After installing a new kernel, boot fails


#1

Hello !

After installing a new kernel, it hangs after printing “Starting kernel …”.
I built a Linux kernel by following steps in https://wiki.radxa.com/Rockpi4/dev/Debian, and I got “boot.img” file in “out” folder.

I uploaded files with rkdeveloptool:

rkdeveloptool db rk3399_loader_*.bin
rkdeveloptool wl 64 idbloader.img
rkdeveloptool wl 16384 uboot.img
rkdeveloptool wl 24576 trust.img
rkdeveloptool wl 32768 boot.img
rkdeveloptool wl 262144 rootfs.img

After reboot, it hangs after printing out “Starting kernel …”.

Here’s the log from terminal.

Hit any key to stop autoboot: 0
Card did not respond to voltage select!
mmc_init: -95, time 9
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:4…
Found /extlinux/extlinux.conf
pxefile_addr_str = 0x00500000
bootfile = /extlinux/extlinux.conf
Retrieving file: /extlinux/extlinux.conf
reading /extlinux/extlinux.conf
184 bytes read in 14 ms (12.7 KiB/s)
Retrieving file: /hw_intfc.conf
** Unable to read file /hw_intfc.conf **
hw_conf.valid = 0
hw_conf.pwm0 = 2
hw_conf.pwm1 = 2
hw_conf.uart2 = 2
hw_conf.uart4 = 2
hw_conf.spi1 = 2
hw_conf.spi2 = 2
hw_conf.i2c2 = 2
hw_conf.i2c6 = 2
hw_conf.i2c7 = 2
hw_conf.dts_overlay_count = 0
1: kernel-4.4
Retrieving file: /Image
reading /Image
20140040 bytes read in 463 ms (41.5 MiB/s)
append: earlyprintk console=ttyFIQ0,1500000n8 rw root=PARTUUID=b921b045-1d rootfstype=ext4 init=/sbin/init rootwait
Retrieving file: /rockpi-4b-linux.dtb
reading /rockpi-4b-linux.dtb
96783 bytes read in 16 ms (5.8 MiB/s)
fdt addr 0000000001f00000
fdt magic number edfe0dd0
fdt size 1048576

Flattened Device Tree blob at 01f00000

Booting using the fdt blob at 0x1f00000
Loading Device Tree to 00000000f3ced000, end 00000000f3deffff … OK
Adding bank: start=0x00200000, size=0xf7e00000

Starting kernel …

I think I missed something, but I did it several times, but it always hangs.


No login prompt on serial console
#2

The problem stems from DTB. When I switched the DTB file to the one provided by Radxa, the system works correctly.
Not sure why the DTB I built was wrong.


#3

Hi, @RA_loop

well, you built your own debian system image.

By default, the console is disabled in rockpi-4b-linux.dtb (kernel 4.4.154-78), so there is nothing after showing “Starting kernel …”

You can install the rockpi4-dtbo package to enable console.

Solutoin one, using ssh

If you can access pi4 using ssh, you can try

add the following at file, /etc/apt/sources.list.

deb http://apt.radxa.com/stretch/ stretch main

And execute these commands

wget -O -  apt.radxa.com/stretch/public.key | sudo apt-key add -
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install -y rockchip-overlay rockchip-fstab
sudo apt-get install -y rockpi4-dtbo

Solution two, using chroot

(system image on eMMC) Insert eMMC Module into eMMC to μSD card converter board, and insert μSD card converter board into μSD Card Reader, which connects to your PC.

(system image on uSD) Insert the μSD Card into μSD Card Reader, which connects to your PC.

In your PC, you can see there are five poaretitions like this:

$ lsblk
sdb           8:16   1  29.1G  0 disk 
├─sdb4        8:20   1   512M  0 part 
├─sdb2        8:18   1     4M  0 part 
├─sdb5        8:21   1     2G  0 part /media/stephen/ROOTFS
├─sdb3        8:19   1     4M  0 part 
└─sdb1        8:17   1   3.9M  0 part 

start chroot

cd ~
sudo umount /dev/sdb5 # umount device.
sudo mkdir tmp-rootfs
sudo mount /dev/sdb5 tmp-rootfs
sudo mount /dev/sdb4 tmp-rootfs/boot
sudo chroot tmp-rootfs

add the following at file, /etc/apt/sources.list.

deb http://apt.radxa.com/stretch/ stretch main

And execute these commands

wget -O -  apt.radxa.com/stretch/public.key | sudo apt-key add -
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install -y rockchip-overlay
sudo apt-get install -y rockpi4-dtbo
sync

Then run the new system image on ROCK Pi 4.


#4

Thank you Stephen !
It works perfect !