Holger Brunck | 0c5dd43 | 2022-12-02 18:22:37 +0100 | [diff] [blame] | 1 | |
| 2 | #ifndef WCOM_UBI_PARTITION_APP |
| 3 | /* one flash chip only called boot */ |
| 4 | # define WCOM_UBI_LINUX_MTD ubi.mtd=ubi0 |
| 5 | ubiattach=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 |
| 9 | ubiattach=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 | |
| 17 | actual_bank=0 |
| 18 | |
| 19 | add_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 | |
| 24 | addpanic=setenv bootargs ${bootargs} panic=1 panic_on_oops=1 |
| 25 | altbootcmd=run bootcmd |
| 26 | backup_bank=0 |
| 27 | boot=bootm ${load_addr_r} - ${fdt_addr_r} |
| 28 | |
| 29 | bootcmd=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 | |
| 44 | cramfsaddr=CONFIG_KM_CRAMFS_ADDR |
| 45 | cramfsloadfdt=cramfsload ${fdt_addr_r} fdt_0x${IVM_BoardId}_0x${IVM_HWKey}.dtb |
| 46 | cramfsloadkernel=cramfsload ${load_addr_r} ${uimage} |
| 47 | |
| 48 | develop=tftp ${load_addr_r} scripts/develop-${arch}.txt && |
| 49 | env import -t ${load_addr_r} ${filesize} && |
| 50 | run setup_debug_env |
| 51 | |
| 52 | env_version=1 |
| 53 | fdt_addr_r=CONFIG_KM_FDT_ADDR |
| 54 | flashargs=setenv bootargs root=mtdblock:rootfs${boot_bank} rootfstype=squashfs ro |
| 55 | init=/sbin/init-overlay.sh |
| 56 | load=tftpboot ${load_addr_r} ${hostname}/u-boot.bin |
| 57 | load_addr_r=CONFIG_KM_KERNEL_ADDR |
| 58 | pnvramsize=CONFIG_KM_PNVRAM |
| 59 | |
| 60 | ramfs=tftp ${load_addr_r} scripts/ramfs-${arch}.txt && |
| 61 | env import -t ${load_addr_r} ${filesize} && |
| 62 | run setup_debug_env |
| 63 | |
| 64 | release=run newenv; reset |
| 65 | subbootcmds=ubiattach ubicopy checkfdt cramfsloadfdt set_fdthigh |
| 66 | cramfsloadkernel flashargs add_default addpanic boot |
| 67 | testbootcmd=setenv boot_bank ${test_bank}; run ${subbootcmds}; reset |
| 68 | ubicopy=ubi read ${cramfsaddr} bootfs${boot_bank} |