Add QEMU testing to CI for all Raspberry Pi configurations#6
Conversation
…ming Co-authored-by: jbltx <1284323+jbltx@users.noreply.github.com>
Co-authored-by: jbltx <1284323+jbltx@users.noreply.github.com>
Co-authored-by: jbltx <1284323+jbltx@users.noreply.github.com>
|
@copilot Please review carefully others references for Pi 0 boot:
This should help reviewing and fixing |
Co-authored-by: jbltx <1284323+jbltx@users.noreply.github.com>
I've reviewed the dwelch67/raspberrypi-zero reference code and simplified the aarch32 boot.S to match that proven implementation (commit b9a1c41). Changes include:
I tested with both PL011 UART0 and Mini UART (as the reference uses). Unfortunately, BCM2835/2836 still produce no UART output in QEMU, while BCM2837 (64-bit) works perfectly with full output. The kernels load and execute (no crashes - they run the full timeout), but UART is silent. Since this also doesn't work on real Pi Zero hardware (as you mentioned), the issue appears to be a fundamental peripheral initialization problem beyond the boot sequence, possibly related to clock initialization, GPIO configuration timing, or memory barriers specific to 32-bit ARM bare metal. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot In GHA use a matrix for each build/test/run. Also you have to edit the integration test to check for |
Co-authored-by: jbltx <1284323+jbltx@users.noreply.github.com>
Done in commit 7801b12. Changes:
|
Co-authored-by: jbltx <1284323+jbltx@users.noreply.github.com>
Implements QEMU testing in CI for BCM2835 (Pi 0/1), BCM2836 (Pi 2), and BCM2837 (Pi 3) to validate builds before deployment to hardware.
Changes
Makefile
arm-none-eabi-gccoraarch64-linux-gnu-gcc(no hardcoded paths)kernel.img(ARMv6),kernel7.img(ARMv7),kernel8.img(ARMv8) per Raspberry Pi bootloader convention-display none -serial stdio)gcc -print-libgcc-file-nameinstead of hardcoded version pathsCI Workflow
kernel-bcm2835-kernel.img,kernel-bcm2836-kernel7.img,kernel-bcm2837-kernel8.img)permissions: {contents: read}on all jobs to limit GITHUB_TOKEN scopegcc-arm-none-eabi,gcc-aarch64-linux-gnu) and QEMUIntegration Tests
kernel.imginstead ofkernel7.imgBoot Sequence (aarch32)
Known Issues
UART on 32-bit ARM: BCM2835/2836 kernels execute but produce no UART output (reproducible on real Pi Zero hardware). BCM2837 (64-bit) outputs correctly. After reviewing reference implementations and testing both PL011 UART0 and Mini UART (AUX), the issue appears to be a deeper peripheral initialization problem beyond the boot sequence, possibly related to clock initialization, GPIO configuration timing, or memory barriers specific to 32-bit ARM bare metal.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.