zedboard的u-boot编译---编辑自己的配置文件
来源:互联网 发布:人工智能发展现状2017 编辑:程序博客网 时间:2024/06/05 18:19
zedboard的u-boot编译
1. 下载xilinx的u-boot源码。
命令:git clone git://git.xilinx.com/u-boot-xlnx.git
2. 取到自己想要的分支。
我们用上面的命令得到的源码默认是master分支,我们可以用checkout来取到我们想要的tag的源码。
首先用git status可以得到:
# On branch master
nothing to commit (working directory clean)
确认我们是在master分支,然后登录https://github.com/Xilinx/u-boot-xlnx,查看master分支有哪些tag。
选择自己想要的tag,比如我使用的是ISE14.6, 所以我就选择了xilinx-v14.6.01版本。
使用命令:git checkout -b xilinx-v14.6.01 xilinx-v14.6.01
结束后使用git status看,已经切换到xilinx-v14.6.01了。
# On branch xilinx-v14.6.01
nothing to commit (working directory clean)
3. 编辑自己的配置文件
对单板u-boot的配置主要通过配置头文件来完成,比如xilinx提供的u-boot里,如果要对zedboard配置,可以使用zynq_zed.h这个头文件,那么配置的命令如下:
make distclean
make zynq_zed_config
make
但是我想对u-boot做一些修改。 首先我将zynq_zed.h文件复制一份,命名为zynq_hello.h。
然后对zynq_hello.h做一些修改。
1)修改环境变量:
添加如下:
/* Default environment */
#undef CONFIG_EXTRA_ENV_SETTINGS
#define CONFIG_EXTRA_ENV_SETTINGS \
"ethaddr=00:0a:35:00:01:22\0"\
"kernel_image=zImage\0"\
"ramdisk_image=ramdisk32M.image.gz\0"\
"devicetree_image=devicetree.dtb\0"\
"bitstream_image=system.bit.bin\0"\
"loadbit_addr=0x100000\0"\
"kernel_size=0x500000\0"\
"devicetree_size=0x20000\0"\
"ramdisk_size=0x5E0000\0"\
"fdt_high=0x20000000\0"\
"initrd_high=0x20000000\0"\
"mmc_loadbit_fat=echo Loading bitstream from SD/MMC/eMMC to RAM.. && " \
"mmcinfo && " \
"fatload mmc 0 ${loadbit_addr} ${bitstream_image} && " \
"fpga load 0 ${loadbit_addr} ${filesize}\0" \
"norboot=echo Copying Linux from NOR flash to RAM... && " \
"cp.b 0xE2100000 0x3000000 ${kernel_size} && " \
"cp.b 0xE2600000 0x2A00000 ${devicetree_size} && " \
"echo Copying ramdisk... && " \
"cp.b 0xE2620000 0x2000000 ${ramdisk_size} && " \
"bootm 0x3000000 0x2000000 0x2A00000\0" \
"qspiboot=echo Copying Linux from QSPI flash to RAM... && " \
"sf probe 0 0 0 && " \
"sf read 0x3000000 0x100000 ${kernel_size} && " \
"sf read 0x2A00000 0x600000 ${devicetree_size} && " \
"echo Copying ramdisk... && " \
"sf read 0x2000000 0x620000 ${ramdisk_size} && " \
"bootm 0x3000000 0x2000000 0x2A00000\0" \
"sdboot=echo Copying Linux from SD to RAM... && " \
"mmcinfo && " \
"fatload mmc 0 0x8000 ${kernel_image} && " \
"fatload mmc 0 0x1000000 ${devicetree_image} && " \
"fatload mmc 0 0x2000000 ${ramdisk_image} && " \
"go 0x8000\0" \
"nandboot=echo Copying Linux from NAND flash to RAM... && " \
"nand read 0x3000000 0x100000 ${kernel_size} && " \
"nand read 0x2A00000 0x600000 ${devicetree_size} && " \
"echo Copying ramdisk... && " \
"nand read 0x2000000 0x620000 ${ramdisk_size} && " \
"bootm 0x3000000 0x2000000 0x2A00000\0" \
"jtagboot=echo TFTPing Linux to RAM... && " \
"tftp 0x8000 ${kernel_image} && " \
"tftp 0x1000000 ${devicetree_image} && " \
"tftp 0x2000000 ${ramdisk_image} && " \
"go 0x8000\0"
这个环境变量主要决定了zImage, devicetree和文件系统的名称。比如默认的文件系统名称是uramdisk.image.gz, 我改为ramdisk32M.image.gz这个名称。另外改变这些文件在内存上的放置的位置。
还添加:
#undef CONFIG_IPADDR
#define CONFIG_IPADDR172.19.67.186
#undef CONFIG_SERVERIP
#define CONFIG_SERVERIP172.19.67.185
修改IP设置。
添加:
/* Default boot from SD card. */
#undef CONFIG_BOOTCOMMAND
#define CONFIG_BOOTCOMMAND "run jtagboot"
将boot的方式改为tftp加载。
大家当然也可以添加一些自己想要修改的参数。
4. 修改boards.cfg文件,添加如下:
zynq_hello arm armv7 zynq xilinx zynq
5. 使用指令,就可以生成u-boot文件。
make distclean
make zynq_hello_config
make
0 0
- zedboard的u-boot编译---编辑自己的配置文件
- zedboard u-boot编译的心路历程
- 编译ZedBoard的u-boot.elf(ssbl)
- u-boot的编译
- U-Boot 的编译
- 如何烧写自己编译的u-boot
- U-boot的编译流程
- u-boot 的编译步骤
- U-boot 编译学习--- U-boot 的编译链接过程
- 一步一步学zedboard之七单独编译u-boot
- 制作ZedBoard-linaro-desktop-ubuntu全过程之编译u-boot
- U-boot中定制自己的命令
- U-boot中定制自己的命令
- 构建自己的u-boot快捷菜单
- (六) 自己写简单的u-boot
- U-Boot的配置、编译、连接过程
- at91sam9263的linux编程----u-boot编译
- U-Boot的配置、编译、连接过程
- 第五周项目2-建立链栈算法库
- iOS各种被拒的原因汇总
- Android - WebView 加载 Https 出现 SSL Error. Failed to validate the certificate chain
- JDBC----Result结果集
- 使用javascript原生实现一个模板引擎
- zedboard的u-boot编译---编辑自己的配置文件
- 九月二十七日Oracle整理
- 50道JAVA基础编程练习题
- net.sf.json.JsonConfig 使用详解
- 建立时间和保持时间(1)
- Java 并发工具包 java.util.concurrent 介绍
- Javascript的字符串操作-16.9.27
- iOS开发中那些容易被我们忽略的代码,常用代码集合
- attr