Bootmenu for amlogic devices

Hi,

This is my quick and dirty solution to multiboot any amlogic device(actually it can be used on any device that uses u-boot):

Be aware that it is not beginner friendly, you need at least some knowledge about writing and editing u-boot scripts, Uart cable is not needed but can be useful during testing and setting up.

I don’t have any of khadas boards, I made the boot menu to run on my kii pro tv box but you just need to replace the dtb.img file with the appropriate one for your board and everything else should work just fine

I tried to get it as close as I can to look like grub2 interface:

Now let’s explain How it works:

First, the sdcard must contain at least two fat32 partitions:

-First partition(fat32) (label=RECOVERY) content:

  Quote

├── aml_autoscript
├── dtb.img
├── Image
├── multiboot.script
├── multiboot.txt
├── uInitrd
└── update.zip

This partition contains the main boot manager files:

1-aml_autoscript is the script that is used to update the u-boot environment to allow for our method to work

2-dtb.img a dtb file, make sure to replace it with the appropriate one for your device I compiled it from coreelec source https://github.com/CoreELEC/device-trees-amlogic

3-Image is the kernel image of the boot manager

4- multiboot.script is the script that is executed to display the boot manager

5-update.zip use this in your update app in android to flash the aml_autoscript above and make the bootloader ready for our boot manager

-Second Partition(fat32) (label=BOOT) content:

├── config.yaml
└── multiboot
    ├── COREELEC
    ├── Debian-3-xfce
    ├── Debian_Server-3
    └── kernel-3.14

This partition contains at least the config.yaml file that contains general settings for the boot manager and the boot entries to be listed.

Note that I have a folder(multiboot) that contains the boot files for my distros(kernel,initrd,dtb and boot script) you don’t have to put them in this partition you can put them anywhere (another partition on the sd card, a USB drive or even in the internal EMMC) just make sure to have the correct path and device id for them in the config.yaml file.
Also If you want to use the remote control instead of a keyboard to select the os place the correct remote.conf of your remote in the root of this partition.

the structure of config.yaml is like this:

generalSettings:
  default: 5
  rememberboot: true
  timeout: 10
menu:
- bootscript: /multiboot/COREELEC/u-boot.script
  device: mmc 0:2
  devicefs: fat
  name: COREELEC
- bootscript: /multiboot/armbian-3.14.29-mate/u-boot.script
  device: mmc 0:2
  devicefs: fat
  name: armbian-3.14.29-mate
- bootscript: /multiboot/dvb_test/u-boot.script
  device: mmc 0:2
  devicefs: fat
  name: dvb_test
- bootscript: /multiboot/kernel-3.14/u-boot.script

first you set the general settings:

  • timeout: this is how many seconds the boot manager should wait before booting into the default boot entry

  • default: this is the zero based index of the default distro that the boot manager will boot to after timeout, note that index 0 is reserved for the internal EMMC boot so your menu starts at index 1.

  • rememberboot: if this is set to true then the manager will remember the entry that you selected and save it’s index in the default entry above so the next time you boot this will be your default entry.

after that you add your menu entries:

  • name: is the name of the distribution displayed in the boot menu

  • bootscript: this is the path of the bootscript of the distribution (note that this boot script should be capable of booting the distro on it’s on, so it must have the correct path of the boot files and pass the correct root parameter to the kernel, see the example u-boot.script files that are included in each distibution)

  • device is the device that contains the bootscipt using u-boot format so the first mmc and second partition would be mmc 0:2 , the second mmc and third partiton would be mmc 1:3 .

  • devicefs is the filesystem type of the above device, this is usually fat because most of these tv boxes support loading files of only fat32 partitions (except some boards like khadas vim and odroid whose bootloader support ext4 partitions)

now let’s see an example of a disto bootscript:

setenv env_addr "0x10400000"
setenv kernel_addr "0x11000000"
setenv initrd_addr "0x13000000"
setenv path "/multiboot/Debian-3-xfce"
setenv boot_start booti ${kernel_addr} ${initrd_addr} ${dtb_mem_addr}
if fatload mmc 0:2 ${kernel_addr} ${path}/zImage; then if fatload mmc 0:2 ${initrd_addr} ${path}/uInitrd; then if fatload mmc 0:2 ${env_addr} ${path}/uEnv.ini; then env import -t ${env_addr} ${filesize};fi; if fatload mmc 0:2 ${dtb_mem_addr} ${path}/dtb.img; then run boot_start; else store dtb read ${dtb_mem_addr}; run boot_start;fi;fi;fi;

this the same bootscript that was shipped with balbes150 image I only edited the device to mmc 0:2 because this is where I have my kernel and other boot files, also I prepended the correct path before each file name.

In the uEnv.ini file of this distro I edited the root parameter to use a partition labeled “Debian-3-xfce” and created that partiton using gparted

bootargs=root=LABEL=Debian-3-xfce rootflags=data=writeback rw console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0
fsck.fix=yes fsck.repair=yes net.ifnames=0 mac=${mac}

I prepared a boot image that contains the boot manager and two distibutions, Coreelec and Debian server.

download the image here and burn it to a new sdcard then use the update application in android and update using update.zip, after that you’ll see the boot menu after the reboot

https://drive.google.com/open?id=1dhpcqNrqbW493SK8J_Er9b-ZipJkTfd3

6 Likes

Hello, I downloaded the image, I have 4 partitions, I wrote it on sd card, I tried updating with the update.zip file but it does not update says the wrong signature and the boot manager does not appear. I mention that I have VIM2 max. What I’m wrong with, please help.
Thank you.

Well, on the k2pro It didn’t require to sign the update.zip maybe on khadas boards it checks for the signature so we might need to sign the update.zip with signapk.
If you can access u-boot through UART cable you can just load and execute the aml_autoscript without the need for the update.zip

Hi blondu,

Which version of Android you tried? I tried VIM2_Nougat_V180619 on VIM2 and load update.zip successfully, but still failed to boot into bootmenu, it is maybe the DTB or kernel of tiny linux not match for VIM2. But it works on VIM1, successfully boot into bootmanu and can boot to CoreELEC, remenber to replace the DTB file.

Thanks.

I have the version requested by Android and I changed dtb in RECOVERY 2 zones: kvim2_multios.dtb and kvim2_linux.dtb taken from DEBIAN / multiboot / Debian-server / dtb.
Thank you.

See on the Uart where it hangs and stops to boot.
for the recovery kernel, I compiled it from the coreelec project https://github.com/CoreELEC/linux-amlogic
Disabled as many features as possible without breaking anything, the dtb file was also compiled from the coreelec device-tree repo.
I can post the config I used so you can compile your own and test, or maybe post the whole Buildroot configs and scripts.
Note that the version of coreelec os that is shipped with the image is modified, the default init scripts of coreelec (and libreelec obviously) Doesn’t support mounting SYSTEM_IMAGE with a path, So I had to modify the init scripts.

Try to compile dtb from coreelec project

Hello, I’ve recovered some boot logs, 1 with the original dtb and the other with dtb linux vim2, can help.

first:
GXM:BL1:dc8b51:76f1a5;FEAT:ADFC318C:80;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 266320

BL2 Built : 11:58:42, May 27 2017.
gxl gc3c9a84 - xiaobo.gu@droid05

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR4 chl: Rank0+1 @ 1008MHz
Rank0: 2048MB(auto)-2T-18
Rank1: 1024MB(auto)-2T-18
DataBus test pass!
AddrBus test pass!
-s
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: 0x00018400
Load bl33 from eMMC, src: 0x0003c200, des: 0x01000000, size: 0x00055400
NOTICE: BL3-1: v1.0(release):3348978
NOTICE: BL3-1: Built : 15:44:01, May 12 2017
NOTICE: BL3-1: BL33 decompress pass
mpu_config_enable:ok

[Image: gxl_v1.1.3221-2cfba69 2017-05-27 16:03:58 qiufang.dai@droid07]

OPS=0x82

wdt: reset registers!

71 4d d5 c0 1b 33 5a c4 d 4c 10 48 [0.461237 Inits done]

secure task start!
high task start!
low task start!
ERROR: Error initializing runtime service opteed_fast

U-Boot 2015.01-g23f9dd2 (Aug 31 2017 - 17:45:34)

DRAM: 3 GiB
Relocation Offset is: b6ed0000
register usb cfg[0][1] = 00000000b7f594a0
[CANVAS]canvas init
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpu: vpu_clk_gate_init_off
vpp: vpp_init
MMC: aml_priv->desc_buf = 0x00000000b3ed0640
aml_priv->desc_buf = 0x00000000b3ed2960
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x3ff2800
emmc/sd response timeout, cmd55, status=0x3ff2800
init_part() 293: PART_TYPE_AML
[mmc_init] mmc init success
dtb magic edfe0dd0
start dts,buffer=00000000b3ed51b0,dt_addr=00000000b3ed51b0
parts: 10
00: logo.0000000002000000 1
01: recovery.0000000002000000 1
02: rsv.0000000000800000 1
03: tee.0000000000800000 1
04: crypt.0000000002000000 1
05: misc.0000000002000000 1
06: boot.0000000002000000 1
07: system.0000000080000000 1
08: cache.0000000020000000 2
09: data.ffffffffffffffff 4
init_part() 293: PART_TYPE_AML
eMMC/TSD partition table have been checked OK!
check pattern success
mmc env offset: 0x27400000
In: serial
Out: serial
Err: serial
reboot_mode=cold_boot
Unknown command ‘cvbs’ - try ‘help’
hpd_state=1
set hdmitx VIC = 16
config HPLL = 2970000
HPLL: 0xc000027b
config HPLL done
j = 4 vid_clk_div = 1
hdmitx: set enc for VIC: 16
HDMITX-DWC addr=0x10004006 rd_data=0x40
Error: HDMITX-DWC exp_data=0xff mask=0x9f
rx version is 1.4 or below div=10
hdmtix: set audio
hdmitx phy setting done
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-917: calc acc5096b, store acc5096b
_verify_dtb_checksum()-917: calc acc5096b, store acc5096b
dtb_read()-1039: total valid 2
dtb_read()-1106: do nothing
vpp: vpp_pq_load pq val error !!!
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
dtb_read_shortcut()-975: short cut in…
Net: __phy_realtek_initdwmac.c9410000amlkey_init() enter!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0

Start read misc partition datas!
info->attemp_times = 0
info->active_slot = 0
info->slot_info[0].bootable = 1
info->slot_info[0].online = 1
info->slot_info[1].bootable = 0
info->slot_info[1].online = 0
info->attemp_times = 0
attemp_times = 0
active slot = 0
wipe_data=successful
wipe_cache=successful
upgrade_step=0
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0xbd851000
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0xbd851000
[CANVAS]addr=0xbd851000 width=3840, height=2160
amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0
[KM]Error:f[key_manage_query_size]L507:key[usid] not programed yet
[BL31]: tee size: 0

mac address: 80:e4:da:81:22:ca
[KM]Error:f[key_manage_query_size]L507:key[deviceid] not programed yet
saradc - saradc sub-system

Usage:
saradc saradc open …- open a SARADC channel
saradc close.- close the SARADC
saradc getval.- get the value in current channel
saradc get_in_range .- return 0 if current value in the range of current channel

gpio: pin GPIOAO_2 (gpio 102) value is 1
Product checking: pass!
normal power on
boot wol: disable
Hit Enter or space or Ctrl+C key to stop autoboot – : 1 … 0
card in
init_part() 278: PART_TYPE_DOS
[mmc_init] mmc init success
reading multiboot.script
544 bytes read in 5 ms (105.5 KiB/s)
Saving Environment to aml-storage…
mmc env offset: 0x27400000
Writing to MMC(1)… done
start bootselector

Executing script at 01080000

reading Image
12967152 bytes read in 748 ms (16.5 MiB/s)
reading uInitrd
9424644 bytes read in 575 ms (15.6 MiB/s)
reading dtb.img
40137 bytes read in 7 ms (5.5 MiB/s)
[rsvmem] get fdtaddr NULL!
rsvmem - reserve memory

Usage:
rsvmem check - check reserved memory
rsvmem dump - dump reserved memory

rsvmem check failed

Loading init Ramdisk from Legacy Image at 13000000 …

Image Name: custom-initrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 9424580 Bytes = 9 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum … OK
load dtb from 0x1000000 …

Flattened Device Tree blob at 01000000

Booting using the fdt blob at 0x1000000
Loading Ramdisk to b35c0000, end b3ebcec4 … OK
Loading Device Tree to 000000001fff3000, end 000000001ffffcc8 … OK
fdt_instaboot: no instaboot image

Starting kernel …

uboot time: 4521103 us
domain-0 init dvfs: 4

second:GXM:BL1:dc8b51:76f1a5;FEAT:ADFC318C:80;POC:3;RCY:0;EMMC:0;READ:0;0.0;CHK:0;
TE: 254813

BL2 Built : 11:58:42, May 27 2017.
gxl gc3c9a84 - xiaobo.gu@droid05

set vdd cpu_a to 1120 mv
set vdd cpu_b to 1050 mv
set vddee to 1000 mv
Board ID = 6
CPU clk: 1200MHz
DQS-corr enabled
DDR scramble enabled
DDR4 chl: Rank0+1 @ 1008MHz
Rank0: 2048MB(auto)-2T-18
Rank1: 1024MB(auto)-2T-18
DataBus test pass!
AddrBus test pass!
-s
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: 0x00018400
Load bl33 from eMMC, src: 0x0003c200, des: 0x01000000, size: 0x00055400
NOTICE: BL3-1: v1.0(release):3348978
NOTICE: BL3-1: Built : 15:44:01, May 12 2017
NOTICE: BL3-1: BL33 decompress pass
mpu_config_enable:ok

[Image: gxl_v1.1.3221-2cfba69 2017-05-27 16:03:58 qiufang.dai@droid07]

OPS=0x82

wdt: reset registers!

71 4d d5 c0 1b 33 5a c4 d 4c 10 48 [0.449638 Inits done]

secure task start!
high task start!
low task start!
ERROR: Error initializing runtime service opteed_fast

U-Boot 2015.01-g23f9dd2 (Aug 31 2017 - 17:45:34)

DRAM: 3 GiB
Relocation Offset is: b6ed0000
register usb cfg[0][1] = 00000000b7f594a0
[CANVAS]canvas init
vpu: error: vpu: check dts: FDT_ERR_BADMAGIC, load default parameters
vpu: clk_level = 7
vpu: set clk: 666667000Hz, readback: 666660000Hz(0x300)
vpu: vpu_clk_gate_init_off
vpp: vpp_init
MMC: aml_priv->desc_buf = 0x00000000b3ed0640
aml_priv->desc_buf = 0x00000000b3ed2960
SDIO Port B: 0, SDIO Port C: 1
emmc/sd response timeout, cmd8, status=0x3ff2800
emmc/sd response timeout, cmd55, status=0x3ff2800
init_part() 293: PART_TYPE_AML
[mmc_init] mmc init success
dtb magic edfe0dd0
start dts,buffer=00000000b3ed51b0,dt_addr=00000000b3ed51b0
parts: 10
00: logo.0000000002000000 1
01: recovery.0000000002000000 1
02: rsv.0000000000800000 1
03: tee.0000000000800000 1
04: crypt.0000000002000000 1
05: misc.0000000002000000 1
06: boot.0000000002000000 1
07: system.0000000080000000 1
08: cache.0000000020000000 2
09: data.ffffffffffffffff 4
init_part() 293: PART_TYPE_AML
eMMC/TSD partition table have been checked OK!
check pattern success
mmc env offset: 0x27400000
In: serial
Out: serial
Err: serial
reboot_mode=cold_boot
Unknown command ‘cvbs’ - try ‘help’
hpd_state=1
set hdmitx VIC = 16
config HPLL = 2970000
HPLL: 0xc000027b
config HPLL done
j = 4 vid_clk_div = 1
hdmitx: set enc for VIC: 16
HDMITX-DWC addr=0x10004006 rd_data=0x40
Error: HDMITX-DWC exp_data=0xff mask=0x9f
rx version is 1.4 or below div=10
hdmtix: set audio
hdmitx phy setting done
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
_verify_dtb_checksum()-917: calc acc5096b, store acc5096b
_verify_dtb_checksum()-917: calc acc5096b, store acc5096b
dtb_read()-1039: total valid 2
dtb_read()-1106: do nothing
vpp: vpp_pq_load pq val error !!!
[store]To run cmd[emmc dtb_read 0x1000000 0x40000]
dtb_read_shortcut()-975: short cut in…
Net: __phy_realtek_initdwmac.c9410000amlkey_init() enter!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0

Start read misc partition datas!
info->attemp_times = 0
info->active_slot = 0
info->slot_info[0].bootable = 1
info->slot_info[0].online = 1
info->slot_info[1].bootable = 0
info->slot_info[1].online = 0
info->attemp_times = 0
attemp_times = 0
active slot = 0
wipe_data=successful
wipe_cache=successful
upgrade_step=0
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0xbd851000
[OSD]load fb addr from dts
[OSD]fb_addr for logo: 0xbd851000
[CANVAS]addr=0xbd851000 width=3840, height=2160
amlkey_init() enter!
amlkey_init() 71: already init!
[EFUSE_MSG]keynum is 4
[BL31]: tee size: 0
[KM]Error:f[key_manage_query_size]L507:key[usid] not programed yet
[BL31]: tee size: 0

mac address: 80:e4:da:81:22:ca
[KM]Error:f[key_manage_query_size]L507:key[deviceid] not programed yet
saradc - saradc sub-system

Usage:
saradc saradc open …- open a SARADC channel
saradc close.- close the SARADC
saradc getval.- get the value in current channel
saradc get_in_range .- return 0 if current value in the range of current channel

gpio: pin GPIOAO_2 (gpio 102) value is 1
Product checking: pass!
normal power on
boot wol: disable
Hit Enter or space or Ctrl+C key to stop autoboot – : 1 … 0
card in
init_part() 278: PART_TYPE_DOS
[mmc_init] mmc init success
reading multiboot.script
544 bytes read in 5 ms (105.5 KiB/s)
Saving Environment to aml-storage…
mmc env offset: 0x27400000
Writing to MMC(1)… done
start bootselector

Executing script at 01080000

reading Image
12967152 bytes read in 750 ms (16.5 MiB/s)
reading uInitrd
9424644 bytes read in 586 ms (15.3 MiB/s)
reading dtb.img
46308 bytes read in 8 ms (5.5 MiB/s)
[rsvmem] get fdtaddr NULL!
rsvmem - reserve memory

Usage:
rsvmem check - check reserved memory
rsvmem dump - dump reserved memory

rsvmem check failed

Loading init Ramdisk from Legacy Image at 13000000 …

Image Name: custom-initrd
Image Type: AArch64 Linux RAMDisk Image (gzip compressed)
Data Size: 9424580 Bytes = 9 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum … OK
load dtb from 0x1000000 …

Flattened Device Tree blob at 01000000

Booting using the fdt blob at 0x1000000
Loading Ramdisk to b35c0000, end b3ebcec4 … OK
Loading Device Tree to 000000001fff1000, end 000000001ffff4e3 … OK
fdt_instaboot: no instaboot image

Starting kernel …

uboot time: 4524150 us
domain-0 init dvfs: 4

domain-1 init dvfs: 4

[ 0.000000@0] Initializing cgroup subsys cpuset
[ 0.000000@0] Initializing cgroup subsys cpu
[ 0.000000@0] Initializing cgroup subsys cpuacct
[ 0.000000@0] Linux version 3.14.29 (mohammad@mohammad-pc) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #116 SMP PREEMPT Wed Jul 4 10:12:24 +03 2018
[ 0.000000@0] CPU: AArch64 Processor [410fd034] revision 4
[ 0.000000@0] no prop version_code
[ 0.000000@0] fdt Reserved memory table:
[ 0.000000@0] linux,di: 0x00000000b6200000 - 0x00000000b8000000 (30 MiB)
[ 0.000000@0] DI: DI reserved memory: created CMA memory pool at 0x00000000b6200000, size 30 MiB
[ 0.000000@0] linux,ion-dev: 0x00000000af5c0000 - 0x00000000b35c0000 (64 MiB)
[ 0.000000@0] linux,vdin1_cma: 0x00000000b5000000 - 0x00000000b6000000 (16 MiB)
[ 0.000000@0] cma: Reserved 16 MiB at b5000000, total cma pages:4096
[ 0.000000@0] linux,ppmgr: 0x00000000b6200000 - 0x00000000b6200000 (0 MiB)
[ 0.000000@0] linux,codec_mm_cma: 0x00000000a3400000 - 0x00000000af400000 (192 MiB)
[ 0.000000@0] cma: Reserved 192 MiB at a3400000, total cma pages:53248
[ 0.000000@0] linux,picdec: 0x00000000b6200000 - 0x00000000b6200000 (0 MiB)
[ 0.000000@0] Reserved memory: incorrect alignment of CMA region
[ 0.000000@0] linux,codec_mm_reserved: 0x000000009f300000 - 0x00000000a3400000 (65 MiB)
[ 0.000000@0] fdt Reserved memory total: 371 MiB
[ 0.000000@0] cma: Reserved 8 MiB at b4800000, total cma pages:55296
[ 0.000000@0] psci: probing function IDs from device-tree
[ 0.000000@0] PERCPU: Embedded 12 pages/cpu @ffffffc0b615f000 s19904 r8192 d21056 u49152
[ 0.000000@0] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 736448
[ 0.000000@0] Kernel command line: root=/dev/ram0 console=ttyS0,115200n8 console=tty0 no_console_suspend consoleblank=0 mac= panic=1
[ 0.000000@0] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000@0] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes)
[ 0.000000@0] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[ 0.000000@0] Memory: 2528904K/3010560K available (7671K kernel code, 847K rwdata, 3028K rodata, 1111K init, 3347K bss, 481656K reserved)
[ 0.000000@0] Virtual kernel memory layout:
[ 0.000000@0] vmalloc : 0xffffff8000000000 - 0xffffff8040000000 ( 1024 MB)
[ 0.000000@0] vmemmap : 0xffffff8040010000 - 0xffffff8043f50000 ( 63 MB)
[ 0.000000@0] modules : 0xffffffbffc000000 - 0xffffffc000000000 ( 64 MB)
[ 0.000000@0] memory : 0xffffffc000000000 - 0xffffffc0b8000000 ( 2944 MB)
[ 0.000000@0] .init : 0xffffffc001af4000 - 0xffffffc001c09dc0 ( 1112 kB)
[ 0.000000@0] .text : 0xffffffc001080000 - 0xffffffc001af3c44 ( 10704 kB)
[ 0.000000@0] .data : 0xffffffc001c0a000 - 0xffffffc001cddcf0 ( 848 kB)
[ 0.000000@0] PM: Registered nosave memory: [mem 0x01080000-0x01af2fff]
[ 0.000000@0] SLUB: HWalign=64, Order=0-1, MinObjects=0, CPUs=8, Nodes=1
[ 0.000000@0] arch_multi_cluster:1
[ 0.000000@0] Preemptible hierarchical RCU implementation.
[ 0.000000@0] .RCU debugfs-based tracing is enabled.
[ 0.000000@0] NR_IRQS:64 nr_irqs:64 0
[ 0.000000@0] Architected cp15 timer(s) running at 24.00MHz (phys).
[ 0.000004@0] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 2863311519744ns
[ 0.000031@0] meson_bc_timer: mclk->mux_reg =ffffff8000014990,mclk->reg =ffffff8000016994
[ 0.000386@0] Console: colour dummy device 80x25
[ 0.000919@0] console [tty0] enabled
[ 0.003196@0] allocated 12582912 bytes of page_cgroup
[ 0.003212@0] please try ‘cgroup_disable=memory’ option if you don’t want memory cgroups
[ 0.003244@0] Calibrating delay loop (skipped), value calculated using timer frequency… 48.00 BogoMIPS (lpj=240000)
[ 0.003270@0] pid_max: default: 32768 minimum: 301
[ 0.003448@0] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.003470@0] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.009406@0] Initializing cgroup subsys memory
[ 0.009448@0] Initializing cgroup subsys devices
[ 0.009462@0] Initializing cgroup subsys freezer
[ 0.009475@0] Initializing cgroup subsys blkio
[ 0.009486@0] Initializing cgroup subsys perf_event
[ 0.009544@0] ftrace: allocating 26807 entries in 105 pages
[ 0.042629@0] /cpus/cpu@0: Missing clock-frequency property
[ 0.042660@0] /cpus/cpu@1: Missing clock-frequency property
[ 0.042674@0] /cpus/cpu@2: Missing clock-frequency property
[ 0.042689@0] /cpus/cpu@3: Missing clock-frequency property
[ 0.042705@0] /cpus/cpu@100: Missing clock-frequency property
[ 0.042721@0] /cpus/cpu@101: Missing clock-frequency property
[ 0.042738@0] /cpus/cpu@102: Missing clock-frequency property
[ 0.042755@0] /cpus/cpu@103: Missing clock-frequency property
[ 0.042772@0] hw perfevents: enabled with arm/armv8-pmuv3 PMU driver, 7 counters available
[ 0.082379@0] Meson chip version = RevA (22:A - 82:0)
[ 0.102490@1] CPU1: Booted secondary processor
[ 0.122470@2] CPU2: Booted secondary processor
[ 0.142475@3] CPU3: Booted secondary processor
[ 0.162510@4] CPU4: Booted secondary processor
[ 0.182507@5] CPU5: Booted secondary processor
[ 0.202517@6] CPU6: Booted secondary processor
[ 0.222540@7] CPU7: Booted secondary processor
[ 0.222628@0] Brought up 8 CPUs
[ 0.222704@0] SMP: Total of 8 processors activated.
[ 0.223255@0] devtmpfs: initialized
[ 0.228296@2] sched: registering cpufreq notifiers for scale-invariant loads
[ 0.228428@2] instabooting: 0
[ 0.236739@2] cma: cma_init_reserved_areas, use_cma_first:1
[ 0.236824@2] pinctrl core: initialized pinctrl subsystem
[ 0.237361@2] regulator-dummy: no parameters
[ 0.238113@2] NET: Registered protocol family 16
[ 0.239420@3] cpuidle: using governor menu
[ 0.239602@2] aml_vdac_init: module init
[ 0.239764@2] register canvas platform driver
[ 0.239849@2] register rdma platform driver
[ 0.240241@2] vdso: 2 pages (1 code, 1 data) at base ffffffc001c14000
[ 0.240291@2] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.240681@2] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.241553@2] software IO TLB [mem 0x99400000-0x99800000] (4MB) mapped at [ffffffc099400000-ffffffc0997fffff]
[ 0.241572@2] Serial: AMBA PL011 UART driver
[ 0.242138@3] aml_i2c version: 20140813
[ 0.242403@2] i2c-core: driver [pmu4] using legacy resume method
[ 0.242494@3] codec_mm:codec_mm_module_init
[ 0.242768@2] aml_watch_point_probe, in
[ 0.243203@3] gxbb_mpll_clk: register mpll_clk_out0 success done
[ 0.243222@3] gxbb_mpll_clk: register mpll_clk_out1 success done
[ 0.243242@3] gxbb_mpll_clk: register mpll_clk_out2 success done
[ 0.243454@3] clk_sys: register PLL sys_pll success done
[ 0.243476@3] gxl_clk: [ xtal .] ->clockrate: 24000000Hz
[ 0.243488@3] gxl_clk: [ 32Khz .] ->clockrate: 32000Hz
[ 0.243499@3] gxl_clk: [ clk81 .] ->clockrate: 166666666Hz
[ 0.243511@3] gxl_clk: [ fixed_pll .] ->clockrate: 2000000000Hz
[ 0.243522@3] gxl_clk: [ fclk_div2 .] ->clockrate: 1000000000Hz
[ 0.243534@3] gxl_clk: [ fclk_div3 .] ->clockrate: 666666666Hz
[ 0.243545@3] gxl_clk: [ fclk_div4 .] ->clockrate: 500000000Hz
[ 0.243556@3] gxl_clk: [ fclk_div5 .] ->clockrate: 400000000Hz
[ 0.243567@3] gxl_clk: [ fclk_div7 .] ->clockrate: 285714285Hz
[ 0.243602@3] gxl_clk: clock initialization complete
[ 0.243825@3] clkmsr: Gxl msr_clk_reg0=ffffff800006475c,msr_clk_reg2=ffffff8000066764
[ 0.246416@3] aml_iomap: amlogic iomap probe done
[ 0.247093@2] pinmux-gxl c1109880.pinmux: Init pinux probe!
[ 0.248299@2] pinmux-gxl c1109880.pinmux: Probed amlogic pinctrl driver
[ 0.248943@2] aml-i2c c1108500.i2c: add adapter aml_i2c_adap1(ffffffc09a1d30e0)
[ 0.249684@2] aml-i2c c11087c0.i2c: add adapter aml_i2c_adap2(ffffffc09a2680e0)
[ 0.250209@2] aml-i2c c11087e0.i2c: add adapter aml_i2c_adap3(ffffffc09a1d38e0)
[ 0.250702@2] aml-i2c c1108d20.i2c: add adapter aml_i2c_adap4(ffffffc09a2688e0)
[ 0.251017@2] genirq: Setting trigger mode 8 for irq 241 failed (gic_set_type+0x0/0xbc)
[ 0.251046@2] genirq: Setting trigger mode 8 for irq 242 failed (gic_set_type+0x0/0xbc)
[ 0.251224@3] genirq: Setting trigger mode 8 for irq 241 failed (gic_set_type+0x0/0xbc)
[ 0.251250@3] genirq: Setting trigger mode 8 for irq 242 failed (gic_set_type+0x0/0xbc)
[ 0.253552@0] dvfs [scpi_dvfs_get_opps] - buf.opp[0].freq_hz = 100000000
[ 0.253569@0] dvfs [scpi_dvfs_get_opps] - buf.opp[1].freq_hz = 250000000
[ 0.253581@0] dvfs [scpi_dvfs_get_opps] - buf.opp[2].freq_hz = 500000000
[ 0.253593@0] dvfs [scpi_dvfs_get_opps] - buf.opp[3].freq_hz = 667000000
[ 0.253606@0] dvfs [scpi_dvfs_get_opps] - buf.opp[4].freq_hz = 1000000000
[ 0.253618@0] dvfs [scpi_dvfs_get_opps] - buf.opp[5].freq_hz = 1200000000
[ 0.253630@0] dvfs [scpi_dvfs_get_opps] - buf.opp[6].freq_hz = 1512000000
[ 0.253642@0] dvfs [scpi_dvfs_get_opps] - new count 7, max_freq 1512000000
[ 0.255821@0] dvfs [scpi_dvfs_get_opps] - buf.opp[0].freq_hz = 100000000
[ 0.255835@0] dvfs [scpi_dvfs_get_opps] - buf.opp[1].freq_hz = 250000000
[ 0.255847@0] dvfs [scpi_dvfs_get_opps] - buf.opp[2].freq_hz = 500000000
[ 0.255859@0] dvfs [scpi_dvfs_get_opps] - buf.opp[3].freq_hz = 667000000
[ 0.255872@0] dvfs [scpi_dvfs_get_opps] - buf.opp[4].freq_hz = 1000000000
[ 0.255884@0] dvfs [scpi_dvfs_get_opps] - new count 5, max_freq 1000000000
[ 0.258130@3] codec_mm has 2 memory regions
[ 0.258183@3] codec_mm codec_mm.19: assigned reserved memory node linux,codec_mm_cma ok
[ 0.258205@3] codec_mm codec_mm.19: assigned reserved memory node linux,codec_mm_reserved ok
[ 0.258321@2] codec_mm has 2 memory regions
[ 0.258345@2] codec_mm codec_mm.19: assigned reserved memory node linux,codec_mm_cma ok
[ 0.258365@2] codec_mm codec_mm.19: assigned reserved memory node linux,codec_mm_reserved ok
[ 0.260667@2] vpu: driver version: v03
[ 0.260710@2] vpu: load vpu_clk: 666667000Hz(7)
[ 0.260810@2] vpu: vpu_probe OK
[ 0.262423@2] tv_vout: tvout_probe
[ 0.262446@2] tv_vout: chrdev devno 266338304 for disp
[ 0.262457@2] vout_notify: vout_register_server
[ 0.262467@2] tv_vout: register tv module server ok
[ 0.262777@3] tv_vout: create cdev tv
[ 0.262794@3] tv_vout: tvout_probe OK
[ 0.263575@3] canvas_probe reg=00000000c8838000,size=400
[ 0.263612@3] canvas maped reg_base =ffffff800019c000
[ 0.267540@2] rdma_probe
[ 0.530758@3] bio: create slab at 0
[ 0.531795@3] SCSI subsystem initialized
[ 0.532353@0] usbcore: registered new interface driver usbfs
[ 0.532454@3] usbcore: registered new interface driver hub
[ 0.532589@3] usbcore: registered new device driver usb
[ 0.533765@1] i2c-gpio i2c_gpio.40: using pins 172 (SDA) and 173 (SCL)
[ 0.533921@3] Linux video capture interface: v2.00
[ 0.534065@3] pps_core: LinuxPPS API ver. 1 registered
[ 0.534078@3] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it
[ 0.534149@3] PTP clock support registered
[ 0.534762@3] hdmitx: system: amhdmitx_init
[ 0.534777@3] hdmitx: system: Ver: 2014May6
[ 0.534978@3] hdmitx: system: amhdmitx_probe
[ 0.535341@0] hdmitx: system: not find match init-data
[ 0.535361@0] hdmitx hpd irq = 89
[ 0.535999@3] hdmitx20: Mapped PHY: 0xc0800000
[ 0.536022@3] hdmitx20: Mapped PHY: 0xc1104400
[ 0.536047@3] hdmitx20: Mapped PHY: 0xc8100000
[ 0.536060@3] hdmitx20: Mapped PHY: 0xc8834000
[ 0.536071@3] hdmitx20: Mapped PHY: 0xc883a000
[ 0.536081@3] hdmitx20: Mapped PHY: 0xc883c000
[ 0.536095@3] hdmitx20: Mapped PHY: 0xd0100000
[ 0.536107@3] hdmitx20: Mapped PHY: 0xda83a000
[ 0.536125@3] hdmitx: alread display in uboot 0x10
[ 0.536171@3] avmute set to 1
[ 0.536384@3] amhdmitx: probe of amhdmitx.38 failed with error 29912536
[ 0.536682@1] vout_serve: no matched vout_init mode
[ 0.536784@2] vinfo: error: invalid vinfo. current vmode is not supported
[ 0.536979@1] vout_serve: create_vout_fops OK
[ 0.536990@1] vout_serve: create vout attribute OK
[ 0.537000@1] vout_serve: meson_vout_probe OK
[ 0.537196@1] logo: logo_init
[ 0.538383@2] Switched to clocksource arch_sys_counter
[ 0.543222@0] hdmitx: system: irq 80000002
[ 0.551511@2] FS-Cache: Loaded
[ 0.551801@1] CacheFiles: Loaded
[ 0.562377@1] NET: Registered protocol family 2
[ 0.562881@1] TCP established hash table entries: 32768 (order: 6, 262144 bytes)
[ 0.563171@1] TCP bind hash table entries: 32768 (order: 7, 524288 bytes)
[ 0.563673@1] TCP: Hash tables configured (established 32768 bind 32768)
[ 0.563754@1] TCP: reno registered
[ 0.563776@1] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[ 0.563864@1] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[ 0.564139@1] NET: Registered protocol family 1
[ 0.564410@2] RPC: Registered named UNIX socket transport module.
[ 0.564426@2] RPC: Registered udp transport module.
[ 0.564436@2] RPC: Registered tcp transport module.
[ 0.564446@2] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.564612@2] Unpacking initramfs…
[ 0.868516@2] hdmitx: plugin
[ 0.925228@2] EDID Parser:
[ 0.925610@2] hdmitx: get dtd0 vic: 16
[ 0.925643@2] hdmitx: get dtd1 vic: 16
[ 0.925653@2] hdmitx: edid: find IEEEOUT
[ 0.925664@2] hdmitx: edid: check sum valid
[ 0.925673@2] hdmitx: edid: check sum valid
[ 0.925684@2] vinfo: error: invalid vinfo. current vmode is not supported
[ 0.925697@2] hdmitx: update rx hdr info 0 at edid parsing
[ 0.925710@2] hdmitx: edid: check sum valid
[ 0.925719@2] hdmitx: edid: check sum valid
[ 0.925729@2] hdmitx: edid: blk0 raw data
[ 0.925775@2] 00ffffffffffff0009d13b78455400001014010380341d782eeed1a555489b26
[ 0.925775@2] 125054a56b80710081c081408180a9c0b300d1c00101023a801871382d40582c
[ 0.925775@2] 450009252100001a000000ff004534413031303137534c300a20000000fd0032
[ 0.925775@2] 4c185311000a202020202020000000fc0042656e5120473234313248440a0165
[ 0.925775@2]
[ 0.925775@2]
[ 0.925829@2] hdmitx: edid: blk1 raw data
[ 0.925873@2] 020322f14f90050403020111121314060715161f2309070766030c0010008301
[ 0.925873@2] 0000023a801871382d40582c450009252100001f011d8018711c1620582c2500
[ 0.925873@2] 09252100009f011d007251d01e206e28550009252100001e8c0ad08a20e02d10
[ 0.925873@2] 103e960009252100001800000000000000000000000000000000000000000026
[ 0.925873@2]
[ 0.925873@2]
[ 0.925951@2] [RX]-receive ksv list len:1,depth:1,cas:0,dev:0
[ 0.925967@2] vinfo: error: invalid vinfo. current vmode is not supported
[ 0.925979@2] hdmitx: video: get current mode: invalid
[ 0.925990@2] hdmitx: update rx hdr info 0
[ 0.925999@2] hdmitx: update physcial size: 520 290
[ 0.926028@2] hdmitx: edid: not find mapped vic
[ 0.926066@2] hdmitx: system: already init VIC = 0 Now VIC = 0
[ 0.926079@2] hdmitx: system: packet: can’t get vendor data
[ 0.926090@2] invalid 60 1
[ 0.926100@2] invalid 60 1
[ 0.926108@2] hdmtix: setting audio 1
[ 0.926117@2] hdmitx tx_aud_src = 0
[ 0.926143@2] hdmitx: audio: Audio Type: #0
[ 0.926159@2] hdmitx: fs = 0, cd = 4, tmds_clk = 0
[ 0.926170@2] hdmitx aud_n_para = 6144
[ 0.926194@2] hdmitx set channel status
[ 0.926290@2] hdmtix: setting audio 1
[ 0.926306@2] hdmitx tx_aud_src = 0
[ 0.926331@2] hdmitx: audio: Audio Type: #0
[ 0.926346@2] hdmitx: fs = 0, cd = 4, tmds_clk = 0
[ 0.926355@2] hdmitx aud_n_para = 6144
[ 0.926379@2] hdmitx set channel status
[ 0.943801@3] Freeing initrd memory: 9200K (ffffffc0b35c0000 - ffffffc0b3ebc000)
[ 0.950779@1] futex hash table entries: 2048 (order: 5, 131072 bytes)
[ 0.950954@1] audit: initializing netlink subsys (disabled)
[ 0.951012@1] audit: type=2000 audit(0.930:1): initialized
[ 0.954863@1] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 0.978218@3] VFS: Disk quotas dquot_6.5.2
[ 0.978818@1] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.986849@3] NFS: Registering the id_resolver key type
[ 0.986909@3] Key type id_resolver registered
[ 0.986920@3] Key type id_legacy registered
[ 0.987358@2] fuse init (API version 7.22)
[ 0.988818@1] msgmni has been set to 5389
[ 0.990453@3] alg: No test for stdrng (krng)
[ 0.991010@1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 0.991165@1] io scheduler noop registered (default)
[ 0.991187@1] io scheduler deadline registered
[ 0.991231@1] io scheduler cfq registered
[ 1.218364@3] meson-rng c8834000.rng: hwrng registered
[ 1.219271@2] [drm] Initialized drm 1.1.0 20060810
[ 1.221837@0] mtdoops: mtd device (mtddev=name/number) must be supplied
[ 1.354814@0] libphy: stmmac: probed
[ 1.354842@0] eth0: PHY ID 001cc916 at 0 IRQ POLL (stmmac-0:00) active
[ 1.354855@0] eth0: PHY ID 001cc916 at 7 IRQ POLL (stmmac-0:07)
[ 1.356376@2] platform c9000000.dwc3: Driver dwc3 requests probe deferral
[ 1.356676@2] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 1.356703@2] ehci-h20ahb: H20AHB-EHCI Host Controller driver
[ 1.357139@1] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 1.358208@2] usbcore: registered new interface driver usb-storage
[ 1.359468@3] amlogic-new-usb2 d0078000.usb2phy: USB2 phy probe:phy_mem:0xd0078000, iomap phy_base:0xffffff80001da000
[ 1.360012@0] amlogic-new-usb3 d0078080.usb3phy: This phy has no usb port
[ 1.360100@0] amlogic-new-usb3 d0078080.usb3phy: USB3 phy probe:phy_mem:0xd0078080, iomap phy_base:0xffffff80001dc080
[ 1.360625@2] i2c /dev entries driver
[ 1.364171@1] cpu cpu0: bL_cpufreq_init: CPU 0 initialized
[ 1.366545@0] cpu cpu4: bL_cpufreq_init: CPU 4 initialized
[ 1.367887@0] arm_big_little: bL_cpufreq_register: Registered platform driver: scpi
[ 1.368288@2] CPUidle arm64: cpuidle init start!!
[ 1.368879@2] CPUidle arm64: cpuidle init done!
[ 1.369773@1] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.370513@3] hidraw: raw HID events driver © Jiri Kosina
[ 1.371517@3] usbcore: registered new interface driver usbhid
[ 1.371542@3] usbhid: USB HID core driver
[ 1.371831@3] meson_uart c81004c0.serial: ==uart0 reg addr = ffffff80001de4c0
[ 1.371878@3] c81004c0.serial: ttyS0 at MMIO 0xc81004c0 (irq = 225, base_baud = 1500000) is a meson_uart
[ 1.371902@3] meson_uart c81004c0.serial: ttyS0 use xtal(8M) 24000000 change 0 to 115200
[ 3.013364@3] console [ttyS0] enabled
[ 3.018118@3] meson_uart c11084c0.serial: ==uart1 reg addr = ffffff80001ea4c0
[ 3.024096@3] c11084c0.serial: ttyS1 at MMIO 0xc11084c0 (irq = 58, base_baud = 1500000) is a meson_uart
[ 3.034252@1] ao-bank:150 is using the pin GPIOAO_5 as gpio
[ 3.038953@1] pinmux-gxl c1109880.pinmux: request() failed for pin 5
[ 3.045173@1] pinmux-gxl c1109880.pinmux: pin-5 (c81004e0.serial) status -22
[ 3.052167@1] pinmux-gxl c1109880.pinmux: could not request pin 5 (GPIOAO_5) from group ao_b_uart on device c1109880.pinmux
[ 3.063292@1] meson_uart c81004e0.serial: Error applying setting, reverse things back
[ 3.071122@1] meson_uart c81004e0.serial: ==uart4 reg addr = ffffff80001ec4e0
[ 3.078146@1] c81004e0.serial: ttyS4 at MMIO 0xc81004e0 (irq = 229, base_baud = 1500000) is a meson_uart
[ 3.089323@1] dwc_otg: usb0: type: 2 speed: 0, config: 0, dma: 0, id: 0, phy: d0078000, ctrl: 0
[ 3.196468@3] dwc_otg: Core Release: 3.10a
[ 3.196512@3] dwc_otg: Setting default values for core params
[ 3.200670@3] dwc_otg: curmode: 0, host_only: 0
[ 3.217037@3] WARN::dwc_otg_core_reset:5150: dwc_otg_core_reset() HANG! Soft Reset GRSTCTL=80000001
[ 3.217037@3]
[ 3.234818@3] WARN::dwc_otg_core_reset:5150: dwc_otg_core_reset() HANG! Soft Reset GRSTCTL=80000001
[ 3.234818@3]
[ 3.250871@3] dwc_otg: Using Buffer DMA mode
[ 3.250912@3] dwc_otg: OTG VER PARAM: 1, OTG VER FLAG: 1
[ 3.254786@3] dwc_otg: Working on port type = SLAVE
[ 3.259651@3] dwc_otg: Dedicated Tx FIFOs mode

Does the board just hang after the last line or does it reboot? I can see that the kernel is booting so there might be some problem setting up Getty on the serial port. if the board reboots then it’s likely that the script was run but for some reason, the framebuffer was not set up correctly, Do you see anything through HDMI?

I do not see the boot menu, so I can not select any system.

Does the board reboot automatically? try to replace the kernel in the recovery partition with a kernel that you tested before(from any distro that you booted before)

@moham96 & community,

this is a great idea. but the google drive is invalid now… can someone share it again?

on another thread (Multiboot selector for your tv box - General Chat - armbian forum) the author posted a newer method, but the google drive is also invalid. can someone, hopefully someone read both the threads here and there, share the files of that thread?

many thanks.