Jump to content

EspressoBin: Possible bug in boot.cmd


Jens Bauer

Recommended Posts

I just came across this line:

Quote

load ${boot_interface} ${devnum}:1 ${scriptaddr} ${prefix}armbianEnv.txt
env import -t ${scriptaddr} ${filesize}

-Is this correct ?

scriptaddr is where the boot.scr is loaded, as far as I understand, it overwrites itself by loading armbianEnv.txt to the same address.

 

So wouldn't it be better to load armbianEnv.txt to kernel_addr, initrd_addr or fdt_addr, since armbianEnv.txt is only used for a short time ?

I have not tried making an armbianEnv.txt, which is larger than boot.scr, but it looks like it would stop the board from booting if it's just long enough to overwrite the 'env import' line.

Link to comment
Share on other sites

That is maybe specific to EspressoBin, because on my Rockchip and Allwinner boards, it is as the following :

if test -e ${devtype} ${devnum} ${prefix}armbianEnv.txt; then
	load ${devtype} ${devnum} ${load_addr} ${prefix}armbianEnv.txt
	env import -t ${load_addr} ${filesize}
fi

Where "load_addr" varies depend of the SoC ...

Link to comment
Share on other sites

3 minutes ago, martinayotte said:

Where "load_addr" varies depend of the SoC ...

... Looks very similar to espressobin; I once had a setup using 'loadaddr' (not load_addr), where loadaddr was used for both loading boot.scr and armbianEnv.txt as well.

 

Link to comment
Share on other sites

Looking at my OPiOne+, it has different addresses for "script_addr" and "load_addr" and during u-boot init it shows :

## Executing script at 4fc00000
...
## Executing script at 44000000

EDIT : ... and here is what is shown for OrangePi-RK3399 :

## Executing script at 00500000
...
## Executing script at 09000000

 

Link to comment
Share on other sites

29 minutes ago, martinayotte said:

Looking at my OPiOne+, it has different addresses for "script_addr" and "load_addr" {snip} and here is what is shown for OrangePi-RK3399 {snip}

That's good news, this means it is likely only be the EspressoBin is 'affected'.

I just double-checked that it's not a "local error" (eg. my own stuipidity), the boot environment variables on the EspressoBin download page does load boot.scr to ${scriptaddr} and Focal's boot.scr does load armbianEnv.txt to ${scriptaddr}.

... So I'll need to try and make an armbianEnv.txt, which is large enough to overwrite the memory where the boot-script is located.

 

Unfortunately, I currently can't get my board to boot from /dev/sda12 correctly; It keeps loading 'version 237' (from /dev/sda11) where it's supposed to load 'version 245.x'.

It's driving me nuts and I'll probably have to rewrite the boot-sequence in order to get it to boot Focal.

That again would probably mean I might not succeed in making the test.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines