[Bug]: cloud-init extension renames `/boot/vmlinuz-xxx` to `/boot/Image` causing build failure for Raspberry Pi 5
Description
Checklist
hideActivity
Show:
Details
Details
Assignee
Unassigned
UnassignedReporter

Priority
Created January 11, 2025 at 5:48 PM
Updated January 11, 2025 at 5:48 PM
What happened?
An error occured when I enabled the `cloud-init` extension with the `rpi5b` board. From what i understand cloud-init extension creates FAT boot partition which changes name from `/boot/vmlinuz-6.6.70-current-bcm2711` to `/boot/Image`. This causes the build to fail with the error:
```
[🌱] Populating /boot/firmware directory [ bcm2711 ]
[🔨] cp: cannot stat '/boot/vmlinuz-6.6.70-current-bcm2711': No such file or directory
[💥] Error 1 occurred in main shell [ at /home/taba1uga/build/lib/functions/logging/runners.sh:211
run_host_command_logged_raw() --> lib/functions/logging/runners.sh:211
chroot_sdcard() --> lib/functions/logging/runners.sh:122
post_family_tweaks__populate_boot_firmware_directory() --> config/sources/families/bcm2711.conf:185
post_family_tweaks() --> <extension_magic>:153
call_extension_method() --> lib/functions/general/extensions.sh:57
install_distribution_agnostic() --> lib/functions/rootfs/distro-agnostic.sh:384
do_with_logging() --> lib/functions/logging/section-logging.sh:81
build_rootfs_and_image() --> lib/functions/main/rootfs-image.sh:31
full_build_packages_rootfs_and_image() --> lib/functions/main/default-build.sh:36
do_with_default_build() --> lib/functions/main/default-build.sh:42
cli_standard_build_run() --> lib/functions/cli/cli-build.sh:25
armbian_cli_run_command() --> lib/functions/cli/utils-cli.sh:136
cli_entrypoint() --> lib/functions/cli/entrypoint.sh:176
main() --> compile.sh:50
```
I attempted to reproduce the issue with the `orangepi5` board, but the issue appears to be specific to the Raspberry Pi 5 board (`rpi5b`).
I created a pull request that addresses this issue, and testing on the Raspberry Pi 5 indicates the fix resolves the problem. Here is PR: https://github.com/armbian/build/pull/7692.
How to reproduce?
Run the following build command:
```bash
./compile.sh build BOARD=rpi5b BRANCH=current BUILD_DESKTOP=no BUILD_MINIMAL=yes KERNEL_CONFIGURE=no RELEASE=bookworm KERNEL_GIT=shallow ENABLE_EXTENSIONS="cloud-init"
```
Observe the error during the build process. Specifically, the error occurs when the `/boot/firmware` directory is populated, and the script fails to locate `/boot/vmlinuz-6.6.70-current-bcm2711`.
Branch
main (main development branch)
On which host OS are you running the build script and observing this problem?
Debian 12 Bookworm
Are you building on Windows WSL2?
[ ] Yes, my Ubuntu/Debian/OtherOS is running on WSL2
Relevant log URL
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Raised by: https://github.com/KubaTaba1uga
https://github.com/armbian/build/issues/7693