Monday, September 14, 2009

Porting uClinux 2.6 on AX4510


This section is about porting uClinux on ARM 7 based S3c4510 samsung processor.




About AX4510
This is ARM7 Development Board based on Samsung S3C4510B Microcontroller
  • Dimensions: 177 x 130 mm
  • 5.0V DC or USB power supply
  • 4 M bytes Flash(2M x 16bit)
  • 16 M bytes SDRAM(2M x 32bit)
  • 2K x 8 EEPROM
  • 2x RS232
  • USB connecter
  • 10M/100M Ethernet interface connector(RJ45)
  • IDE44 port: for 2.5" hard disk
  • LCD port
  • 2 PS2 port
  • 4 key buttons
  • Reset button
  • 4 LEDS
  • Beeper
  • 20-pin JTAG interface connector
  • all the pins of CPU expand out


About uClinux
uClinux as an operating system includes Linux kernel releases for 2.0 2.4 and 2.6 as well as a collection of user applications, libraries and tool chains,it basically meant to support processor without Memory Management unit.


Essential Tools and Source for Download.
arm-elf-tools-20040427.sh
GCC 2.95.3 with linux 2.6 patch and binutil 2.14 based ARM-ELF toolchain which is made based linux 2.6.5-hsc2 is available for kernel and userland applications compile.It compiles the 2.4 kernel and applications.

uClinux-dist-20040218.tar.gz distribution, this is a full source package, containing kernel, libraries and application code.

linux-2.6.9 vanilla kernels and adds patches relevent to AX4510 http://www.kernel.org/pub/linux/kernel/2.6/linux-2.6.9.tar.bz2

uClinux patch for linux-2.6.9

http://www.uclinux.org/pub/uClinux/uClinux-2.6.x/linux-2.6.9-uc0.patch.gz

MMU less ARM patch -
Name: Hyoks patch
http://opensrc.sec.samsung.com/download/linux-2.6.9-uc0-hsc0.patch.gz


Steps to build the image and downloading to ram.
1.extract uClinux distribution and remove all the existing linux kernel versions.
  • tar -zxvf uClinux-dist-20040408.tar.gz
  • cd uClinux-dist-20040408
  • rm -rf linux-2.0.x linux-2.4.x linux-2.6.x
2. Extract these patches and apply them one after another.
  • gunzip -d linux-2.6.9-uc0.patch.gz
  • gunzip -d linux-2.6.9-uc0-hsc0.patch.gz
  • \linux-2.6.x> patch -p1 < ../linux-2.6.9-uc0.patch
  • \linux-2.6.x> patch -p1 < ../linux-2.6.9-uc0-hsc0.patch
3. Copy relevent configuration files in vendor directory
  • \uClinux-dist-20040408>cp linux-2.6.x/arch/armnommu/configs/espd_4510b_defconfig vendor/Samsung/4510B/config.linux-2.6.x
  • \uClinux-dist-20040408>cp vendor/Samsung/4510B/config.vendor-2.4.x vendor/Samsung/4510B/config.vendor-2.6.x
4. edit 'vendor/Samsung/4510B/rc' file in uClinux-dist directory, change '/dev/ram0' to '/dev/ram1'

5. Edit the Kernel linker file to include the ROMFS

edit file 'linux-2.6.x/arch/armnommu/arch/kernel/vmlinux-lds.S', Add the below lines

  • 81 *(.got) /* Global offset table */
  • 82
  • 83 romfs_start = .;
  • 84 romfs.o
  • 85 romfs_end = .;


6. Configure the kernel using menuconfig,
Block devices --->Default RAM disk size (kbytes) to 2100
General setup ---> (root=/dev/ram0 initrd=,2100k keepinitrd) Default kernel command string

Note:
start address of ramdisk can be determined only compilation of uclinux,
this information can retrieved from System. map file after it is build. so I needed to recompile the uClinux with the updated ramdisk start address.
  • make lib_only
  • make user_only
  • make romfs
  • make image
  • make all
7. image.ram is created in images folder of the distibution and this can be downloaded to ram using tftp.

  • \uClinux-dist-20040408>cd images/
  • \images>tftp 192.168.1.2
  • \images>put image.ram

1 comment:

  1. linux-2.6.9 vanilla kernels and adds patches relevent to AX4510 its link address has changed..
    http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.9.tar.bz2

    ReplyDelete