Tech memo of imx27 pdk (1) -- For kernel building on imx27 pdk with ltib

Suppose i already setup my ltib to this path: /home/hongao_client/ltib, then ltib perl file was under it.

The kernel spec file was over here: /home/hongao_client/ltib/tmp/kernel-2.6.22-pdk27.spec

 

Log-in your system as an user, say leocdsc, then switch to /home/hongao_client/ltib, running:

./ltib -p kernel -m prep

then the kernel source code will be extracted to /home/hongao_client/ltib/rpm/BUILD/linux-2.6.22 and as well the kernel patch for imx27 pdk will be added.

 

Now we're trying to build kernel with: ./ltib -p kernel -m scbuild. But unfortunately, c compiler complains an error in drivers/video/mxc/mx2fb.c. This is becos CONFIG_FB_MXC_TVOUT is switched on but CONFIG_FB_MXC_FS453 and CONFIG_FB_MXC_CH7024 are both switched off. BTW, chips FS453 and CH7024 are designed for transferring RGB to CVBS out, anyway, i cannot find any of them on imx27 PDK board. So switching off them is the correct behavior. However as they are off, c pre-processor runs to #error "no encoder selected" and then throwing out an error.

To fix it, my suggestion is to write a dummy function for encoder_ioctl, and share this funtion with other kernel modules, e.g. EXPORT_SYMBOL(mx2fb_dummy_ioctl);

 

Ok, we try to re-compile, and this time, we should succeed! The actual build sequence of ltib is:

1. switch to /home/hongao_client/ltib/rpm/BUILD/linux-2.6.22;

2. cp -f /home/hongao_client/ltib/config/platform/imx27pdk/linux-2.6.22-pdk27.config.dev ./.config;

3. make ARCH= arm CROSS_COMPILE= HOSTCC= /usr/bin/gcc -B/usr/bin// oldconfig

4. make ARCH=arm CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-

 

After that, we are able to see the following messages:

  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
  CHK     include/linux/version.h
make[1]: `include/asm-arm/mach-types.h' is up to date.
  CHK     include/linux/utsrelease.h
  CALL    scripts/checksyscalls.sh
  Building modules, stage 2.
  MODPOST 27 modules
Build time for kernel-2.6.22-pdk27: 40 seconds

 

At last, we install the kernel by: ./ltib -p kernel -m scinstall.

ltib will switch to /home/hongao_client/ltib/rpm/BUILD/linux-2.6.22, and copy

vmlinux, System.map, arch/arm/boot/zImage to /home/hongao_client/ltib/tmp/kernel//opt/freescale/rootfs/arm/boot/,

and then make a soft link bootable_kernel to zImage.

Ok, tomorrow let's see if the new zImage can be boot-up or not on imx27 pdk.

Good night!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值