How to build kernel for Beaglebone for custom cape support

October 9, 2012   Posted by: Dr. Ace Jeangle

http://www.chalk-elec.com/?p=1605


In this How-to we will try to build kernel for Beaglebone that will support our LVDS cape.

Download and install all required sources:

sudo apt-get install gcc-arm-linux-gnueabi git ccache libncurses5-dev u-boot-tools lzma
cd ~
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git clone git://github.com/RobertCNelson/linux-dev.git
cd linux-dev
git checkout origin/am33x-v3.2 -b am33x-v3.2
cp system.sh.sample system.sh

Then make the following changes in system.sh:
- uncomment line CC=arm-linux-gnueabi-
- uncomment line LINUX_GIT=~/linux-stable/
- uncomment line ZRELADDR=0×80008000
- uncomment line BUILD_UIMAGE=1
- uncomment and change line MMC=/dev/sde to your SD card system name (mine is /dev/sdb)

Next commands:

./build_kernel.sh

will bring you directly to kernel config GUI, and then will assemble it.

After kernel is compiled, please make changes to file ~/linux-dev/KERNEL/arch/arm/mach-omap2/board-am335xevm.c (see below), then recompile kernel again (command “tools/rebuild.sh”). Once the build had completed there will be a uImage file in ~/linux-dev/deploy. You can install this to your SD card with:

./tools/load_uImage.sh

Built kernel modules are located in ~/linux-dev/deploy/mod/lib

To add support for our LVDS cape you need to patch file board-am335xevm.c located in /kernel/arch/arm/mach-omap2. You should find function beaglebone_cape_setup(struct
memory_accessor *mem_acc, void *context)
in this file and change it to always invoke function dvi_init(0,0). The easiest way is to put
the following lines:

pr_info("BeagleBone cape: initializing DVI cape\n");
dvi_init(0,0);
return;

at the beginning of function.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值