U-Boot questions

AmigaOne X5000 platform specific issues.

U-Boot questions

Postby Roland » Sun Nov 26, 2017 4:06 pm

Is there a way to prevent Linux distros from automatically changing the "amigabootmenu_default" variable? Every time I run a Linux, this variable is changed to '2' and saved in the permanent memory, and I have to reverse it manually to '0' from U-Boot cli.

Is it somehow possible to change the bootmenu labels, and add submenus? At least the Linux-menu would necessarily need submenus as there are several distros available. As a workaround, I have scattered them to the 'massboot' subitems, but the titles are not very informative...
- Roland -
Roland
 
Posts: 110
Joined: Tue May 02, 2017 8:23 am

Re: U-Boot questions

Postby tonyw » Sun Nov 26, 2017 11:05 pm

Are you sure that Linux is changing the NV variable? That sounds almost impossible - Linux would have to have a means to do it, which it does not AFAIK.

Remember to type "saveenv" in the U-Boot command line after using "setenv" to change the setting, otherwise your change will work only for this boot.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1260
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: U-Boot questions

Postby Spectre660 » Mon Nov 27, 2017 2:14 am

@Roland

U-Boot seems to save the last Start option selected in the boot menu.
If you selected "Start AmigaOS" again then it should save that option for future boots.
To keep the AmigaOS option as default select command line and start from the U-Boot Shell using the run command and the variable.
Example
run ubuntu
of course you have to define and save the U-Boot variable first .
Spectre660
 
Posts: 1388
Joined: Sat Jun 18, 2011 3:16 pm
Location: Montserrat

Re: U-Boot questions

Postby Spectre660 » Mon Nov 27, 2017 2:27 am

@tonyw

Actually the fw_printenv and fw_saveenv commands can read and write U-Boot variables from linux.
The correct parameters for the sdcard address need to be present in a config file.
I have compiled the commands but I can't work out the correct address so it is not working.
The fw_printenv is the command for reading the variables .again the correct address needs to be set in the config file or it
gives an error and prints what it can. fw_saveenv is actually a link to fw_printenv.
so when called as fw_saveenv the command writes the variable.

tonyw wrote:Are you sure that Linux is changing the NV variable? That sounds almost impossible - Linux would have to have a means to do it, which it does not AFAIK.

Remember to type "saveenv" in the U-Boot command line after using "setenv" to change the setting, otherwise your change will work only for this boot.
Spectre660
 
Posts: 1388
Joined: Sat Jun 18, 2011 3:16 pm
Location: Montserrat

Re: U-Boot questions

Postby tonyw » Mon Nov 27, 2017 11:30 am

Contact me privately and I'll give you all the data you need.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1260
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: U-Boot questions

Postby Roland » Mon Nov 27, 2017 11:33 am

Spectre660 wrote:U-Boot seems to save the last Start option selected in the boot menu.
If you selected "Start AmigaOS" again then it should save that option for future boots.


Nope, running AmigaOS again from the menu (or from Command Line with 'Boota') does not reverse the variable to '0', at least in my machine! Have tested it many times... I have to change the variable manually.

But the opposite change (to '2') happens every time I run Linux from the boot menu.

To keep the AmigaOS option as default select command line and start from the U-Boot Shell using the run command and the variable.
Example
run ubuntu
of course you have to define and save the U-Boot variable first .


Thanks! I have to use that trick in future...
- Roland -
Roland
 
Posts: 110
Joined: Tue May 02, 2017 8:23 am

Re: U-Boot questions

Postby Roland » Mon Nov 27, 2017 7:50 pm

tonyw wrote:Are you sure that Linux is changing the NV variable? That sounds almost impossible - Linux would have to have a means to do it, which it does not AFAIK.


Well, in my further testings I noticed that also the second menuitem (Mophos) does change the variable to point to itself (1), so it seems to be an U-Boot feature and not a 'Linux effect', as Spectre already said. The fourth item (Boot options) does not do this, nor the first (AmigaOS). But should they do it? If you set the variable to something else than '0' and save it, and then boot AmigaOS from the menu, does it reverse to '0 ' in your machine?

If I would like to set the variable to point some submenuitem in "Boot Options', how should I formulate it? I alreday tried '3:1' and '3;1', but they just opened the submenu listing, like when the variable is set to '3'.
- Roland -
Roland
 
Posts: 110
Joined: Tue May 02, 2017 8:23 am

Re: U-Boot questions

Postby tonyw » Tue Nov 28, 2017 12:06 am

Roland wrote:Well, in my further testings I noticed that also the second menuitem (Mophos) does change the variable to point to itself (1), so it seems to be an U-Boot feature and not a 'Linux effect', as Spectre already said. The fourth item (Boot options) does not do this, nor the first (AmigaOS). But should they do it? If you set the variable to something else than '0' and save it, and then boot AmigaOS from the menu, does it reverse to '0 ' in your machine?


I didn't have that variable (amigabootmenu_default) in my NV list, so I added it and set it to "5". If I type "boota" from the command line, the variable is not changed, but if I choose "Boot AmigaOS" from the menu, the variable is reset to "0". SInce I don't have any other OS installed and AmigaOS certainly does not look for that variable and can't change any variables anyway, it must be U-Boot itself.

I suppose somebody thinks that's a good thing...
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1260
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: U-Boot questions

Postby Roland » Tue Nov 28, 2017 1:47 am

tonyw wrote: I didn't have that variable (amigabootmenu_default) in my NV list, so I added it and set it to "5". If I type "boota" from the command line, the variable is not changed, but if I choose "Boot AmigaOS" from the menu, the variable is reset to "0". SInce I don't have any other OS installed and AmigaOS certainly does not look for that variable and can't change any variables anyway, it must be U-Boot itself.


Hmm... If both you and Spectre get the same result, "Boot AmigaOS" resetting that variable, that would suggest there is something wrong with my system!? The U-Boot version of my X5000 is the same as in all resale machines, though. Is it possible somehow to check that the U-Boot code on the boot SD is valid?
- Roland -
Roland
 
Posts: 110
Joined: Tue May 02, 2017 8:23 am


Return to Platform: AmigaOne X5000

Who is online

Users browsing this forum: No registered users and 1 guest

cron