Adelie on QEMU PPC
by BALATON Zoltan
Hello,
I'm not subscribed here (hope this still gets through), please cc me on
any reply. I'm also not sure this is the right place to send this but I
guess you may be more interested than the general QEMU crowd and could
help more with debugging the Adelie Linux side so I'm sending it here.
I'm trying to run adelie-live-ppc-1.0-beta2-20181218.iso on QEMU (mainly
to have something that's known to work on real hardware to test with).
Actually I eventually could boot it and it seems to work but I've found
some strange problems during this that I'm not sure if bug in QEMU or
guest code and how to debug it. Hope you have some idea. Here are the
details. I'm using this command with QEMU from git master as of today:
qemu-system-ppc -M mac99,via=pmu -m 1024 -boot d \
-cdrom adelie-live-ppc-1.0-beta2-20181218.iso \
-d unimp,guest_errors -serial stdio
on an x86_64 host. (This approximately emulates a PowerMac3,1 but not
exactly. I've also enabled some debug to get more details on what's
happening: #define DEBUG_EXCEPTIONS in target/ppc/excp_helper.c)
I get the grub boot menu after some errors in OF console (not sure what
are these and if could be related to the problem) then pressing enter
starts to load kernel but ends in an unexpected exception around loading
initrd that jumps off to a non-existent handler so I think this should not
happen. This is what I could find out about this:
DSI exception: DSISR=42000000 DAR=02e8d000
DSI exception: DSISR=42000000 DAR=02e8e000
^ These are last lines of loading /bzImage I think
ISI exception: msr=00003030, nip=0480afc0
ISI exception: msr=00003030, nip=0480c294
DSI exception: DSISR=40000000 DAR=04861650
^ Some grub code running?
DSI exception: DSISR=40000000 DAR=3fc5b1f4
DSI exception: DSISR=42000000 DAR=3fcc05fc
DSI exception: DSISR=40000000 DAR=3fcbed2c
DSI exception: DSISR=40000000 DAR=3fcbc974
DSI exception: DSISR=40000000 DAR=3fcba84c
DSI exception: DSISR=40000000 DAR=3fcb8f94
DSI exception: DSISR=40000000 DAR=3fcb7c78
DSI exception: DSISR=40000000 DAR=3fcb6be4
DSI exception: DSISR=40000000 DAR=3fcb5b64
DSI exception: DSISR=40000000 DAR=3fcb3a50
DSI exception: DSISR=40000000 DAR=3fcb2ffc
DSI exception: DSISR=40000000 DAR=3fca8890
DSI exception: DSISR=40000000 DAR=3fc9bffc
DSI exception: DSISR=40000000 DAR=3fcacc1c
DSI exception: DSISR=40000000 DAR=3fc5dfe0
^ Not sure what are these
ISI exception: msr=00003030, nip=048a903c
ISI exception: msr=00003030, nip=048b8fe4
ISI exception: msr=00003030, nip=048ada7c
^ More grub code
DSI exception: DSISR=42000000 DAR=00002000
ISI exception: msr=00003030, nip=048abfa4
invalid/unsupported opcode: 00 - 00 - 00 - 00 (00000000) 00002428 0
Invalid instruction at 00002428
and ends with the exception that should not happen and hangs here. The
interesting part is that this seems to depend on what's in the memory or
layout or positions so it may be a problem in guest code (like using an
unitialised pointer which may work if it luckily points to some data that
does not cause big harm but fails otherwise) or could also be problem in
QEMU or OpenBIOS if it does not provide something that grub expects and
this causes problem (or anything else really as I'm only guessing here).
What I've found is that when I press 'c' at the boot menu to get to grub>
prompt and then manually do:
linux /bzImage
initrd /initrd
then I get exception slightly differently, such as:
DSI exception: DSISR=42000000 DAR=02e8d000
DSI exception: DSISR=42000000 DAR=02e8e000
DSI exception: DSISR=40000000 DAR=3fde7cdc
DSI exception: DSISR=40000000 DAR=04861650
DSI exception: DSISR=42000000 DAR=3fcbaaec
DSI exception: DSISR=40000000 DAR=3fcbb2f8
DSI exception: DSISR=40000000 DAR=3fcb3a50
DSI exception: DSISR=40000000 DAR=3fcad7f8
DSI exception: DSISR=40000000 DAR=3fcae01c
DSI exception: DSISR=40000000 DAR=3fcacc1c
ISI exception: msr=00003030, nip=048a903c
ISI exception: msr=00003030, nip=048b8fe4
DSI exception: DSISR=40000000 DAR=048b0b28
ISI exception: msr=00003030, nip=048a78d8
ISI exception: msr=00003030, nip=048971e4
ISI exception: msr=00003030, nip=048981b8
DSI exception: DSISR=40000000 DAR=048afc90
ISI exception: msr=00003030, nip=048a1750
DSI exception: DSISR=40000000 DAR=8115d380
ISI exception: msr=00003030, nip=0489fc74
DSI exception: DSISR=40000000 DAR=04830520
ISI exception: msr=00003030, nip=04837e88
DSI exception: DSISR=40000000 DAR=81165080
ISI exception: msr=00003030, nip=048ada7c
DSI exception: DSISR=42000000 DAR=00002000
DSI exception: DSISR=42000000 DAR=00003000
invalid/unsupported opcode: 00 - 00 - 00 - 00 (00000000) 0000238c 0
Invalid instruction at 0000238c
So there seems to be something non-deterministic in this. I guess my first
question would be what does grub do here at nip=048ada7c? Is there a way
to guess this from the above (it's somewhere around loading initrd) or can
you make an iso with unstripped grub and if that reproduces the problem
then maybe we can get something from grub source? Where are the sources of
grub that's on the iso?
Then I've tried with my pathched OpenBIOS from here (at Known problems 1.):
http://zero.eik.bme.hu/~balaton/qemu/amiga/#morphos
which fixes a device tree problem I know about. Add
'-bios openbios-qemu.elf' to qemu command above to use it.
With that it does not get the above problem and starts to boot but seems
to get a panic (based on where it hangs) but I could not make it print
this on serial or anywhere to get more info. Do you know what options
could make the kernel log to serial during boot? I've tried earlyprintk
console=ttyPZ0 console=ttyS0 and similar but could not get output with any
of these.
But during experimenting with this sometimes I managed to boot it. Finally
I've found that if I do exactly this:
1. Use -bios openbios-qemu.elf
2. press c at boot menu to get grub> prompt
3. Type these (issue 'set' 2 times!)
grub> ls
grub> set
grub> set
grub> linux /bzImage
grub> initrd /initrd
grub> boot
then it boots. Strange! So I wonder if you have an idea how this could be
debugged and identify if it's a QEMU, OpenBIOS or guest code problem. I
think most likely could be something is missing from OpenBIOS which then
leads to using uninitialised data but without getting some debug output
from the kernel panic at least or finding out where the crash in grub is
happening I have no idea how to find what could cause this.
Thank you,
BALATON Zoltan
1 year, 10 months
[adelie-devel]Adélie Linux 1.0-BETA3 Released
by A. Wilcox
TULSA, OKLAHOMA (31 May 2019) — The Adélie Linux Release Engineering
Team is pleased to announce the immediate release of Adélie Linux
1.0-BETA3 for all supported platforms:
https://distfiles.adelielinux.org/adelie/1.0-beta3/iso/
Please note: This is a test release of Adélie Linux. While every care
has been taken to ensure the stability of the system, features and
packages may be missing or may not function correctly. You should always
back up your computer’s data before you install a new Linux distribution.
Tier 1 platforms supported for this release: 32-bit PowerPC, 64-bit
PowerPC, 32-bit Intel x86, 64-bit Intel x86, 64-bit ARM (AArch64).
Tier 2 platforms supported for this release: ARMv7.
Release Notes
=============
All architectures
-----------------
* GCC has been updated to 8.3.0, and the entire distribution has been
rebuilt using it.
* gcompat has been updated to support more glibc software. libucontext
has been updated to support all Tier 1 architectures.
* The Go programming language is now available via gcc-go.
* Ghostscript is now available, which allows most printers to function
using CUPS and Gutenprint.
* Java is now available.
* LLVM and Clang have been updated to 8.0.0. Additionally, our LLVM
package now supports the SPARC and WebAssembly targets.
* The MATE desktop environment is now available.
* MTP (Media Transfer Protocol) support, used by many digital cameras,
has been added.
* NetworkManager and ModemManager are now available, and have been
tested and are known to work.
* Qt 5 Speech is now packaged, allowing some applications to deliver
text-to-speech functionality.
* XScreenSaver is now available.
* Development: Sphinx and Subversion are now available.
* Fonts: Nearly 50 new fonts have been added.
* KDE: Applications has been updated to 19.04.1, Frameworks have been
updated to 5.54.0.
* Networking: iw, netqmail, Netsurf, NFS, NMap, Postfix, RDesktop, and
WireGuard are now available.
* Productivity: AbiWord, Evince, Gnumeric, and LibreOffice are now
available.
* …and over a thousand other enhancements, upgrades, and fixes!
ARMv7
-----
Support for ARMv7 is offered on a limited testing basis only, and ARMv7
remains a Tier 2 architecture. The system/ repository is available for
ARMv7 in Adélie Linux 1.0-BETA3. The user/ repository is not available.
64-bit ARM (AArch64)
--------------------
Full support for the Raspberry Pi 3 has been added to easy-kernel.
PowerPC (32-bit)
----------------
An issue with USB booting on 32-bit PowerPC has been fixed.
PowerPC (64-bit)
----------------
Many issues involving booting our live and full-install media have been
fixed on 64-bit PowerPC. Our 1.0-BETA3 media has been tested on Power
Mac G5, IBM POWER6, Raptor Talos II, QEMU KVM, and Raptor Blackbird.
Intel x86 (all)
---------------
Media support for EFI has been fixed.
Statistics
==========
Adélie Packages
---------------
There were 1683 commits to packages.git between 1.0-BETA2 and 1.0-BETA3,
by twelve developers:
933 A. Wilcox
547 Kiyoshi Aman
75 zlg
53 Luis Ressel
35 Max Rees
15 Laurent Bercot
12 Dan Theisen
6 multiplexd
2 Bobby Bingham
2 Gavin Howard
2 Samuel Holland
1 Brandon Bergren
Team
----
We welcomed Luis Ressel (aranea@) and sysvinit@ as a committer during
this release cycle.
--
A. Wilcox (awilfox)
Project Lead, Adélie Linux
https://www.adelielinux.org
1 year, 11 months
s6-rc, netifrc, etc
by Phil Hofer
Hi all,
I was looking at porting the init scripts for
some common daemons that I run (openssh, etc.)
to s6, and I immediately ran into the obvious
issue that many of these services have non-trivial
ordering dependencies ('net' and 'dns' targets, etc.)
The simplest transitional configuration would be
to have OpenRC still manage service/networking
dependencies as it does today, and just replace
the 'start-stop-daemon' invocations in the scripts
with the appropriate s6 equivalent. But ultimately
I'm interested in seeing if I can get everything on
my system running under s6-rc. (I don't know yet how
interesting this is to upstream Adelie, but I'm happy
to contribute whatever is interesting.)
Consequently, I'm looking at writing some tooling
to generate s6-rc service definition directories
and bundles for the 'net' prerequisite. In practice
I think this looks like a tool to read the system
networking configuration from a file and generating
execline scripts that do the appropriate iproute2 voodoo,
launch a supervised dhcpcd, etc.
(I haven't thought too seriously about wireless/hotplug
yet, since I'd likely have to open the udev can of worms.)
Ultimately this would serve the same purpose as netifrc
or NetworkManager, albeit with somewhat narrower scope.
One obvious upside here is that s6 supports (a subset of)
socket activation, so this would open the door to cool
stuff like services that can wait for dhcp/slaac address
assignment, route configuration, etc.
If anyone is aware of a similar effort already in
progress, let me know.
I'll probably start looking at this seriously towards
the end of next week, but I'm interested to gather some
initial feedback on the concept before I head down that path.
Regards,
Phil
1 year, 11 months