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