Linux Build Help: Stuck at "Starting kernel ..." - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98) +--- Forum: Linux on RockPro64 (https://forum.pine64.org/forumdisplay.php?fid=101) +--- Thread: Linux Build Help: Stuck at "Starting kernel ..." (/showthread.php?tid=8050) |
Linux Build Help: Stuck at "Starting kernel ..." - ihamilton - 10-07-2019 I'm trying to build a kernel image for Rockpro64. I have U-Boot 2019 built and working from https://gitlab.denx.de/u-boot.git. I have tested a prebuilt debian image on the board and run through some simple tests and the hardware all seems to work. In U-Boot, I can read/write from both SD card and eMMC module fine. I am wondering about the process to load the kernel image and DTB into memory for booting. I am using a ext4 partition for the file system that is already extracted out. I have tested with a FAT partition and the ext4 partition and both can load the kernel image (Image) and DTB (rk3399-rockpro64.dtb) but when using booti in U-Boot it hangs at "Starting kernel...". I am using the following U-Boot commands: Code: setenv bootargs 'console=ttyS2,1500000n8 rw rootwait root=/dev/mmcblk1p1 rootfstype=ext4 earlycon=uart8250,mmio32,0xff1a0000' The output from this is: Code: => booti 0x02080000 - 0x01f00000 I chose those memory locations as that was the default found in the U-Boot parameters with printenv. I would prefer not to dd the kernel image and rootfs.img to the SD card directly and would rather have them in the /boot directory and load them in U-Boot on the go as this is the method I would like to use on the eMMC as well. I am trying kernel builds from: https://github.com/ayufan-rock64/linux-kernel.git https://github.com/ayufan-rock64/linux-mainline-kernel.git It seems to me that the address location I am choosing could be wrong or the device tree is not loading properly but I am lost at the moment. I am still somewhat new to this so any help would be greatly appreciated. Thanks. RE: Linux Build Help: Stuck at "Starting kernel ..." - ihamilton - 10-09-2019 So I kept testing over the last few days. The kernel is properly built. I tested it by mounting the prebuilt Armbian 5.90 Debian Stretch 4.4.182 and changing the symlink to test my linux image. This booted properly but does lose console during the boot. It seems like either the earlycon or the bootconsole is set incorrectly to print the messages prior to entering user space: Code: ## Loading init Ramdisk from Legacy Image at 04000000 ... Is the bootconsole supposed to be set to [uart2]? So from my previous post, I correctly set the memory address for the DTB and the kernel works with the rest of Ayufan's images. I also tested with the DTB from my linux build and that worked as well. If anyone has any idea if this is an upstream U-Boot problem with the Ayufan linux build or if I am making some stupid mistake somewhere please let me know. Thanks. RE: Linux Build Help: Stuck at "Starting kernel ..." - ihamilton - 10-10-2019 Update: I moved the boot.scr to another name so U-Boot won't use it to boot automatically. I wanted to see if my bootargs were correct with a working system. They were not. I have changed the armbianEnv.txt to contain all the correct parameters: Code: verbosity=1 I am then running the U-Boot commands to get the UUID part for MMC 1. This boots correctly from the Armbian image with my linux image and DTB. I also got early printing of the boot messages as well as shutdown messages the I was not receiving before. I then went and dd'ed my u-boot.itb and idbloader image to the memory locations specified by Rockchip. I can load my parameters and use them but I am still stuck at "Starting kernel..." The only differences in the messages before the starting kernel message between the prebuilt image and upstream U-Boot is an error reserving fdt memory: Code: #### AYUFAN PREBUILT IMAGE: I think this might be causing the kernel to crash but not sure yet. Again, if anyone has any advice it'd be greatly appreciated. Thanks. |