I’ve compiled the 2.6 kernel (refer to this post), now I’m going to test it.
I found several ways to test the kernel:
- Upload into TS-7260 ROM (replacing the original 2.4 kernel on it). Bad idea, since I don’t want corrupt kernel in the ROM.
- Copy the kernel into SD-CARD then boot the board from SD-CARD. To do this, you will need to upgrade the bootloader (TS-BootROM) on TS-7260 (refer to this page). I don’t like it, since you cannot downgrade it once you upgrade the bootloader (since the board belongs to my employer, I must keep everything intact as original).
- Copy the kernel into TFTP server then boot from TFTP. I like this one, since everything still intact, exept for my tested kernel.
So, here’s the details of the #3 option that I’ve done:
Set-up TFTP server
I’m using Linux SuSE Enterprise Desktop 10, and my choice for TFTP server is ATFTP. To install it:
- Use Yast to install atftp
- Create /tftpboot directory:
# sudo mkdir /tftpboot
- Fix its permission:
# sudo chmod 777 /tftpboot # sudo chown nobody:nobody /tftpboot
- Run the atftpd
#sudo /usr/sbin/rcatftpd start
Later when I tested the atftpd, I found that my firewall blocked it. TFTP service is not very secure service (since you don’t need any username / password to upload/download the files), but since I need it, I turned of the firewall for a while.
# sudo /sbin/SuSEfirewall2 stop
Testing The Kernel
- Copy the kernel into /tftpboot
# cp linux-2.6.21-ts/arch/arm/boot/zImage /tftpboot/
- Power-up TS-7260 board, and interrupt the RedBoot by pressing CTRL+C
- Change the board’s IP to suit your LAN. At very least, your PC should be in the same network as the board.
RedBoot> ip_address -l 192.168.100.4/24
- Then download the kernel
RedBoot> load -r -b 0x218000 -h 192.168.100.206 zImage
Let me explain a bit about the parameters: ‘-r’ refers to “raw” (which mean the file is in raw binary format, instead of ELF, SREC, or Intel Hex), ‘-b’ refers to RAM address where the image should be downloaded, ‘-h’ refers to the TFTP server address, ‘zImage’ refers to our kernel’s file name.
- Execute the kernel
RedBoot> exec
The kernel will be executed, boot, then it will stop since we haven’t define the root filesystem for it.
Well, that’s it for this post. The next post will be how to use the flash’s root filesystem to boot with our new kernel.
[...] the few last posts (here and here), I showed some guide to compile, install, and test the kernel. Now it is the time to install the [...]
Pingback by Creating Simple Root Filesystem for Embedded Linux « Embedded Freaks.. — December 18, 2008 @ 11:38 am