Re: difference between 9.4, 10.1-branch on qemu
Andrew Randrianasulu <[email protected]> Sun, 30 Mar 2025 19:08:31 +0300
| Newsgroups | gmane.os.netbsd.ports.macppc |
|---|---|
| Message-ID | <CA+rFky7SCogH1UKk_q11y6KpYdkP4F+5n8CTQ+zC-Um-Tg7EyQ@mail.gmail.com> |
On Sun, Mar 30, 2025 at 5:25=E2=80=AFAM Andrew Randrianasulu <[email protected]> wrote: > > > > =D0=B2=D1=81, 30 =D0=BC=D0=B0=D1=80. 2025 =D0=B3., 03:58 Andrew Randriana= sulu <[email protected]>: >> >> >> >> =D1=81=D0=B1, 29 =D0=BC=D0=B0=D1=80. 2025 =D0=B3., 21:48 Andrew Randrian= asulu <[email protected]>: >>> >>> >>> >>> =D1=81=D0=B1, 29 =D0=BC=D0=B0=D1=80. 2025 =D0=B3., 18:46 Andrew Randria= nasulu <[email protected]>: >>>> >>>> >>>> >>>> =D1=81=D0=B1, 29 =D0=BC=D0=B0=D1=80. 2025 =D0=B3., 05:04 Andrew Randri= anasulu <[email protected]>: >>>>> >>>>> I was trying to pinpoint if any older Netbsd/macppc was working with = mem > 259 mb on qemu. >>>>> >>>>> It seems that anything up to 9.2 worked, then I see strange behaviour= in 9.3/9.4 where only really big memory sizes (like 1, 1.5Gb ) works for i= nstall iso, and then both official 10.1 and selfcompiled 10.1 branch just h= ang with >1gb mem and panics with less (tried few numbers down to 259 mb wh= ere it started to work again) >>>>> >>>>> 10.1 branch hang >>>>> >>>>> netbsd10$ ~/src/qemu/build/qemu-system-ppc -cdrom ~/obj/releasedir/im= ages/NetBSD-10.1_STABLE-macppc.iso -nographic -boot d -L /usr/pkg/share= /qemu/ -prom-env 'boot-device=3Dcd:,ofwboot.xcf /netbsd.macppc -c -d ' -m = 2047 >>>>> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = >> OpenBIOS 1.1 [Mar 7 2023 22:21] >>>>> >> Configuration device id QEMU version 1 machine id 2 >>>>> >> CPUs: 1 >>>>> >> Memory: 2047M >>>>> >> UUID: 00000000-0000-0000-0000-000000000000 >>>>> >> CPU type PowerPC,750 >>>>> milliseconds isn't unique. >>>>> Welcome to OpenBIOS v1.1 built on Mar 7 2023 22:21 >>>>> Trying cd:,ofwboot.xcf... >>>>> >> switching to new context: >>>>> >> NetBSD/macppc OpenFirmware Boot, Revision 1.15 (Fri Mar 28 21:27= :52 UTC 2025) >> Open Firmware version 3.x >>>>> >> Open Firmware running in virtual-mode. >>>>> 6752780+120084=3D0x68e324 >>>>> start=3D0x100000 >>>>> [ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 200= 2, 2003, >>>>> [ 1.0000000] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2= 012, 2013, >>>>> [ 1.0000000] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2= 022, 2023, >>>>> [ 1.0000000] 2024, 2025 >>>>> [ 1.0000000] The NetBSD Foundation, Inc. All rights reserved. >>>>> [ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993 >>>>> [ 1.0000000] The Regents of the University of California. A= ll rights reserved. >>>>> [ 1.0000000] NetBSD 10.1_STABLE (INSTALL) #0: Sat Mar 29 01:00:37 = MSK 2025 >>>>> [ 1.0000000] guest@netbsd10:/home/guest/obj/sys/arch/macppc/compil= e/INSTALL >>>>> [ 1.0000000] total memory =3D 2047 MB >>>>> [ 1.0000000] oea_startup: failed to allocate DEAD ZONE: error=3D12 >>>>> [ 1.0000000] avail memory =3D 1972 MB >>>>> >>>>> >>>>> it hangs here ..... >>>>> >>>>> >>>>> 9.4 with 1 gb: >>>>> >>>>> netbsd10$ ~/src/qemu/build/qemu-system-ppc -cdrom NetBSD-9.4-macppc.i= so -nographic -boot d -L /usr/pkg/share/qemu/ -prom-env 'boot-device=3Dc= d:,ofwboot.xcf /netbsd.macppc -c -d ' -m 1G >>>>> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>>> >> OpenBIOS 1.1 [Mar 7 2023 22:21] >>>>> >> Configuration device id QEMU version 1 machine id 2 >>>>> >> CPUs: 1 >>>>> >> Memory: 1024M >>>>> >> UUID: 00000000-0000-0000-0000-000000000000 >>>>> >> CPU type PowerPC,750 >>>>> milliseconds isn't unique. >>>>> Welcome to OpenBIOS v1.1 built on Mar 7 2023 22:21 >>>>> Trying cd:,ofwboot.xcf... >>>>> >> switching to new context: >>>>> >> NetBSD/macppc OpenFirmware Boot, Revision 1.13 (Sat Apr 20 13:32:2= 2 UTC 2024) >>>>> open /netbsd: No such file or directory >>>>> open /netbsd.gz: No such file or directory >>>>> 6587420+126944=3D0x6677c0 >>>>> start=3D0x100000 = [ 1.0000000] mem region 0 start=3D0 size= =3D40000000 >>>>> [ 1.0000000] avail region 0 start=3D0x4000 size=3D0x3ffc000 >>>>> [ 1.0000000] avail region 1 start=3D0x4800000 size=3D0x3b458000 >>>>> [ 1.0000000] avail region 2 start=3D0x3fe10000 size=3D0xda000 >>>>> [ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 20= 02, 2003, >>>>> [ 1.0000000] 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 20= 12, 2013, >>>>> [ 1.0000000] 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2= 022, 2023, >>>>> [ 1.0000000] 2024 >>>>> [ 1.0000000] The NetBSD Foundation, Inc. All rights reserved. >>>>> [ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993 >>>>> [ 1.0000000] The Regents of the University of California. All= rights reserved. >>>>> [ 1.0000000] NetBSD 9.4 (INSTALL) #0: Sat Apr 20 13:32:22 UTC 2024 >>>>> [ 1.0000000] [email protected]:/usr/src/sys/arch/macp= pc/compile/INSTALL >>>>> [ 1.0000000] total memory =3D 1024 MB >>>>> [ 1.0000000] oea_startup: failed to allocate DEAD ZONE: error=3D= 12 >>>>> [ 1.0000000] avail memory =3D 980 MB >>>>> [ 1.0000000] found heathrow PIC at 81080000 >>>>> >> out of malloc memory (c)! >>>>> >> out of malloc memory (c)! >>>>> >> out of malloc memory (c)! >>>>> >> out of malloc memory (c)! >>>>> [ 1.0000000] bootpath: /pci@80000000/mac-io@10/ata-3@21000/cdrom@= 0:0/netbsd.macppc >>>>> [ 1.0000000] mainbus0 (root) >>>>> [ 1.0000000] cpu0 at mainbus0: 750 (Revision 3.1), ID 0 (primary) >>>>> [ 1.0000000] cpu0: HID0 0x805000a4<EMCP,NAP,DPM,SGE,BTIC,BHT>, po= wersave: 1 >>>>> [ 1.0000000] cpu0: 0.00 MHz L2 cache present but not enabled >>>>> [ 1.0000000] grackle0 at mainbus0 >>>>> [ 1.0000000] pci0 at grackle0 bus 0 >>>>> [ 1.0000000] pchb0 at pci0 dev 0 function 0 >>>>> [ 1.0000000] pchb0: vendor 1057 product 0002 (rev. 0x00) >>>>> [ 1.0000000] pchb0: L2 cache: 256K, uniprocessor/none mode >>>>> [ 1.0000000] genfb0 at pci0 dev 1 function 0: vendor 1234 product = 1111 (rev. 0x02) >>>>> >>>>> >>>>> >>>>> so in short it boots. >>>>> >>>>> 9.2 boots without malloc errors: >>>>> >>>>> netbsd10$ ~/src/qemu/build/qemu-system-ppc -cdrom NetBSD-9.2-macppc.i= so -nographic -boot d -L /usr/pkg/share/qemu/ -prom-env 'boot-device=3Dc= d:,ofwboot.xcf /netbsd.macppc -c -d ' -m 1G = = >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D = >> OpenBIOS 1.1 [Mar 7 2023 22:21] = >> Configuration device id QEMU version 1 machine= id 2 >>>>> >> CPUs: 1 >>>>> >> Memory: 1024M >>>>> >> UUID: 00000000-0000-0000-0000-000000000000 >>>>> >> CPU type PowerPC,750 >>>>> milliseconds isn't unique. >>>>> Welcome to OpenBIOS v1.1 built on Mar 7 2023 22:21 >>>>> Trying cd:,ofwboot.xcf... >>>>> >> switching to new context: >>>>> >> NetBSD/macppc OpenFirmware Boot, Revision 1.13 (Wed May 12 13:15:= 55 UTC 2021) >>>>> open /netbsd: No such file or directory >>>>> open /netbsd.gz: No such file or directory >>>>> 6579548+126688=3D0x665800 >>>>> start=3D0x100000 >>>>> [ 1.0000000] mem region 0 start=3D0 size=3D40000000 >>>>> [ 1.0000000] avail region 0 start=3D0x4000 size=3D0x3ffc000 >>>>> [ 1.0000000] avail region 1 start=3D0x4800000 size=3D0x3b458000 >>>>> [ 1.0000000] avail region 2 start=3D0x3fe10000 size=3D0xda000 >>>>> [ 1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2= 002, 2003, 2004, 2005, >>>>> [ 1.0000000] 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, = 2014, 2015, 2016, 2017, >>>>> [ 1.0000000] 2018, 2019, 2020 The NetBSD Foundation, Inc. A= ll rights reserved. >>>>> [ 1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993 >>>>> [ 1.0000000] The Regents of the University of California. All= rights reserved. >>>>> [ 1.0000000] NetBSD 9.2 (INSTALL) #0: Wed May 12 13:15:55 UTC 2021 >>>>> [ 1.0000000] [email protected]:/usr/src/sys/arch/macp= pc/compile/INSTALL >>>>> [ 1.0000000] total memory =3D 1024 MB >>>>> [ 1.0000000] oea_startup: failed to allocate DEAD ZONE: error=3D12 >>>>> [ 1.0000000] avail memory =3D 980 MB >>>>> [ 1.0000000] found heathrow PIC at 81080000 >>>>> [ 1.0000000] bootpath: /pci@80000000/mac-io@10/ata-3@21000/cdrom@= 0:0/netbsd.macppc [ 1.0000000] mainbus0 (root) >>>>> [ 1.0000000] cpu0 at mainbus0: 750 (Revision 3.1), ID 0 (primary= ) >>>>> [ 1.0000000] cpu0: HID0 0x805000a4<EMCP,NAP,DPM,SGE,BTIC,BHT>, p= owersave: 1 >>>>> [ 1.0000000] cpu0: 0.00 MHz L2 cache present but not enabled >>>>> [ 1.0000000] grackle0 at mainbus0 >>>>> [ 1.0000000] pci0 at grackle0 bus 0 >>>>> >>>>> >>>>> =3D=3D=3D=3D=3D >>>>> >>>>> I tried to find changes in sys/arch/powerpc or macppc but there were = only few in last 5 years? >>>>> >>>>> Not sure what should be next step ... any help? >>>> >>>> >>>> >>>> >>>> Now I am trying to build 9.2+ macppc on 10.1_stable/amd64 and it does = not work? >>>> >>>> cc -O -I. -I/home/guest/src/NetBSD/src/external/gpl3/gdb/dist/sim/pp= c -I/home/guest/src/NetBSD/src/external/gpl3/gdb/dist/include -I/home/gues= t/src/NetBSD/src/external/gpl3/gdb/lib/libsim/arch/powerpc -I/home/guest/s= rc/NetBSD/src/external/gpl3/gdb/lib/libsim/../libbfd/arch/powerpc -I/home/= guest/src/NetBSD/src/external/gpl3/gdb/dist/bfd -I/home/guest/src/NetBSD/s= rc/external/gpl3/gdb/dist/gdb -I/home/guest/src/NetBSD/src/external/gpl3/g= db/dist/gdb/config -DHAVE_COMMON_FPU -I/home/guest/src/NetBSD/src/externa= l/gpl3/gdb/lib/libsim/../arch/powerpc -I/home/guest/src/NetBSD/src/externa= l/gpl3/gdb/dist/sim/common igen.lo table.lo lf.lo misc.lo filter_host.lo l= d-decode.lo ld-cache.lo filter.lo ld-insn.lo gen-model.lo gen-itable.lo gen= -icache.lo gen-semantics.lo gen-idecode.lo gen-support.lo -o igen >>>> ld: ld-insn.lo:(.bss+0x0): multiple definition of `max_model_fields_le= n'; igen.lo:(.bss+0xc): first defined here >>>> ld: ld-insn.lo:(.bss+0x60): multiple definition of `models'; igen.lo= :(.bss+0x68): first defined here >>>> ld: ld-insn.lo:(.bss+0x58): multiple definition of `last_model'; ige= n.lo:(.bss+0x60): first defined here >>>> >>>> and many others >>>> >>>> >>>> with git set to netbsd9 branch and currently at >>>> >>>> commit 2a832e9328652990c5d776b176328e18d0772a95 (HEAD) >>>> Author: martin <[email protected]> >>>> Date: Sat Nov 20 14:59:04 2021 +0000 >>>> Pull up the following, requested by msaitoh in ticket #1373: = = sys/dev/pci/i= f_wm.c 1.716-1.718 via patch >>>> sys/dev/pci/if_wmreg.h 1.121 >>>> sys/dev/mii/ihphy.c 1.20 >>>> >>>> >>>> this is by itself not bad commit, I set them >>>> >>>> git bisect bad ab7c387b4133efdf3729b83dc7bbce65f36bd923 >>>> >>>> git bisect good 42352fce30b581d86c05d6f50c93937c90af9210 >>>> >>>> and then simply running >>>> >>>> ./build.sh -U -j8 -O ~/obj -m macppc -a powerpc cleandir >>>> >>>> ./build.sh -U -j8 -O ~/obj -m macppc -a powerpc tools >>>> >>>> ./build.sh -U -j8 -O ~/obj -m macppc -a powerpc release >>>> >>>> landed me in build error :( >>>> >>>> tried two git skip, then cleaned ~/obj completely. >>>> >>>> Still error :( >>>> >>>> Guess its time to learn sandboxctl .... >>> >>> >>> >>> sandboxctl failed for me, back to reading sources >>> >>> >>> ./build.sh -V MKGDB=3Dno -U -u -j8 -O ~/obj -m macppc -a powerpc rele= ase >>> >>> >>> this allow me to go past gdb build error and get iso file for testing i= n qemu. >> >> >> Unfortunately nor this file nor anything from -9 branch I self-build boo= ts like official isos :( >> >> Do I miss some step outside of build.sh <options> iso-image step specifi= cally on -9 branch for macppc target? >> > > yeah, I did miss step: > > https://www.netbsd.org/docs/bootcd.html#macppcimage > > > but instructions not quite valid for -9 branch, so I used this script ( r= un from same directory where ./build.sh located): > > #!/bin/sh > cdrom_util=3D"./distrib/cdrom" > snag_boot=3D"-map ${cdrom_util}/hfsmap.lst -hfs-bless ./macppc" > #ofw_boot=3D"-boot-hfs-file ${cdrom_util}/macppc_installboot/macppcboot.r= aw" > mkisofs -o output.iso -hfs -part ${snag_boot} ${ofw_boot} -l -J -r -allow= -leading-dots /home/guest/obj/distrib/macppc/cdroms/installcd/cdrom/ > blknum=3D`ls -l output.iso | awk '{print $5}'` > blknum=3D`expr ${blknum} / 512` > #${cdrom_util}/macppc_installboot/macppc_installboot output.iso ${blknum}= 756 > dd if=3D/home/guest/obj/distrib/macppc/cdroms/installcd/cdrom/ofwboot.xc= f bs=3D64k count=3D1 conv=3Dsync >> output.iso > > Resulted file is hanging on qemu (Openbios/Openfirmware 3.x) with mem 512= , 768, 1024 > > but boots with 2047 and 1536 This all is very very strange, I did git bisect and results are ... netbsd10$ cat bisect_512mb.log git bisect start # status: waiting for both good and bad commits # good: [ab7c387b4133efdf3729b83dc7bbce65f36bd923] Welcome to 9.3_STABLE git bisect good ab7c387b4133efdf3729b83dc7bbce65f36bd923 # status: waiting for bad commit, 1 good commit known # bad: [76b1e4b5b311ba8a632c44bd324426ac28f3cfda] Welcome to 9.4_STABLE git bisect bad 76b1e4b5b311ba8a632c44bd324426ac28f3cfda # bad: [6ae27a7634c3ab8ef681b4edd7aa7c6315d16b34] Ticket #1664 git bisect bad 6ae27a7634c3ab8ef681b4edd7aa7c6315d16b34 # bad: [0dcd27c0b2b3360f5b7d2bcca62340512cfe049c] Apply patch, requested by mrg in ticket #1577: git bisect bad 0dcd27c0b2b3360f5b7d2bcca62340512cfe049c # bad: [1645502407d3dbf2e2a11b15d99a258e2888815b] Pull up following revision(s) (requested by martin in ticket #1535): usr.sbin/sysinst/arch/landisk/md.c: revision 1.16 PR install/57025: revert bogus rev 1.9 which was only papering over a bug in the adoption of the MBR handling code and fix the original conversion bug instead: - run fdisk to install the MBR bootcode on the raw disk partition - run installboot against the NetBSD root partition (not the raw partition). git bisect bad 1645502407d3dbf2e2a11b15d99a258e2888815b # good: [7951b0c7d4ffd8c2d389f74dfddb1a576a7950d1] Ticket #1517 git bisect good 7951b0c7d4ffd8c2d389f74dfddb1a576a7950d1 # bad: [74d8906b22c1485643a04d65c1500dbef0c2e5f4] Pull up following revision(s) (requested by msaitoh in ticket #1525): git bisect bad 74d8906b22c1485643a04d65c1500dbef0c2e5f4 # good: [50ed951c9fbc5121385a28b03fafe6aa6e32fef7] Pull up the following, requested by msaitoh in ticket #1522: git bisect good 50ed951c9fbc5121385a28b03fafe6aa6e32fef7 # good: [bce2616d37b0319294950efdc0036bd9b4d285a7] backout of #1523 git bisect good bce2616d37b0319294950efdc0036bd9b4d285a7 # bad: [e35a9a8006846b51c40a68102978a665da84e1d7] Ticket #1523 has been re-instated git bisect bad e35a9a8006846b51c40a68102978a665da84e1d7 # bad: [4f2ea0dc4e1c5de800d3edf0d329a99a473afdc8] Catch up to current, requested by christos in ticket #1523 git bisect bad 4f2ea0dc4e1c5de800d3edf0d329a99a473afdc8 # first bad commit: [4f2ea0dc4e1c5de800d3edf0d329a99a473afdc8] Catch up to current, requested by christos in ticket #1523 netbsd10$ but "Catch up to current" is usr.bin/ftp/Makefile up to 1.39 usr.bin/ftp/fetch.c up to 1.235 usr.bin/ftp/ftp.1 up to 1.147 usr.bin/ftp/ftp_var.h up to 1.86 usr.bin/ftp/main.c up to 1.128 usr.bin/ftp/ssl.c up to 1.12 usr.bin/ftp/util.c up to 1.164 usr.bin/ftp/version.h up to 1.94 PR 57003: Support relative redirects. I reset (git reset --hard commit) git tree to commit before that: commit bce2616d37b0319294950efdc0036bd9b4d285a7 (HEAD) Author: martin <[email protected]> Date: Mon Sep 12 15:03:25 2022 +0000 backout of #1523 and resulting output.iso file boots again on qemu with 512 mb ram. How ftp commit (not even in kernel!) can affect bootability with specific amount of ram on qemu ? > > > >> >> >>> >>> >>>> >>>> >>>>