From Tech memo of imx27 pdk(1 ~ 3) we already know how to run linux-2.6.22 with imx27pdk patch on the platform. However, i checked Linux Kernel Archive today and download the latest stable version linux-2.6.38. I found this version already support imx27 pdk so i want to try it.
Fristly, cp arch/arm/configs/mx27_defconfig ./.config, and then make menuconfig to DIY your own system.
Secondly, vim Makefile and change from line191:
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-
and then make zImage. Soon you can get kernel image under arch/arm/boot/zImage. Using this image to boot the system:
RedBoot> fis load kernel... Read from 0x07ee0000-0x07eff000 at 0x00080000: .... Read from 0x00100000-0x002c74d8 at 0x000a0000: ...............RedBoot> exec -b 0x100000 -l 0x200000 -c "console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.10.212:/home/hongao_client/ltib/rootfs_fr_jffs2_img init=/linuxrc ip=192.168.10.119:192.168.10.1:192.168.10.1:255.255.255.0 fec_mac=00:04:9F:00:D4:8F"entry=0xa0008000, target=0xa0008000Uncompressing Linux... done, booting the kernel.Linux version 2.6.38 (root@localhost.localdomain) (gcc version 4.1.2) #2 PREEMPT Thu Apr 14 22:11:43 SGT 2011CPU: ARM926EJ-S [41069264] revision 4 (ARMv5TEJ), cr=00053177CPU: VIVT data cache, VIVT instruction cacheMachine: Freescale MX27PDKMemory policy: ECC disabled, Data cache writebackBuilt 1 zonelists in Zone order, mobility grouping on. Total pages: 32512Kernel command line: console=ttymxc0,115200 root=/dev/nfs nfsroot=192.168.10.212:/home/hongao_client/ltib/rootfs_fr_jffs2_img init=/linuxrc ip=192.168.10.119:192.168.10.1:192.168.10.1:255.255.255.0 fec_mac=00:04:9F:00:D4:8FPID hash table entries: 512 (order: -1, 2048 bytes)Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)Memory: 128MB = 128MB totalMemory: 126164k/126164k available, 4908k reserved, 0K highmemVirtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) DMA : 0xffc00000 - 0xffe00000 ( 2 MB) vmalloc : 0xc8800000 - 0xf4000000 ( 696 MB) lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .init : 0xc0008000 - 0xc0026000 ( 120 kB) .text : 0xc0026000 - 0xc03703c4 (3369 kB) .data : 0xc0372000 - 0xc03930c0 ( 133 kB)Preemptable hierarchical RCU implementation. RCU-based detection of stalled CPUs is disabled. Verbose stalled-CPUs detection is disabled.NR_IRQS:272MXC IRQ initializedMXC GPIO hardwareConsole: colour dummy device 80x30Calibrating delay loop... 199.06 BogoMIPS (lpj=995328)pid_max: default: 32768 minimum: 301Mount-cache hash table entries: 512CPU: Testing write buffer coherency: okNET: Registered protocol family 163-Stack Debug board detected, rev = 0x0200bio: create slab <bio-0> at 0Switching to clocksource mxc_timer1Switched to NOHz mode on CPU #0NET: Registered protocol family 2IP route cache hash table entries: 1024 (order: 0, 4096 bytes)TCP established hash table entries: 4096 (order: 3, 32768 bytes)TCP bind hash table entries: 4096 (order: 2, 16384 bytes)TCP: Hash tables configured (established 4096 bind 4096)TCP reno registeredUDP hash table entries: 256 (order: 0, 4096 bytes)UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)NET: Registered protocol family 1RPC: Registered udp transport module.RPC: Registered tcp transport module.RPC: Registered tcp NFSv4.1 backchannel transport module.NetWinder Floating Point Emulator V0.97 (extended precision)JFFS2 version 2.2. (NAND) ?? 2001-2006 Red Hat, Inc.msgmni has been set to 246io scheduler noop registered (default)Serial: IMX driverimx-uart.0: ttymxc0 at MMIO 0x1000a000 (irq = 20) is a IMXconsole [ttymxc0] enabledspi_imx imx27-cspi.1: probedFEC Ethernet Driverfec_enet_mii_bus: probedi2c /dev entries driverDriver for 1-wire Dallas network protocol.i.MX SDHC driveroprofile: hardware counters not availableoprofile: using timer interrupt.TCP cubic registeredNET: Registered protocol family 17drivers/rtc/hctosys.c: unable to open rtc device (rtc0)eth0: Freescale FEC PHY driver [Generic PHY] (mii_bus:phy_addr=1:1f, irq=-1)IP-Config: Complete: device=eth0, addr=192.168.10.119, mask=255.255.255.0, gw=192.168.10.1, host=192.168.10.119, domain=, nis-domain=(none), bootserver=192.168.10.1, rootserver=192.168.10.212, rootpath=PHY: 1:1f - Link is Up - 100/FullVFS: Mounted root (nfs filesystem) on device 0:13.Freeing init memory: 120Kinit started: BusyBox v1.6.1 () multi-call binarystarting pid 242, tty '': '/etc/rc.d/rcS'Setting the hostname to freescaleMounting /proc and /sysStarting the hotplug events dispatcher udevdudevd (251): /proc/251/oom_adj is deprecated, please use /proc/251/oom_score_adj instead.Synthesizing initial hotplug eventsMounting filesystemsmount: sysfs already mounted or /sys busymount: according to mtab, /sys is already mounted on /sysStarting syslogd and klogdRunning depmodWARNING: Couldn't open directory /lib/modules/2.6.38: No such file or directoryFATAL: Could not open /lib/modules/2.6.38/modules.dep.temp for writing: No such file or directoryStarting mxc-charger:Running sysctlSetting up networking on loopback device:Setting up networking on eth0:/etc/rc.d/init.d/network: line 46: udhcpc: command not foundSetting time from ntp server: north-america.pool.ntp.orgnorth-america.pool.ntp.org: Host name lookup failureStarting inetd:Starting the dropbear ssh server:Starting qtopials: /sys/class/input/input*: No such file or directory Waiting for qcop (try 1)... Waiting for qcop (try 2)... Waiting for qcop (try 3)... Waiting for qcop (try 4)... Waiting for qcop (try 5)...Failed to run touchscreen calibration since qcop could not run.starting pid 374, tty '': '/bin/sh'mx27# lsbin etc linuxrc proc sys usrdev home mnt root tmp vardir lib opt sbin unit_tests
It seems touch screen driver and QT still have problems but anyway, system is up. Not bad. Let's go on and resolve these problems in the following sessions.