Difference between revisions of "TS-7500"

From Openembedded.org
Jump to: navigation, search
(new kernel info)
m (typo and note about linuxrc)
Line 40: Line 40:
 
   root@ts75xx:/etc/rcS.d# ls
 
   root@ts75xx:/etc/rcS.d# ls
 
   S02banner      S38devpts.sh    S39hostname.sh
 
   S02banner      S38devpts.sh    S39hostname.sh
 +
 +
You will also need to edit/tweak the linuxrc script on the SPI flash or SD part initrd partition using the method in the offical TS-7500 Software Guide. An example will be posted [http://mirror.lug.udel.edu/pub/lug-udel/projects/ts7500/ here], where we have replaced the fourth partition which is usally VFAT with a EXT2/3 /var parition.
  
 
There is a opkg Angstrom repository for this device hosted by the University of Delaware Linux User Group
 
There is a opkg Angstrom repository for this device hosted by the University of Delaware Linux User Group
Line 68: Line 70:
  
 
We also need to replace the modules.tar.gz from the initrd partition used during the bootstrap process. We need to strip the debugging info from the modules so that the tarball is <200KiB or so.
 
We also need to replace the modules.tar.gz from the initrd partition used during the bootstrap process. We need to strip the debugging info from the modules so that the tarball is <200KiB or so.
  find lib/modules/ -name '*.ko' -exec
+
  find lib/modules/ -name '*.ko' -exec /oe/build/tmp/sysroots/i686-linux/usr/armv4/bin/arm-angstrom-linux-gnueabi-strip -S {} \;
/oe/build/tmp/sysroots/i686-linux/usr/armv4/bin/arm-angstrom-linux-gnueabi-strip
 
-S {} \;
 
 
  tar cfz modules.tar.gz lib/modules/2.6.35.11/kernel/drivers/connector/cn.ko lib/modules/2.6.35.11/kernel/drivers/scsi/scsi_mod.ko lib/modules/2.6.35.11/kernel/drivers/scsi/scsi_wait_scan.ko lib/modules/2.6.35.11/kernel/drivers/scsi/sd_mod.ko lib/modules/2.6.35.11/kernel/drivers/scsi/sg.ko lib/modules/2.6.35.11/kernel/drivers/star/str8100/crash.ko lib/modules/2.6.35.11/kernel/drivers/star/str8100/inthandler.ko lib/modules/2.6.35.11/kernel/drivers/usb/core/usbcore.ko lib/modules/2.6.35.11/kernel/drivers/usb/host/ehci-hcd.ko lib/modules/2.6.35.11/kernel/drivers/usb/storage/usb-storage.ko
 
  tar cfz modules.tar.gz lib/modules/2.6.35.11/kernel/drivers/connector/cn.ko lib/modules/2.6.35.11/kernel/drivers/scsi/scsi_mod.ko lib/modules/2.6.35.11/kernel/drivers/scsi/scsi_wait_scan.ko lib/modules/2.6.35.11/kernel/drivers/scsi/sd_mod.ko lib/modules/2.6.35.11/kernel/drivers/scsi/sg.ko lib/modules/2.6.35.11/kernel/drivers/star/str8100/crash.ko lib/modules/2.6.35.11/kernel/drivers/star/str8100/inthandler.ko lib/modules/2.6.35.11/kernel/drivers/usb/core/usbcore.ko lib/modules/2.6.35.11/kernel/drivers/usb/host/ehci-hcd.ko lib/modules/2.6.35.11/kernel/drivers/usb/storage/usb-storage.ko
  

Revision as of 03:52, 4 March 2011

Overview

The TS-7500 is based on a Cavium CNS2132 (aka Star Semi STR8132) which contains a Faraday FA-526 core which basically resembles a ARM920T but has NO thumb or thumb interworking support which makes it not a fully EABI compliant architecture. However, as of GCC-4.4.2 (recommend at least GCC-4.4.4) EABI binaries can be built for ARMv4 architectures like this one. This guide helps you setup a openembedded toolchain and new kernel w/ EABI support. Most major linux distributions have decided to make ARMv4T (not ARMv4) the minimum supported architecture for their packages so OE is the best way to roll your own EABI Linux for this board. see the Debian discussion

Machine

A ts75xx.conf and tune-fa526.inc are here ts7500/ but they should be added into OE soon.

Binaries must always be built with these flags to function properly. If you do an objdump of your compiled binaries you should see no thumb type instructions (like B, BL, BX, BLX, and BXJ). Use -ffast-math to speed up your software floating point operations, but you can't set it globally since some low-level packages will refuse to build with that flag.

gcc compiler cflags

-march=armv4 -mno-thumb-interwork -mno-thumb -mfloat-abi=soft

Angstrom

There is a couple of changes you need to make to Angstrom in my experience to get it working

distro/include/angstrom.inc

 #comment this line out .. it was adding thumb when it shouldn't have for a armv4 (bug?)
 #DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}'
 #force 32-bit at all times
 ARM_INSTRUCTION_SET = "arm"
 #no BX instructions  (maybe this fixed the above problem)
 THUMB_INTERWORK = "no"

distro/angstrom-2008.1.conf

 #gcc-4.4.4 seems to work better
 ANGSTROM_GCC_VERSION_armv4              ?= "4.4.4"

an inittab from a base-image that works

 ::sysinit:/etc/init.d/rcS
 ::restart:/sbin/init
 ::ctrlaltdel:/sbin/reboot
 ::shutdown:/bin/umount -a -r
 ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100

You need to move some scripts out of rc.S get get it working with the standard chroot boot method for this board. Notice the lack of udev using busybox's mdev -s seems to work fine.

 root@ts75xx:/etc/rcS.d# ls
 S02banner       S38devpts.sh    S39hostname.sh

You will also need to edit/tweak the linuxrc script on the SPI flash or SD part initrd partition using the method in the offical TS-7500 Software Guide. An example will be posted here, where we have replaced the fourth partition which is usally VFAT with a EXT2/3 /var parition.

There is a opkg Angstrom repository for this device hosted by the University of Delaware Linux User Group http://mirror.lug.udel.edu/pub/lug-udel/projects/ts7500/repo/deploy

Kernel

The kernel that comes default from Technologic Systems TS-7500 only supports OABI, so we first need to recompile the kernel linux-2.6.24-cavium_source_aug052010.tar.gz and see this for a reference for how-to get to kernel on your board.

Note that Technologic Systems has now released 2.6.36 for TS-75xx; however 2.6.36 is not currently a "longterm supported kernel version" which means it will not receive security updates and bug fixes in the near future. Luckily 2.6.35 is a longterm release, and we can backport the patch to that version. You can get these patches here. After obtaining the latest 2.6.35 kernel and after patching for the ts7500 and getting a working EABI tool-chain as described above.

export ARCH=arm
#this is an example based on where my cross compiler lives
export CROSS_COMPILE=/oe/build/tmp/sysroots/i686-linux/usr/armv4/bin/arm-angstrom-linux-gnueabi-
make ts7500_defconfig

Only a few changes need to be make to the default TS-7500 kernel .config

 #this first two are the most important options
 CONFIG_AEABI=y
 #allows old OABI to still work like under OABI environments (within the TS-7500's default initrd for example)
 CONFIG_OABI_COMPAT=y
 #lets be able to check our configuration
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 #speed up floating point (not for scientific computing)
 # CONFIG_FPE_NWFPE is not set
 CONFIG_FPE_FASTFPE=y

We also need to replace the modules.tar.gz from the initrd partition used during the bootstrap process. We need to strip the debugging info from the modules so that the tarball is <200KiB or so.

find lib/modules/ -name '*.ko' -exec /oe/build/tmp/sysroots/i686-linux/usr/armv4/bin/arm-angstrom-linux-gnueabi-strip -S {} \;
tar cfz modules.tar.gz lib/modules/2.6.35.11/kernel/drivers/connector/cn.ko lib/modules/2.6.35.11/kernel/drivers/scsi/scsi_mod.ko lib/modules/2.6.35.11/kernel/drivers/scsi/scsi_wait_scan.ko lib/modules/2.6.35.11/kernel/drivers/scsi/sd_mod.ko lib/modules/2.6.35.11/kernel/drivers/scsi/sg.ko lib/modules/2.6.35.11/kernel/drivers/star/str8100/crash.ko lib/modules/2.6.35.11/kernel/drivers/star/str8100/inthandler.ko lib/modules/2.6.35.11/kernel/drivers/usb/core/usbcore.ko lib/modules/2.6.35.11/kernel/drivers/usb/host/ehci-hcd.ko lib/modules/2.6.35.11/kernel/drivers/usb/storage/usb-storage.ko

Or you can use the prebuild kernel from here: ts7500/ make sure to cp modules.tar.gz into your initrd partition overwriting the old one.