summaryrefslogtreecommitdiff
path: root/include/env/pg-wcom
diff options
context:
space:
mode:
Diffstat (limited to 'include/env/pg-wcom')
-rw-r--r--include/env/pg-wcom/common.env68
-rw-r--r--include/env/pg-wcom/ls102xa.env29
-rw-r--r--include/env/pg-wcom/powerpc.env16
3 files changed, 113 insertions, 0 deletions
diff --git a/include/env/pg-wcom/common.env b/include/env/pg-wcom/common.env
new file mode 100644
index 0000000000..4b660cebd6
--- /dev/null
+++ b/include/env/pg-wcom/common.env
@@ -0,0 +1,68 @@
+
+#ifndef WCOM_UBI_PARTITION_APP
+/* one flash chip only called boot */
+# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0
+ubiattach=ubi part ubi0
+#else /* WCOM_UBI_PARTITION_APP */
+/* two flash chips called boot and app */
+# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 ubi.mtd=ubi1
+ubiattach=if test ${boot_bank} -eq 0;
+ then;
+ ubi part ubi0;
+ else;
+ ubi part ubi1;
+ fi
+#endif /* WCOMC_UBI_PARTITION_APP */
+
+actual_bank=0
+
+add_default=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off:
+ console=ttyS0,${baudrate} mem=${kernelmem} init=${init}
+ phram.phram=phvar,${varaddr},CONFIG_KM_PHRAM
+ WCOM_UBI_LINUX_MTD
+
+addpanic=setenv bootargs ${bootargs} panic=1 panic_on_oops=1
+altbootcmd=run bootcmd
+backup_bank=0
+boot=bootm ${load_addr_r} - ${fdt_addr_r}
+
+bootcmd=km_checkbidhwk &&
+ setenv bootcmd 'if km_checktestboot;
+ then;
+ setenv boot_bank ${test_bank};
+ else;
+ setenv boot_bank ${actual_bank};
+ fi;
+ run ${subbootcmds}; reset' &&
+ setenv altbootcmd 'setenv boot_bank ${backup_bank};
+ run ${subbootcmds};
+ reset' &&
+ saveenv &&
+ saveenv &&
+ boot
+
+cramfsaddr=CONFIG_KM_CRAMFS_ADDR
+cramfsloadfdt=cramfsload ${fdt_addr_r} fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb
+cramfsloadkernel=cramfsload ${load_addr_r} ${uimage}
+
+develop=tftp ${load_addr_r} scripts/develop-${arch}.txt &&
+ env import -t ${load_addr_r} ${filesize} &&
+ run setup_debug_env
+
+env_version=1
+fdt_addr_r=CONFIG_KM_FDT_ADDR
+flashargs=setenv bootargs root=mtdblock:rootfs${boot_bank} rootfstype=squashfs ro
+init=/sbin/init-overlay.sh
+load=tftpboot ${load_addr_r} ${hostname}/u-boot.bin
+load_addr_r=CONFIG_KM_KERNEL_ADDR
+pnvramsize=CONFIG_KM_PNVRAM
+
+ramfs=tftp ${load_addr_r} scripts/ramfs-${arch}.txt &&
+ env import -t ${load_addr_r} ${filesize} &&
+ run setup_debug_env
+
+release=run newenv; reset
+subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt set_fdthigh
+ cramfsloadkernel flashargs add_default addpanic boot
+testbootcmd=setenv boot_bank ${test_bank}; run ${subbootcmds}; reset
+ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank}
diff --git a/include/env/pg-wcom/ls102xa.env b/include/env/pg-wcom/ls102xa.env
new file mode 100644
index 0000000000..abbec42457
--- /dev/null
+++ b/include/env/pg-wcom/ls102xa.env
@@ -0,0 +1,29 @@
+#define WCOM_UBI_PARTITION_APP
+
+#include <env/pg-wcom/common.env>
+
+EEprom_ivm=pca9547:70:9
+boot=bootm $load_addr_r - $fdt_addr_r
+checkfdt=true
+cramfsloadfdt=cramfsload $fdt_addr_r fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb
+ethrotate=no
+hwconfig=devdis:esdhc,usb3,usb2,sata,sec,dcu,duart2,qspi,can1,can2_4,ftm2_8,i2c2_3,sai1_4,lpuart2_6,asrc,spdif,lpuart1,ftm1
+netdev=eth2
+
+newenv=protect off CONFIG_ENV_ADDR_REDUND +0x40000 &&
+ erase CONFIG_ENV_ADDR_REDUND +0x40000 &&
+ protect on CONFIG_ENV_ADDR_REDUND +0x40000
+
+set_fdthigh=true
+
+update=protect off CONFIG_SYS_MONITOR_BASE +${filesize} &&
+ erase CONFIG_SYS_MONITOR_BASE +${filesize} &&
+ cp.b ${load_addr_r} CONFIG_SYS_MONITOR_BASE ${filesize} &&
+ protect on CONFIG_SYS_MONITOR_BASE +${filesize}
+
+update-nor=protect off CONFIG_SYS_FLASH_BASE +${filesize} &&
+ erase CONFIG_SYS_FLASH_BASE +${filesize} &&
+ cp.b ${load_addr_r} CONFIG_SYS_FLASH_BASE ${filesize} &&
+ protect on CONFIG_SYS_MONITOR_BASE +0x100000
+
+uimage=uImage
diff --git a/include/env/pg-wcom/powerpc.env b/include/env/pg-wcom/powerpc.env
new file mode 100644
index 0000000000..744c07388c
--- /dev/null
+++ b/include/env/pg-wcom/powerpc.env
@@ -0,0 +1,16 @@
+#define BOOTFLASH_START 0xF0000000
+
+arch=ppc_82xx
+bootm_mapsize=CONFIG_SYS_BOOTM_LEN
+checkfdt=true
+set_fdthigh=true
+
+update=protect off BOOTFLASH_START +${filesize} &&
+ erase BOOTFLASH_START +${filesize} &&
+ cp.b ${load_addr_r} BOOTFLASH_START ${filesize} &&
+ protect on BOOTFLASH_START +${filesize}
+
+newenv=prot off CONFIG_ENV_ADDR +0x40000 &&
+ era CONFIG_ENV_ADDR +0x40000
+
+unlock=yes