qemu-ios icon indicating copy to clipboard operation
qemu-ios copied to clipboard

Keep getting kernel abort type 4 when trying to boot into iPhone OS on Ventura & Above

Open UrkiMimi opened this issue 2 years ago • 22 comments

I tried the command and replaced the arguments with the files I have on my mac but I still cant get past this issue where it ends up panicing on startup. I couldn't get the entire output but I got the output where it it gave me the panic.

qemulog.txt

Apple iMac 24 M1 2021 macOS 13.1 22C65

UrkiMimi avatar Dec 26 '22 21:12 UrkiMimi

Having the same issue. Moreover it happens randomly. Sometimes it boots up successfully other times it panics with this very message.

NSG650 avatar Dec 27 '22 11:12 NSG650

Now with you actually getting it to boot is exciting but may I have the type of mac you're using to emulate the iPod? For me, it happens every time on boot.

UrkiMimi avatar Dec 28 '22 18:12 UrkiMimi

Late 2012 Mac Mini

[email protected] 
------------------- 
OS: macOS 12.6.1 21G217 x86_64 
Host: Macmini6,1 
Kernel: 21.6.0 
Uptime: 2 days, 11 hours, 18 mins 
Packages: 174 (brew) 
Shell: zsh 5.8.1 
Resolution: 1280x1024 
DE: Aqua 
WM: Quartz Compositor 
WM Theme: Blue (Dark) 
Terminal: /dev/ttys001 
CPU: Intel i5-3210M (4) @ 2.50GHz 
GPU: Intel HD Graphics 4000 
Memory: 5576MiB / 12288MiB 

NSG650 avatar Dec 29 '22 17:12 NSG650

I'll try this out on a machine that I know has an Intel processor since both of the machines I attempted to try this on are ARM based.

UrkiMimi avatar Dec 29 '22 23:12 UrkiMimi

I got it to work! The only issue I have is that I have to pull out my 11 year old iMac in order to use the emulator in the first place. Another issue that I discovered is the lack of M1 support so I can't run this on modern machines either.

image

UrkiMimi avatar Dec 30 '22 05:12 UrkiMimi

I’ve managed to successfully boot it on my M1 MacBook Air with no problems, although there were some small changes to the building and launching process required

alfiecg24 avatar Apr 10 '23 08:04 alfiecg24

What did you exactly do to get it to work?

UrkiMimi avatar Apr 21 '23 22:04 UrkiMimi

I’ve managed to successfully boot it on my M1 MacBook Air with no problems, although there were some small changes to the building and launching process required

@alfiecg24 I wonder how you accomplished it? In my case I have ARM compiled qemu to run iphoneOS 1, getting the same kernel abort type 4 when launching emulation, would be nice to share some changes of what you did

zavocc avatar Jun 08 '23 17:06 zavocc

So from the root directory, I entered the following commands: firstly mkdir build; cd $_, then ../configure --enable-sdl --disable-cocoa --target-list=arm-softmmu --disable-capstone --disable-pie --disable-slirp --extra-cflags=-I/opt/homebrew/Cellar/openssl@3/3.1.0/include --extra-ldflags='-L/opt/homebrew/Cellar/openssl@3/3.1.0/lib -lcrypto' (this is assuming the same paths on your computer), and finally make -j $(nproc).

I then ran the VM with ./arm-softmmu/qemu-system-arm -M iPod-Touch,bootrom=path/to/bootrom_s5l8900,iboot=/path/to/iboot_204_n45ap.bin,nand=path/to/nand -serial mon:stdio -cpu max -m 1G -d unimp -pflash path/to/nor_n45ap.bin -display sdl and this also displayed the LCD output.

Hope this helps! Any issues, let me know.

alfiecg24 avatar Jun 08 '23 17:06 alfiecg24

Unfortunately it's still the same, tried to recompile qemu again although build and launching process you suggested looks nearly exactly the same as mine although I'm using and trying this on ARM64 linux-based host, qemu compiles but it still getting kernel abort type 4 at launch, probably has something to do with ARM64 qemu not being able to emulate iPhone correctly?

On my WSL2 Debian installation, I also compiled QEMU there and iOS runs and launches fine.

zavocc avatar Jun 09 '23 03:06 zavocc

although I'm using and trying this on ARM64 linux-based host

These are the build instructions that I used on my M1 Mac - so I have no idea whether it would work on Linux.

probably has something to do with ARM64 qemu not being able to emulate iPhone correctly?

You shouldn’t be using ARM64 QEMU, as you’re trying to emulate an ARMv7 iPhone. The correct binary is qemu-system-arm.

And it must be able to emulate it correctly because this repository adds support for it - although regular QEMU won’t be able to.

alfiecg24 avatar Jun 09 '23 05:06 alfiecg24

You shouldn’t be using ARM64 QEMU, as you’re trying to emulate an ARMv7 iPhone. The correct binary is qemu-system-arm.

I meant ARM64 compiled qemu-system-arm binary on Linux arm64 host, so my situation doesn't make a difference as I got here It was compiled successfully but same treatment as this issue, kernel panic 4

zavocc avatar Jun 09 '23 06:06 zavocc

You shouldn’t be using ARM64 QEMU, as you’re trying to emulate an ARMv7 iPhone. The correct binary is qemu-system-arm.

I meant ARM64 compiled qemu-system-arm binary on Linux arm64 host, so my situation doesn't make a difference as I got here It was compiled successfully but same treatment as this issue, kernel panic 4

Oh sorry, my mistake! Unfortunately, I’m not the one to ask about Linux issues - sorry.

alfiecg24 avatar Jun 09 '23 06:06 alfiecg24

./arm-softmmu/qemu-system-arm -M iPod-Touch,bootrom=path/to/bootrom_s5l8900,iboot=/path/to/iboot_204_n45ap.bin,nand=path/to/nand -serial mon:stdio -cpu max -m 1G -d unimp -pflash path/to/nor_n45ap.bin -display sdl

I know I'm very late to respond with this since its been over a month since I've worked on something like this but still kernel panics with kernel abort type 4. However, I did upgrade my system to Sonoma even though its in beta since I like to make my mac up to date.

UrkiMimi avatar Aug 08 '23 00:08 UrkiMimi

Screenshot 2023-08-07 at 7 46 16 PM

Here's the log that the terminal outputted right before it panicked.

UrkiMimi avatar Aug 08 '23 00:08 UrkiMimi

Hmm I remember that I was stuck with a race condition somewhere for a while, related to the USB driver. But that got away after I fixed the timer and clock, probably causing the program flow to be corrected again. Is it consistently failing?

devos50 avatar Aug 08 '23 07:08 devos50

Pretty much.

UrkiMimi avatar Aug 08 '23 17:08 UrkiMimi

So I finally found out the issue I was having. I restored my Macbook Air back to Monterey earlier today and I compiled and the emulator ran fine. So I feel like this crashing issue is with something to do with Ventura and above.

UrkiMimi avatar Aug 16 '23 22:08 UrkiMimi

@UrkiMimi glad to hear that it works now! I have Ventura installed on my development machine and there it seems to run fine though?

devos50 avatar Aug 17 '23 07:08 devos50

I updated my Macbook to Ventura about a day ago and it ran fine. I'll be closing this later on as soon as I figure out what permissions I need to enable since I feel like this issue is due to insufficient permissions.

UrkiMimi avatar Sep 27 '23 04:09 UrkiMimi

Any update about this? Successfully built QEMU on macOS 14 & M2 MacBook Air and am receiving the same panic.

hc20k avatar Oct 19 '23 19:10 hc20k

No progress on this particular issue but I haven't seen this error on the iPod Touch 2G.

devos50 avatar Jan 01 '24 10:01 devos50