Skip to content

Runqemu for raspi1ap and raspi0, and various clean-ups - #1594

Open
jonmason wants to merge 7 commits into
agherzan:masterfrom
jonmason:runqemu
Open

Runqemu for raspi1ap and raspi0, and various clean-ups#1594
jonmason wants to merge 7 commits into
agherzan:masterfrom
jonmason:runqemu

Conversation

@jonmason

Copy link
Copy Markdown
Contributor

Add the relevant entries to conf/machine/raspberrypi0.conf and conf/machine/raspberrypi.conf to get runqemu fully running. Workaround were needed for USB issues and PM. Attempts were made to get raspberrypi3-64 and raspberrypi4-64, but they do not fully boot to prompt. Patches were left in so that the work can be used by a future developer.

Broken parselogs stuff was removed.

Finally, kas code was cleaned up and broken into multiple machine specific files. This allows for a user to simply specify the machine (and not hand edit a file to specify which machine and features). In doing all of this, it is now possible to run CI on this setup with a simple:
kas build kas/raspberrypi.yml:kas/testimage.yml

Comment thread conf/layer.conf

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small note: this file change will clash with PR #1593 - which I think also has a good chance to be accepted (similar to this). It looks like a fly-by improvement in both PRs, though this one seems to be a bit more complete (due to the change in rpi-default-settings.inc also) - ping @JianpengChang

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think relevant part of PR 1593 is incomplete, as the parselogs_rpi.py is not removed. That file is no longer relevant, as OE Core changes 2+ years ago, and parselogs now uses txt files to indicate ignores.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't notice the oe-core commit. My changes do have defects — please ignore the related parts.

jonmason added 7 commits July 6, 2026 13:53
Since OE Core commit bba243e1d18b954578afcdb3c727d8f687187ee8
(4 December 2023) changed how parselogs ignores works, this code has
been broken.  Since it wasn't actually doing any extra checking, there
is no need to add back anything to replace it.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Add support for USB networking and change to USB storage for the boot
device.  This requires adding in a workaround of
"dwc_otg.fiq_fsm_enable=0" to prevent a hang during boot.  Booting from
a USB devices prevents and issues with "power of 2" for emulated SD
cards and seems to be more reliable.  Also, add in the early console
help with future debugging.

Also, adding in init-ifupdown file to automatically get an IP address on
the USB network interface.  This is the same file currently in OE Core,
only with the USB interface being automatically brought up and given a
dynamic address.  This will help when testimage support is added.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Add the relevant QB_ variables sufficient to get the QEMU raspi0 model
running with runqemu.  The dwc_otg.fiq_fsm_enable setting is necessary
to get USB devices (both disk and net) working.  Without this, boot
hangs.  The initcall_blacklist=bcm2835_pm_driver_init is needed to
workaround other boot issues.  Seems like the PM HW emulation isn't
present in the QEMU model.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Add the relevant QB_ variables sufficient to get the QEMU raspi1ap model
running with runqemu.  The dwc_otg.fiq_fsm_enable setting is necessary
to get USB devices (both disk and net) working.  Without this, boot
hangs.  The initcall_blacklist=bcm2835_pm_driver_init is needed to
workaround other boot issues.  Seems like the PM HW emulation isn't
present in the QEMU model.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Add the relevant QB_ variables sufficient to get the QEMU raspi1ap model
running with runqemu.

Unfortunately, it doesn't fully boot to shell, and seems to hang around
bluetooth and video inits.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Add the relevant QB_ variables sufficient to get the QEMU raspi1ap model
running with runqemu.

Unfortunately, it doesn't fully boot to shell, and seems to hang trying
to find boot media (for both SD and USB boot devices).

Signed-off-by: Jon Mason <jon.mason@arm.com>
Refactor the existing kas configuration by splitting it into a shared
base.yml and a set of per-machine include files. This allows for easier
usage and potential CI use cases.

Also, change the readme to reflect the new changes.

Signed-off-by: Jon Mason <jon.mason@arm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants