160 likes | 326 Views
Porting Linux. Linux onto the Puppeteer SA1110. The Puppeteer board. The Puppeteer board SA1110 CPU SMSC LAN91C96I ethernet 8 Mb Flash Intel 28F320C3 Boot block flash 32 Mb DRAM Altera FPGA 6k Xilinks CPLD XCR3064A. Selecting an OS. Lots of choices NETBSD
E N D
Porting Linux Linux onto the Puppeteer SA1110
The Puppeteer board • The Puppeteer board • SA1110 CPU • SMSC LAN91C96I ethernet • 8 Mb Flash Intel 28F320C3 Boot block flash • 32 Mb DRAM • Altera FPGA 6k • Xilinks CPLD XCR3064A
Selecting an OS • Lots of choices • NETBSD • gcc problems – good documentation • Ecos • Modular rt system • Linux • Various commercial versions • Montavista, Yellowdog, blue cat • Distributions • Redhat, Debian • Uclinux • Arm has an MMU • Build your own! • 2.4.18 -> 2.4.21
Building the cross compiler • Using gcc 2.95.3 • Going to 3.3 for 2.6.n kernels • Binutils • X • Building own • There are lots of toolchains around!
Selecting a library • Selecting a library for an embedded system requires care. • Glibc • GNU standard – too large • Newlib • Good for embedded board without an OS/linux • Uclibc • Doesn’t need Uclinux – small & well supported • Good gcc support
The native BSP • Fairly large problem for porting • Supports VxWorks • Specialised command set – no debug! • Uses COFF/MSbin • Does use standard tftp • No documentation • Had to create several tools • Elf2bin • Eloadsvr • elf2data
Building the kernel • SA1110 is well supported • Changes to board specifics • Linux/arch/arm/head.s • Serial port code esp. in linux/include
Creating a rootfs • Need to create rootfs on host • dd to create empty 8mb file • Mkfs.ext2 on it • Mount –o loop • Create /dev /etc et al • Type carefully! • Needed converting into MSbin format – yuk!
Busybox & tiny login • Rather than build each tool, busybox and tinylogin were used • Very good set of utilities • Works well with uclibc • Easy to configure • Require some full scale tools • TCP/IP tools • Weird busybox error!
TCP/IP& NFS • Had to port the SMC9194.c driver for board • Find the chip! • Re-write low level access routine • FPGA interrupt handling routines • Debugging! • The importance of ARP • NFS • Requires some extra library support zlib • Seems to work • NFS mounted root fs doesn’t work, yet!
Remote debugging with GDB • Using gdb version 6 • Seems to work well with uclibc • untested
MTD flash devices • MTD is not supposed to be in sync with kernel – seemed fine • Using CFI • Under 2.4.n have to put partitions into map file sa1110-flash.c • 7MB available • Boot block? • Choice of file systems • Weird mtd MAC address problem
I2c and eeprom • Due to the MTD/MAC problem I ported some transpond code for I2c & eeprom to read the nv data • Works in smc driver! • I2c implemented as a linux driver – not tested • This is straying towards bsp/bios functionality
Das Uboot • Needs a new boot strap – lots of choice • Redboot, blob, angelboot, • Using Uboot • Well supported, small, modular • Need to write FPGA support code • Need I2c code • How to install • Jtag? ICE?