[PATCH v2 0/5] ppc/amigaone patches

BALATON Zoltan posted 5 patches 1 month ago
hw/ppc/amigaone.c | 284 +++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 271 insertions(+), 13 deletions(-)
[PATCH v2 0/5] ppc/amigaone patches
Posted by BALATON Zoltan 1 month ago
Hello,

v2:
- change unused read function to g_assert_not_reached()
- new patch to add defines to constants
- added R-b tags

This series adds NVRAM and support for -kernel, -initrd and -append
options to the amigaone machine. This makes it easier to boot AmigaOS
and avoids a crash in the guest when it tries to access NVRAM.

While the -kernel option emulates what U-Boot passes to the kernel,
old Linux kernels for amigaone may not work with it because of two
reasons: these come in legacy U-Boot Multi-File image format that QEMU
cannot read and even after unpacking that and creating a kernel uimage
it won't find PCI devices because it does not initialise them
correctly. This works when booted from U-Boot because U-Boot inits PCI
devices. So does my BBoot loader which can be used to load AmigaOS so
I don't intend to emulate that part of U-Boot.

I'd like this to be merged for the next release please. When merging
please update https://wiki.qemu.org/ChangeLog/10.0 with the following:

amigaone

Added support for NVRAM and -kernel, -initrd, -append command line
options. By default the NVRAM contents are not preserved between
sessions. To make it persistent create a backing file with 'qemu-image
create -f raw nvram.bin 4k' and add -drive
if=mtd,format=raw,file=nvram.bin to keep NVRAM contents in the backing
file so settings stored in it will be preserved between sessions.

To run AmigaOS with BBoot using the -kernel option at least BBoot
version 0.8 is needed. Older BBoot versions only work with -device
loader and cannot be used with -kernel on amigaone.

Regards,

BALATON Zoltan (5):
  ppc/amigaone: Simplify replacement dummy_fw
  ppc/amigaone: Implement NVRAM emulation
  ppc/amigaone: Add default environment
  ppc/amigaone: Add kernel and initrd support
  ppc/amigaone: Add #defines for memory map constants

 hw/ppc/amigaone.c | 284 +++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 271 insertions(+), 13 deletions(-)

-- 
2.30.9
Re: [PATCH v2 0/5] ppc/amigaone patches
Posted by BALATON Zoltan 3 weeks, 4 days ago
On Thu, 27 Feb 2025, BALATON Zoltan wrote:
> Hello,
>
> v2:
> - change unused read function to g_assert_not_reached()
> - new patch to add defines to constants
> - added R-b tags

Ping? Will there be a pull request for soft freeze with this series 
included or do I need to do anything with this?

Regards,
BALATON Zoltan

> This series adds NVRAM and support for -kernel, -initrd and -append
> options to the amigaone machine. This makes it easier to boot AmigaOS
> and avoids a crash in the guest when it tries to access NVRAM.
>
> While the -kernel option emulates what U-Boot passes to the kernel,
> old Linux kernels for amigaone may not work with it because of two
> reasons: these come in legacy U-Boot Multi-File image format that QEMU
> cannot read and even after unpacking that and creating a kernel uimage
> it won't find PCI devices because it does not initialise them
> correctly. This works when booted from U-Boot because U-Boot inits PCI
> devices. So does my BBoot loader which can be used to load AmigaOS so
> I don't intend to emulate that part of U-Boot.
>
> I'd like this to be merged for the next release please. When merging
> please update https://wiki.qemu.org/ChangeLog/10.0 with the following:
>
> amigaone
>
> Added support for NVRAM and -kernel, -initrd, -append command line
> options. By default the NVRAM contents are not preserved between
> sessions. To make it persistent create a backing file with 'qemu-image
> create -f raw nvram.bin 4k' and add -drive
> if=mtd,format=raw,file=nvram.bin to keep NVRAM contents in the backing
> file so settings stored in it will be preserved between sessions.
>
> To run AmigaOS with BBoot using the -kernel option at least BBoot
> version 0.8 is needed. Older BBoot versions only work with -device
> loader and cannot be used with -kernel on amigaone.
>
> Regards,
>
> BALATON Zoltan (5):
>  ppc/amigaone: Simplify replacement dummy_fw
>  ppc/amigaone: Implement NVRAM emulation
>  ppc/amigaone: Add default environment
>  ppc/amigaone: Add kernel and initrd support
>  ppc/amigaone: Add #defines for memory map constants
>
> hw/ppc/amigaone.c | 284 +++++++++++++++++++++++++++++++++++++++++++---
> 1 file changed, 271 insertions(+), 13 deletions(-)
>
>
Re: [PATCH v2 0/5] ppc/amigaone patches
Posted by Nicholas Piggin 3 weeks, 1 day ago
On Fri Feb 28, 2025 at 2:39 AM AEST, BALATON Zoltan wrote:
> Hello,
>
> v2:
> - change unused read function to g_assert_not_reached()
> - new patch to add defines to constants
> - added R-b tags
>
> This series adds NVRAM and support for -kernel, -initrd and -append
> options to the amigaone machine. This makes it easier to boot AmigaOS
> and avoids a crash in the guest when it tries to access NVRAM.
>
> While the -kernel option emulates what U-Boot passes to the kernel,
> old Linux kernels for amigaone may not work with it because of two
> reasons: these come in legacy U-Boot Multi-File image format that QEMU
> cannot read and even after unpacking that and creating a kernel uimage
> it won't find PCI devices because it does not initialise them
> correctly. This works when booted from U-Boot because U-Boot inits PCI
> devices. So does my BBoot loader which can be used to load AmigaOS so
> I don't intend to emulate that part of U-Boot.
>
> I'd like this to be merged for the next release please. When merging
> please update https://wiki.qemu.org/ChangeLog/10.0 with the following:
>
> amigaone
>
> Added support for NVRAM and -kernel, -initrd, -append command line
> options. By default the NVRAM contents are not preserved between
> sessions. To make it persistent create a backing file with 'qemu-image
> create -f raw nvram.bin 4k' and add -drive
> if=mtd,format=raw,file=nvram.bin to keep NVRAM contents in the backing
> file so settings stored in it will be preserved between sessions.
>
> To run AmigaOS with BBoot using the -kernel option at least BBoot
> version 0.8 is needed. Older BBoot versions only work with -device
> loader and cannot be used with -kernel on amigaone.

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>

>
> Regards,
>
> BALATON Zoltan (5):
>   ppc/amigaone: Simplify replacement dummy_fw
>   ppc/amigaone: Implement NVRAM emulation
>   ppc/amigaone: Add default environment
>   ppc/amigaone: Add kernel and initrd support
>   ppc/amigaone: Add #defines for memory map constants
>
>  hw/ppc/amigaone.c | 284 +++++++++++++++++++++++++++++++++++++++++++---
>  1 file changed, 271 insertions(+), 13 deletions(-)