Hi all,
After some trial and error procedures, I may report that I am now able to
modify and compile a 2.6.37.6 kernel with possibility to mount SD card
partitions to TS-7800.
I use openSUSE 12.2 build environment, cross compiler gcc 4.5.3,
howe:duwe:crosstools version, from software.opensuse.org (package
cross-arm-linux-gnueabi-gcc).
The 'dirdiff' tool was very useful for comparing kernel 2.6.34-ts with mainline
kernel 2.6.34.7.
You may need to change the MBR of your TS-7800 before continuing, a new MBR can
be downloaded from www.embeddedarm.com. An alternative is to change
arch/arm/kernel/head.S according to an earlier message from me (kernel
2.6.36.4, ts-7000 group message no 20289 from Thu Mar 3, 2011). That was the
"ldr r1, =0x00000674" line added after "beq __error_p".
Another thing: mounting a yaffs partition in writable mode seems to mess up the
partition on /dev/mtdblock3. Try "mount -t yaffs -o ro /dev/mtdblock3 /mnt".
You may try to use UBI (as described in http://www.digriz.org.uk/ts78xx/debian)
or some other file system on onboard flash.
What to do when you want to follow my steps:
1. a) Download kernel 2.6.37.6 from www.kernel.org
b) tar -xf <the archived kernel source file>
c) Download kernel 2.6.34-ts from ftp.embeddedarm.com
d) tar -xf linux-2.6.34-ts-latest.tar.gz
2. Change main Makefile of 2.6.37.6
ARCH ?= arm
CROSS_COMPILE ?= /opt/cross/bin/arm-linux-gnueabi-
3. Replace following files with 2.6.34-ts kernel source files, rename original
files to .orig or something
I'm in source directories of 2.6.37.6.
arch/arm/mach-orion5x/include/mach/
a) irqs.h
b) entry-macro.S
c) orion5x.h
arch/arm/mach-orion5x/
d) irq.c
arch/arm/plat-orion/
e) irq.c
4. Update ts78xx-fpga.h and ts78xx-setup.c (both at arch/arm/mach-orion5x/) if
running newer than rev 5 fpga.
FPGA of my board was rev 10 (this is displayed by dmesg, or when
console=ttyS0,115200n8 is included in kernel command line), so I change line 13
of ts78xx-fpga.h to
TS7800_REV_10 = FPGAID(0x00b480, 0x0a),
and line 336 of ts78xx-setup.c to
case TS7800_REV_10:
5. Copy drivers/dma/ts7800dma.c
Change Makefile and Kconfig in drivers/dma/ folder to include the DMA stuff.
Add "config DMA_7800" part to Kconfig (copy this part from Kconfig of
2.6.34-ts).
Add "obj-$(CONFIG_DMA_7800) += ts7800dma.o" to Makefile
6. Change init_MUTEX to sema_init in ts7800dma.c, line 142:
sema_init(&dev->sem, 1);
7. Copy drivers/mmc/host/tssdcore2.c and tssdcard.c
Change Makefile and Kconfig in drivers/mmc/host/ to include the SD card stuff.
Add "config TS_SDCARD" part to Kconfig (copy this part from Kconfig of
2.6.34-ts).
Add "obj-$(CONFIG_TS_SDCARD) += tssdcard.o" to Makefile
8. Change (! blk_fs_request(req)) to ((req)->cmd_type != REQ_TYPE_FS) in
tssdcard.c.
Two separate lines need to be changed the same way, find them.
9. Apply yaffs patch (start your search from www.yaffs.net) with
"./patch-ker.sh c m ../path/to/linux-2.6.37.6"
If you don't need onboard flash with YAFFS, skip this step.
10. From main directory of 2.6.37.6, type "make orion5x_defconfig"
11. Type "make menuconfig" to change something.
If some error comes up, you probably need "ncurses-devel" package for your
Linux PC.
What I changed:
a) Boot Options -> Default Kernel Command line string ->
"console=ttyS0,115200n8 root=/dev/sda1 rootdelay=5 init=/sbin/init"
(I use sda1, it is partition 1 of a USB drive with ext3 filesystem and
Debian)
b) Device drivers -> MMC/SD/SDIO -> [*] SD Card support for Technologic
Systems ARM platform
c) File systems -> Miscellaneous -> [*] yaffs2
d) Add USB sound, Video4Linux or whatever modules you need. I added UBI fs
support.
12. Type "make". The kernel compile procedure starts. I use "make -j 2" because
I have a two-core CPU.
13. If "make" was successful, type "dd if=arch/arm/boot/zImage of=/dev/sdd2"
Replace sdd2 with some other destination which could be booted, 2nd partition
of your SD, or mtdblock1 when running a console on TS-7800.
14. Copy fresh modules to the root file system. I run "make modules_install" as
root and copy the modules from /lib/modules to root filesystem of TS-7800 (USB
partition 1).
The new kernel does not work perfectly when both SD cards are available. There
is also the YAFFS mounting trouble. Now, I use only the normal-sized SD card
and everything else seems to work.
Jaan
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|