bootargs&bootcmd
程序员文章站
2022-07-13 22:23:16
...
海思uboot中设置bootargs&bootcmd
简述
给到工厂生产的软件必须要在uboot中进行bootargs&bootcmd设置,否则会导致系统跑不起来,bootdelay是决定启动延时的,这个一般需要在uboot中设置为0
1、设置bootargs
osdrv/opensource/uboot/u-boot-2016.11/include/config_distro_bootcmd.h
#ifndef CONFIG_BOOTCOMMAND
#define CONFIG_BOOTCOMMAND "nand read 0x82600000 0x900000 0x200000;nand read 0x82000000 0x100000 0x10000;nand read 0x82100000 0x200000 0x10000;dcache flush;cread 0x82000000 0x82100000 0x10000 0x825c0000;go_cpu1 0x82700000 0x84200000 0x300000 0x600000; nand read 0x82000000 0xb00000 0x500000;bootm 0x82000000"
#endif
需要将双引号中的内容更新为reference/out/hi3559v200_dashcam_rearview_demb_c2395_bt656_1080p25/burn/spinand/config里的bootargs内容
setenv bootargs 'mem=37M quiet console=ttyAMA0,115200 clk_ignore_unused rw ubi.mtd=6 root=ubi0:ubifs rootfstype=ubifsmtdparts=hinand:1M(uboot.bin),1M(rawparam),1M(rawparambak),6M(media_app_zip.bin),2M(resImage),5M(uImage),12M(rootfs.ubifs),30M(appfs.ubifs)'
2、设置bootcmd
osdrv/opensource/uboot/u-boot-2016.11/include/configs/hi3556v200.h
#define CONFIG_BOOTARGS "mem=37M quiet console=ttyAMA0,115200 clk_ignore_unused rw ubi.mtd=6 root=ubi0:ubifsrootfstype=ubifsmtdparts=hinand:1M(uboot.bin),1M(rawparam),1M(rawparambak),6M(media_app_zip.bin),2M(resImage),5M(uImage),12M(rootfs.ubifs),30M(appfs.ubifs)"
需要将双引号中的内容更新为reference/out/hi3559v200_dashcam_rearview_demb_c2395_bt656_1080p25/burn/spinand/config里的bootcmd内容
setenv bootcmd 'nand read 0x82600000 0x900000 0x200000;nand read 0x82000000 0x100000 0x10000;nand read 0x82100000 0x200000 0x10000;dcache flush;cread 0x82000000 0x82100000 0x10000 0x825c0000;go_cpu1 0x82700000 0x84200000 0x300000 0x600000; nand read 0x82000000 0xb00000 0x500000;bootm 0x82000000'
3、设置bootdelay
osdrv/opensource/uboot/u-boot-2016.11/configs/hi3556v200_nand_defconfig /CONFIG_BOOTDELAY=0
下一篇: unity网格合并的用法
推荐阅读