# qq2440-uboot **Repository Path**: 66/qq2440-uboot ## Basic Information - **Project Name**: qq2440-uboot - **Description**: qq2440使用的uboot - **Primary Language**: C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 6 - **Forks**: 1 - **Created**: 2015-08-12 - **Last Updated**: 2025-07-29 ## Categories & Tags **Categories**: hardware **Tags**: None ## README 1.怎么编译uboot CROSS_COMPILE=arm-linux- make O=/tmp/build distclean CROSS_COMPILE=arm-linux- make O=/tmp/build qq2440_config CROSS_COMPILE=arm-linux- make O=/tmp/build all -j4 在 2.怎么清除中间文件 CROSS_COMPILE=arm-linux- make O=/tmp/build distclean 3.怎么把编译后的文件下载到flash中或者内存中 1. speed 12000 //设置TCK为12M,下载程序时会很快 2. 下载并运行init.bin,这是用来初始化SDRAM的 2.1 如果是NAND启动: loadbin /tftp/init.bin 0 setpc 0 g 2.2 如果是Nor启动: loadbin /tftp/init.bin 0x40000000 setpc 0x40000000 g 3. 下载特制的uboot: h loadbin /tftp/u-boot.bin 0x33f80000 setpc 0x33f80000 g 2.4 使用u-boot烧写Flash 以例子为例,假设需要烧写一个名为leds.bin的程序到Nor、Nand Flash,那么请参考: (1).通过Jlink下载: 在J-Link commander里执行: h loadbin /tftp/leds.bin 0x30000000 loadbin /tftp/u-boot.bin 0x30000000 setpc 30000000 g 注意leds.bin的大小 (2).通过u-boot烧写到Nor Flash: 在u-boot里执行: protect off all // 解锁 erase 0 2ffff // 擦除从0地址开始的大小为0x30000的NOR Flash扇区(大小为可擦除块的整数倍,可以运行flash info命令查看) cp.b 0x30000000 0 30000 // 把前面下载到0x30000000的程序烧写到NOR去 (3).通过u-boot烧写到Nand Flash: 在u-boot里执行: nand erase 0 30000 // 擦除从0地址开始的大小为0x30000的Nnad Flash扇区 nand write.jffs2 30000000 0 30000 // 把前面下载到0x30000000的程序烧写到Nand去 注意,上面用的2ffff、30000等数字是192K,如果你的程序比较小,请自行设置。 调试uboot: loadbin /tftp/init.bin 0x40000000 setpc 0x40000000 g h loadbin /tftp/u-boot.bin 0x33f80000 setpc 0x33f80000 g