Template Information

Trang

Making of X-Loader,U-boot.bin and uImage for BeagleBoard

Thứ Hai, 20 tháng 6, 2011 / 09:23

X-Loader

Steve did some work to consolidate and update X-Loader from various sources and put it in a X-Loader git repository. Get it by
git clone git://gitorious.org/x-loader/x-loader.git xloader
cd xloader/
Build:
make distclean
make omap3530beagle_config
make
Result will be a ~20k sized MLO in the main directory. This is the signed x-loader and is ready for use.

U-Boot

Mainline U-Boot has good support for BeagleBoard (except for revision C4; see note below). Get it by:
git clone git://git.denx.de/u-boot.git u-boot-main
cd u-boot-main
git checkout --track -b omap3 origin/master
Build (assuming Code Sourcery GCC):
make CROSS_COMPILE=arm-none-linux-gnueabi- mrproper
make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_beagle_config
make CROSS_COMPILE=arm-none-linux-gnueabi-
Result will be a ~160k sized u-boot.bin in main directory.
Note: Due to (patch and binary) size, BeagleBoard splash screen was removed from upstream version. If you want it back, use U-Boot v1 BeagleBoard splash screen patch.
Note: For experimental U-Boot patches not ready for mainline yet, Steve's Beagle U-Boot git repository is used to test them. Get it by:
git clone git://gitorious.org/u-boot-omap3/mainline.git u-boot-omap3
cd u-boot-omap3
git checkout --track -b omap3-dev origin/omap3-dev
Note: For changing the screen resolution there is one option modifying the file in "include/configs/omap3_beagle.h" and adjusting the maximum resolution before compiling as describe in ARM OMAP2/3 Display Subsystem

Note: For beagleboard revision C4, above sources will not work. USB EHCI does not get powered, hence devices are not detected... get a patched version of u-boot from http://gitorious.org/beagleboard-default-u-boot/beagle_uboot_revc4/ (Update on April 23 - 2010: This repository has been superseded by the U-Boot version found at http://gitorious.org/beagleboard-validation/)

Note: If you want to activate I2C from the expansion header, modify board/ti/beagle/beagle.h :
MUX_VAL(CP(I2C2_SCL),  (IEN  | PTU | EN | M4)) /*GPIO_168*/
MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M4)) /*GPIO_183*/
to
MUX_VAL(CP(I2C2_SCL),  (IEN  | PTU | DIS | M0)) /*I2C2_SCL*/
MUX_VAL(CP(I2C2_SDA), (IEN | PTU | DIS | M0)) /*I2C2_SDA*/

Linux kernel

Git repository of OMAP Linux kernel contains Beagle support. Get it by:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git linux-omap-2.6
cd linux-omap-2.6
Build:
make distclean
make ARCH=arm omap2plus_defconfig
make ARCH=arm menuconfig # only needed if you want to change the default configuration
make ARCH=arm uImage
The result will be a uImage in arch/arm/boot/ directory.
If you use the OE toolchain and want to build outside of the OE tree you should do
ARCH=arm
export ARCH
PATH=~/oe/tmp/cross/armv7a/bin:~/oe/tmp/staging/i686-linux/usr/bin:$PATH # add cross tools to your path
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- distclean
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- omap3_beagle_defconfig
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- menuconfig # only needed if you want to change the default configuration
make CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage
Note: the staging dir in the path is for mkimage. If you've built a kernel before with oe, the program should be there
Note: If you are interested in kernel development have a look to manually compiling BeagleBoard kernel, too.

0 nhận xét:

Đăng nhận xét