rellla changed the topic of #linux-sunxi to: Allwinner/sunxi /development discussion - did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait! - https://github.com/linux-sunxi/ - Logs at http://irclog.whitequark.org/linux-sunxi - *only registered users can talk*
[Chameleon] is now known as [AquaMan]
ChriChri_ has joined #linux-sunxi
ChriChri has quit [Ping timeout: 260 seconds]
ChriChri_ is now known as ChriChri
[AquaMan] is now known as [UltraBlackFish]
cnxsoft has joined #linux-sunxi
TheSeven has quit [Disconnected by services]
[7] has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
wingrime has joined #linux-sunxi
wingrime_ has quit [Ping timeout: 264 seconds]
lurchi_ has joined #linux-sunxi
lurchi__ has quit [Ping timeout: 240 seconds]
reinforce has joined #linux-sunxi
netlynx has joined #linux-sunxi
netlynx has quit [Changing host]
netlynx has joined #linux-sunxi
cmeerw has joined #linux-sunxi
gaston1980 has quit [Quit: Konversation terminated!]
reinforce has quit [Quit: Leaving.]
_whitelogger has joined #linux-sunxi
tmlind_ has joined #linux-sunxi
tmlind_ has quit [Ping timeout: 256 seconds]
[UltraBlackFish] has quit [Quit: SNA -> Snorter Not Allowed.]
rzerres has quit [Quit: ZNC 1.7.5 - https://znc.in]
rzerres has joined #linux-sunxi
ganbold_ has joined #linux-sunxi
ganbold has quit [Ping timeout: 260 seconds]
[EPacketNabz] has joined #linux-sunxi
cnxsoft has quit [Read error: Connection reset by peer]
AneoX has quit [Quit: Textual IRC Client: www.textualapp.com]
iamfrankenstein has joined #linux-sunxi
Mangy_Dog has joined #linux-sunxi
lurchi_ is now known as lurchi__
lurchi__ is now known as lurchi_
iamfrankenstein has quit [Ping timeout: 265 seconds]
[EPacketNabz] is now known as [MyLittlePony]
iamfrankenstein has joined #linux-sunxi
lurchi_ is now known as lurchi__
Werner has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
Werner has joined #linux-sunxi
Werner has joined #linux-sunxi
[MyLittlePony] is now known as [Almanac]
[Almanac] is now known as [Almanach]
cnxsoft has joined #linux-sunxi
andy25225 has quit [Ping timeout: 240 seconds]
[Almanach] has quit [Quit: SNA -> Snorter Not Allowed.]
sunshavi has quit [Remote host closed the connection]
sunshavi has joined #linux-sunxi
andy25225 has joined #linux-sunxi
cnxsoft has quit [Quit: cnxsoft]
lurchi__ is now known as lurchi_
mauz555 has joined #linux-sunxi
mauz555 has quit []
warpme_ has quit [Quit: Connection closed for inactivity]
lurchi_ is now known as lurchi__
iamfrankenstein has quit [Quit: iamfrankenstein]
gaston1980 has joined #linux-sunxi
[Gulliver] has joined #linux-sunxi
asdf28 has joined #linux-sunxi
Nemo_bis has quit [Ping timeout: 265 seconds]
diego71 has quit [Read error: Connection reset by peer]
diego71 has joined #linux-sunxi
<asdf28> does anyone know where to find an u-boot command reference?
<asdf28> i have found this page: https://www.denx.de/wiki/DULG/Manual
<asdf28> but a lot of commands are not listed there, such as boot_mmc or bootz
<mru> "help"?
<asdf28> mru you mean from the u-boot prompt?
<mru> right
<asdf28> i do not have it installed or running
<mru> the README and the files under doc/ in the source then
<mru> or failing that, the source itself
<mru> boot_mmc isn't a command, btw
<asdf28> could that be from a very old u-boot version? or from a modified version?
<asdf28> thank you, i will have a look there
<mru> it's common to store a command for booting from mmc in an environment variable called boot_mmc
jbrown has quit [Ping timeout: 272 seconds]
<mru> but "boot_mmc" is neither a command name or the name of a special env variable
<asdf28> oh, i see
<mru> "bootcmd" holds the command to run for booting
<mru> and that will often be something like "run boot_mmc" to run whatever is in the boot_mmc variable
<asdf28> script.bin, is this the file that contains the actual boot command?
<mru> it's a convenient way to switch between different boot methods
<mru> the boot command might load and execute a script
<mru> there's nothing built in that does that
<mru> all u-boot does automatically is run the contents of "bootcmd" as a command
<asdf28> i have a newer uEnv.txt file that contains the "bootcmd" command
<asdf28> but another one from a very old image that does not
<asdf28> i wonder what triggers the boot process on that image
<asdf28> boot_mmc=fatload mmc 0 0x43000000 ${fexfile}; fatload mmc 0 0x48000000 ${kernel}; bootm 0x48000000
<asdf28> that is the boot_mmc variable, but no bootcmd variable is present
<mru> booting, whether automatically or by someone entering the "boot" command, runs the contents of the bootcmd variable
<mru> that's it
<mru> loading scripts or variable settings (uenv.txt) has to be done by commands specified there
<mru> ok, there's also the "preboot" variable
<mru> its contents are run before the auto-boot countdown or dropping to the shell
<asdf28> how do you run the script.bin file that is present on some images?
<asdf28> is u-boot hard-coded to run this file somewhere?
<mru> no
<mru> one last time: the only thing hardcoded is running the contents of the bootcmd variable
<asdf28> yes, i understand
<asdf28> This version of u-boot supports boot.scr, and will look for it in the first partition FAT /boot.scr or extX /boot.scr or extX /boot/boot.scr. boot.scr contains your needed uboot commands for loading script.bin, kernel. initrd (optional), setting kernel parameters and booting.
<asdf28> so could this be a custom addition in the linux-sunxi uboot version?
<mru> no
<mru> that's all done with commands stored in variables and executed starting with bootcmd
<mru> the default sunxi environment does a ton of weird stuff
<mru> I suppose it's intended to be helpful
<mru> but I always end up ripping it all out
<asdf28> but that boot.scr file must be hardcoded to run somehwere, isn't it?
<mru> no
<asdf28> that's the only file that contains the actual boot command
<asdf28> how strange
<mru> it's referenced, possibly indirectly, from the bootcmd variable
<mru> and that's the very last time I'm saying that
<mru> you're on your own until someone more patient comes along
andy25225 has quit [Ping timeout: 240 seconds]
<asdf28> that's just what i'm getting from the sunxi-uboot documentation, from what i understand it executes this magic file boot.scr.
<asdf28> that might not exist in the original u-boot
andy25225 has joined #linux-sunxi
Nemo_bis has joined #linux-sunxi
<KotCzarny> asdf28: i think boot_mmc is just some script predefined
<KotCzarny> try: printenv
<asdf28> i cannot use printenv yet, i have not installed u-boot yet
<asdf28> i'm just trying to understand the process
<diego71> ah goodluck :)
<KotCzarny> do you know any scripting language?
<asdf28> but according to the sunxi-uboot wiki, this is all some magic that was added to the sunxi-uboot code
<asdf28> executing the boot.scr file and if that not exists, executing a default boot command
<KotCzarny> if its hardcoded, then look into the source
<asdf28> that would otherwise not happen with the original u-boot
<asdf28> at least from what i understand
<asdf28> yes i'm looking at it right now
<KotCzarny> google the sources for boot_mmc and you will know if its the alias for some subscript or custom command
<KotCzarny> s/google/grep/
<asdf28> s/google/grep/?
<KotCzarny> common shorthand 'i've meant to write 'grep' not 'google''
<asdf28> oh i see
<j--r> <KotCzarny "common shorthand 'i've meant to "> Actually it's the syntax of the sed tool to do a replace...
<KotCzarny> j--r: but it grew out of a sed to irc and other places
<j--r> KotCzarny: I know
<asdf28> "bootcmd=run boot_mmc" this appears in the mainline u-boot source, but only in some board-specific files as far as i understand
<asdf28> but apparently, this is a magic variable that is executed at some point
<KotCzarny> i still think boot_mmc is just alias for a chain of commands
<KotCzarny> which woulg get explained by printenv
<mru> still going round in the same circles, I see
<KotCzarny> i dont have board handy to check at this moment unfortunatelly
iamfrankenstein has joined #linux-sunxi
<asdf28> mru how do you mean that?
<mru> the discussion is very repetitive
<asdf28> well i am slow to understand, yes, because this is the first time i am learning about these things
<asdf28> and i'm just trying to understand which bits of code are standard u-boot and which aren't, because the sunxi-uboot has made some modifications
<KotCzarny> boot_mmc=fatload mmc 0 0x43000000 script.bin && fatload mmc 0 0x48000000 ${kernel} && watchdog 0 && bootm 0x48000000
<KotCzarny> yeah, i knew i saw it
<KotCzarny> think about it as a script/alias
<smaeul> if you want to know what is standard, read the source for mainline U-Boot, not some old fork
<j--r> <asdf28 "and i'm just trying to understan"> But the wiki says everywhere that the sunxi-uboot is legacy or?
<KotCzarny> at the bottom of the page
<KotCzarny> and yeah, it's legacy
<asdf28> j--r yes but that doesn't mean that all of its code is legacy or customized
<j--r> <asdf28 "j.r yes but that doesn't mean th"> Legcy means you should ignore it because it shouldn't be used anywhere anymore...
<j--r> https://lists.denx.de/pipermail/u-boot/2014-December/199351.html clearly says that sunxi-uboot is no long supported
<KotCzarny> j--r: well, one can define own aliases of uboot commands in mainline too
<j--r> I know.... but just wanted to make clear that it's pointless to look at legacy stuff
<KotCzarny> j--r: for new things, yes. for learning some tricks, there are fine hacks here and there
<j--r> Yeah ok
<asdf28> j--r i needed to look at it because newer examples for u-boot use the device tree model, and i cannot use that because newer kernels do not work with my board
<asdf28> so i looked at the legacy examples that use the old method with script files
<j--r> Okay
<asdf28> but the mainline u-boot might also work if it can use these old script files
<KotCzarny> newer uboot can boot legacy kernel
JohnDoe_71Rus has quit [Quit: KVIrc KVIrc Aria 5.0.1, revision: 5.0.1+git-7433-0df9f22f2, build type: debug, sources date: 20160102, built on: 2019-12-08 19:19:20 UTC 5.0.1+git-7433-0df9f22f2 http://www.kvirc.net/]
<KotCzarny> but you should get your board supported in both uboot and linux
<KotCzarny> will save you time in the long run
<asdf28> yes
iamfrankenstein has quit [Quit: iamfrankenstein]
asdf28 has quit [Remote host closed the connection]
lurchi__ is now known as lurchi_
lurchi_ has quit [Quit: Konversation terminated!]
jbrown has joined #linux-sunxi
[Gulliver] is now known as [SpongeBob]
netlynx has quit [Quit: Ex-Chat]
cmeerw has quit [Ping timeout: 272 seconds]
ldevulder_ has joined #linux-sunxi
ldevulder has quit [Ping timeout: 256 seconds]
[SpongeBob] is now known as [BruceLee]