Difference between revisions of "TS-7500"

From Openembedded.org
Jump to: navigation, search
m (typo and note about linuxrc)
(delete old info; reference main site)
 
Line 1: Line 1:
 
==Overview ==
 
==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
+
The TS-7500 is based on a Cavium CNS2132 (aka Star Semi STR8132) which contains a Faraday FA-526 core and as a ARMv4 it has NO thumb or thumb interworking 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. [http://wiki.debian.org/ArmEabiPort#ChoiceofminimumCPU see the Debian discussion]. That is why you need to use openembedded.
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. [http://wiki.debian.org/ArmEabiPort#ChoiceofminimumCPU see the Debian discussion]
 
  
==Machine==
+
==Basic Setup==
  
A ts75xx.conf and tune-fa526.inc  are here
+
[http://wiki.embeddedarm.com/wiki/TS-75xx_OpenEmbedded See here for the image and instructions for oe]
[http://mirror.lug.udel.edu/pub/lug-udel/projects/ts7500/ ts7500/]
+
[http://wiki.embeddedarm.com/wiki/TS-7500 Main Wiki]  
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 [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
 
http://mirror.lug.udel.edu/pub/lug-udel/projects/ts7500/repo/deploy
 
  
 
==Kernel==
 
==Kernel==
  
The kernel that comes default from Technologic Systems TS-7500 only supports OABI, so we first need to recompile the kernel [ftp://ftp.embeddedarm.com/ts-arm-sbc/ts-7500-linux/sources/ linux-2.6.24-cavium_source_aug052010.tar.gz] and see [http://www.embeddedarm.com/about/resource.php?item=410#compile this] for a reference for how-to get to kernel on your board.
+
If you need to build your own kernel  
 
+
See https://github.com/embeddedarm/linux-3.4-ts75xx/network
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 [http://mirror.lug.udel.edu/pub/lug-udel/projects/ts7500/ 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.
+
==Cflags==
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:
+
These flags let you build code with almost any gcc-arm toolkit.
[http://mirror.lug.udel.edu/pub/lug-udel/projects/ts7500/ ts7500/]
+
-march=armv4 -mno-thumb-interwork -marm -mfloat-abi=soft
make sure to cp [http://mirror.lug.udel.edu/pub/lug-udel/projects/ts7500/modules.tar.gz modules.tar.gz] into your initrd partition overwriting the old one.
 

Latest revision as of 18:29, 3 July 2016

Overview

The TS-7500 is based on a Cavium CNS2132 (aka Star Semi STR8132) which contains a Faraday FA-526 core and as a ARMv4 it has NO thumb or thumb interworking 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. see the Debian discussion. That is why you need to use openembedded.

Basic Setup

See here for the image and instructions for oe Main Wiki

Kernel

If you need to build your own kernel See https://github.com/embeddedarm/linux-3.4-ts75xx/network

Cflags

These flags let you build code with almost any gcc-arm toolkit. -march=armv4 -mno-thumb-interwork -marm -mfloat-abi=soft