[solved] Update Radxa Rock Lite

Hi,

my Radxa Rock Lite is running outdated kernel 3.0.36 and Ubuntu 14. I would like to update it to the recent and supported version Ubuntu, for example, kernel 4.4 and Ubuntu 16

I couldn’t find any ready made image, so I tried to compile the kernel and rootfs manually

Compiled u-boot: https://wiki.radxa.com/Rock/U-Boot#For_SD_card
Compiled 4.4 kernel: https://wiki.radxa.com/Rock/Linux_Mainline

Flashed everything, tried to boot. The kernel boots, but hangs at some point:

DDR Version 1.04 20130830
In
DDR3
300MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
Memory OK
OUT


U-Boot 2014.01-ge062e1d8a3 (May 01 2020 - 17:32:34)

CPU:	RK3188
Board:	RK30xx platform Board
total reserving memory(except stack) is :48m
DRAM:  1 GiB
arch_interrupt_init
DMAInit: OK
SdmmcInit=0 0
FwPartOffset=2000 , 0
storage init OK!
Using default environment

In:    serial
Out:   serial
Err:   serial
board_late_init
unsigned!
SecureBootEn = 0 0
##################################################
uboot version: U-Boot 2014.01-ge062e1d8a3 (May 01 2020 - 17:32:34)

#Boot ver: 0000-00-00#0.00

##################################################
setup gpio int
GetParam
check parameter success
partition(boot): offset=0x00002000, size=0x00008000
partition(linuxroot): offset=0x0000A000, size=0xFFFFFFFF
empty serial no.
checkKey
vbus = 0
lcd_ctrl_init [38]
i2c init OVER in board! 
set_lcdc_dclk: lcdc_source_clk = 768, clk = 71, div = 11
rk30_load_screen for lcdc ok!
lcd_enable [55]
ERROR: [fastboot_find_ptn]: partition(misc) not found, aborting
table:
misc partition not found!
SecureBootCheckOK:0
booti: do_bootm_linux...

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpu
Linux version 4.4.0+ (user@ubuntu18) (gcc version 7.5.0 (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) ) #1 SMP Fri May 1 22:08:11 EEST 2020
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Radxa Rock
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc
On node 0 totalpages: 520192
free_area_init_node: node 0, pgdat c08b7940, node_mem_map ef018000
  Normal zone: 1536 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 196608 pages, LIFO batch:31
  HighMem zone: 323584 pages, LIFO batch:31
PERCPU: Embedded 12 pages/cpu @eefcc000 s18380 r8192 d22580 u49152
pcpu-alloc: s18380 r8192 d22580 u49152 alloc=12*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 518656
Kernel command line: console=tty0 console=ttyS2,115200 debug earlyprintk root=/dev/mmcblk0p1 rootwait rootfstype=ext4 rw splash
PID hash table entries: 4096 (order: 2, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 2053736K/2080768K available (6563K kernel code, 180K rwdata, 1840K rodata, 380K init, 345K bss, 27032K reserved, 0K cma-reserved, 1294336K highmem)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xf0800000 - 0xff800000   ( 240 MB)
    lowmem  : 0xc0000000 - 0xf0000000   ( 768 MB)
    pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
    modules : 0xbf000000 - 0xbfe00000   (  14 MB)
      .text : 0xc0008000 - 0xc083cfc4   (8404 kB)
      .init : 0xc083d000 - 0xc089c000   ( 380 kB)
      .data : 0xc089c000 - 0xc08c9048   ( 181 kB)
       .bss : 0xc0916dd4 - 0xc096d450   ( 346 kB)
Hierarchical RCU implementation.
	Build-time adjustment of leaf fanout to 32.
NR_IRQS:16 nr_irqs:16 16
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 16 ways, 512 kB
L2C-310: CACHE_ID 0x4100c0c8, AUX_CTRL 0x46050001
sched_clock: 64 bits at 150MHz, resolution 6ns, wraps every 2199023255551ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x2298375bd0, max_idle_ns: 440795208267 ns
Console: colour dummy device 80x30
console [tty0] enabled
Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
Initializing cgroup subsys freezer
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
rockchip_smp_prepare_cpus: ncores 4
Setting up static identity map for 0x600082c0 - 0x60008318
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
CPU2: thread -1, cpu 2, socket 0, mpidr 80000002
CPU3: thread -1, cpu 3, socket 0, mpidr 80000003
Brought up 4 CPUs
SMP: Total of 4 processors activated (4787.40 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
Failed to find PMU node
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
otg-vbus: 5000 mV 
reg-fixed-voltage usb-otg-regulator: otg-vbus supplying 5000000uV
sdmmc-supply: 3300 mV 
reg-fixed-voltage sdmmc-regulator: sdmmc-supply supplying 3300000uV
host-pwr: 5000 mV 
reg-fixed-voltage usb-host-regulator: host-pwr supplying 5000000uV
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Linux video capture interface: v2.00
NET: Registered protocol family 23
Bluetooth: Core ver 2.21
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
clocksource: Switched to clocksource arm_global_timer
simple-framebuffer df000000.framebuffer: framebuffer at 0xdf000000, 0x384000 bytes, mapped to 0xf0880000
simple-framebuffer df000000.framebuffer: format=x8r8g8b8, mode=1280x720x32, linelength=5120
Console: switching to colour frame buffer device 160x45
simple-framebuffer df000000.framebuffer: fb0: simplefb registered!
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 3, 32768 bytes)
TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)

My question is: is it possible to run kernel 4.4 on Rock Lite? Has anyone succeeded upgrading Rock to Ubuntu 16 or 18?

Thanks

After digging into the code, I found that the kernel hangs in this function: pcpu_chunk_addr

File: mm/percpu.c

Calling place:

/* clear the areas and return address relative to base address */
for_each_possible_cpu(cpu)
{
       memset((void *)pcpu_chunk_addr(chunk, cpu, 0) + off, 0, size);
}

Hanging function:

static unsigned long pcpu_chunk_addr(struct pcpu_chunk *chunk,
                                     unsigned int cpu, int page_idx)
{
        return (unsigned long)chunk->base_addr + pcpu_unit_offsets[cpu] +
                (page_idx << PAGE_SHIFT);
}

Probably, memset is corrupting some memory?

Unfortunately, I’m not much familiar with kernel debugging and could not find out why the board hangs :frowning:

Ok, that memset gave me an idea and I finally solved the issue and now running 4.4 kernel and Ubuntu 16

The problem was in DTS file, provided by Radxa. It only supports Rock, not Rock Lite. But all I had to change - memory amount in the DTS, as Rock has only 1GB (compared with Rock 2Gb):

memory {
		reg = <0x60000000 0x3f000000>;
	};

I also tried to compile the newest 5.7 kernel - it does not start. Does to even show “Uncompressing Linux…”. Probably, some different issue. Maybe u-boot needs changes to be able to boot recent kernels. But that is a different story

2 Likes

Unfortunately, the kernel 4.4 boots and runs, but most of functions are not working, for example, USB and Ethernet are not functional

Probably, dts and defconfig need to be updated by Radxa for 4.4 kernel

Hi. I bought recently an used Radxa Rock Pro board. Starting to read info about it. Thanks for sharing your experiences with us! Regards.