~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: 4b660cebd675fff5740c9253a9fcbcd06588a5bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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}