vagrantc has quit [Quit: leaving]
thinkfat has joined #beagle
thinkfat_ has quit [Ping timeout: 240 seconds]
starblue has quit [Ping timeout: 252 seconds]
starblue has joined #beagle
set_ has quit [Read error: Connection reset by peer]
set_ has joined #beagle
mag has quit [Remote host closed the connection]
mag has joined #beagle
buzzmarshall has quit [Quit: Konversation terminated!]
notserpe has quit [*.net *.split]
blathijs has quit [*.net *.split]
notserpe has joined #beagle
blathijs has joined #beagle
Posterdati has quit [Ping timeout: 260 seconds]
ikarso has joined #beagle
Posterdati has joined #beagle
javaJake_ has joined #beagle
javaJake has quit [Ping timeout: 250 seconds]
javaJake_ is now known as javaJake
javaJake_ has joined #beagle
javaJake has quit [Ping timeout: 260 seconds]
javaJake_ is now known as javaJake
florian has joined #beagle
johanhenselmans has joined #beagle
zjason`` is now known as zjason
starblue has quit [Ping timeout: 276 seconds]
starblue has joined #beagle
Shadyman has quit [Quit: Leaving.]
lucascastro has joined #beagle
lucascastro has quit [Ping timeout: 260 seconds]
jfsimon1981 has quit [Ping timeout: 240 seconds]
johanhenselmans has quit [Quit: johanhenselmans]
johanhenselmans has joined #beagle
jfsimon1981 has joined #beagle
jfsimon1981 has quit [Ping timeout: 276 seconds]
jfsimon1981 has joined #beagle
Guest78 has joined #beagle
<Guest78> hi
<Guest78> is anyone here?
Guest78 has quit [Client Quit]
lucascastro has joined #beagle
<Amgine[m]> 60-120 seconds.
lucascastro has quit [Ping timeout: 260 seconds]
lucascastro has joined #beagle
lucascastro has quit [Ping timeout: 272 seconds]
vagrantc has joined #beagle
lucascastro has joined #beagle
buzzmarshall has joined #beagle
florian has quit [Quit: Ex-Chat]
lucascastro has quit [Ping timeout: 260 seconds]
ikarso has quit [Quit: Connection closed for inactivity]
xet7 has joined #beagle
jfsimon1981 has quit [Ping timeout: 260 seconds]
demirok has joined #beagle
Midjak has joined #beagle
jfsimon1981 has joined #beagle
lucascastro has joined #beagle
Shadyman has joined #beagle
lucascastro has quit [Ping timeout: 272 seconds]
jfsimon1981 has quit [Ping timeout: 260 seconds]
lucascastro has joined #beagle
onio has joined #beagle
<onio> I am trying to build u-boot v2017.01 to run on BeagleBoneBlack but when I run make I get error "arm-cortex_a8-linux-gnueabihf-gcc: error: unrecognized -march target: armv5"
<onio> Earlier today I was able to build u-boot version v2022.04 and copied both MLO and u-boot.img to the SD-Card but when I power on the board all I got was continuous output of CCCCCCCCC
* vagrantc wonders what version beagleboard.org images ship with
<vagrantc> i know it usually has some patches relative to upstream, but it's been a while since i've looked
<zmatt> onio: ehh, armv5 is definitely wrong
<vagrantc> oh yeah, at least armv7
<zmatt> onio: if you're getting CCCC then bootrom doesn't understand the contents of your SD card and hasn't even loaded your MLO
<onio> I am not even sure where it is getting the -march target: armv5 from.
<zmatt> dunno either, but v2017.01 builds fine for me... or, well, the version with rcn's patches (i.e. the same as was used for official beagleboard.org images), dunno if mainline was any use back then
<vagrantc> definitely had mainline working as early as 2016.11 ... but i think even earlier
<onio> zmatt: did you just build v2017.01 now?
<zmatt> I think the armv5 error might be incompatibility between that very old u-boot and a very new gcc.... I don't see armv5 documented as possible value for -march= in the current gcc manpage
lucascastro has quit [Ping timeout: 240 seconds]
<vagrantc> u-boot 2013.10 i think...
<zmatt> and no I haven't compiled u-boot in a long time
<onio> is there a way to validate the MLO image that was built when I used u-boot v2022.04?
<zmatt> anyway, as for your other problem... bootrom looks for MLO in two different ways: it first tries to find a "configuration header" in sector 0, 256, 512, and 768 ... if found, it expects the MLO to start at the next sector. if it finds it in none of these locations it will try to look for a file named "MLO" on a FAT partition, but iirc it is a bit fussy about some details, I don't quite remember since ...
<zmatt> ...nobody really uses this method anymore for a long time
<zmatt> iirc the MLO u-boot creates actually has this configuration header prepended, which I think might actually make it an invalid MLO file for the second method though I'm not sure... this is what it looks like if it has a configuration header: https://pastebin.com/2Nz3a9FF
<zmatt> typically configuration header + MLO is written to sector offset 256, u-boot.img to sector offset 768, and the first partition starts at sector 8192
<zmatt> I think for the method using a FAT partition, the partition needs to be marked as "bootable" in the partition table, and the MLO (and u-boot.img) need to be in the root of that filesystem. and if the MLO starts with a configuration header you should probably strip it off (i.e. remove the first 512 bytes)
<onio> this is what I get when I do hexdump on the MLO https://pastebin.com/ZCrR0dMH
<zmatt> yep so that has a configuration header
<zmatt> the stuff at offset 0x200 is the start of the *actual* MLO
<zmatt> hmm, that length seems rather large
<zmatt> the first two words of the real MLO (ignoring the configuration header) are the length and load address... the load address is always 0x402f0400, the length in your case is apparently 0x1a094 (107668 bytes)
<zmatt> which I think is _very_ close to the max
<zmatt> just over 105K, while the max allowed is 109K ... so I guess it technically still fits :P
<zmatt> I guess u-boot continues to get more and more bloated
<zmatt> yeah like I said, if you want to use the FAT partition method then you probably need to strip off the configuration header
<zmatt> there's probably some way to keep u-boot from prepending it in the first place, but I've never looked into how or why that happens
<zmatt> you can e.g. use head -c +513 MLO >MLO-without-ch and then put that file on the boot partition as "MLO"
ikarso has joined #beagle
<zmatt> any particular reason you're trying to build u-boot yourself instead of using a prebuilt one?
<onio> zmatt learning exercise
<zmatt> fair enough
<onio> going through the Mastering Embedded Linux Programming by Chris Simmond
<onio> book
<zmatt> books are tricky, they tend to get outdated fast
<onio> yes, that is what I been finding
<onio> head -c +513 MLO >MLO-without-ch I am not sure I understand this command. Is the "-without-ch" part of the command?
<zmatt> MLO-without-ch is the output filename here, just as example... overwriting the original MLO file with this command would not work
<zmatt> oh, also I meant tail, not head
<zmatt> alternatively dd if=MLO of=MLO-without-ch skip=1 will do basically the same
<zmatt> to create a version of the MLO with the configuration header stripped off
<onio> alright thanks, where can I learn about the MLO file structure?
<zmatt> MLO is just a raw binary with two 32-bit (little-endian) integers prepended: the length of the raw binary and the address to which it should be loaded (always 0x402f0400)
<zmatt> bootrom just loads the rest of the MLO (with given length) to that address and then execution simply jumps to it
<zmatt> unless you meant the structure of the configuration header (which isn't technically part of the MLO, even though u-boot's build process includes it in the file it calls "MLO"), which is presumably documented in the AM335x TRM... I'm pretty sure everyone just copy-pastes that fixed sequence of bytes without caring what it means ;)
<zmatt> ah, there ya go, the structure/meaning of the configuration header: https://github.com/mvduin/bbb-asm-demo/blob/master/extra/raw-mmc-header.txt
<onio> zmatt: cool thanks
<zmatt> that github repo is something I made a long time ago, an example of a tiny executable that gets directly loaded/executed by bootrom
<onio> Nice
<onio> zmatt: thanks for your time. I will have to continue tomorrow. I am worn out and brain dead as I a have been on this for over 12 hours
<zmatt> giving the brain a rest every now and then can be helpful too :)
<onio> yep, very very true
lucascastro has joined #beagle
<onio> thanks once again
onio has quit [Ping timeout: 260 seconds]
lucascastro has quit [Ping timeout: 240 seconds]
demirok has quit [Quit: Leaving.]
lucascastro has joined #beagle
Midjak has quit [Quit: This computer has gone to sleep]
lucascastro has quit [Remote host closed the connection]
lucascastro has joined #beagle
xet7 has quit [Remote host closed the connection]
xet7 has joined #beagle
nparafe has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
nparafe has joined #beagle
<set_> I am messing w/ that book too!
<set_> onio!
<set_> Me, me, me.
<set_> Dang. He/she left. Boo!
<set_> oh and what is the deal w/ uboot changing?
<set_> It is hard to find the right picks and tricks.
<set_> I know...w/ all kbuild envs, one can always use /.
<set_> But still. it used to be right there in my face for viewing. Now, i cannot find any of it, e.g. omap2_plus, where to place the .dtb and so on.
<set_> I read!
<set_> Something I learned today from watching IoTCon Europe 2020 was the kernel needs to be newer than the toolchain. Book it!
<set_> and to think I did not care or even know it was a fact.
<set_> check the dates!