[树莓派内核学习]u-boot移植-barebox

文章参考链接: http://coldnew.github.io/blog/2013/06/17_234c8.html
                             http://wiki.beyondlogic.org/index.php?title=Compiling_uBoot_RaspberryPi

在这里首先要介绍下我的硬件接线:
环境准备:
用TTL串口链接树莓派,使用超级终端,设置波特率为115200。
串口工具链接方法:
______  GND         9  ________
              |--------> <----|
USB      | RXD         8 |
TTL       |--------> <----|   RPI
              | TXD       10 |
______|--------> <----|________


首先要明确一下,虽让这个标题是讲u-boot,实际上并不是u-boot。barebox作为一种高级版的类似于u-boot的引导工具。

在树莓派上安装barebox

1、下载barebox的源代码
下载地址: http://barebox.org/download/barebox-2014.09.0.tar.bz2

2、配置barebox
export ARCH=arm
export CROSS_COMPILE=/home/debian/raspberrypi/git/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-

配置raspberryPi
make rpi_defconfig

配置menuconfig
make menuconfig

进入下面的 界面:

配置以下的内容就能支持SD卡:
Drivers  --->
         [*] MCI drivers  --->
                          [*]   Probe on system start
                          [*]   MCI Info
                          [*]   Support writing to MCI cards
                          [*]   MCI support for BCM2835

Filesystem support  --->
         [*] FAT filesystem support  --->
                          [*]   FAT write support
                          [*]   Support long filenames

3、执行make

编译完成,将barebox.bin放到tf卡boot目录下。
更改config.txt,添加
kernel=barebox.bin

4、完成编译,启动树莓派。
barebox的功能比较强大,从编译到使用都可以体现。

帮助界面:


从上面的支持指令可以看出barebox挂载了文件系统,支持文件的操作。
不过在boot指令之下,并没有看到bootz,不支持zImage的启动。

猜你喜欢

转载自blog.csdn.net/u010398378/article/details/39717353
今日推荐