Changes between Version 9 and Version 10 of ventana/bootloader

11/29/2018 01:30:19 PM (3 months ago)
Cale Collins

uboot env tools refresh, examples and clarification added.


  • ventana/bootloader

    v9 v10  
     486* ''Booting rootfs from microSD does not necessarily constitute "NAND-less", env variables are still stored on NAND when NAND is present.''
    486490It is important to realize the meaning of the '''Warning: Bad CRC, using default environment''' message. This means that the non-volatile env area is empty or corrupt (Note that this is the way Gateworks boards ship by default) and that the built-in env within U-Boot will be used.
    488492If you use {{{fw_setenv}}} on an environment in this state it will properly set the variable you specify and all other variables will continue to use their built-in default values within U-Boot. Essentially you are 'overriding' the defaults as you would expect.
     495==== Configuring u-boot-tools
     496A file defining where your environment is located must be present for u-boot-tools to work.  Without this file you will receive an error:
     498Cannot parse config file '/etc/fw_env.config': No such file or directory
     501* Ventana booting from NAND
     503#Create config file
     504cat << EOF > /etc/fw_env.config
     505# device  offset size erasesize
     506/dev/mtd1 0x0 0x20000 0x40000
     507/dev/mtd1 0x80000 0x20000 0x40000
     510* Ventana MMC only
     512#Create config file
     513cat << EOF > /etc/fw_env.config
     514# device  offset size erasesize
     515/dev/mmcblk0 0xb1400 0x20000 0x20000
     516/dev/mmcblk0 0xd1400 0x20000 0x20000
     519* A file for building an image
     521#Create config file
     522cat << EOF > /working/fw_env.config
     523# device  offset size erasesize
     524envVentana.bin 0x00000 0x20000
     525envVentana.bin 0x20000 0x20000
     529This will define the device being used, offset according to flash layout, size from flash map, and size of erase block (unless the device is a file).  Ventana U-boot environment is redundant hence two entries, both locations need their variables updated. 
     531==== Usage example
     534# display environment
     536# set environment variable
     537fw_setenv foo bar #foo being variable name bar being value variable will be set to
     538#second example
     539fw_setenv ipaddr
     540#print single environment variable
     541fw_printenv foo
     542#second example
     543fw_printenv ipaddr