How to use linux kernel I compiled?

I compiled newest linux kernel and uboot, but I don’t know how to boot with it, the kernel output file seems haven’t ‘zImage’.

Your Archlinux image for VIM appears to be using ‘Image’ file directly, can you help me, thanks.

You can use Image and command booti to bootup.

booti ${kernel_loadaddr} ${initrd_loadaddr} ${dtb_loadaddr}

But I don’t know how to enter uboot mode, I have serial tools.

You need to setup the serial.

Have you seen the output message from uart? If so you can hit any key to enter the uboot command line.

I tried, but finally enter the ubuntu

Can I modify this config to start from ‘Image’?

If the kernel is built with the text_ofset patch, you can simply rename the Image to zImage.

gpio: pin GPIOAO_2 (gpio 102) value is 1
Product checking: pass! Hardware version: VIM1.V12
Hit Enter or space or Ctrl+C key to stop autoboot – : 0
Does it mean I’m in the uboot console?

I compared ‘Image’ and ‘zImage’, they have same header info.

Yes. It is. You are in uboot console.


It seems need a ‘zImage’
And I want to know how to get uInitrd, I copy it from another image, is that right?
Scanning mmc 0:1…
reading uInitrd
5475735 bytes read in 304 ms (17.2 MiB/s)
reading zImage
** Unable to read file zImage **
Scanning mmc 0:5…
** Invalid partition 5 **
Scanning mmc 1:1…
Failed to mount ext2 filesystem…
** Unrecognized filesystem type **
Scanning mmc 1:5…
7793094 bytes read in 225 ms (33 MiB/s)
28414464 bytes read in 801 ms (33.8 MiB/s)
53688 bytes read in 7 ms (7.3 MiB/s)
108 bytes read in 3 ms (35.2 KiB/s)
Import env.txt
Found custom ethmac: da:2a:bf:26:61:6d, overwrite eth_mac!
Failed to mount ext2 filesystem…

You can simply rename Image to zImage. But you need text_ofset patch for mainline kernel as @balbes150 said above.

Thank you, I’ll have a try

@balbes150 @numbqq

It’s now repeating this step

gpio: pin GPIOAO_2 (gpio 102) value is 1
Product checking: pass! Hardware version: VIM1.V12
Hit Enter or space or Ctrl+C key to stop autoboot – : 0
reading boot.ini from mmc 0:1 …
card in
init_part() 278: PART_TYPE_DOS
[mmc_init] mmc init success
reading boot.ini
** Unable to read file boot.ini **
cfgload: fatload: no boot.ini or empty file
reading boot.ini from mmc 1:5 …
4819 bytes read in 4 ms (1.1 MiB/s)
cfgload: applying boot.ini…
cfgload: echo “Starting boot.ini…”
Starting boot.ini…
cfgload: setenv kernel_loadaddr “0x11000000”
cfgload: setenv dtb_loadaddr “0x1000000”
cfgload: setenv initrd_loadaddr “0x13000000”
cfgload: setenv env_loadaddr “0x20000000”
cfgload: setenv hdmiargs “logo=${display_layer},loaded,${fb_addr},${outputmode}”
cfgload: if test “X$lcd_exist” = “X1”; then setenv panelargs "panel_exist=${lcd;
cfgload: setenv boot_start booti ${kernel_loadaddr} ${initrd_loadaddr} ${dtb_lo}
cfgload: setenv mmc_devplist “1 5”
cfgload: setenv mmc_devnums “0 1”
cfgload: setenv usb_devplist “1”
cfgload: setenv usb_devnums “0 1 2 3”
cfgload: setenv mark_prefix “”
cfgload: if test “$hostname” = “KVIM1”; then setenv ml_dtb "/dtb/amlogic/meson-;
cfgload: for dev_num in ${mmc_devnums}; do for distro_bootpart in ${mmc_devplis;
Scanning mmc 0:1…
reading uInitrd
5475735 bytes read in 304 ms (17.2 MiB/s)
reading zImage
13824512 bytes read in 767 ms (17.2 MiB/s)
reading dtb.img
26209 bytes read in 5 ms (5 MiB/s)
reading /boot/env.txt
** Unable to read file /boot/env.txt **
reading env.txt
** Unable to read file env.txt **
rootdev is missing! use default: root=LABEL=ROOTFS!
Set default mac address to ethaddr: da:2a:bf:26:61:6d!
Booting legacy kernel…
[rsvmem] get fdtaddr NULL!
rsvmem - reserve memory

rsvmem check - check reserved memory
rsvmem dump - dump reserved memory

rsvmem check failed
“Synchronous Abort” handler, esr 0x96000210
ELR: 77eb9798
LR: 77eb978c
x0 : 0000000077f6eba8 x1 : 0000000000080000
x2 : 0000000000dd3000 x3 : 0000000000dd3000
x4 : 0000000000000024 x5 : 0000000011000000
x6 : 0000000077f31fc0 x7 : 0000000000000044
x8 : 0000000000000001 x9 : 0000000000000000
x10: 000000000000000f x11: 0000000077f34158
x12: 0000000000000000 x13: 0000000000000000
x14: 0000000000000000 x15: 0000000000000000
x16: 0000000000000000 x17: 0000000000000000
x18: 0000000073e9ce28 x19: 0000000077f6ea68
x20: 0000000000000003 x21: 0000000073eb9d18
x22: 0000000077f6e000 x23: 0000000077f6ea68
x24: 0000000000000000 x25: 0000000073eb9d10
x26: 0000000077f5fc08 x27: 0000000073eb9d40
x28: 0000000000000000 x29: 0000000073e9bed0

Resetting CPU …

resetting …
TE: 76769

BL2 Built : 20:32:17, Sep 8 2017.
gxl g6296b83 -

set vcck to 1120 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR3 chl: Rank0+1 @ 768MHz - PASS
Rank0: 1024MB(auto)-2T-11
Rank1: 1024MB(auto)-2T-11
DataBus test pass!
AddrBus test pass!
Load fip header from eMMC, src: 0x0000c200, des: 0x01400000, size: 0x00004000
New fip structure!
Load bl30 from eMMC, src: 0x00010200, des: 0x01100000, size: 0x0000d600
Load bl31 from eMMC, src: 0x00020200, des: 0x05100000, size: 0x0002c600
Load bl33 from eMMC, src: 0x00050200, des: 0x01000000, size: 0x00067000
NOTICE: BL3-1: v1.0(release):a625749
NOTICE: BL3-1: Built : 11:25:15, Aug 25 2017
[BL31]: GXL CPU setup!
NOTICE: BL31: BL33 decompress pass
[Image: gxl_v1.1.3243-377db0f 2017-09-07 11:28:58 qiufang.dai@droid07]
87 14 45 fb 6c 2e c8 7a 1f 1b 32 1d [0.303762 Inits done]
secure task start!
high task start!
low task start!
ERROR: Error initializing runtime service opteed_fast

Could you provide a config file for linux5.x?

Are you sure that you applied the patch successfully?

Yes, I’m trying to use another config to compile now

It started, but there’s nothing output to my screen after logo.

Flattened Device Tree blob at 01000000

Booting using the fdt blob at 0x1000000
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
[rsvmem] fdt get prop fail.
Loading Ramdisk to 73705000, end 73e9a5c1 … OK
Loading Device Tree to 000000001fff6000, end 000000001ffff660 … OK
fdt_instaboot: no instaboot image

Starting kernel …

uboot time: 3847916 us

What a mess you have in eMMC ? Restore the regular firmware Android and only after that try running your version of the kernel with external media.