darwin-on-arm / xnu

Porting the Darwin kernel to the AArch64/ARMv7/ARMv6-A architectures.
Other
582 stars 146 forks source link

cann't boot #37

Open nightsuns opened 8 years ago

nightsuns commented 8 years ago

hi,all: i use the newest version in repo to boot up, and there is some problem:

  1. it's a kernel pain after startup, and i comment out OSKextRemoveKextBootstrap() , ok there error is gone
  2. but use the ramdisk on repo, i cann't boot to the login shell. after some debug, because lanuchd always has problem, and call sleh_undef.

anybody, could help me?

BTW: https://www.dropbox.com/s/j5id402t2er59vh/ramdisk_new.dmg?dl=0, this ramdisk is 404,could somebody share a copy?

nightsuns commented 8 years ago

below is my startup log, and alway stop at: exec_mach_imgact: mach_header = b4000, sp 2fd4cf4c.

qemu-system-arm -S -s -machine realview-pb-a8 -m 1024 -kernel uImage -append "rd=md0 debug=0x1 -v -s" -serial stdio

debug_init()

:: :: GenericBooter for RealView, Copyright 2013, winocm. :: :: BUILD_TAG: :: :: BUILD_STYLE: DEVELOPMENT :: :: COMPILE_DATE: May 9 2016 15:55:33

::

wargio commented 8 years ago

you mean this one https://github.com/darwin-on-arm/ramdisk/blob/master/ramdisk.dmg ?

nightsuns commented 8 years ago

@wargio : yes, the log i am cannot boot is this one.

but i refered on dropbox, is the one i used can boot about half year ago. and on dropbox one i cannot download it anymore.

wargio commented 8 years ago

at the least you can build it. i'm failing on generating the uBoot image. keeps giving me mkimage: Write error on uImage: Bad address.

anyway, you can create a new ramdisk. https://github.com/darwin-on-arm/wiki/wiki/Creating-a-new-ramdisk

wargio commented 8 years ago

have you built a good image? i'm trying to, but each time i launch qemu it gives me an error. anyway my vmlinux image is > 2 gb D: is also yours so big?

nightsuns commented 8 years ago

no.

Generating uImage... Image Name: GenericBooter Created: Fri May 13 20:26:16 2016 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 38930427 Bytes = 38018.00 kB = 37.13 MB Load Address: 84000040 Entry Point: 84000040 rm -f vmlinux.raw

nightsuns commented 8 years ago

Generating uImage... Image Name: GenericBooter Created: Fri May 13 20:26:16 2016 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 38930427 Bytes = 38018.00 kB = 37.13 MB Load Address: 84000040 Entry Point: 84000040 rm -f vmlinux.raw

wargio commented 8 years ago

ok. i got the right image. i had to change the toolchain version. how you built your devicetree data? mine is wrong. it doesn't load somehow :|

these are what i built.

$ md5sum *.devicetree 
a9a9a3189021d13fd5e177c5b3fe49b3  Nokia_RX51.devicetree
780d77bcc6520dd35b21775ae8490145  RealView.devicetree
5660f9c615db52da4daebdc7c5b91c69  TI_BeagleXM.devicetree
483b08e77415286c7bced6160c6aa6af  USBarmory_MkI.devicetree

and i included mine in this way: image3maker -t xmdt -f ../DeviceTrees/RealView.devicetree -o images/DeviceTree.img3 How have you done yours?

wargio commented 8 years ago

finally i'm able to build something good. i've updated the wiki with the right commands and all the missing things.

now i have the same OSKextRemoveKextBootstrap kpanic!

[Edit] after commenting OSKextRemoveKextBootstrap(); at line 409 (https://github.com/darwin-on-arm/xnu/blob/master/osfmk/kern/startup.c#L409) it does boot and i got to the command console.