Embedded Freaks..

December 4, 2008

Testing Linux 2.6.21 on TS-7260 board

Filed under: ARM9, embedded-linux — Tags: , — kunilkuda @ 10:43 am

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:

  1. 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.
  2. 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).
  3. 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:

  1. Use Yast to install atftp
  2. Create /tftpboot directory:
    # sudo mkdir /tftpboot
  3. Fix its permission:
    # sudo chmod 777 /tftpboot
    # sudo chown nobody:nobody /tftpboot
    
  4. 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

  1. Copy the kernel into /tftpboot
    #  cp linux-2.6.21-ts/arch/arm/boot/zImage /tftpboot/
    
  2. Power-up TS-7260 board, and interrupt the RedBoot by pressing CTRL+C
  3. 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
    
  4. 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.

  5. 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.

Advertisements

1 Comment »

  1. […] 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


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: