****** [Simtec_Electronics] ****** =============================================================================== ___________________ |Product:EB675001DIP| ****** EB675001DIP uCLinux notes ****** |Date:17/12/2004____| |Reference:NTS001___| |Author:BJD_&_VRS___| |Version:1.1________| =============================================================================== ***** Contents ***** * Introduction * Install_compiler * Unpack_and_patch_uCLinux_distribution * Configuring_and_building_uCLinux * Download_and_run_image_on_module * References (c)2004 Simtec Electronics $Id: uclinux-notes.html,v 1.1 2004/12/17 16:21:17 vince Exp $ =============================================================================== ***** Introduction ***** This document outlines how to retrieve, unpack, patch and build the mCLinux distribution for use with the Simtec EB675001DIP module. The main steps are: 1. Install toolchain (cross compiler) 2. Unpack and patch uCLinux distribution 3. configure and build your distribution ***** Install compiler ***** Because of the limitations of mCLinux native compiling is usually not possible, so a cross compiler must be employed, cross compiler tools are typically hosted on a more powerful X86 machine and generate ARM binaries. A uCLinux_toolchain can be obtained from the mCLinux website. and provides all the necessary tools to compile the distribution. The arm-elf-tools-20030314.sh is the toolchain we have used to build our example images. To install one of the pre-built uclinux toolchains the downloaded file must be executed as root. # sh arm-elf-tools-20030314.sh this will install arm-elf-* tools into /usr/local/bin ***** Unpack and patch mCLinux distribution ***** 1. Obtain the distribution files, patches and kernel sources, the complete list of required files are: o mCLinux_09/09/2003_Distribution # EB675001DIP_vendor_patches. # uClibc_ioperm_fix # BOA_webserver_CSS_mimetype_fix o Linux_2.4.24_Kernel_source # uCLinux_2.4.24 Kernel patch. # 2.4.24-uc0-eb675001dip_uCLinux Kernel patch. 2. unpack the software distribution: # tar -xzf uClinux-dist-20030909.tar.gz 3. Unpack 2.4.24 kernel inside the distribution # cd uClinux-dist # tar -xjf linux-2.4.24.tar.bz2 4. Apply the patches for uCLinux # cd linux-2.4.24 # zcat patch-2.4.24-uc0-eb675001dip.gz | patch -p1 5. Apply Simtec OKI kernel patches # zcat patch-2.4.24-uc0-eb675001dip.gz | patch -p1 # cd .. 6. Move the original kernel out of the way and link the new one in place. # mv linux-2.4.x linux-2.4.x-orig # ln -s linux-2.4.24 linux-2.4.x 7. Apply Simtec OKI patches for uCLinux distribution # zcat patch-uclinux20030909-vendor-eb675001dip.gz | patch -p1 8. Apply uclibc fix for ioperm # zcat patch-uclinux20030909-uclibc-ioperm.gz | patch -p1 9. Optionally apply this patch to add the css mime type to BOA webserver # zcat patch-uclinux20030909-boacss.gz | patch -p1 ***** Configuring and building uCLinux ***** Ensure the present working directory is the unpacked uCLinux directory # cd uClinux-dist Then make the xconfig target # make xconfig Perform the following steps in the presented menu 1. Select `Target Platform Selection` 2. Select Oki/EB67DIP 3. Return to Main Menu 4. `Save and Exit` Finally build the configured distribution with # make dep # make if successful, this will create the output images image.bin and romfs.img in the images directory. ***** Download and run image on module ***** Download and run on module, using ABLE, the following commands can be issued: > setargs root=/dev/ram console=ttyS0,115200 ro > load (tftpboot)image.bin (tftpboot)romfs.img > boot ***** References ***** * http://www.kernel.org/pub/linux/kernel/v2.4/ 2.4 series kernel sources. * http://www.uclinux.org/pub/uClinux/dist/ mCLinux distribution page * http://www.uclinux.org/pub/uClinux/uClinux-2.4.x/ mCLinux Kernel source page. ______________________________ |***** Simtec Electronics *****| |Web:http://www.simtec.co.uk/ | |Email:info@simtec.co.uk | |Simtec Electronics, | |Avondale Drive, | |Tarleton, | |Preston, | |Lancs | |PR4 6AX | |United Kingdom | |Tel:+44 (0)1772 812863 | |Fax:+44_(0)1772_816426________|