I need to boot OpenWRT on a Kernel 4.14. I pull the last OpenWRT git files and only change “menu menuconfig” config like this:
Target System -> MediaTek Ralink ARM
Subtarget -> MT7622
Target Profile -> LeMaker Banana Pi R64
The project builds good and I get .bin files. But the boot progress stops at the “[ATF][ 23.608535]el3_exit” (see List 1 below). By the way if I change version to 4.19 (in
target/linux/mediatek/Makefile) the image boots normal.
Whats wrong with 4.14?
List 1
MT7622> bootm
bootm flag=0, states=70f
## Loading kernel from FIT Image at 4007ff28 ...
Using 'config@1' configuration
Trying 'kernel@1' kernel subimage
Description: ARM64 OpenWrt Linux-4.14.156
Type: Kernel Image
Compression: lzma compressed
Data Start: 0x40080014
Data Size: 4478937 Bytes = 4.3 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x41080000
Entry Point: 0x41080000
Hash algo: crc32
Hash value: d385e1ea
Hash algo: sha1
Hash value: 2e026562f5260207241a2e873fce56a30b547e4a
Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 4007ff28 ...
Using 'config@1' configuration
Trying 'fdt@1' fdt subimage
Description: ARM64 OpenWrt BPI-R64 device tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x404c5928
Data Size: 22258 Bytes = 21.7 KiB
Architecture: AArch64
Hash algo: crc32
Hash value: fb3ab39e
Hash algo: sha1
Hash value: 905d9e9c593d3806699c23cd148b60a0f73f3a89
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x404c5928
Uncompressing Kernel Image ... OK
Loading Device Tree to 6bff7000, end 6bfff6f1 ... OK
Starting kernel ...
[ATF][ 23.582142]save kernel info
[ATF][ 23.585079]Kernel_EL2
[ATF][ 23.587749]Kernel is 64Bit
[ATF][ 23.590837]pc=0x41080000, r0=0x6bff7000, r1=0x0
INFO: BL3-1: Preparing for EL3 exit to normal world, Kernel
INFO: BL3-1: Next image address = 0x41080000
INFO: BL3-1: Next image spsr = 0x3c9
[ATF][ 23.608535]el3_exit
Maybe 4.14 does not contain init-code? 4.14 is 2 years old and first mt7622 patches are bit later in 2018
maybe other cause
Your kernel container (fit image) is aarch64 and after unpacking kernel there seem to be switch from 32 to 64bit (atf lines)…can you compare this part with 4.19?
The “quick start img” has Kernel 4.4 and it works:
Does it mean current 4.14 is older then current 4.4? And how can I realize the Kernel contains init-code or not?
List 2 contains boot log for 4.19. The start part looks like 4.14.
MT7622> bootm
bootm flag=0, states=70f
## Loading kernel from FIT Image at 4007ff28 ...
Using 'config@1' configuration
Trying 'kernel@1' kernel subimage
Description: ARM64 OpenWrt Linux-4.19.86
Type: Kernel Image
Compression: lzma compressed
Data Start: 0x40080010
Data Size: 4769798 Bytes = 4.5 MiB
Architecture: AArch64
OS: Linux
Load Address: 0x41080000
Entry Point: 0x41080000
Hash algo: crc32
Hash value: e5fd6d53
Hash algo: sha1
Hash value: 13a99c81f9f9f178a4143994585687bf57e25efd
Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 4007ff28 ...
Using 'config@1' configuration
Trying 'fdt@1' fdt subimage
Description: ARM64 OpenWrt BPI-R64 device tree blob
Type: Flat Device Tree
Compression: uncompressed
Data Start: 0x4050c950
Data Size: 23070 Bytes = 22.5 KiB
Architecture: AArch64
Hash algo: crc32
Hash value: 6f50902d
Hash algo: sha1
Hash value: a45cf7ff90b8c1baa5e7680293643f6d156ddda2
Verifying Hash Integrity ... crc32+ sha1+ OK
Booting using the fdt blob at 0x4050c950
Uncompressing Kernel Image ... OK
Loading Device Tree to 6bff7000, end 6bfffa1d ... OK
Starting kernel ...
[ATF][ 29.840173]save kernel info
[ATF][ 29.843109]Kernel_EL2
[ATF][ 29.845779]Kernel is 64Bit
[ATF][ 29.848867]pc=0x41080000, r0=0x6bff7000, r1=0x0
INFO: BL3-1: Preparing for EL3 exit to normal world, Kernel
INFO: BL3-1: Next image address = 0x41080000
INFO: BL3-1: Next image spsr = 0x3c9
[ATF][ 29.866565]el3_exit
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 4.19.86 (revyakin@lenovo) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 r11625-a512123)) #0 SMP Thu Dec 5 14:29:46 2019
[ 0.000000] Machine model: Bananapi BPI-R64
[ 0.000000] On node 0 totalpages: 262096
[ 0.000000] DMA32 zone: 4096 pages used for memmap
[ 0.000000] DMA32 zone: 0 pages reserved
[ 0.000000] DMA32 zone: 262096 pages, LIFO batch:63
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] random: get_random_bytes called from start_kernel+0x8c/0x3ec with crng_init=0
[ 0.000000] percpu: Embedded 20 pages/cpu s42712 r8192 d31016 u81920
[ 0.000000] pcpu-alloc: s42712 r8192 d31016 u81920 alloc=20*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258000
[ 0.000000] Kernel command line: console=ttyS0,115200n1 rootfstype=squashfs earlyprintk block2mtd.block2mtd=/dev/mmcblk0,65536,eMMC,5 mtdparts=eMMC:768k(mbr)ro,512k(uboot),512k(Config),256k(Factory),64M(Kernel),2048M(usrdata)
Patches are for r2…in the other folders there is only makefile and config…but i see no code. e.g. this files from 5.4 (don’t know yet where init-code is located):