U-Boot questions

AmigaOne X5000 platform specific issues.
Roland
Posts: 442
Joined: Tue May 02, 2017 7:23 am

U-Boot questions

Post by Roland »

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 -

User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1426
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: U-Boot questions

Post by tonyw »

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

Spectre660
Posts: 1493
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: U-Boot questions

Post by Spectre660 »

@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: 1493
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: U-Boot questions

Post by Spectre660 »

@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.

User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1426
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: U-Boot questions

Post by tonyw »

Contact me privately and I'll give you all the data you need.
cheers
tony

Roland
Posts: 442
Joined: Tue May 02, 2017 7:23 am

Re: U-Boot questions

Post by Roland »

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: 442
Joined: Tue May 02, 2017 7:23 am

Re: U-Boot questions

Post by Roland »

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 -

User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 1426
Joined: Wed Mar 09, 2011 1:36 pm
Location: Sydney, Australia

Re: U-Boot questions

Post by tonyw »

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

Roland
Posts: 442
Joined: Tue May 02, 2017 7:23 am

Re: U-Boot questions

Post by Roland »

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 -

Lio
Posts: 46
Joined: Tue Sep 13, 2011 8:07 pm

Re: U-Boot questions

Post by Lio »

Are the U-Boot parameters documented somewhere ?

I could not find anything on the X5000 wiki and I would like to experiment/optimize my nvgetvar !

Post Reply