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!