<Kwiboo>
one possible issue with appending the U-Boot FIT to the usb472 image is that the rk atags TPL write to RAM at ~2MiB is overwritten, could be an issue for >16GiB rk3588 devices
stikonas has joined #linux-rockchip
franoosh has joined #linux-rockchip
tchebb has joined #linux-rockchip
tchebb_ has quit [Ping timeout: 265 seconds]
<naoki>
Kwiboo: The code looks very good. How does SPL know the u-boot.itb address?
<naoki>
I couldn't solve it with booting from RAM
<naoki>
Btw boot_merger is a closed program for x86-64 only. The best solution is for rockusb to support "rockusb tpl spl(+u-boot)"
<naoki>
ah CONFIG_SPL_LOAD_FIT_ADDRESS
<naoki>
Kwiboo: SPL placed at CFG_SYS_SDRAM_BASE, and u-boot.itb in u-boot-rockchip-usb472.bin is placed at CONFIG_SPL_LOAD_FIT_ADDRESS, right?
<naoki>
is 2MB too much? or SPL uses SDRAM_BASE+2MB space?
<naoki>
ah, RK atags
<naoki>
hmm
<naoki>
no-write-symbols; is only for CONFIG_ROCKCHIP_SPI_IMAGE?
<naoki>
Is it not compatible with RK3328?
<Kwiboo>
naoki: correct, SPL is loaded to CFG_SYS_SDRAM_BASE, and FIT/u-boot.idb is placed at 2 MiB, mainly because 256KiB-2MiB may be used/reserved for TF-A, puting it at 1 MiB also works, but qschulz suggested to instead use the 2 MiB offset a few weeks back
<Kwiboo>
regarding no-write-symbols, it seem it was only needed in the spi image, but only after a new binman image was added, feels like it should have already complained, not sure what is going on
raster has joined #linux-rockchip
tchebb_ has joined #linux-rockchip
tchebb has quit [Ping timeout: 260 seconds]
<Kwiboo>
the idea was to combine SPL + FIT/u-boot.itb as close as possible so that both payload could be sent using the 472 usb command, sending 2-3 MiB using the windows rkdevtool was very slow, using linux rkdeveloptool db or rockusb command was very fast, at least on the rk356x/rk3588 board I tested
<Kwiboo>
tricky part is getting load addresses correct, so payload do not overlap where SPL want to load the images from FIT
<Kwiboo>
and use of boot_merger is strictly not necessary, only for rkdeveloptool/rkdevtool/rockusb tools, beause they expect the input in that format, and if needed we could add simple support for that image format to the u-boot mkimage tool
<Kwiboo>
however best would be to extend the tools to support separate 471 and 472 input files and do any special handling based on the usb product id or similar on the fly
<Kwiboo>
should make u-boot development/CI for rockchip little bit easier, no need for e.g. sd-mux or similar