s-matyukevich / raspberry-pi-os

Learning operating system development using Linux kernel and Raspberry Pi
MIT License
13.16k stars 1.29k forks source link

The boot problem with Mac and ch340G chip usb2ttl. #218

Closed yangyueren closed 3 years ago

yangyueren commented 3 years ago

I have an problem with Mac and ch340G chip usb2ttl. Could someone help me? When I use screen /dev/cu.wchusbserial14130 115200 to connect to the original Pi OS, everything goes well. I can login and do everything. image

But after I remove the kernel*.img in the boot and place the kernel8.img, as well as modify the config.txt to kernel_old=1 disable_commandline_tags=1 enable_uart=1, I fail to see the hello world. image

image

image image

Originally posted by @yangyueren in https://github.com/s-matyukevich/raspberry-pi-os/issues/43#issuecomment-737220879

yangyueren commented 3 years ago

I solved this problem by modifying the config.txt: Replace kernel_old=1 with arm_64bit=1. This problem is caused by the newer Pi os.

rockytriton commented 3 years ago

The new pios also puts you in a different exception level than the older ones, I have some code to revert it to how it was before so you can follow along with the lessons related to exception levels as well: https://youtu.be/zRhMutscRL0

yangyueren commented 3 years ago

The new pios also puts you in a different exception level than the older ones, I have some code to revert it to how it was before so you can follow along with the lessons related to exception levels as well: https://youtu.be/zRhMutscRL0

Thanks for your quick reply. I will look into it.

SunrShine commented 3 years ago

image when I open the putty and connect the raspberry-pi, there are Garbled codes as the picture shows. but if put the bootcode_delay=5 in to config, using 5 seconds to open the putty and connect the raspberry-pi, it can get the right output.