Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cann't boot #37

Open
nightsuns opened this issue May 13, 2016 · 9 comments
Open

cann't boot #37

nightsuns opened this issue May 13, 2016 · 9 comments

Comments

@nightsuns
Copy link

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
Copy link
Author

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

::

  • Preparing system...
    image3_get_tag_data: data at 0x84010080 of size 0x00d07280 for image type 'krnl'
    Loading kernel at 0x70001000
    Slidden address at 0x80001000
    image3_get_tag_data: data at 0x86517370 of size 0x00000a5b for image type 'xmdt'
    image3_get_tag_data: data at 0x84d17340 of size 0x01800000 for image type 'rdsk'
    creating ramdisk at 0x70d50000 of size 0x1800000, from image at 0x84d17340
    creating device tree at 0x72550000 of size 0xa00
    gBootArgs.commandLine = [rd=md0 debug=0x1 -v -s]
    kernel prepped at 0x701b88e0, transferring control out of booter now!
    PE_RealView: pic at 0xc0002000, distribution at 0xc0003000
    cache: initializing i+dcache ... done
    CPU: Cortex A8-r0 rev 0 (Cortex-A core)
    Supported features: ARM_ISA THUMB2 THUMBEE ARMv4
    WB enabled LABT branch prediction enabled
    LoUU:2 LoC:2 LoUIS:1
    Cache level 1:
    16KB/64B 4-way data cache WT WB Read-Alloc
    16KB/64B 4-way instruction cache Read-Alloc
    Debugger called: <inline call to debugger(machine_startup)>
    pmap_steal_memory: C0307000 - C0309000; size=00002000
    pmap_steal_memory: C0309000 - C030A000; size=00001000
    pmap_steal_memory: C030A000 - C0310000; size=00006000
    pmap_steal_memory: C0310000 - C0390000; size=00080000
    pmap_steal_memory: C0390000 - C03E0000; size=00050000
    pmap_steal_memory: C03E0000 - C08DAF80; size=004FAF80
    Filling vm_pages with pattern: 0xdeb8f177
    [ASID configuration start]
    All ASID/asids enabled: real_ncpus: 1, pmap_asid_ncpus: 1
    Scheduler: Default of traditional
    PE_RealView: decrementer frequency = 5000
    PE_RealView: RealView Timer initialized, Timer value 4803
    rtclock_bus_configure: Configuring RTCLOCK...
    [RTCLOCK] Frequency = 1.000000MHz, cvtt2n = 000003E8.00000000, cvtn2t = 00000000.00418937
    Initializing serial KDP
    Kernel boot args: 'rd=md0 debug=0x1 -v -s'
    PE_init_iokit: starting IOKit now!
    COLOR video console at 0xc0007000 (1024x768x32)
    bsd_autoconf: calling kminit
    attempting to start init of /sbin/launchd
    dyld_slide: 0x000b3000
    dyld_slide: 0x000b3000
    exec_mach_imgact: mach_header = b4000, sp 2fd4cf4c

@wargio
Copy link

wargio commented May 13, 2016

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

@nightsuns
Copy link
Author

@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
Copy link

wargio commented May 13, 2016

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
Copy link

wargio commented May 13, 2016

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
Copy link
Author

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
Copy link
Author

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
Copy link

wargio commented May 16, 2016

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
Copy link

wargio commented May 23, 2016

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.

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

No branches or pull requests

2 participants