应用程序linux修改uboot参数,uboot启动内核参数

setenv bootargs 'root=/dev/nfs nfsroot=192.168.1.141:/root/rootfs/rootfs ip=192.168.1.10:192.168.1.141:192.168.1.1:255.255.255.0::eth0:off init=/linuxrc console=ttySAC2,115200'

setenv bootcmd 'movi read kernel 30008000; bootm 30008000'

setenv bootcmd 'tftp 0x30008000 zImage; bootm 0x30008000'

//bootcmd 对应的是boot命令

setenv bootargs 'console=ttySAC2,115200 root=/dev/mmcblk0p2 rw init=/linuxrc rootfstype=ext3'

tslib移植问题

selected device is not a touchscreen I understand

export TSLIB_TSEVENTTYPE=INPUT

export TSLIB_ROOT=/opt/tslib

export TSLIB_TSDEVICE=/dev/input/event2

export QWS_MOUSE_PROTO=tslib:/dev/input/event2

export TSLIB_CONFFILE=$TSLIB_ROOT/etc/ts.conf

export TSLIB_CALIBFILE=$TSLIB_ROOT/etc/pointercal

export TSLIB_PLUGINDIR=$TSLIB_ROOT/lib/ts

export TSLIB_FBDEVICE=/dev/fb0

export TSLIB_CONSOLEDEVICE=none

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$TSLIB_ROOT/lib

九鼎新板210的tslib,配置电容屏的内容

echo set tslib environment...

export TSLIB_TSDEVICE=/dev/input/event2

export TSLIB_TSEVENTTYPE=INPUT

export TSLIB_CONFFILE=/etc/ts.conf

export TSLIB_CALIBFILE=/etc/pointercal

公建控制器  NUC972版

uboot 给kernel传参 64MB内存nandfalse

#define CONFIG_BOOTCOMMAND"nand read 0x7fc0 0x200000 0x500000 ;bootm 0x7fc0"// nandflash flash kernel boot kernel"

uboot给从nandfalse中的0X200000地址处读取0X500000(5MB)大小的内容到内存的0X7fc0出运行。内核放在nandfalse的0X200000到0X1600000。

#define CONFIG_BOOTARGS"mem=64M console=ttyS0 115200 root=/dev/mtdblock2 rw rootfstype=yaffs2 rootflags=inband-tags mtdparts=nand0:0x200000@0x0(u-boot),0x1400000@0x200000(kernel),-(user)"//yaffs2 true

uboot给内核传递参数

mem=64M告诉板载的内存是多大

console=ttyS0 115200控制台串口与波特率

root=/dev/mtdblock2 rw rootfstype=yaffs2根文件系统在mtdblock2分区 可读可写文件系统类型为yaffs2

rootflags=inband-tags mtdparts=nand0:0x200000@0x0(u-boot),0x1400000@0x200000(kernel),-(user)"设备为nand0 分区信息:0-0X200000给uboot 0X200000-0X1600000给kernel

0X1600000之后的所有false可用空间给user。

#if 1//why 2016/10/21 env

#define CONFIG_NETMASK255.255.255.0

#define CONFIG_IPADDR192.168.1.221

#define CONFIG_SERVERIP192.168.1.189

#define CONFIG_GATEWAYIP192.168.1.0

//#define CONFIG_BOOTCOMMAND     "tftp 0x7fc0 970p_w_picpath.ub; bootm 0x7fc0"//tftp download kernel        serverip 192.168.1.189

#define CONFIG_BOOTCOMMAND"nand read 0x7fc0 0x200000 0x500000 ;bootm 0x7fc0"// nandflash flash kernel boot kernel"

//#define CONFIG_BOOTARGS"root=/dev/ram0 console=ttyS0,115200n8 rdinit=/sbin/init mem=64M mtdparts=nand0:0x200000@0x0(u-boot),0x1400000@0x200000(kernel),-(user)"

//#define CONFIG_BOOTARGS"noinitrd root=/dev/mtdblock2 rootfstype=yaffs2 rootflags=inband-tags console=ttyS0,115200n8 rdinit=/sbin/init mem=64M mtdparts=nand0:0x200000@0x0(u-boot),0x1400000@0x200000(kernel),-(user)"

#define CONFIG_BOOTARGS"mem=64M console=ttyS0 115200 root=/dev/mtdblock2 rw rootfstype=yaffs2 rootflags=inband-tags mtdparts=nand0:0x200000@0x0(u-boot),0x1400000@0x200000(kernel),-(user)"//yaffs2 true

//#define CONFIG_BOOTARGS"root=/dev/nfs nfsroot=192.168.1.189:/root/rootfs ip=192.168.1.221:192.168.1.189:192.168.1.0:255.255.255.0::eth0:off console=ttyS0,115200 rdinit=/sbin/init mem=64M"//nfs

#endif

u-boot-spl.bin 烧录地址 0X200 type:uboot

u-boot.bin 烧录地址 0x100000  type:data

kernel 烧录地址 0x200000

yaffs2 烧录地址 0x1600000

rootfs-yaffs2 为自动运行应用程序的镜像

public-control-yaffs2 为不自动运行应用程序的镜像

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值