Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2022.07 is OUT / Merge Window is OPEN, -next is CLOSED / Release v2022.10 is scheduled for 3 October 2022 / http://www.denx.de/wiki/U-Boot / Channel archives at https://libera.irclog.whitequark.org/u-boot
Forty-Bot has quit [Ping timeout: 248 seconds]
Forty-Bot has joined #u-boot
persmule has quit [Remote host closed the connection]
naoki has joined #u-boot
vagrantc has quit [Quit: leaving]
umbramalison has quit [Quit: %So long and thanks for all the fish%]
umbramalison has joined #u-boot
sbach has quit [Read error: Connection reset by peer]
umbramalison has quit [Client Quit]
umbramalison has joined #u-boot
sbach has joined #u-boot
<naoki> is there any good way to use 2nd fdt(dtb) file? if 1st one is missing, try to load 2nd one
mmu_man has quit [Ping timeout: 268 seconds]
thopiekar has quit [Ping timeout: 248 seconds]
thopiekar has joined #u-boot
vagrantc has joined #u-boot
scientes has joined #u-boot
camus has joined #u-boot
Net147 has quit [Quit: Quit]
LeSpocky has quit [Ping timeout: 252 seconds]
Net147 has joined #u-boot
Net147 has joined #u-boot
Net147 has quit [Changing host]
LeSpocky has joined #u-boot
mkennedy has quit [Ping timeout: 260 seconds]
mkennedy has joined #u-boot
<Forty-Bot> naoki: you can do something like `if ! load_cmd fdt1; then load_cmd fdt2; fi`
scientes has quit [Ping timeout: 252 seconds]
<naoki> Forty-Bot: thanks. I want to do it as default boot sequence on specific board
<naoki> hmm, do something in include/configs/board_name.h ...?
<naoki> it seems to be difficult if extlinux is used :(
kmcopper has joined #u-boot
prabhakarlad has quit [Quit: Client closed]
justJingo has quit [Quit: ZNC 1.8.2 - https://znc.in]
justache has joined #u-boot
vagrantc has quit [Quit: leaving]
thopiekar has quit [Quit: Likely restarting quassel...]
GNUtoo has quit [Ping timeout: 258 seconds]
thopiekar has joined #u-boot
GNUtoo has joined #u-boot
GNUtoo has quit [Ping timeout: 258 seconds]
GNUtoo has joined #u-boot
mmu_man has joined #u-boot
mmu_man has quit [Ping timeout: 268 seconds]
kmcopper has quit [Quit: kmcopper]
persmule has joined #u-boot
mmu_man has joined #u-boot
camus has quit [Remote host closed the connection]
camus has joined #u-boot
mmu_man has quit [Ping timeout: 248 seconds]
naoki has quit [Quit: naoki]
camus has quit [Remote host closed the connection]
camus has joined #u-boot
mmu_man has joined #u-boot
guillaume_g has joined #u-boot
guillaume_g has quit [Quit: Konversation terminated!]
minimal has joined #u-boot
persmule has quit [Ping timeout: 258 seconds]
persmule has joined #u-boot
mrnuke has quit [Ping timeout: 252 seconds]
brassado has joined #u-boot
brassado is now known as sam_sepi0l
mrnuke has joined #u-boot
vagrantc has joined #u-boot
pgreco has quit [Ping timeout: 268 seconds]
WoC has joined #u-boot
aggi has quit [Ping timeout: 248 seconds]
tsraoien has joined #u-boot
WoC has quit [Remote host closed the connection]
WoC has joined #u-boot
mrnuke has quit [Ping timeout: 268 seconds]
aggi has joined #u-boot
mrnuke has joined #u-boot
sam_sepi0l has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
WoC has quit [Remote host closed the connection]
tsraoien has quit [Ping timeout: 248 seconds]
tsraoien has joined #u-boot
<marex> Forty-Bot: test -e -- test whether file on FS exists , no
<marex> Forty-Bot: or load ... || load ... (if load fails, load somethng else)
<Forty-Bot> also possible
<Forty-Bot> the if/then is nice if you need multiple commands
<Forty-Bot> but it's personal preference IMO
WoC has joined #u-boot
mmu_man has quit [Ping timeout: 248 seconds]
mmu_man has joined #u-boot
tsraoien has quit [Quit: WeeChat 3.6]
tsraoien has joined #u-boot
brassado has joined #u-boot
WoC` has joined #u-boot
WoC has quit [Ping timeout: 244 seconds]
<marex> Forty-Bot: sure
adams[1] has joined #u-boot
<adams[1]> mkimage -D "-I dts -O dtb -p 1024" -f ${IMGDEPLOYDIR}/boot.its ${IMGDEPLOYDIR}/boot.img  ---> Using this I created boot.img and then used "dumpimage -T flat_dt -l boot.img -p 1 -o output" this tool to extract ramdisk but both are not matching.
<adams[1]> boot.its has kernel + ramdisk + dtb in that order.
<adams[1]> I was able to match kernel and dtb but ramdisk is not matching and also during kernel boot uboot is not able to load ramdisk but succefully able to load kernel and device tree.
<adams[1]> any pointers?
<hanetzer> adams[1]: *any ;) but yeah. the cpio you extract, is it actually a cpio on extraction? eg, can you lsinitrd/cpio -t it, does file extracted.cpio return the correct kind of data?
GuestGuy has joined #u-boot
<adams[1]> hanetzer: I did binary comparison. Shouldn't it match?
<hanetzer> padding and such could change md5; also, did you set any compression params in the its?
<adams[1]> hanetzer: all files are uncompressed.
<marex> iow share the u-boot.its please , and check fdtdump u-boot.its (that prints the tree bundled into fitImage)
<marex> you can even dd if=/of= the blob from the ITB , or use fdtget to dump the specific property with the blob if you dont use fitImage with external data, and compare that
<adams[1]> https://ideone.com/PO3QOc is the .its file
<hanetzer> adams[1]: you seem to be using some TOKENS; do they get passed thru?
<adams[1]> marex: can you clarify which file are you looking for? I couldn't find this file u-boot.its file ?
<adams[1]> hanetzer: yes, I have checked that and that is why my kernel and dtb is getting loaded and booted up. Problem is initramfs is not loaded.
<marex> ${IMGDEPLOYDIR}/boot.its
<adams[1]> getting this:
<adams[1]> [ 2.612216] Unpacking initramfs...
<adams[1]> [ 2.612495] Initramfs unpacking failed: invalid magic at start of compressed archive
<adams[1]> marex: let me provide that...
<marex> adams[1]: is your initrd load address correct ?
<hanetzer> are you passing ramdisk.cpio or ramdisk.cpio.gz?
<hanetzer> ah yeh, something could be clobbering it
<adams[1]> cpio.gz
<adams[1]> let me provide boot.its hold on.
<adams[1]> marex: hanetzer:
<adams[1]> https://ideone.com/RFFLGj this image works but it is different from my method where I am using boot.img for booting up.
<adams[1]> in the "working" method, kernel and ramdisk are part of single .its file and also in that method we are flashing directly the fitImage and not creating boot.img.
<marex> adams[1]: what happens if you plug in ramdisk-1 { ... cpio (without gz) and set compression = gzip } ?
<adams[1]> marex: let me try
<marex> adams[1]: I am not entirely sure whether you need to pass in cpio.gz or plain cpio with compression = gzip, try both
<marex> compression=gzip would instruct u-boot fitImage loader to decompress the payload first
<marex> adams[1]: also, by any chance, do you have 'initrd_high' set in U-Boot environment ?
naoki has joined #u-boot
<adams[1]> wondering if you know how the uboot loads the initramfs image as in that .its file we are not passing loading address of initramfs?
<marex> naoki: FYI, you can do load ... || load ... , or "if load ... else load fi ", the load command sets return value which u-boot shell conditionals can handle just fine
<adams[1]> https://ideone.com/RFFLGj as I said with this it works but wondering why it doesn't have loading address of initramfs?
<marex> adams[1]: it just copies the blob to load= address to my knowledge and then passes that address to the kernel
<adams[1]> https://ideone.com/RFFLGj but in here there is no loading adress and it works...
<marex> adams[1]: u-boot will likely pick a suitable one near the end of RAM (near fdt_high) and relocate RD there
<adams[1]> aha....
<marex> have a look at boot/image-fit.c fit_image_load()
<adams[1]> but shouldn't uboot print a log when it finds initramfs image like it does for kernel and dtb as below:
<adams[1]> ## Loading kernel from FIT Image at 12000000 ...
<adams[1]> ## Flattened Device Tree blob at 70065000
<marex> that's where the loading should be implemented
<adams[1]> compression doesn't count right?
<adams[1]> as first uboot should find the ramdisk image
<marex> right
<marex> well, you can load the fitImage into RAM in U-Boot and then run 'iminfo' on it to verify the ramdisk is OK
<adams[1]> I have googled up and found that whenever ramdisk gets found by uboot there are some logs which I am not getting it.
<adams[1]> so i suspect the problem is creating the boot.img as when I extracted the ramdisk from it and the one I supplied, it doesn't match.
<adams[1]> I did binary comparison.
<adams[1]> mkimage -D "-I dts -O dtb -p 1024" -f ${IMGDEPLOYDIR}/boot.its ${IMGDEPLOYDIR}/boot.img ---> Using this I created boot.img and then used "dumpimage -T flat_dt -l boot.img -p 1 -o output" this tool to extract ramdisk but both are not matching.
<adams[1]> so either I am using wrong commands to create boot.img or I am extracting wrong.
<marex> adams[1]: you are doing some signed/encrypted boot though, right ?
<adams[1]> adams[1]: I am not sure, I can check though.
<adams[1]> *let me check
<marex> line
<marex> adams[1]: btw mkimage version ?
<adams[1]> let me check
<adams[1]> marex: mkimage version 2021.07-g1a6716ec1c
scientes has joined #u-boot
<adams[1]> zcat initramfs.cpio.gz | cpio -idmv  --- using this I am able to see the contents of initramfs and whatever I packed.
<marex> should be ok
<adams[1]> well, you can load the fitImage into RAM in U-Boot and then run 'iminfo' on it to verify the ramdisk is OK -- i like this idea, do you have some steps how to load fitImage into RAM? I flashed the boot.img which has the images, after that do I need to go to some offset and load ?
<adams[1]> marex: or is there any way to create boot.img using mkimage using fitImage of kernel which has both kernel + ramfs ?
alpernebbi has quit [Ping timeout: 244 seconds]
scientes has quit [Ping timeout: 252 seconds]
alpernebbi has joined #u-boot
tsraoien has quit [Ping timeout: 268 seconds]
WoC` has quit [Remote host closed the connection]
WoC` has joined #u-boot
camus has quit [Remote host closed the connection]
camus has joined #u-boot
camus has quit [Remote host closed the connection]
camus has joined #u-boot
camus has quit [Remote host closed the connection]
camus has joined #u-boot
camus has quit [Remote host closed the connection]
camus has joined #u-boot
<marex> adams[1]: see '=> help load'
<marex> => load mmc 0:1 $loadaddr boot/fitImage && iminfo $loadaddr
<marex> for example
scientes has joined #u-boot
camus has quit [Remote host closed the connection]
camus has joined #u-boot
scientes has quit [Ping timeout: 252 seconds]
camus has quit [Ping timeout: 244 seconds]
camus1 has joined #u-boot
camus1 is now known as camus
camus has quit [Remote host closed the connection]
camus has joined #u-boot
GuestGuy has quit [Quit: Client closed]
camus has quit [Remote host closed the connection]
camus has joined #u-boot