rpi: copy DTBs to Debian/Ubuntu standard location /lib/firmware/$version/device-tree; remove build-time-only hacks (#3462)

- this allows us to remove the most horrible hack
- should allow for correctly working DTB upgrades
- should NOT impact other families
This commit is contained in:
Ricardo Pardini
2022-02-07 11:36:22 +01:00
committed by GitHub
parent 4034a8f535
commit 2f2d10c04a

View File

@@ -74,12 +74,13 @@ create_package() {
exit 0
EOT
# for Ubuntu/Debian compatiblity, symlink in /lib/firmware/$version/device-tree
# for Ubuntu/Debian compatiblity, copy DTBs to /lib/firmware/$version/device-tree
cat >> $pdir/DEBIAN/postinst <<- EOT
cd /boot
ln -sfT dtb-$version dtb 2> /dev/null || mv dtb-$version dtb
mkdir -p /lib/firmware/$version
[ ! -L /lib/firmware/$version/device-tree ] && ln -s /boot/dtb-$version /lib/firmware/$version/device-tree
rm -rf /lib/firmware/$version/device-tree
cp -rp /boot/dtb-$version /lib/firmware/$version/device-tree
exit 0
EOT