Letux Kernel

Boot

Table of Content

How to boot our kernel on different devices

Introduction

On most devices just copy the uImage to the /boot directory of the rootfs or to the root of the boot partition (if it is separated). U-Boot of the device will know how to load the kernel.

Letux 400

The newest kernel uImages for the JZ4730 based L400 Minibook are too big so that the vendor installed U-Boot in NAND is not able to decompress it.

Unless we want to install a new U-Boot in NAND (which is risky to brick the device), we need to load a (smaller) U-Boot variant first which then loads the real uImage.

This intermediate u-boot loader can be found at

https://git.goldelico.com/?p=letux-uboot.git;a=shortlog;h=refs/heads/work/hns/mipsbook

Just (cross) compile for alpha400_nand_defconfig. This builds an u-boot.bin amongst other files.

Then run these commands:

gzip u-boot.bin.gz
tools/mkimage -A mips -O u-boot -C gzip -T kernel -a 0x80100000 -e 0x80100000 -n intermediate-u-boot -d u-boot.bin.gz uImage

Copy the resulting uImage to the boot partition.

ToDo: how to install the real uImage without overwriting the uImage intermediate loader.

Boot log (press Fn+L-Shift on power-on) looks like:

NAND SPL

Starting U-Boot ...


U-Boot 1.1.6 (Jun 24 2008 - 18:57:34)

Board: Ingenic PMP Ver 1.x (CPU Speed 335 MHz)
DRAM:  64 MB
Flash:  0 kB
NAND:1024 MiB
*** Warning - bad CRC or NAND, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   JZ ETHERNET
### main_loop: bootcmd="mmcinit;fatload mmc 0 0x80600000 uimage;bootm"
Hit any key to stop autoboot:  0 
MMC card found
MMC card is ready
I'm sorry wo only surport fat16 and fat32
I'm sorry wo only surport fat16 and fat32
reading uimage
filesize: 234810, got: 234810

234810 bytes read
## Booting image at 80600000 ...
   Image Name:   intermediate-u-boot
   Image Type:   MIPS U-Boot Kernel Image (gzip compressed)
   Data Size:    234746 Bytes = 229.2 kB
   Load Address: 80100000
   Entry Point:  80100000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...



U-Boot 2021.01-rc2-00029-g3453b36750 (Dec 05 2020 - 11:58:38 +0100)

Board: Skytone Alpha 400
DRAM:  128 MiB
WDT:   Started with servicing (0s timeout)
NAND:  2048 MiB
MMC:   MSC: 0
In:    serial@10030000
Out:   serial@10030000
Err:   serial@10030000
Net:   eth0: ethernet@13100000
Hit any key to stop autoboot:  0 
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...

...

Created: 3 years 11 months ago
by Nikolaus Schaller