如何使用u-boot(7)

一 如何使用u-boot:(version:u-boot-1.1.6)
1 打补丁:
tar xjf /mnt/hgfs/neo/tools_linux/u-boot-1.1.6.tar.bz2  -C ./
cd u-boot-1.1.6/
patch -p1 < /mnt/hgfs/neo/tools_linux/u-boot-1.1.6_jz2440.patch
2 配置:
make 100ask24x0_config
3 编译:
make


4 下载:
tftp 30000000 u-boot_jz2440.bin; nand erase.part u-boot; nand write 30000000 u-boot


5.操作u-boot
常用命令:
? / help : 查看有哪些命令
?cmd       :查看命令具体用法  
print    :查看环境变量
set bootdelay 7    :设置环境变量
save               :保存到nandflash中去
reset   :重启




说明:
由于u-boot版本比较低,使用4.3.2编译器会使用失败,所以这里使用3.4.5版本。
如何切换编译器版本:
1.修改/etc/profile  

vi /etc/profile



  添加:pathmunge /usr/local/arm/3.4.5/gcc-3.4.5-glibc-2.3.6/bin
   去掉:pathmunge /usr/local/arm/4.3.2/bin


2 使交叉编译器生效
source /etc/profile 


3 使用arm-linux-gcc -v验证
arm-linux-gcc -v
Reading specs from /usr/local/arm/3.4.5/gcc-3.4.5-glibc-2.3.6/bin/../lib/gcc/arm-linux/3.4.5/specs
Configured with: /work/tools/create_crosstools/crosstool-0.43/build/arm-linux/gcc-3.4.5-glibc-2.3.6/gcc-3.4.5/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/work/tools/gcc-3.4.5-glibc-2.3.6 --with-float=soft --with-headers=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux/include --with-local-prefix=/work/tools/gcc-3.4.5-glibc-2.3.6/arm-linux --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.4.5


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

奔跑吧撸码兄弟

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值