Page 1 of 1
Show U-Boot variables
Posted: Fri Dec 17, 2021 6:13 pm
by xeno74
Package: u-boot-tools (Ubuntu, MintPPC etc.)
Command:
fw_printenv
Edit the file fw_env.config in /etc. To create this file, you need to know information about where U-Boot stores its env variables. Specifically, you need the mmcblk device name, the device offset, the env size and the flash sector size.
fw_env.config file:
Code: Select all
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# MTD device name Device offset Env. size Flash sector size
/dev/mmcblk0 0x99C00 0x4000 0x100
Unfortunately we don't know the device offset, the env size and the flash sector size.
Re: Show U-Boot variables
Posted: Fri Dec 17, 2021 9:47 pm
by nbache
The comments in the file you show above mention also an fw_setenv utility.
Does this work under Linux on your X5000? Both /20 and /40?
Best regards,
Niels
Re: Show U-Boot variables
Posted: Sat Dec 18, 2021 12:23 pm
by xeno74
I get the U-Boot variables with PuTTY via a null modem RS-232 serial cable.
PuTTY log:
PuTTY_X5000_40_U-Boot.log
Re: Show U-Boot variables
Posted: Sat Dec 18, 2021 12:31 pm
by xeno74
nbache wrote: Fri Dec 17, 2021 9:47 pm
The comments in the file you show above mention also an fw_setenv utility.
Does this work under Linux on your X5000? Both /20 and /40?
Best regards,
Niels
No, it doesn't because I don't know the device offset, the env size and the flash sector size.
Re: Show U-Boot variables
Posted: Sat Dec 18, 2021 1:38 pm
by nbache
@xeno74:
Try contacting Tony Wyatt directly - I believe he can't read the Linux groups here. But I'm relatively sure he can help.
Best regards,
Niels
Re: Show U-Boot variables
Posted: Tue Dec 21, 2021 5:52 am
by xeno74
Maybe this fw_env.config file works:
Code: Select all
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# MTD device name Device offset Env. size Flash sector size
/dev/mmcblk0 0x89200 0x2000 0x200
Thanks a lot to Skateman and Jamie Krueger for the values.
Re: Show U-Boot variables
Posted: Tue Dec 21, 2021 8:31 am
by Skateman
I have tried the Values but did not work on my machine... (might be due to the 2018 Olson U-Boot version)
With a "stock" u-boot version that came with the X5K the above values could work.
(would be nice if that could be tried by someone)
Further investigation needed regarding the later 2018 Olson u-boot.
Re: Show U-Boot variables
Posted: Thu Dec 23, 2021 4:23 am
by xeno74
xeno74 wrote: Tue Dec 21, 2021 5:52 am
Maybe this fw_env.config file works:
Code: Select all
# Configuration file for fw_(printenv/setenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# MTD device name Device offset Env. size Flash sector size
/dev/mmcblk0 0x89200 0x2000 0x200
Thanks a lot to Skateman and Jamie Krueger for the values.
It works with MintPPC on my X5000/40!

Version: U-Boot aeon-2020-11-14 (Nov 14 2020 - 23:49:16)
fw_printenv --version
fw_printenv
Output:
Code: Select all
amigaboot_quiet=n
amigabootmenu_animate=1
amigabootmenu_animcycles=10
amigabootmenu_default=2
amigabootmenu_delay=1
amigabootmenu_timeout=0
baudrate=115200
bdev=sda3
bootargs=root=/dev/sda2 mem=3500M console=ttyS0,115200 console=tty0
bootargs_live=root=/dev/ramdisk boot=casper mem=3500M ro --
bootargs_live_debug=root=/dev/ramdisk boot=casper mem=3500M ro break debug
bootcmd=setenv bootargs root=/dev/$bdev rw console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr - $fdtaddr
bootdelay=10
bootdvd=scsi reset ; load scsi 0 2000000 boot_dvd ; bootm 2000000
bootfile=uImage
consoledev=ttyS0
eth1addr=00:1E:C0:F8:01:59
ethact=FM1@DTSEC5
ethaddr=00:04:A3:6B:41:65
ethernetboot=echo Running Ethernet Boot
ethprime=FM1@DTSEC4
fdtaddr=c00000
fman_ucode=7fe87128
harddiskboot=echo Running Hard Disk Boot
hwconfig=fsl_ddr:ctlr_intlv=cacheline,bank_intlv=cs0_cs1;usb1:dr_mode=host,phy_type=utmi;usb2:dr_mode=host,phy_type=utmi
linuxboot=setenv bootargs root=/dev/sda4 ; load sata 1:1 1000000 uImage-5.10 ; load sata 1:1 2000000 cyrus-p5040.dtb ; bootm 1000000 - 2000000
liveusb=usb start ; setenv bootargs_live_debug ; ext2load usb 1:1 2000000 boot_dvd ; bootm 2000000
loadaddr=1000000
massboot=echo Running Mass Storage Boot
mos=bootmorphos
netdev=eth0
nfsboot=setenv bootargs root=/dev/nfs rw nfsroot=$serverip:$rootpath ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off console=$consoledev,$baudrate $othbootargs;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr - $fdtaddr
opticalboot=echo Running Optical Boot
os4_bootdevice=auto
os4_commandline=debug munge debuglevel=0
preboot=ami
ramboot=setenv bootargs root=/dev/ram rw console=$consoledev,$baudrate $othbootargs;tftp $ramdiskaddr $ramdiskfile;tftp $loadaddr $bootfile;tftp $fdtaddr $fdtfile;bootm $loadaddr $ramdiskaddr $fdtaddr
ramdiskaddr=2000000
ramdiskfile=ramdisk.uboot
rootpath=/opt/nfsroot
scsidevs=1
stdin=usbkbd,serial
stdout=serial,vga
uboot=u-boot.bin
ubootaddr=0xFFF80000
It seems, that we need different values for each U-Boot version.
Re: Show U-Boot variables
Posted: Thu Dec 23, 2021 8:02 am
by Skateman
Great!!! Good thing it works on your machine.