summaryrefslogtreecommitdiff
path: root/board/keymile/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'board/keymile/scripts')
-rw-r--r--board/keymile/scripts/README23
-rw-r--r--board/keymile/scripts/debug-arm-env.txt2
-rw-r--r--board/keymile/scripts/debug-common-env.txt9
-rw-r--r--board/keymile/scripts/debug-ppc-env.txt2
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}