velxio/backend/app/services/boot_images
davidmonterocrespo24 1a2c26aab4 fix(pi3): decompressed kernel + explicit earlycon PL011 address
Two more defects making Pi 3 boot silently:

1. The kernel8.img that ships in the Pi OS armhf boot partition is a
   gzip-compressed PE-COFF Image (first 4 bytes 0x1f8b0800). QEMU's
   `-kernel` does NOT auto-decompress; it tries to execute the gzip
   header as ARM code and the CPU faults immediately. Result: zero
   bytes on ttyAMA0, simulator looks dead. Switch the asset_id to a
   pre-decompressed kernel (24 MiB raw vs 9.7 MiB gzipped) so QEMU
   gets a valid Image to boot.

2. Even with a real kernel, the original cmdline `console=ttyAMA0`
   alone wasn't enough — the kernel can't initialise the BCM2837
   PL011 UART early enough for `printk` to reach the serial console
   under QEMU's bare-metal boot (no Pi firmware to set it up
   beforehand). Adding `earlycon=pl011,mmio32,0x3f201000` makes the
   kernel program the UART itself in the early boot path.
   Verified: boot output starts streaming within 100 ms of QEMU
   launch instead of never.

The cmdline also locks the baud rate at 115200 to match the agetty
drop-in created by scripts/configure-pi3-autologin.sh.
2026-05-16 06:46:04 +02:00
..
__init__.py feat(sim): boot_images module + Pi 3 emulation restored 2026-05-16 05:41:46 +02:00
downloader.py feat(sim): boot_images module + Pi 3 emulation restored 2026-05-16 05:41:46 +02:00
errors.py feat(sim): boot_images module + Pi 3 emulation restored 2026-05-16 05:41:46 +02:00
integrity.py feat(sim): boot_images module + Pi 3 emulation restored 2026-05-16 05:41:46 +02:00
manifest.json fix(pi3): decompressed kernel + explicit earlycon PL011 address 2026-05-16 06:46:04 +02:00
manifest.py feat(sim): boot_images module + Pi 3 emulation restored 2026-05-16 05:41:46 +02:00
provider.py fix(pi3): show kernel boot + autologin SD + sidecar cache invalidation 2026-05-16 06:23:22 +02:00