home kinesia products products
Embedded Linux Information

  1. Building the 2.4.x Kernel Basics
  2. Network Configuration
  3. Developing Applications and Modules for uClinux 2.4.x
  4. Connection between Linux PC and 44B0X Target Board
  5. LCD Configuration
  6. Audio Configuration
  7. Sharp ARM 9 Root FS with FC
  8. Modifying SDL-1.2.11 to support USB mouse for ARM

Network Configuration of uClinux 2.4.x for 44B0X

by Tong Lai Yu and Felix Lo, July 2005

 
Network

It took us about four days to bring the network up. It took such a long time mainly because at first we could not find the appropriate network driver. Worse, the schematics that came with the CD did not show the correct DMA mode used by the network card; it indicated that 16-bit mode was used but upon calling the Beijing head quarter of Brightek, we learned that actually 8-bit mode is used in the board that we purchased.

At first we modified the file drivers/net/ne.c. To use this driver we need to select [] Other ISA card under Ethernet (10 or 100Mbit)--> of Network device support ---> . We added the following:

//added by Tong
#elif defined(CONFIG_ARCH_S3C44B0)
        static int once = 0;
        if (once)
                return -ENXIO;
//      if (base_addr == 0) { //Felix hardcode
                dev->base_addr = base_addr = 0x06000000;//ARM_NE2000_BASE;
                dev->irq = 22;//ARM_NE2000_IRQ;
                once++;
//      }

#endif
The following were added to drivers/net/Space.c:
//Felix
static struct devprobe arm_probes[] __initdata = {
#ifdef CONFIG_ARM
        {ne_probe, 0},
#endif
        {NULL, 0},
};
The following were modified in arch/armnommu/config.in. Note that we set network card base address to 0x06000000, which we deduced from the CD schematics and 44B0X board memory distribution, and irq to 24, which we found out by running the CD binary linux image linux_bootram.bin and executing the command ifconfig.

if [ "$CONFIG_ARCH_S3C44B0" = "y" ]; then
   define_bool CONFIG_NO_PGT_CACHE y
   define_bool CONFIG_CPU_32 y
   define_bool CONFIG_CPU_32v4 y
   define_bool CONFIG_CPU_26 n
   define_bool CONFIG_CPU_ARM710 y
   define_bool CONFIG_CPU_WITH_CACHE y
   define_bool CONFIG_CPU_WITH_MCR_INSTRUCTION n
   define_hex DRAM_BASE 0x0c000000
   define_hex DRAM_SIZE 0x00800000
   define_hex FLASH_MEM_BASE 0x00000000
   define_hex FLASH_SIZE 0x00200000
   define_hex ARM_NE2000_BASE 0x06000000
   define_hex ARM_NE2000_IRQ 24
fi
Using 'ping' command, we could transmit packets but errors occurred on receiving.

Later, we copied the files rtl8019.c and rtl8019.h to the directory arch/armnommu/mach-s3c44b0 from a 2.6.x distribution. But even after long struggling and juggling with various parameters and modifications, we could not bring up the network.

Finally, we called Brightek at Beijing; the technical support, Mr.Zhang promised to send the correct network driver but he never did. Nevertheless from what he hinted, Felix found that the network driver actually was hidden somewhere in a tar-zipped package and the files were also named 'rtl8019.h' and 'rtl8019.c' and all irqs are defined in irq.h. Besides using 8-bit DMA mode, the crucial changes made in these files are that they cast all 16-bit data to char. After adopting this driver, we could ping from two sites successfully. But still the receiving packets showed some errors.

To ping to the outside world, execute the command:

route add default gw 192.168.1.1

LCD Driver

The driver is at drivers/video/s3c44b0fb.c. 'fb' here means framebuffer, which is a hardware device that can save a graphics image.:q