------------- Boot loader commands -------------- ? - alias for 'help' askenv - get environment variables from stdin auth - authenticate an image auth_chunk- authenticate an image in block of chunks auth_img- authenticate a uboot image format,search for kernel type and authenticate it auth_initrd- authenticate a secure_boot image format,kernel uimage + initrd image base - print or set address offset bootm - boot application image from memory bootp - boot image via network using BOOTP/TFTP protocol chpart - change active partition cmp - memory compare cp - memory copy echo - echo args to console editenv - edit environment variable env - environment handling commands exit - exit script false - do nothing, unsuccessfully go - start application at address 'addr' help - print command description/usage i2c - I2C sub-system loop - infinite loop on address range md - memory display mm - memory modify (auto-incrementing address) mtdparts- define flash/nand partitions mw - memory write (fill) nand - NAND sub-system nboot - boot from NAND device nm - memory modify (constant address) printenv- print environment variables reset - Perform RESET of the CPU run - run commands in an environment variable saveenv - save environment variables to persistent storage secboot - Command to Boot TOS setenv - set environment variables showvar - print local hushshell variables sleep - delay execution for some time source - run script from memory test - minimal test like /bin/sh tftpboot- boot image via network using TFTP protocol true - do nothing, successfully ubi - ubi commands upgrade - upgrade - forward/backward copy memory to pre-defined flash location version - print monitor, compiler and linker version GRX500 # ---------- Boot loader predefined variables ---------- active_bank=B addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:on addmisc=setenv bootargs ${bootargs} console=${console},${baudrate} ethaddr=${ethaddr} panic=1 ${mtdparts} init=/etc/preinit active_bank=${active_bank} update_chk=${update_chk} maxcpus=4 pci=pcie_bus_perf ethwan=${ethwan} ubootver=${ver} mem=480M@512M baudrate=115200 bootcmd=run flash_flash bootcore=openwrt-intel_mips-xrx500_4kec-easy350550_bootcore-initramfs-kernel.bin bootcoreA_id=6 bootcoreB_id=7 bootcore_vol=bootcoreB bootdelay=0 bootfile=uImage bootmode=secure check_image0=run switchbankA check_image1=run switchbankB;setenv update_chk 0;save check_image2=run switchbankB check_image3=run switchbankA;setenv update_chk 2;save console=ttyLTQ0 data_block0=uboot data_block1=rootfs data_block2=kernel data_block3=sysconfig data_block4=ubootconfig data_block5=dectconfig eth1addr=88:6A:E3:86:A4:78 ethact=GRX500-Switch ethaddr=88:6A:E3:86:A4:79 f_bootcore_crc=9fb63e1a f_ddrconfig_addr=0x00007fe8 f_ddrconfig_end=0x00007fff f_ddrconfig_size=24 f_dectconfig_addr=0x007FF000 f_dectconfig_size=0x400 f_gphy_firmware_addr=IFX_CFG_FLASH_GPHY_FIRMWARE_IMAGE_START_ADDR f_gphy_firmware_end=IFX_CFG_FLASH_GPHY_FIRMWARE_IMAGE_END_ADDR f_gphy_firmware_size=IFX_CFG_FLASH_GPHY_FIRMWARE_IMAGE_SIZE f_kernel_addr=0x007EDFFF f_kernel_crc=ed439c55 f_kernel_end=IFX_CFG_FLASH_KERNEL_IMAGE_END_ADDR f_kernel_size=f_kernel_sizeB f_kernel_sizeB=1A6B958 f_red_ubootconfig_addr=0x140000 f_rootfs_addr=0x00040000 f_rootfs_crc=205ac61c f_rootfs_end=IFX_CFG_FLASH_ROOTFS_IMAGE_END_ADDR f_rootfs_size=0 f_sysconfig_addr=0x007EE000 f_sysconfig_size=0x10000 f_uboot_addr=0x00000000 f_uboot_size=0x40000 f_ubootconfig_addr=0x100000 f_ubootconfig_end=0x007FEFFF f_ubootconfig_range=0x40000 f_ubootconfig_size=0x4000 f_wlanconfig_addr= IFX_CFG_FLASH_WLAN_CFG_START_ADDR f_wlanconfig_size=IFX_CFG_FLASH_WLAN_CFG_SIZE fileaddr=80800000 filesize=1be62e8 firmware=firmware.img firmwareA_id=2 firmwareB_id=5 firmware_vol=firmwareB flash_end=0x007FFFFF flash_flash=run run_bootcore; ubi read 0xA07FFFC0 ${kernel_vol}; auth_initrd 0xA07FFFC0 ;run flashargs addmisc; bootm 0xA0800000;reset flash_nfs=run nfsargs addip addmisc;bootm ${kernel_addr} flashargs=setenv bootargs root=/dev/ram ro rd_start=${initrd_start} rd_size=${initrd_size} ubi.mtd=system_sw fullimage=fullimage-secure.img gatewayip=192.162.1.1 gws_release= GWS-1.6 ipaddr=192.168.1.1 kernelA_id=0 kernelB_id=3 kernel_id=3 kernel_vol=kernelB load=tftp ${loadaddr} ${u-boot} loadaddr=0x80800000 machtype=C4000L mem=224M mtddevname=uboot mtddevnum=0 mtdids=nand0=17c00000.nand-parts mtdparts=mtdparts=17c00000.nand-parts:1m(uboot),256k(ubootconfigA),256k(ubootconfigB),256k(gphyfirmware),256k(dsd),506m(system_sw),-(res) net_flash=run run_bootcore;tftpboot ${loadaddr} ${tftppath}${bootfile}; run flashargs addip addmisc; bootm net_nfs=run run_bootcore;tftpboot ${loadaddr} ${tftppath}${bootfile};run nfsargs addip addmisc;bootm net_ram=run run_bootcore;tftpboot ${loadaddr} ${tftppath}${bootfile}; run ramargs addip addmisc; bootm netdev=eth0 netmask=255.255.255.0 nfsargs= setenv bootargs ubi.mtd=system_sw root=/dev/nfs rw nfsroot=${serverip}:${rootpath} part0_begin=0x00000000 part1_begin=0x00010000 partition=nand0,0 phym=224M preboot=echo;echo Type "run flash_nfs" to mount root filesystem over NFS;echo ramargs=setenv bootargs root=/dev/ram rw reset_ddr_config=nand write.partial 80400000 ${f_ddrconfig_addr} ${f_ddrconfig_size} reset_sysconfig=run ubi_init; ubi remove rootfs_data reset_uboot_config=nand erase ${f_ubootconfig_addr} ${f_ubootconfig_range};nand erase ${f_red_ubootconfig_addr} ${f_ubootconfig_range}; rootfs=rootfs.img rootfsA_id=1 rootfsB_id=4 rootfs_id=4 rootfs_vol=rootfsB rootfsmtd=/dev/mtdblock6 rootfsname=rootfsB rootpath=/mnt/full_fs run_bootcore=run ubi_init; ubi read 0xA03FFFC0 ${bootcore_vol} ; secboot load_os 0xDEADBEEF 0xA0400000 0x400000;secboot wait_os serial#=C4000LG2011030446 serverip=192.168.1.2 setbank=check_image1 stderr=serial stdin=serial stdout=serial switchbankA=setenv active_bank A;setenv kernel_id ${kernelA_id};setenv rootfs_id ${rootfsA_id};setenv f_kernel_size f_kernel_sizeA;setenv kernel_vol kernelA;setenv rootfs_vol rootfsA;setenv firmware_vol firmwareA;setenv rootfsname rootfsA;setenv bootcore_vol bootcoreA switchbankB=setenv active_bank B;setenv kernel_id ${kernelB_id};setenv rootfs_id ${rootfsB_id};setenv f_kernel_size f_kernel_sizeB;setenv kernel_vol kernelB;setenv rootfs_vol rootfsB;setenv firmware_vol firmwareB;setenv rootfsname rootfsB;setenv bootcore_vol bootcoreB total_db=6 total_part=2 totalimage=totalimage.img u-boot=u-boot.ltq ubi_init=setenv kernelA_id 0;setenv rootfsA_id 1;setenv firmwareA_id 2;setenv kernelB_id 3;setenv rootfsB_id 4;setenv firmwareB_id 5; setenv bootcoreA_id 6; setenv bootcoreB_id 7; setenv setbank check_image${update_chk};run ${setbank};ubi part system_sw update=protect off 1:0-2;era 1:0-2;cp.b ${loadaddr} B0000000 ${filesize} update_bootcore=run ubi_init;tftpboot ${loadaddr} ${tftppath}${bootcore};run switchbankB;upgrade ${loadaddr} ${filesize};run switchbankA;set update_chk 0;upgrade ${loadaddr} ${filesize} update_bootloader=run update_uboot;run update_gphyfirmware; update_chk=2 update_dsd=tftpboot 80800000 dsd.bin ; nand write.partial 80800000 1c0000 40000 ; nand lock both 0x1C0000 update_fullimage=run ubi_init;tftpboot ${loadaddr} ${tftppath}${fullimage};run switchbankB;upgrade ${loadaddr} ${filesize};run switchbankA;set update_chk 0;upgrade ${loadaddr} ${filesize}; ubi create rootfs_data 0x2000000 update_kernel=run ubi_init;tftpboot ${loadaddr} ${tftppath}${bootfile};run switchbankB;upgrade ${loadaddr} ${filesize};run switchbankA;set update_chk 0;upgrade ${loadaddr} ${filesize} update_nandboot=tftpboot ${loadaddr} ${tftppath}u-boot-nand.bin;nand erase 0 100000;nand write.partial ${loadaddr} 0 ${filesize} update_rootfs=run ubi_init;tftpboot ${loadaddr} ${tftppath}${rootfs};run switchbankB;upgrade ${loadaddr} ${filesize};run switchbankA;set update_chk 0;upgrade ${loadaddr} ${filesize} update_totalimage=run ubi_init;tftpboot ${loadaddr} ${tftppath}${totalimage};upgrade ${loadaddr} ${filesize} update_uboot=tftpboot ${loadaddr} ${tftppath}${u-boot};nand write.partial ${loadaddr} 0x4000 ${filesize};reset ver=U-Boot 2016.07-INTEL-v-3.1.177 GWS-1.6 (Jul 13 2022 - 21:46:48 +0000) wifi_guest_passphrase=qb5auejp17bsov Environment size: 6663/16379 bytes GRX500 #