Hi,
i’m trying to move dtb to outside kernel to get it loaded separately in uboot (like r64)
my source:
uboot output:
U-Boot> printenv
askkernel=askenv kernelinput "enter uImage-name:";
board=bpi-r2
boot0=run lskernel;run askkernel;if printenv kernelinput ;then setenv kernel ${kernelinput}; run newboot; fi
boot1=run selectmmc; run loadbootenv; run importenv; run newboot;
boot14=setenv kernel ${kernel414}; run newboot;
boot19=setenv kernel ${kernel419}; run newboot;
boot19_dt=setenv kernel ${kernel419_nodt}; setenv fdt ${fdt419}; run newboot2;
boot20=setenv kernel ${kernel420}; run newboot;
bootall=if printenv fdt ;then run loadfdt; bootm ${loadaddr} - $dtaddr ;else bootm fi
bootargs=board=bpi-r2 console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait vmalloc=496M 7
bootcmd=setenv bootdelay 3; run reloadmenu;
bootdelay=3
bootenv=uEnv.txt
bootfile=uImage_4.19.0-rc1-hdmiv5
bootmenu_0=1. Enter kernel-name to boot from SD/EMMC.=run boot0
bootmenu_1=2. Boot kernel from TFTP.=run bootnet
bootmenu_2=3. Boot from SD/EMMC 4.14.=run boot14
bootmenu_3=4. Boot from SD/EMMC 4.19.=run boot19
bootmenu_4=5. Boot from SD/EMMC 4.20.=run boot20
bootmenu_5=6. Boot from SD/EMMC 4.19 (fdt/dto).=run boot19_dt
bootmenu_default=4
bootnet=printenv; setenv bootargs ${netbootargs};tftp ${loadaddr} ${bootfile};bootm
bootopts=vmalloc=496M debug=7 initcall_debug=0
bpi=bananapi
buildargs=setenv bootargs "board=${board} console=${console} root=${root} ${bootopts} ${graphic}"
checkenv=test -e ${device} ${partition} ${bpi}/${board}/${service}/${bootenv}
checksd=fatinfo ${device} 1:1
console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200
device=mmc
dtaddr=0x83000000
dtolist419=bpi-r2-mac.dtb
ethaddr=02:03:04:05:06:07
fdt=bpi-r2-4.19-13-main.dtb
fdt419=bpi-r2-4.19-13-main.dtb
fdtcontroladdr=ffb96fc0
fileaddr=80200000
filesize=6f6a30
graphic=video=1280x1024 drm.debug=0x7
importenv=env import -t ${scriptaddr} ${filesize}
ipaddr=192.168.0.11
kernel=uImage_4.19.13-main_nodt
kernel414=uImage_4.14.74-main
kernel419=uImage_4.19.13-main
kernel419_nodt=uImage_4.19.13-main_nodt
kernel420=uImage_4.20.0-gmac
loadaddr=0x80200000
loadbootenv=if fatload ${device} ${partition} ${scriptaddr} ${bpi}/${board}/${service}/${bootenv};then run importenv;else echo "fatload (${bootenvi
loaddto=fdt addr ${dtaddr};fdt resize; setexpr fdtovaddr ${dtaddr} + F000; fatload ${device} ${partition} ${fdtovaddr} ${bpi}/${board}/${service}/}
loadfdt=fatload $device $partition $dtaddr ${bpi}/${board}/${service}/dtb/${fdt}
loadkernel= fatload ${device} ${partition} ${loadaddr} ${bpi}/${board}/${service}/${kernel}
lskernel=ls ${device} ${partition} ${bpi}/${board}/${service};
lstftp=tftp ${loadaddr} ${serverip}:files.lst;setexpr listend ${loadaddr} + ${filesize};mw.b ${listend} 00 2;strings ${loadaddr};
netbootargs=console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
netmask=255.255.255.0
newboot=run buildargs;printenv bootargs;fatload ${device} ${partition} ${loadaddr} ${bpi}/${board}/${service}/${kernel}; bootm
newboot2=run buildargs; printenv bootargs; run loadkernel; run bootall;
partition=1:1
reloadmenu=run selectmmc;if run checkenv; then run loadbootenv; else echo file not found; fi;bootmenu;
resetenv=env default -a;printenv;
root=/dev/mmcblk0p2 rootfstype=ext4 rootwait
scriptaddr=0x83000000
selectmmc=if run checksd; then echo Boot from SD ; setenv partition 1:1;else echo Boot from eMMC; setenv partition 0:1 ; fi;
serverip=192.168.0.10
service=linux
Environment size: 3920/4092 bytes
=====================================================================
U-Boot> run loadkernel
7301680 bytes read in 469 ms (14.8 MiB/s)
U-Boot> run loadfdt
27836 bytes read in 10 ms (2.7 MiB/s)
U-Boot> bootm ${loadaddr} - $dtaddr
## Booting kernel from Legacy Image at 80200000 ...
Image Name: Linux Kernel 4.19.13-main_nodt
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 7301616 Bytes = 7 MiB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 83000000
Booting using the fdt blob at 0x83000000
Loading Kernel Image ... OK
Loading Device Tree to ffb8c000, end ffb95cbb ... OK
Starting kernel ...
and nothing happens…
simply i compile like the kernel with appended dtb, but without this option and modified mkimage (no append of dtb via cat)
i only copy the build dtb to dtb-folder on BPI-root
any idea why kernel does not boot? have checked that ARM_APPENDED_DTB is set to [=n]…so kernel should not look into its binary to find dtb and use address passed by uboot
can anybody explain this to me?