Embedded Linux: Hardware, Software and Interfacing
Dr. Craig Hollabaugh
Running kernel 2.4.17 on the MediaEngine
In Chapter 4, Booting Linux, the MediaEngine is booted using kernel version 2.4.2. This is a stock
kernel with three patches applied.
From the buildtoolchain-environment script:
KERNELPATCH1=patch-2.4.2-rmk1.gz
KERNELPATCH2=diff-2.4.2-rmk1-np2.gz
KERNELPATCH3=patch-2.4.2-rmk1-np2-bse.gz
After applying these three patches, the resultant kernel source is v2.4.2-rmk1-np2-bse
Here are the instructions to download, patch and compile the stock kernel 2.4.17.
Download the kernel source using this command: wget http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.17.tar.gz
Download the patch file using this command: wget http://www.embeddedlinuxinterfacing.com/source/mediaengine2.4.17.patch.gz
Extract the kernel source and patch file contents with these commands: tar zxvf linux-2.4.17.tar.gz
gunzip mediaengine2.4.17.patch.gz
Patch the kernel source with these commands: cd linux
patch -p1 < ../mediaengine2.4.17.patch
Compile the patched kernel source with these commands: make oldconfig
make dep
make zImage
The build should create a kernel image 2.4.17 for the MediaEngine.
Copy your new kernel image to the /tftpboot directory with this command: cp arch/arm/boot/zImage /tftpboot/arm2417
Now load and boot this kernel using minicom and these commands: load arm2417 c0008000
go c0008000
Uncompressing Linux................................... done, booting the kernel.
Linux version 2.4.17-rc2-rmk1 (root@taylor) (gcc version 2.95.3 20010315 (relea2
Processor: Intel StrongARM-1110 revision 6
Architecture: BSE nanoEngine
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/nfs nfsaddrs=192.168.1.21:192.168.1.11::255.255.w
Calibrating delay loop... 137.21 BogoMIPS
Memory: 32MB = 32MB total
Memory: 31072KB available (887K code, 206K data, 48K init)
Dentry-cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode-cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
ttySA0 at MEM 0x80010000 (irq = 15) is a SA1100
ttySA1 at MEM 0x80030000 (irq = 16) is a SA1100
ttySA2 at MEM 0x80050000 (irq = 17) is a SA1100
pty: 256 Unix98 ptys configured
SA1100 Real Time Clock driver v1.00
block: 64 slots per queue, batch=16
cerf89x0:cerf89x0_probe()
cerf89x0.c: (kernel 2.3.99) Russell Nelson, Andrew Morton
eth0: cs8900 rev J Base 0xF0000300<6>, IRQ 0, MAC 00:50:15:03:00:19
bad dev id: got 0x19001900, expected 0x12098086 (0)
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 2048)
IP-Config: Complete:
device=eth0, addr=192.168.1.21, mask=255.255.255.0, gw=255.255.255.255,
host=tbdevarm, domain=, nis-domain=(none),
bootserver=192.168.1.11, rootserver=192.168.1.11, rootpath=
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Looking up port of RPC 100003/2 on 192.168.1.11
Looking up port of RPC 100005/1 on 192.168.1.11
VFS: Mounted root (nfs filesystem).
Freeing init memory: 48K
Warning: unable to open an initial console.
Oops got an error. The kernel has changed serial device names because the major/minor numbers were
offically assigned to the SA1100.
This means that /dev/ttyS0 isn't the device file for the MediaEngine's serial port 0 any longer. Look back at the boot
console output to find the serial port information.
ttySA0 at MEM 0x80010000 (irq = 15) is a SA1100
ttySA1 at MEM 0x80030000 (irq = 16) is a SA1100
ttySA2 at MEM 0x80050000 (irq = 17) is a SA1100
/dev/ttySA0 now exists. The error "Warning: unable to open an initial console." happened because /dev/console isn't
symbolically linked to the correct device file (console -> ttyS0).
Create the new device files and link /dev/console with these commands: cd /tftpboot/arm-rootfs/dev
mknod ttySA0 c 204 5
mknod ttySA1 c 204 6
mknod ttySA2 c 204 7
rm console ttyS0
ln -s ttySA0 console
Reboot the MediaEngine, this time you should get the bash prompt.
Again using minicom and these commands: load arm2417 c0008000
go c0008000
Uncompressing Linux................................... done, booting the kernel.
Linux version 2.4.17-rc2-rmk1 (root@taylor) (gcc version 2.95.3 20010315 (relea2
Processor: Intel StrongARM-1110 revision 6
Architecture: BSE nanoEngine
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/nfs nfsaddrs=192.168.1.21:192.168.1.11::255.255.w
Calibrating delay loop... 137.21 BogoMIPS
Memory: 32MB = 32MB total
Memory: 31072KB available (887K code, 206K data, 48K init)
Dentry-cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode-cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
ttySA0 at MEM 0x80010000 (irq = 15) is a SA1100
ttySA1 at MEM 0x80030000 (irq = 16) is a SA1100
ttySA2 at MEM 0x80050000 (irq = 17) is a SA1100
pty: 256 Unix98 ptys configured
SA1100 Real Time Clock driver v1.00
block: 64 slots per queue, batch=16
cerf89x0:cerf89x0_probe()
cerf89x0.c: (kernel 2.3.99) Russell Nelson, Andrew Morton
eth0: cs8900 rev J Base 0xF0000300<6>, IRQ 0, MAC 00:50:15:03:00:19
bad dev id: got 0x19001900, expected 0x12098086 (0)
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 2048)
IP-Config: Complete:
device=eth0, addr=192.168.1.21, mask=255.255.255.0, gw=255.255.255.255,
host=tbdevarm, domain=, nis-domain=(none),
bootserver=192.168.1.11, rootserver=192.168.1.11, rootpath=
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Looking up port of RPC 100003/2 on 192.168.1.11
Looking up port of RPC 100005/1 on 192.168.1.11
VFS: Mounted root (nfs filesystem).
Freeing init memory: 48K
INIT: version 2.78 booting
INIT: Entering runlevel: 2
Starting Network
bash-2.04#