boundarydevices 编译启动脚本工具

本文介绍了一种名为6x_bootscript的编译启动脚本,该脚本用于配置和加载嵌入式系统的内核及设备树。脚本详细定义了内存地址分配,并通过检查和设置变量来确定加载路径和参数。此外,脚本还包含了错误处理流程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

编译启动脚本6x_bootscript

http://git.boundarydevices.com/bootscript.php


a_script=0x10800000
a_zImage=0x10800000
a_fdt=0x13000000
a_ramdisk=0x13800000
a_initrd=0x13a00000


setenv initrd_high 0xffffffff




dtbname=imx6q-sabresd-roadj.dtb;




if load ${dtype} ${disk}:1 ${a_script} uEnv.txt ; then
env import -t ${a_script} ${filesize}
fi


if itest.s x == x${bootdir} ; then
bootdir=/
fi


if itest.s x${bootpart} == x ; then
bootpart=1
fi


if load ${dtype} ${disk}:${bootpart} ${a_fdt} ${bootdir}${dtbname} ; then
fdt addr ${a_fdt}
setenv fdt_high 0xffffffff
else
echo "!!!! Error loading ${bootdir}${dtbname}";
exit;
fi


run cmd_lvds
cmd_xxx_present=1;


setenv bootargs enable_wait_mode=off
setenv bootargs "$bootargs console=ttymxc0,115200 vmalloc=400M consoleblank=0 vt.global_cursor_default=0 cma=384M rootwait"
#setenv bootargs "${bootargs} console=${console},115200 vmalloc=400M consoleblank=0 rootfstype=ext4 rootwait fixrtc"




bpart=2




setenv bootargs "${bootargs} root=/dev/mmcblk${disk}p${bpart}"




if itest.s "x" != "x${gpumem}" ; then
setenv bootargs ${bootargs} galcore.contiguousSize=${gpumem}
fi


if itest.s "x" != "x${cma}" ; then
setenv bootargs ${bootargs} cma=${cma}
fi


if itest.s "x" != "x${show_fdt}" ; then
fdt print /
fi


if itest.s "x" != "x${show_env}" ; then
printenv
fi


if load ${dtype} ${disk}:${bootpart} ${a_zImage} /zImage ; then
bootz ${a_zImage} - ${a_fdt}
fi
echo "Error loading kernel image"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值