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:
bulldozer-balena[bot] 2020-08-20 10:08:36 +00:00 committed by GitHub
commit 70b1e6240f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 66 deletions

View File

@ -600,13 +600,8 @@ function checkBoolChanged(
// Modifies conf
// exported for tests
export function ensureRequiredOverlay(deviceType: string, conf: ConfigOptions) {
switch (deviceType) {
case 'fincm3':
ensureDtoverlay(conf, 'balena-fin');
break;
case 'raspberrypi4-64':
ensureDtoverlay(conf, 'vc4-fkms-v3d');
break;
if (deviceType === 'fincm3') {
ensureDtoverlay(conf, 'balena-fin');
}
return conf;

View File

@ -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', () => {
// const upboardConfig = new DeviceConfig();
// let upboardConfigBackend: ConfigBackend | null;