]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
configs: Rename environment variable fit_loadaddr to addr_fit
authorAndrew F. Davis <afd@ti.com>
Mon, 12 Aug 2019 19:59:54 +0000 (15:59 -0400)
committerTom Rini <trini@konsulko.com>
Tue, 20 Aug 2019 15:46:11 +0000 (11:46 -0400)
This is the first part of a larger effort I would like to propose to
unify and simplify the default set of environment variables.

When many early environment variables were named there were fewer images
being loaded, usually just a kernel. At this time names like 'loadaddr'
would suffice. Now we have more images and many more commands that act on
them, often re-using the same variable for several different uses. The
contents of a variable are also not immediately known causing one to have
to look up a chain of variables to understand what a command is actually
doing. I suggest the following.

To start, all variables containing names should be prefixed with name_
and addresses with addr_. This is like how K2 already does things and
allows for simple universal commands like:

get_fdt_nfs=nfs ${addr_fdt} /boot/${name_fdt}

Which is very clear on what is intended here and would work across all
board that using the this naming convention.

We can do this one variable at a time, start here with addr_fit.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Andreas Dannenberg <dannenberg@ti.com>
include/configs/k2g_evm.h
include/configs/ti_armv7_common.h
include/configs/ti_armv7_keystone2.h

index 3ec5a5acf5f9780c744e44c68c0ba2a2aa8b662e..b39e956defd6ac3cf304c683dea78051fc9a7d8c 100644 (file)
@@ -69,7 +69,7 @@
        "run run_mon_hs; "                                              \
        "run init_${boot}; "                                            \
        "run get_fit_${boot}; "                                         \
-       "bootm ${fit_loadaddr}#${name_fdt}"
+       "bootm ${addr_fit}#${name_fdt}"
 #endif
 
 /* NAND Configuration */
index 828fb1b2a59cd69fe284e9836e85618454159d99..ece329fc7dd5183adca97d58ecad734c8f286c99 100644 (file)
@@ -52,9 +52,9 @@
 
 #define DEFAULT_FIT_TI_ARGS \
        "boot_fit=0\0" \
-       "fit_loadaddr=0x90000000\0" \
+       "addr_fit=0x90000000\0" \
        "fit_bootfile=fitImage\0" \
-       "update_to_fit=setenv loadaddr ${fit_loadaddr}; setenv bootfile ${fit_bootfile}\0" \
+       "update_to_fit=setenv loadaddr ${addr_fit}; setenv bootfile ${fit_bootfile}\0" \
        "loadfit=run args_mmc; bootm ${loadaddr}#${fdtfile};\0" \
 
 /*
index b44b51bbd1a604a4604cd3e623caf4b275f6b210..401dec44931af1a9e4d586ffa5edcb47bf87c3d2 100644 (file)
        "get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon}\0"       \
        "get_mon_nfs=nfs ${addr_mon} ${nfs_root}/boot/${name_mon}\0"    \
        "get_mon_ubi=ubifsload ${addr_mon} ${bootdir}/${name_mon}\0"    \
-       "get_fit_net=dhcp ${fit_loadaddr} ${tftp_root}"                 \
+       "get_fit_net=dhcp ${addr_fit} ${tftp_root}"                     \
                                                "/${fit_bootfile}\0"    \
-       "get_fit_nfs=nfs ${fit_loadaddr} ${nfs_root}/boot/${fit_bootfile}\0"\
-       "get_fit_ubi=ubifsload ${fit_loadaddr} ${bootdir}/${fit_bootfile}\0"\
-       "get_fit_mmc=load mmc ${bootpart} ${fit_loadaddr} "             \
+       "get_fit_nfs=nfs ${addr_fit} ${nfs_root}/boot/${fit_bootfile}\0"\
+       "get_fit_ubi=ubifsload ${addr_fit} ${bootdir}/${fit_bootfile}\0"\
+       "get_fit_mmc=load mmc ${bootpart} ${addr_fit} "                 \
                                        "${bootdir}/${fit_bootfile}\0"  \
        "get_uboot_net=dhcp ${loadaddr} ${tftp_root}/${name_uboot}\0"   \
        "get_uboot_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_uboot}\0" \
        "get_fdt_ramfs=dhcp ${fdtaddr} ${tftp_root}/${name_fdt}\0"      \
        "get_kern_ramfs=dhcp ${loadaddr} ${tftp_root}/${name_kern}\0"   \
        "get_mon_ramfs=dhcp ${addr_mon} ${tftp_root}/${name_mon}\0"     \
-       "get_fit_ramfs=dhcp ${fit_loadaddr} ${tftp_root}"               \
+       "get_fit_ramfs=dhcp ${addr_fit} ${tftp_root}"                   \
                                                "/${fit_bootfile}\0"    \
        "get_fs_ramfs=dhcp ${rdaddr} ${tftp_root}/${name_fs}\0" \
        "get_ubi_net=dhcp ${addr_ubi} ${tftp_root}/${name_ubi}\0"       \
        "run run_mon_hs; "                                              \
        "run init_${boot}; "                                            \
        "run get_fit_${boot}; "                                         \
-       "bootm ${fit_loadaddr}#${name_fdt}"
+       "bootm ${addr_fit}#${name_fdt}"
 #endif
 #endif