blob: 4b660cebd675fff5740c9253a9fcbcd06588a5bc [file] [log] [blame]
Holger Brunck0c5dd432022-12-02 18:22:37 +01001
2#ifndef WCOM_UBI_PARTITION_APP
3/* one flash chip only called boot */
4# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0
5ubiattach=ubi part ubi0
6#else /* WCOM_UBI_PARTITION_APP */
7/* two flash chips called boot and app */
8# define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 ubi.mtd=ubi1
9ubiattach=if test ${boot_bank} -eq 0;
10 then;
11 ubi part ubi0;
12 else;
13 ubi part ubi1;
14 fi
15#endif /* WCOMC_UBI_PARTITION_APP */
16
17actual_bank=0
18
19add_default=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off:
20 console=ttyS0,${baudrate} mem=${kernelmem} init=${init}
21 phram.phram=phvar,${varaddr},CONFIG_KM_PHRAM
22 WCOM_UBI_LINUX_MTD
23
24addpanic=setenv bootargs ${bootargs} panic=1 panic_on_oops=1
25altbootcmd=run bootcmd
26backup_bank=0
27boot=bootm ${load_addr_r} - ${fdt_addr_r}
28
29bootcmd=km_checkbidhwk &&
30 setenv bootcmd 'if km_checktestboot;
31 then;
32 setenv boot_bank ${test_bank};
33 else;
34 setenv boot_bank ${actual_bank};
35 fi;
36 run ${subbootcmds}; reset' &&
37 setenv altbootcmd 'setenv boot_bank ${backup_bank};
38 run ${subbootcmds};
39 reset' &&
40 saveenv &&
41 saveenv &&
42 boot
43
44cramfsaddr=CONFIG_KM_CRAMFS_ADDR
45cramfsloadfdt=cramfsload ${fdt_addr_r} fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb
46cramfsloadkernel=cramfsload ${load_addr_r} ${uimage}
47
48develop=tftp ${load_addr_r} scripts/develop-${arch}.txt &&
49 env import -t ${load_addr_r} ${filesize} &&
50 run setup_debug_env
51
52env_version=1
53fdt_addr_r=CONFIG_KM_FDT_ADDR
54flashargs=setenv bootargs root=mtdblock:rootfs${boot_bank} rootfstype=squashfs ro
55init=/sbin/init-overlay.sh
56load=tftpboot ${load_addr_r} ${hostname}/u-boot.bin
57load_addr_r=CONFIG_KM_KERNEL_ADDR
58pnvramsize=CONFIG_KM_PNVRAM
59
60ramfs=tftp ${load_addr_r} scripts/ramfs-${arch}.txt &&
61 env import -t ${load_addr_r} ${filesize} &&
62 run setup_debug_env
63
64release=run newenv; reset
65subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt set_fdthigh
66 cramfsloadkernel flashargs add_default addpanic boot
67testbootcmd=setenv boot_bank ${test_bank}; run ${subbootcmds}; reset
68ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank}