mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-25 00:11:06 +00:00
Merge pull request #1441 from balena-io/1404-no-vc4-fkms-v3d
Don't enforce the vc4-fkms-v3d dtoverlay on rpi4
This commit is contained in:
commit
70b1e6240f
@ -600,13 +600,8 @@ function checkBoolChanged(
|
|||||||
// Modifies conf
|
// Modifies conf
|
||||||
// exported for tests
|
// exported for tests
|
||||||
export function ensureRequiredOverlay(deviceType: string, conf: ConfigOptions) {
|
export function ensureRequiredOverlay(deviceType: string, conf: ConfigOptions) {
|
||||||
switch (deviceType) {
|
if (deviceType === 'fincm3') {
|
||||||
case 'fincm3':
|
ensureDtoverlay(conf, 'balena-fin');
|
||||||
ensureDtoverlay(conf, 'balena-fin');
|
|
||||||
break;
|
|
||||||
case 'raspberrypi4-64':
|
|
||||||
ensureDtoverlay(conf, 'vc4-fkms-v3d');
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return conf;
|
return conf;
|
||||||
|
@ -307,65 +307,6 @@ describe('Device Backend Config', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Raspberry pi4', () => {
|
|
||||||
it('should always add the vc4-fkms-v3d dtoverlay', () => {
|
|
||||||
expect(
|
|
||||||
deviceConfig.ensureRequiredOverlay('raspberrypi4-64', {}),
|
|
||||||
).to.deep.equal({
|
|
||||||
dtoverlay: ['vc4-fkms-v3d'],
|
|
||||||
});
|
|
||||||
expect(
|
|
||||||
deviceConfig.ensureRequiredOverlay('raspberrypi4-64', {
|
|
||||||
test: '123',
|
|
||||||
test2: ['123'],
|
|
||||||
test3: ['123', '234'],
|
|
||||||
}),
|
|
||||||
).to.deep.equal({
|
|
||||||
test: '123',
|
|
||||||
test2: ['123'],
|
|
||||||
test3: ['123', '234'],
|
|
||||||
dtoverlay: ['vc4-fkms-v3d'],
|
|
||||||
});
|
|
||||||
expect(
|
|
||||||
deviceConfig.ensureRequiredOverlay('raspberrypi4-64', {
|
|
||||||
dtoverlay: 'test',
|
|
||||||
}),
|
|
||||||
).to.deep.equal({ dtoverlay: ['test', 'vc4-fkms-v3d'] });
|
|
||||||
expect(
|
|
||||||
deviceConfig.ensureRequiredOverlay('raspberrypi4-64', {
|
|
||||||
dtoverlay: ['test'],
|
|
||||||
}),
|
|
||||||
).to.deep.equal({ dtoverlay: ['test', 'vc4-fkms-v3d'] });
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should not cause a config change when the cloud does not specify the pi4 overlay', () => {
|
|
||||||
expect(
|
|
||||||
deviceConfig.bootConfigChangeRequired(
|
|
||||||
configTxtBackend,
|
|
||||||
{ HOST_CONFIG_dtoverlay: '"test","vc4-fkms-v3d"' },
|
|
||||||
{ HOST_CONFIG_dtoverlay: '"test"' },
|
|
||||||
'raspberrypi4-64',
|
|
||||||
),
|
|
||||||
).to.equal(false);
|
|
||||||
expect(
|
|
||||||
deviceConfig.bootConfigChangeRequired(
|
|
||||||
configTxtBackend,
|
|
||||||
{ HOST_CONFIG_dtoverlay: '"test","vc4-fkms-v3d"' },
|
|
||||||
{ HOST_CONFIG_dtoverlay: 'test' },
|
|
||||||
'raspberrypi4-64',
|
|
||||||
),
|
|
||||||
).to.equal(false);
|
|
||||||
expect(
|
|
||||||
deviceConfig.bootConfigChangeRequired(
|
|
||||||
configTxtBackend,
|
|
||||||
{ HOST_CONFIG_dtoverlay: '"test","test2","vc4-fkms-v3d"' },
|
|
||||||
{ HOST_CONFIG_dtoverlay: '"test","test2"' },
|
|
||||||
'raspberrypi4-64',
|
|
||||||
),
|
|
||||||
).to.equal(false);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
// describe('ConfigFS', () => {
|
// describe('ConfigFS', () => {
|
||||||
// const upboardConfig = new DeviceConfig();
|
// const upboardConfig = new DeviceConfig();
|
||||||
// let upboardConfigBackend: ConfigBackend | null;
|
// let upboardConfigBackend: ConfigBackend | null;
|
||||||
|
Loading…
Reference in New Issue
Block a user