[树莓派内核学习] u-boot移植
来源:互联网 发布:直播软件推广 编辑:程序博客网 时间:2024/06/18 10:18
本文参考了:
http://shumeipai.nxez.com/2014/07/08/u-boot-raspberry-pi.html
http://blog.sina.com.cn/s/blog_7cedb56d0102uzye.html
环境准备:
交叉编译操作系统: linux_x86虚拟机
arm-linux存储介质:tf卡(预先装过debian并且运行过,这时tf卡上有两个分区:boot与(另一个分区)。最后将tf卡用读卡器连电脑,挂到虚拟机的usb上)
1)获取U-Boot源代码:
下载地址:https://github.com/gonzoua/u-boot-pi/archive/rpi.tar.gz
2) 打补丁,令其支持sdhci
补丁地址:http://people.freebsd.org/~gonzo/arm/patches/u-boot-pi-sdhci-hs-workaround.diff
补丁内容:
基于patch的分析,只改了一行代码。
应用补丁:
3)执行配置
5)编译后得到u-boot.bin,放到树莓派/boot分区,修改config.txt:
6)至此u-boot就编译移植完毕了。
http://shumeipai.nxez.com/2014/07/08/u-boot-raspberry-pi.html
http://blog.sina.com.cn/s/blog_7cedb56d0102uzye.html
环境准备:
交叉编译操作系统: linux_x86虚拟机
arm-linux存储介质:tf卡(预先装过debian并且运行过,这时tf卡上有两个分区:boot与(另一个分区)。最后将tf卡用读卡器连电脑,挂到虚拟机的usb上)
1)获取U-Boot源代码:
下载地址:https://github.com/gonzoua/u-boot-pi/archive/rpi.tar.gz
2) 打补丁,令其支持sdhci
补丁地址:http://people.freebsd.org/~gonzo/arm/patches/u-boot-pi-sdhci-hs-workaround.diff
补丁内容:
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.cindex 8f2137e..bab6084 100644--- a/drivers/mmc/bcm2835_sdhci.c+++ b/drivers/mmc/bcm2835_sdhci.c@@ -166,7 +166,7 @@ int bcm2835_sdhci_init(u32 regbase, u32 emmc_freq) host->name = "bcm2835_sdhci"; host->ioaddr = (void *)regbase; host->quirks = SDHCI_QUIRK_BROKEN_VOLTAGE | SDHCI_QUIRK_BROKEN_R1B |-SDHCI_QUIRK_WAIT_SEND_CMD;+SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_NO_HISPD_BIT; host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195; host->ops = &bcm2835_ops;
基于patch的分析,只改了一行代码。
应用补丁:
$ patch –R –p1 <u-boot-pi-sdhci-hs-workaround.diff手动操作也可:
$ vi drivers/mmc/bcm2835_sdhci.c$ /SDHCI_QUIRK_WAIT_SEND_CMD$ i
3)执行配置
$ make ARCH=arm CROSS_COMPILE=/home/debian/raspberrypi/git/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi- rpi_b_config
4)执行make
$ make ARCH=arm CROSS_COMPILE=/home/debian/raspberrypi/git/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-
5)编译后得到u-boot.bin,放到树莓派/boot分区,修改config.txt:
kernel=u-boot.bin
6)至此u-boot就编译移植完毕了。
0 0
- [树莓派内核学习] u-boot移植
- [树莓派内核学习] u-boot移植-续
- [树莓派内核学习]u-boot移植-barebox
- 学习驱动:移植u-boot
- 【嵌入式Linux学习七步曲之第三篇 Linux系统bootlaoder移植】U-BOOT全线移植分析系列之四--U-boot如何引导Linux内核启动?
- 嵌入式Linux学习-----u-boot移植
- u-boot学习(五):u-boot启动内核
- U-Boot简介与嵌入式内核移植简介
- u-boot系统移植对内核和文件系统的处理
- 第十四章、TIny4412 U-BOOT移植十四 编译产生内核
- A20网络机顶盒移植4.5内核+U-Boot+rootfs
- u-boot-2009.08引导内核学习笔记
- u-boot启动内核学习总结
- 学习笔记:u-boot引导内核启动
- TQ2440 学习笔记—— 32、移植U-Boot【U-Boot 的移植】
- XSBase255B -- u-boot移植
- u-boot移植心得
- u-boot移植日记
- jdk 安装
- windows下运行的linux服务器批量管理工具(带UI界面)
- ubuntu下安装mysql出现FATAL ERROR: Could not find mysqld的处理
- merge用法(读书笔记)
- Mockups知识点
- [树莓派内核学习] u-boot移植
- 农历和阳历的相互转化
- 《数据结构》实验一: VC编程工具的灵活使用
- day34,page55
- 关于if (!cin)
- JSP编程技术5-购物车的实现-session会话对象
- hdu 5055 Bob and math problem
- 资源全部到位但是网站渲染不了的原因
- Longest Consecutive Sequence