Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2021.07 is OUT / Merge Window is OPEN until 26 July 2021 / Release v2021.10 is scheduled for 04 October 2021 / http://www.denx.de/wiki/U-Boot / Channel archives at https://libera.irclog.whitequark.org/u-boot
ccf has quit [Quit: Leaving.]
mmu_man has quit [Ping timeout: 240 seconds]
Crofton has quit [Ping timeout: 245 seconds]
Crofton has joined #u-boot
LeSpocky has quit [Ping timeout: 250 seconds]
LeSpocky has joined #u-boot
FO has quit [Read error: Connection reset by peer]
FO has joined #u-boot
vagrantc has quit [Quit: leaving]
sbach has quit [Read error: Connection reset by peer]
sbach has joined #u-boot
mranostaj has quit [Remote host closed the connection]
mranostaj has joined #u-boot
agust has joined #u-boot
redbrain has joined #u-boot
redbrain has quit [Ping timeout: 240 seconds]
mmu_man has joined #u-boot
alpernebbi has joined #u-boot
redbrain has joined #u-boot
jwillikers has joined #u-boot
vagrantc has joined #u-boot
mthall has joined #u-boot
mthall has quit [Read error: Connection reset by peer]
mthall has joined #u-boot
<mrnuke> ccf: send me an email. I don't do much IRCing in he weekends, and the info might get lost
akaWolf has quit [Ping timeout: 240 seconds]
EdSwarthout has quit [Ping timeout: 250 seconds]
akaWolf has joined #u-boot
vagrantc has quit [Quit: leaving]
redbrain has quit [Ping timeout: 250 seconds]
Rondom_ has quit [Remote host closed the connection]
Rondom has joined #u-boot
<marex> mrnuke: user left 15 hours ago ;-)
<soumar> good afternoon
<soumar> may I ask some basic stuff regarding u-boot here? I am currently looking for a correct channel to find support for my case,
<soumar> therefor forgive me my noob questions, but you might be able to point me correct direrrion
<soumar> s/direrrion/direction
<soumar> I assume I may
<soumar> I have an odroid hc4 board and I'd like to run FreeBSD on it
<soumar> I have no experience with u-boot and I am no developer/coder, so I am real noob in this field
<soumar> I have tried to use u-boot files from hardkernels ubuntu image as well as from arch linux image
<soumar> but non of them is able to run FreeBSD
<soumar> I have tried compiling u-boot from sources
<soumar> even some "experimental" ways
<soumar> like this one
<soumar> where I skipped the blobs fip part as it seems it'S alredy being compiled in, in the hardkernels version of u-boot
<soumar> I am able to boot linux, but the u-boot always rejects to boot FreeBSD kernel (kernel.bin, to be precise) with an error of wrong kernel image file
<soumar> when I query the kernel.bin in my FreeBSD box, it simply claims it's an arm64/aarch64 kernel image
<soumar> but u-boot does not seem to be sharing the same opinion
<soumar> therefor I am in need to find a proper channel for my problem, which might be u-boot related, hardkernel related or simply FreeBSD related
<soumar> as I have already stated I had had no experience with coding/u-boot, I am not really sure where to seek the support.
<marex> soumar: isn't the BSD kernel distributed as an ELF file ?
<soumar> and that's my main question now. Will be glad if you could point me the correct way
<marex> soumar: so, you need to relocate it using some bootelf or some such ?
EdSwarthout has joined #u-boot
<marex> also, you need to have a kernel port compatible with your hardware (ie. the kernel must contain the drivers and you need to somehow pass DT to it (if applicable))
<soumar> marex sure, but for aarch64/arm64 we have kernel.bin, which identifies itself as linux arch64 boot image
<marex> oh, that
<marex> soumar: so, try booti
<marex> soumar: that is for booting arm64 Image (the linux ones at least)
<soumar> to be honest, as I am new to this area, I am really not experienced.
<soumar> booti - yes, I have tried those
<soumar> but no joy.
<soumar> regarding the DT
<soumar> can I reuse those from linux? namely arch?
<marex> so what does booti print ?
<soumar> or do I have to recompile them myself?
<marex> I dont know what bsd does there, the DT is hardware description, so likely yes
<marex> you should be able to use the .dtb file for your platform, assuming the bsd kernel needs a DT (it likely does)
<soumar> well, among my tries, booti mostly complains about [rsvmem] get fdtaddr NULL!
<marex> soumar: pastebin the whole output please
<soumar> I see
<soumar> I only have some logs from today from my cutecom sessions
<soumar> is that approproate?
<soumar> I guess not really
<soumar> anyway, can you point me a bit more in this DT stuff please?
<marex> soumar: well, start logging, turn it on, run the booti attempt, stop logging, pastebin the log
<marex> soumar: that;s what would be helpful
<soumar> I have many of those in my log :)
<soumar> and I have no idea what everything I tried in there
<soumar> but the last thing was the u-boot was complaining about incorrect/unknown OS
<soumar> just to be sure: u-boot is a platform independant bootloader, or?
<soumar> $ file kernel.bin
<soumar> kernel.bin: Linux kernel ARM64 boot executable Image, little-endian
<soumar> and this is what the kernel.bin identifies itself as
<soumar> the booti takes basically 3 arguments: the kerneladdr, the ramdiskaddr and the dtbaddr, correct?
<soumar> I do not have the ramdisk, as we generally do not use it....
<soumar> could that be the issue?
<marex> sry, nmi
<soumar> do you mean new model?
<marex> aaaargh, pastebin.com now says "We value your privacy" (and that's why you must agree to us collecting data about you) and obscures the entire paste
<marex> just a moment, video ad is now playing
<soumar> f*ck
<marex> ah
<marex> soumar: u-boot 2015.01 ?
<marex> soumar: isnt there a newer port for your system ?
<marex> doesnt mainline support your board ?
<marex> if so, there is a chance this problem was fixed in the last 6 years
<marex> LeSpocky: didnt you do something with BSD recently ?
<soumar> the kardkernel, as far as I know, patches their u-boot
<soumar> I hope
<soumar> but I can as well try the mainline u-boot as well ofc
<soumar> there are "just" some blobs from the hardkernel
<soumar> to be honest, I have no clue how to get them into the mainline
<marex> board/amlogic/odroid-n2/odroid-n2.c: /* OdroidHC4 rev 2020,8,7 */
<marex> so there is a chance the board is actually supported by mainline u-boot ... so, try it ?
<soumar> as the link I used t ocompile the uboot says: get the mainline, compile it, get the source from hardkernel, compile it
<soumar> and create the u-boot bin from their fip thing
<soumar> which is what the compilation of jardkernel already does
<marex> I never worked with the amlogic SoCs, so I cannot really help you there
<soumar> (if I am not wrong, which is ofc possible)
<marex> I'll be back in a bit
<soumar> I see, I will try that
<soumar> thx
<marex> soumar: once you get an image, boot it, run => ver command, it should say 2021.07 or so
<marex> or 2021.10-rc
<soumar> kk
<marex> the readthedocs is the official upstream documentation
<marex> well, once you boot that, try the booti and see where it gets you
<soumar> ok, as the available FreeBSD versions say to use fatload mmc X ${addr} /kernel.bin; go ${addr}
<soumar> and it always hangs with "starting app at ${addr}"
<soumar> https://u-boot.readthedocs.io/en/latest/board/amlogic/odroid-c4.html - this is probably even more appropriate
<soumar> so
<soumar> do I have to (cross)compile this on FreeBSD ordoes it not matter if I use linux/etc.. ?
<marex> soumar: oh ... go $addr
<marex> soumar: does it also say what the value of $addr should be ?
<marex> soumar: if this is not a PIE, then you might need to use specific $addr value (address where to load the kernel in physical address space of the SoC)
<marex> back in a bit
<soumar> export CROSS_COMPILE=aarch64-none-elf- <- is this a must or can I use aarch64-linux-gnu- ?
<soumar> as my ubuntu jail only has binaries for the later... :-/
<soumar> so, just to be sure
<soumar> I have simply compiled the mainline u-boot on FreeBSD
<soumar> CROSS_COMPILE=aarch64-none-elf-
<soumar> I only set this env variable
<soumar> and used gnu make to compile it
<soumar> for the odroid part I need to use linux
<soumar> as it claims to get some linux toolchain
<soumar> do you think I can simply compile the odroid part on ubuntu and reuse that?
<soumar> or do I have to find my way to compile it on fbsd?
<marex> soumar: you can probably use the aarch64-none-elf- toolchain too
<marex> soumar: the difference is often only in the user-facing libraries that are included, not in the compiler itself
<soumar> +1
<soumar> the mainline compiled ok on my box
<soumar> just the final u-boot.bin image is larger than 1MB.. if it is a probelm, I have no clue
<soumar> is the sd.bin the file I need in the end? for me it's personaly not a big deal if it's larger than 1MB :)
vagrantc has joined #u-boot
<soumar> 1120624 28 Aug 22:21 u-boot.bin.sd.bin
<soumar> this is the output
<soumar> let's see
<soumar> I did (cross)compile the mainline u-boot on fbsd, the odroid one in ubuntu and then ran those customization scripts from fbsd again
<soumar> I will try and will see/report here
<soumar> thank you for your help
<marex> soumar: well, random documentation says
<marex> doc/board/amlogic/s400.rst: $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444
<marex> so, I guess you just dd it to SD card
alpernebbi has quit [Quit: alpernebbi]
<marex> search for u-boot.bin.sd.bin in the docs
<soumar> yes, it'S written there in the end
<soumar> it does return some errors ($DEV: invalid argument)
<soumar> but it got written
<soumar> (sure I put my /dev/mmcsd0 into $DEV variable)
<soumar> let'S see... burning OS slice on the sd now
<sjg1> Tartarus: The EFI loader bootflow is pretty trivial, as I suspected. I sent a patch
<sjg1> Tartarus: I've just done enough for rpi so far. I need to clean things up and do a v2 once we have settled on the naming
<soumar> https://pastebin.com/FFN3KK4y this is what I get now
<soumar> completely new thing...
<soumar> ok, the thing is nwo the sd card is mmc 0, but was mmc 1 before
<soumar> @marex thans for your help!
<soumar> the bootlader load freebsd now
<soumar> it'S aleap ahead for me!
<soumar> (the os does not yet, but anyway :) )
<soumar> good night for now and thanks again!
<marex> soumar: so you got further ?
pgreco_ has joined #u-boot
pgreco has quit [Ping timeout: 240 seconds]
<soumar> yes, now the board reboots after loading kernel (efi boot)
<soumar> so now it should be FreeBSD problem :)
agust has quit [Ping timeout: 240 seconds]
<soumar> I will now try to re-compile FreeBSD with other options and will see, or ask in freebsd channels
agust has joined #u-boot
pgreco_ is now known as pgreco
<marex> soumar: well, are you sure the kernel even supports this platform ?
<soumar> arm64 is Tier 1 as of fbsd 13
<soumar> sso it should "at least" boot
tlwoerner has quit [Read error: Connection reset by peer]
<marex> soumar: there are many arm64
<marex> soumar: its not like your desktop pc which is reasonably standard and probe-able
<marex> soumar: hence the DT which describes the hardware to the kernel , and the kernel must have drivers for most of that stuff
<soumar> I know, it's my fight
<marex> soumar: well, good luck
<soumar> thank you
agust has quit [Quit: Leaving.]
FO has quit [Killed (calcium.libera.chat (Nickname regained by services))]
Guest7521 has joined #u-boot
tlwoerner has joined #u-boot