diff options
author | Holger Brunck <holger.brunck@keymile.com> | 2011-05-04 01:47:34 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-05-18 23:03:22 +0200 |
commit | 2d9528e32fa0a05d2b170a23fb445f83d4d26571 (patch) | |
tree | 688d44cc51a69ab0f5e6129ce0d96635bd13aeb4 /board/keymile/scripts | |
parent | 92c91080e41b36146985fc6d5bf9d35bb162d034 (diff) | |
download | u-boot-imx-2d9528e32fa0a05d2b170a23fb445f83d4d26571.zip u-boot-imx-2d9528e32fa0a05d2b170a23fb445f83d4d26571.tar.gz u-boot-imx-2d9528e32fa0a05d2b170a23fb445f83d4d26571.tar.bz2 |
km/common: simplify default environment
This is a first step to simplify the default environment. Move all
the environment variables which are only needed for debugging
purpose to textfiles in the scripts directory. In case of debugging
these files can be loaded via tftp into RAM and set via the env import
command. Other variables are identified as obsolete and were removed.
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Acked-by: Heiko Schocher <hs@denx.de>
cc: Wolfgang Denk <wd@denx.de>
cc: Detlev Zundel <dzu@denx.de>
Diffstat (limited to 'board/keymile/scripts')
-rw-r--r-- | board/keymile/scripts/README | 23 | ||||
-rw-r--r-- | board/keymile/scripts/debug-arm-env.txt | 2 | ||||
-rw-r--r-- | board/keymile/scripts/debug-common-env.txt | 9 | ||||
-rw-r--r-- | board/keymile/scripts/debug-ppc-env.txt | 2 |
4 files changed, 36 insertions, 0 deletions
diff --git a/board/keymile/scripts/README b/board/keymile/scripts/README new file mode 100644 index 0000000..86c2b5a --- /dev/null +++ b/board/keymile/scripts/README @@ -0,0 +1,23 @@ +debug-common-env.txt +============================ +This file defines environment variables which are valid for powerpc boards +and for arm boards. + +addramfs: add phram device for the rootfilesysten in ram +develop: for development, laod kernel via tftp and mount rootfs via NFS +nfsargs: default arguments for nfs boot +ramfs: load rootfilesystem in RAM kernel +rootfsfile: loacation of the rootfs file for ramfs +setramfspram: compute PRAM size for ramfs target +setrootfsaddr: compute rootfilesystem address for phram +tftpkernel: load a kernel with tftp into ram +tftpramfs: load rootfs with tftp into ram + +debug-ppc-env.txt +============================ +fdt_file: location of the dtb file on the tftp server +tftpfdt: load dtb file and set fdt address + +debug-arm-env.txt +============================ +tftpfdt: for arm only a dummy variable, because we have no fdt on arm diff --git a/board/keymile/scripts/debug-arm-env.txt b/board/keymile/scripts/debug-arm-env.txt new file mode 100644 index 0000000..84498af --- /dev/null +++ b/board/keymile/scripts/debug-arm-env.txt @@ -0,0 +1,2 @@ +debug_env_common=tftpboot 0x200000 scripts/debug-common-env.txt && env import -t 0x200000 ${filesize} +tftpfdt=true diff --git a/board/keymile/scripts/debug-common-env.txt b/board/keymile/scripts/debug-common-env.txt new file mode 100644 index 0000000..1fd4b0c --- /dev/null +++ b/board/keymile/scripts/debug-common-env.txt @@ -0,0 +1,9 @@ +addramfs=setenv bootargs "${bootargs} phram.phram=rootfs${boot_bank},${rootfsaddr},${rootfssize}" +develop=setenv subbootcmds "tftpfdt tftpkernel nfsargs ${commonargs} boot " && setenv bootcmd 'run bootrunner' && setenv altbootcmd 'run bootcmd' && km_setboardid && saveenv && reset +nfsargs=setenv bootargs ubi.mtd=ubi0 root=/dev/nfs rw nfsroot=${serverip}:${rootpath} +ramfs=setenv actual_bank -1 && setenv subbootcmds "tftpfdt tftpkernel setrootfsaddr tftpramfs flashargs ${commonargs} addpanic addramfs boot " && setenv bootcmd 'run bootrunner' && setenv altbootcmd 'run bootcmd' && run setboardid && run setramfspram && run setpnvramaddr && saveenv && reset +rootfsfile=${hostname}/rootfsImage +setramfspram=setexpr value 0 + ${reservedpram} && setexpr value 0x${value} + ${rootfssize} && setexpr value 0x${value} + ${varsize} && setexpr value 0x${value} + ${pnvramsize} && setexpr value 0x${value} / 0x400 && setenv pram 0x${value} +tftpkernel=tftpboot ${kernel_addr_r} ${hostname}/uImage && setenv actual_kernel_addr ${kernel_addr_r} +tftpramfs=tftpboot ${rootfsaddr} ${hostname}/rootfsImage && setenv loadaddr +setrootfsaddr=setexpr value ${pnvramsize} - ${rootfssize} && setenv rootfsaddr 0x${value} diff --git a/board/keymile/scripts/debug-ppc-env.txt b/board/keymile/scripts/debug-ppc-env.txt new file mode 100644 index 0000000..3c06ff1 --- /dev/null +++ b/board/keymile/scripts/debug-ppc-env.txt @@ -0,0 +1,2 @@ +debug_env_common=tftpboot 0x200000 scripts/debug-common-env.txt && env import -t 0x200000 ${filesize} +tftpfdt=tftpboot ${fdt_addr_r} ${hostname}/${hostname}.dtb && setenv actual_fdt_addr ${fdt_addr_r} |