[BPI-R4] Kernel 6.9.x automatically enables CONFIG_RELOCATABLE=y and fails to boot

Hi all,

After troubleshooting about 6h I found out this option is make the Kernel unbootable.

Compiling Kernel 6.1.73 from BPI-SINOVOIP GitHub - BPI-SINOVOIP/BPI-R4-bsp-6.1 was able to boot my board. But trying the same procedure with 6.9.0 frank-w or jcdutton kernels, Linux is stuck even to printout early messages.

Taking the config from 6.1.73 and applied to 6.9.0 I was able to boot 6.9.0 Kernel. Then I created under Kernel 6.9.0 a new configuration file using mt7988a_bpi-r4_defconfig with command make ARCH=arm64 O=build-mt7988-6.9.0 mt7988a_bpi-r4_defconfig. Then, under 6.9.0 directory, I used in parallel in 2 consoles:

  1. make ARCH=arm64 O=build-mt7988-6.1.73
  2. make ARCH=arm64 O=build-mt7988-6.9.0

Then, going each page in each configuration, I’ve tried to match options in build-mt7988-6.1.73 with the ones from build-mt7988-6.9.0. Compiling the build-mt7988-6.1.73 multiple times until I set CONFIG_RELOCATABLE in build-mt7988-6.1.73. Soon as this option was activated, the kernel fails to boot anymore. When I deactivate the option, kernel boots. I disabled also in build-mt7988-6.9.0 and after I build it the default config mt7988a_bpi-r4_defconfig booted the kernel.

This is the option which is by default enabled in ARM64:

CONFIG_RELOCATABLE=y

From arch/arm64/Kconfig

config RELOCATABLE
        bool "Build a relocatable kernel image" if EXPERT
        select ARCH_HAS_RELR
        default y
        help
          This builds the kernel as a Position Independent Executable (PIE),
          which retains all relocation metadata required to relocate the
          kernel binary at runtime to a different virtual address than the
          address it was linked at.
          Since AArch64 uses the RELA relocation format, this requires a
          relocation pass at runtime even if the kernel is loaded at the
          same address it was linked at.

For example config file attached config-6.9.0-bpi-r4-nok was created with ./bash.sh importconfig from frank-w kernel, then compiled and tried to run:

MT7988> setenv consoleargs "earlycon=uart8250,mmio32,0x11000000 console=ttyS0,115200n1 earlyprintk debug=7 loglevel=8 pci=pcie_bus_perf consolebl
ank=0"
MT7988> setenv rootfs "root=/dev/mmcblk0p6 rootfstype=ext4 rootwait"
MT7988> setenv bootargs $consoleargs $rootfs
MT7988> 
MT7988> # Keep 32MB space between Kernel and FTD.
MT7988> setenv dtaddr 0x47000000
MT7988> setenv kaddr  0x48000000
MT7988> 
MT7988> bootp ${kaddr} 10.42.0.1:Linux-6.9.0-frank-w.itb; bootm ${kaddr}
BOOTP broadcast 1
DHCP client bound to address 10.42.0.145 (3 ms)
Using ethernet@15100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.145
Filename 'Linux-6.9.0-frank-w.itb'.
Load address: 0x48000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######
         17.8 MiB/s
done
Bytes transferred = 8669140 (8447d4 hex)
## Loading kernel from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel 6.9.0 BPi-R4 (2024-07-15 11:15:14)
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x48000100
     Data Size:    8623954 Bytes = 8.2 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   d9c96f2db39af94f8e55a920c74a2bb5838638b1
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-base' fdt subimage
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4883994c
     Data Size:    36871 Bytes = 36 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   691df0eaac37a425055fbdddc6dbd7f40e683040
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x4883994c to 0x47000000
## Loading fdt from FIT Image at 48000000 ...
   Trying 'fdt-ov-sd' fdt subimage
     Description:  BPi-R4 SD MMC FDT overlay blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x48842a30
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   4ddb0442509f1e0e66f70270ad0aad5b57894599
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
   Uncompressing Kernel Image to 44000000
   Loading Device Tree to 00000000ff7eb000, end 00000000ff7f72b3 ... OK
Working FDT set to ff7eb000

Starting kernel ...


Fails to boot. It gets stuck at Starting kernel ....

In second file config-6.9.0-bpi-r4-ok I disabled CONFIG_RELOCATABLE in the same config, nothing else I changed, and is booting:

MT7988> setenv consoleargs "earlycon=uart8250,mmio32,0x11000000 console=ttyS0,115200n1 earlyprintk debug=7 loglevel=8 pci=pcie_bus_perf consolebl
ank=0"
MT7988> setenv rootfs "root=/dev/mmcblk0p6 rootfstype=ext4 rootwait"
MT7988> setenv bootargs $consoleargs $rootfs
MT7988> 
MT7988> # Keep 32MB space between Kernel and FTD.
MT7988> setenv dtaddr 0x47000000
MT7988> setenv kaddr  0x48000000
MT7988> 
MT7988> bootp ${kaddr} 10.42.0.1:Linux-6.9.0-frank-w.itb; bootm ${kaddr}
BOOTP broadcast 1
DHCP client bound to address 10.42.0.145 (3 ms)
Using ethernet@15100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.145
Filename 'Linux-6.9.0-frank-w.itb'.
Load address: 0x48000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #######################
         18.3 MiB/s
done
Bytes transferred = 8918780 (8816fc hex)
## Loading kernel from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel 6.9.0 BPi-R4 (2024-07-15 11:15:14)
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x48000100
     Data Size:    8873593 Bytes = 8.5 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   ef4d4e0a895ae66371eb528a2f13aea2e0591592
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-base' fdt subimage
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x48876874
     Data Size:    36871 Bytes = 36 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   691df0eaac37a425055fbdddc6dbd7f40e683040
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x48876874 to 0x47000000
## Loading fdt from FIT Image at 48000000 ...
   Trying 'fdt-ov-sd' fdt subimage
     Description:  BPi-R4 SD MMC FDT overlay blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4887f958
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   4ddb0442509f1e0e66f70270ad0aad5b57894599
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
   Uncompressing Kernel Image to 44000000
   Loading Device Tree to 00000000ff7eb000, end 00000000ff7f72b3 ... OK
Working FDT set to ff7eb000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd090]
[    0.000000] Linux version 6.9.0-bpi-r4+ (adrian@Rzyen5900X) (aarch64-linux-gnu-gcc (Debian 13.2.0-12) 13.2.0, GNU ld (GNU Binutils for Debian)
 2.42.50.20240710) #3 SMP Mon Jul 15 11:42:04 CEST 2024
[    0.000000] Machine model: Banana Pi BPI-R4
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000011000000 (options '')
[    0.000000] printk: legacy bootconsole [uart8250] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] OF: reserved mem: 0x0000000042ff0000..0x0000000042ffffff (64 KiB) map non-reusable ramoops@42ff0000
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004304ffff (320 KiB) nomap non-reusable secmon@43000000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000013fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004304ffff]
[    0.000000]   node   0: [mem 0x0000000043050000-0x000000013fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000013fffffff]

Any thoughts why this option is breaking the kernel to boot?

config-6.9.0-bpi-r4-nok (169.6 KB) config-6.9.0-bpi-r4-ok (169.6 KB)

In case it helps, the config file in my tree has

CONFIG_RELOCATABLE=y

and it boots fine.

1 Like

I also checked my tree and it is also set there and had no issues with booting…i guess more something is overridden as you have changed the adresses to load…the fit parts are unpacked to the locations defined in the fit. I use 0x46000000 as kaddr so less space from 0x44000000 where the image.gz gets unpacked from fit.

So strange. I use:

setenv kaddr  0x48000000
bootp ${kaddr} 10.42.0.1:Linux-6.9.0-EasyOS.itb;
bootm ${kaddr}

So even higher than 0x46000000. I tried with multiple memory locations and I got the same issue. Even 0x50000000 and still not working.

Could be a bug in U-boot? I’m using U-Boot 2024.07-00783-gb182816c1fb4

Yes,i was only thinking…

Why do you use bootp? Isn’t it a tftp?

Yes, it is a TFTP server. I’m using it for multiple tests to load the kernel from my PC. Moving SD card from BPI-R4 to PC and back when I have to recompile the Kernel multiple times is not an option.

But bootp is just loading the file to the specified location. Then bootm ${kaddr} is command which takes care about booting.

I use tftpboot as first command…maybe bootp does some strange things…

Yes i also use tftp often for testing kernels or usb when network is not available…thats why my vuild.sh has the upload option :stuck_out_tongue: having a notify script on server creates/updates a textfile which can be downloaded by my uboot so i know the last x files uploaded for a board and can copy filename to askkernel prompt (tftp option in my uboot)

Nope … I tried with tftpboot:

MT7988> setenv consoleargs "earlycon=uart8250,mmio32,0x11000000 console=ttyS0,115200n1 earlyprintk debug=7 loglevel=8 pci=pcie_bus_perf consolebl
ank=0"
MT7988> setenv rootfs "root=/dev/mmcblk0p6 rootfstype=ext4 rootwait"
MT7988> setenv bootargs $consoleargs $rootfs
MT7988> 
MT7988> setenv kaddr  0x48000000
MT7988> dhcp; tftpboot ${kaddr} 10.42.0.1:Linux-6.9.0-bpi-r4-frank-w-EasyOS.itb; bootm ${kaddr}
BOOTP broadcast 1
DHCP client bound to address 10.42.0.141 (2 ms)
*** Warning: no boot file name; using '0A2A008D.img'
Using ethernet@15100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.141
Filename '0A2A008D.img'.
Load address: 0x42000000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
Using ethernet@15100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.141
Filename 'Linux-6.9.0-bpi-r4-frank-w-EasyOS.itb'.
Load address: 0x48000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######
         20.4 MiB/s
done
Bytes transferred = 8668548 (844584 hex)
## Loading kernel from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel  BPi-R4 (2024-07-15 20:02:19)
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x48000108
     Data Size:    8623322 Bytes = 8.2 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   59c04edcfe73c301beed06dbd3b990d0fc6ff161
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-base' fdt subimage
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x488396dc
     Data Size:    36871 Bytes = 36 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   691df0eaac37a425055fbdddc6dbd7f40e683040
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x488396dc to 0x47000000
## Loading fdt from FIT Image at 48000000 ...
   Trying 'fdt-ov-sd' fdt subimage
     Description:  BPi-R4 SD MMC FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x488427b8
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   4ddb0442509f1e0e66f70270ad0aad5b57894599
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
   Uncompressing Kernel Image to 44000000
   Loading Device Tree to 00000000ff7eb000, end 00000000ff7f72b3 ... OK
Working FDT set to ff7eb000

Starting kernel ...

There is something real strange with this option activated in Kernel and U-boot.

Today I tried U-boot 202401 from GitHub - BPI-SINOVOIP/BPI-R4-bsp-6.1 . I’ve compiled with default config from BPI-R4. I had the same issue. Can’t boot Linux kernel with CONFIG_RELOCATABLE=y

I will try 6.1 with this option enabled. I have no clue why my board doesn’t boot with this option enabled. :face_with_raised_eyebrow:

Seems that 6.1 from SINOVOIP is working with CONFIG_RELOCATABLE=y. I don’t understand. I will try frank-w kernel 6.1, 6.2, 6.3 and so on (if there have mt7988 patches). Let me check until which previous version of kernel this option is working.

6.9-main is the first (except of special r4 branches beginning from 6.6) which have mt7988 patches

1 Like

What about 6.5-dango-r4 or 6.5-r4 versions? I was able to compile it and I saw DTS/DTSO files for R4.

Thats some of the r4 branches i talked before :stuck_out_tongue:

Ok, I’ve notice some strange behaviors:

  1. Linux-6.1.73-sinovoip-EasyOS-norelocatable.itb is not booting if address for kernel is:
                        load = <0x40080000>;
                        entry = <0x40080000>;

and DTB

load = <0x47000000>;

But as soon I’m moving to the kernel address to:

                        load = <0x44000000>;
                        entry = <0x44000000>;

Was booting without issues.

  1. Linux-6.1.73-sinovoip-EasyOS-relocatable.itb is booting with 0x40080000 and with 0x44000000.

  2. Linux-6.5.0-rc7-next-20230824-bpi-r4-frank-w-EasyOS-relocatable.itb is not booting at 0x44000000 nor 0x40080000, nor 0x50000000.

  3. Linux-6.5.0-rc7-next-20230824-bpi-r4-frank-w-EasyOS-norelocatable.itb is not booting at 0x40080000, but boots perfect at 0x44000000 or 0x50000000.

I tried with relocatable version to load FIT at 0x58000000 and run it from 0x60000000. Nothing. I’m out of clue what is going on here.

My testing U-boot is:

U-Boot 2024.01 (Jul 16 2024 - 12:09:39 +0200)

aarch64-linux-gnu-gcc (Debian 13.2.0-12) 13.2.0
GNU ld (GNU Binutils for Debian) 2.42.50.20240710

The one from BPI-SINOVOIP/BPI-R4-bsp-6.1 .

What U-boot version are you using?

Could you please send me / attach yours u-boot.bin and Image.gz / itb file that you are using to test on my device?

Just load the u-boot-r4*.bin to TEXTBASE/uaddr

For itb i activate pipeline for 6.10-main,you can test with 6.9-main from releases page in meantime

1 Like

You are the best! Kernel 6.10 is booting without any issues! I’ve tried your version from GIT Hub.

I honestly respect your work! If you need to test anything on the boards, I’m available for this.

I’ve booted from old U-boot version and also with yours.

root@EasyOS:~# uname -a
Linux EasyOS 6.10.0-bpi-r4-main #10 SMP Wed Jul 17 08:48:04 UTC 2024 aarch64 GNU/Linux
root@EasyOS:~#
root@EasyOS:~# zgrep RELOCATABLE /proc/config.gz                                                                                                 
CONFIG_RELOCATABLE=y

If I’m compiling with your script or using O=build-mt7988 is not booting. I tried with AARCH64 compiler from Debian:

$ aarch64-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc-cross/aarch64-linux-gnu/13/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 13.2.0-12' --with-bugurl=file:///usr/share/doc/gcc-13/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-13 --enable-shared --enable-linker-build-id --libexecdir=/usr/libexec --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-libstdcxx-backtrace --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --without-target-system-zlib --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=aarch64-linux-gnu --program-prefix=aarch64-linux-gnu- --includedir=/usr/aarch64-linux-gnu/include
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.2.0 (Debian 13.2.0-12) 

I’m keeping to search what is makes my compilation to fail to boot.

//LE

This is awkward! Kernel compiled with ARM Toolchain 11 is booting!

root@EasyOS:~# uname -a
Linux EasyOS 6.10.0-bpi-r4-frank-w-EasyOS #1 SMP Wed Jul 17 20:33:44 CEST 2024 aarch64 GNU/Linux
root@EasyOS:~# zgrep RELOCATABLE /proc/config.gz                                                                                                 
CONFIG_RELOCATABLE=y
root@EasyOS:~# 

But compiled with GCC 13 Debian is failing to boot! I’m trying now with GCC 12.

//LE

Is booting without issues if you compile it with GCC 12 or 13 ARM Toolchain! But Debian GCC 13 is a total failure! :face_with_raised_eyebrow: .

## Loading kernel from FIT Image at 46000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel 6.10.0 BPi-R4 (2024-07-17 20:44:45) / gcc version 12.3.1 20230626 (Arm GNU Toolchain 12.3.Rel1 (Build arm-
12.35)) 
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x46000164
     Data Size:    9155334 Bytes = 8.7 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   0d7ecd1173086863219699071b55b44522ef31bf
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 46000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-base' fdt subimage
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x468bb564
     Data Size:    36460 Bytes = 35.6 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   614445f784bfbbb579adcd71c4e374baa7461572
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x468bb564 to 0x47000000
## Loading fdt from FIT Image at 46000000 ...
   Trying 'fdt-ov-sd' fdt subimage
     Description:  BPi-R4 SD MMC FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x468c44a4
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   4ddb0442509f1e0e66f70270ad0aad5b57894599
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
   Uncompressing Kernel Image
   Loading Device Tree to 00000000fe7b3000, end 00000000fe7bf118 ... OK
Working FDT set to fe7b3000
set /chosen/rootdisk to bootrom media: rootdisk-sd (phandle 0x0000008f)

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd090]
[    0.000000] Linux version 6.10.0-bpi-r4-frank-w-EasyOS (adrian@Rzyen5900X) (aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 12.3.Rel1 (Build arm
-12.35)) 12.3.1 20230626, GNU ld (Arm GNU Toolchain 12.3.Rel1 (Build arm-12.35)) 2.40.0.20230627) #2 SMP Wed Jul 17 20:44:36 CEST 2024
[    0.000000] Machine model: Banana Pi BPI-R4
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000011000000 (options '')
[    0.000000] printk: legacy bootconsole [uart8250] enabled
[    0.000000] efi: UEFI not found.
[    0.000000] OF: reserved mem: 0x0000000042ff0000..0x0000000042ffffff (64 KiB) map non-reusable ramoops@42ff0000
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004304ffff (320 KiB) nomap non-reusable secmon@43000000
[    0.000000] Zone ranges:
...

root@EasyOS:~# uname -a
Linux EasyOS 6.10.0-bpi-r4-frank-w-EasyOS #2 SMP Wed Jul 17 20:44:36 CEST 2024 aarch64 GNU/Linux
root@EasyOS:~# zgrep RELOCATABLE /proc/config.gz 
CONFIG_RELOCATABLE=y
root@EasyOS:~# 

Debian Trixie GCC 13 is failing:

MT7988> bootm ${kaddr}
## Loading kernel from FIT Image at 46000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel 6.10.0 BPi-R4 (2024-07-17 21:10:55) / gcc version 13.2.0 (Debian 13.2.0-12) 
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x46000140
     Data Size:    8664370 Bytes = 8.3 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   c9554b65aef0559cd44d1c78191d1002cca26685
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 46000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-base' fdt subimage
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4684376c
     Data Size:    36460 Bytes = 35.6 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   614445f784bfbbb579adcd71c4e374baa7461572
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x4684376c to 0x47000000
## Loading fdt from FIT Image at 46000000 ...
   Trying 'fdt-ov-sd' fdt subimage
     Description:  BPi-R4 SD MMC FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4684c6ac
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   4ddb0442509f1e0e66f70270ad0aad5b57894599
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
   Uncompressing Kernel Image
   Loading Device Tree to 00000000fe7b3000, end 00000000fe7bf118 ... OK
Working FDT set to fe7b3000
set /chosen/rootdisk to bootrom media: rootdisk-sd (phandle 0x0000008f)

Starting kernel ...

But ARM Aarch64 Toolchain 13 is fine:

## Loading kernel from FIT Image at 46000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel 6.10.0 BPi-R4 (2024-07-17 20:52:02) / gcc version 13.3.1 20240614 (Arm GNU Toolchain 13.3.Rel1 (Build arm-
13.24)) 
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x46000164
     Data Size:    9212545 Bytes = 8.8 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   2776ae34be1fe15d4321a96a73527e485b1201cf
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 46000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-base' fdt subimage
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x468c94e0
     Data Size:    36460 Bytes = 35.6 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   614445f784bfbbb579adcd71c4e374baa7461572
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x468c94e0 to 0x47000000
## Loading fdt from FIT Image at 46000000 ...
   Trying 'fdt-ov-sd' fdt subimage
     Description:  BPi-R4 SD MMC FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x468d2420
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   4ddb0442509f1e0e66f70270ad0aad5b57894599
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
   Uncompressing Kernel Image
   Loading Device Tree to 00000000fe7b3000, end 00000000fe7bf118 ... OK
Working FDT set to fe7b3000
set /chosen/rootdisk to bootrom media: rootdisk-sd (phandle 0x0000008f)

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd090]
[    0.000000] Linux version 6.10.0-bpi-r4-frank-w-EasyOS (adrian@Rzyen5900X) (aarch64-none-linux-gnu-gcc (Arm GNU Toolchain 13.3.Rel1 (Build arm
-13.24)) 13.3.1 20240614, GNU ld (Arm GNU Toolchain 13.3.Rel1 (Build arm-13.24)) 2.42.0.20240614) #3 SMP Wed Jul 17 20:51:54 CEST 2024
[    0.000000] Machine model: Banana Pi BPI-R4
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000011000000 (options '')
[    0.000000] printk: legacy bootconsole [uart8250] enabled
[    0.000000] efi: UEFI not found.

I’ve added to my script to fulfill the description of the FIT file with date and GCC version compiled.