Fix the builddeb script so linux-image upgrades work correctly #4508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix the builddeb script so linux-image upgrades work correctly
on fat /boot partitions.
Currently the postinst file that is created has the following contents:
...
ln -sf vmlinuz-6.0.10-meson64 /boot/Image 2> /dev/null || mv /boot/vmlinuz-6.0.10-meson64 /boot/Image
touch /boot/.next
mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n "Linux" -d /boot/vmlinuz-6.0.10-meson64 /boot/uImage > /dev/null 2>&1
exit 0
...
In the first line on a fat filesystem the mv command leaves the system without a file named 'vmlinuz...'. The following mkimage command is looking for the vmlinuz... file that is no longer there and fails.
This fix changes the 'mv' to a 'cp' so that the files in the directory are the same regardless of the type of partition (i.e. the softlink in the ext4 case leaves both objects and the fat case now leaves both objects as well, at the cost of disk space)
With this fix the amlogic tv box builds can now upgrade to the latest community build kernels without errors.
Changes to be committed:
modified: packages/armbian/builddeb
Description
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.
Checklist: