support for TQ tb5200l
The following patches add support for TQ's TB5200L a small powerpc-based machine providing ethernet, USB host, RS232, RS485 and 2 CAN busses. See http://www.tq-components.com for details.
Bye,
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
PATCH 1/5 tb5200l: add machine configuration for TQ TB5200L 'tinyBox'
[PATCH 1/5] tb5200l: add machine configuration for TQ TB5200L 'tinyBox'
--- conf/machine/tb5200l.conf | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) create mode 100644 conf/machine/tb5200l.conf
conf/machine/tb5200l.conf new file +28 -0
@@ -0,0 +1,28 @@ +#@TYPE: Machine +#@NAME: TQ Components' Tiny Box TB5200L +#@DESCRIPTION: Mini industrial control + +TARGET_ARCH = "powerpc" +PACKAGE_EXTRA_ARCHS = "ppc" + +MACHINE_FEATURES = "kernel26 usbhost ext2" +MACHINE_TASK_PROVIDER = "task-base" +MACHINE_EXTRA_RRECOMMENDS = "u-boot-utils iproute2 canutils" + +USE_DEVFS = "0" + +PREFERRED_PROVIDER_virtual/kernel = "linux" +PREFERRED_VERSION_linux = "2.6.32" +PREFERRED_VERSION_linux-libc-headers = "2.6.32" + +# don't try to access tty1 (used for application code) +USE_VT = "0" + +SERIAL_CONSOLE = "115200 ttyPSC0" +KERNEL_DEVICETREE_tb5200l = "arch/${ARCH}/boot/dts/tqm5200.dts" +EXTRA_IMAGECMD_jffs2 = "--big-endian -e 0x20000" + +# TB5200L carries kernel in separate flash partition +ROOTFS_POSTPROCESS_COMMAND += "rm -f ${IMAGE_ROOTFS}/boot/*Image*" + +require conf/machine/include/tune-ppc603e.inc
Signature · 1 line
1.5.6.5
Re: [PATCH 1/5] tb5200l: add machine configuration for TQ TB5200L 'tinyBox'
Vitus Jensen ha scritto, Il 16/04/2010 18:51:
Quoted 32 lines
[PATCH 1/5] tb5200l: add machine configuration for TQ TB5200L 'tinyBox'
Signed-off-by Vitus Jensen <[email protected]>--- conf/machine/tb5200l.conf | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) create mode 100644 conf/machine/tb5200l.confconf/machine/tb5200l.conf new file +18
-0@@ -0,0 +1,28 @@ +#@TYPE: Machine +#@NAME: TQ Components' Tiny Box TB5200L +#@DESCRIPTION: Mini industrial control + +TARGET_ARCH = "powerpc" +PACKAGE_EXTRA_ARCHS = "ppc" + +MACHINE_FEATURES = "kernel26 usbhost ext2" +MACHINE_TASK_PROVIDER = "task-base" +MACHINE_EXTRA_RRECOMMENDS = "u-boot-utils iproute2 canutils" + +USE_DEVFS = "0" + +PREFERRED_PROVIDER_virtual/kernel = "linux" +PREFERRED_VERSION_linux = "2.6.32" +PREFERRED_VERSION_linux-libc-headers = "2.6.32" + +# don't try to access tty1 (used for application code)
conf/machine/tb5200l.conf line 28
Quoted 10 lines
conf/machine/tb5200l.conf new file +10
-0+USE_VT = "0" + +SERIAL_CONSOLE = "115200 ttyPSC0" +KERNEL_DEVICETREE_tb5200l = "arch/${ARCH}/boot/dts/tqm5200.dts" +EXTRA_IMAGECMD_jffs2 = "--big-endian -e 0x20000" + +# TB5200L carries kernel in separate flash partition +ROOTFS_POSTPROCESS_COMMAND += "rm -f ${IMAGE_ROOTFS}/boot/*Image*" + +require conf/machine/include/tune-ppc603e.inc
Cordiali Saluti / Kindest Regards / mit freundlichen Grüssen --
Marco Cavallini | KOAN sas | Bergamo - Italia
embedded and real-time software engineering
Atmel third party certified consultant
Phone:+39-035-255.235 - Fax:+39-178-22.39.748
http://www.KoanSoftware.com
http://www.KaeilOS.com
PATCH 2/5 base-files: tb5200l specific changes
In reply to Vitus Jensen* create /opt directory
* fstab which mounts / and /opt from jffs2 filesystem on mtd
* link /tmp to /var/tmp
* issue and issue.net
--- recipes/base-files/base-files/tb5200l/fstab | 10 ++++++++++ recipes/base-files/base-files/tb5200l/issue | 2 ++ recipes/base-files/base-files/tb5200l/issue.net | 3 +++ recipes/base-files/base-files_3.0.14.bb | 8 +++++++- 4 files changed, 22 insertions(+), 1 deletions(-) create mode 100644 recipes/base-files/base-files/tb5200l/fstab create mode 100644 recipes/base-files/base-files/tb5200l/issue create mode 100644 recipes/base-files/base-files/tb5200l/issue.net
recipes/base-files/base-files/tb5200l/fstab new file +10 -0
@@ -0,0 +1,10 @@ +# tb5200l filesystem, mount / read-only, mount /opt read-write + +rootfs / jffs2 defaults 1 1 +/dev/mtdblock4 /opt jffs2 defaults 0 0 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbfs /proc/bus/usb usbfs defaults 0 0 +tmpfs /var/volatile tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 +tmpfs /media/ram tmpfs defaults 0 0
recipes/base-files/base-files/tb5200l/issue new file +2 -0
@@ -0,0 +1,2 @@ +Cameron Linux \n \l +
recipes/base-files/base-files/tb5200l/issue.net new file +3 -0
@@ -0,0 +1,3 @@ +Cameron Linux %h + +
recipes/base-files/base-files_3.0.14.bb +7 -1
@@ -42,7 +42,7 @@ dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \ ${localstatedir}/volatile/lock/subsys \ ${localstatedir}/volatile/log \ ${localstatedir}/volatile/run \ - /mnt /media /media/card /media/cf /media/net /media/ram \ + /opt /mnt /media /media/card /media/cf /media/net /media/ram \ /media/union /media/realroot /media/hdd \ /media/mmc1"
@@ -157,6 +157,12 @@ do_install_append_netbook-pro () { mkdir -p ${D}/initrd } +do_install_append_tb5200l() { + rmdir ${D}/tmp + ln -s var/tmp ${D}/tmp +} + + PACKAGES = "${PN}-dbg ${PN}-doc ${PN}" FILES_${PN} = "/*" FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
Signature · 1 line
1.5.6.5
Re: [PATCH 2/5] base-files: tb5200l specific changes
Vitus Jensen ha scritto, Il 16/04/2010 18:52:
Quoted 65 lines
* create /opt directory
* fstab which mounts / and /opt from jffs2 filesystem on mtd
* link /tmp to/var/tmp
* issue and issue.netSigned-off-by Vitus Jensen <[email protected]>--- recipes/base-files/base-files/tb5200l/fstab | 10 ++++++++++ recipes/base-files/base-files/tb5200l/issue | 2 ++ recipes/base-files/base-files/tb5200l/issue.net | 3 +++ recipes/base-files/base-files_3.0.14.bb | 8 +++++++- 4 files changed, 22 insertions(+), 1 deletions(-) create mode 100644 recipes/base-files/base-files/tb5200l/fstab create mode 100644 recipes/base-files/base-files/tb5200l/issue create mode 100644 recipes/base-files/base-files/tb5200l/issue.netrecipes/base-files/base-files/tb5200l/fstab new file +10
-0@@ -0,0 +1,10 @@ +# tb5200l filesystem, mount / read-only, mount /opt read-write + +rootfs / jffs2 defaults 1 1 +/dev/mtdblock4 /opt jffs2 defaults 0 0 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbfs /proc/bus/usb usbfs defaults 0 0 +tmpfs /var/volatile tmpfs defaults 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 +tmpfs /media/ram tmpfs defaults 0 0recipes/base-files/base-files/tb5200l/issue new file +2
-0@@ -0,0 +1,2 @@ +Cameron Linux \n \l +recipes/base-files/base-files/tb5200l/issue.net new file +3
-0@@ -0,0 +1,3 @@ +Cameron Linux %h + +recipes/base-files/base-files_3.0.14.bb +1
-1@@ -42,7 +42,7 @@ dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \ ${localstatedir}/volatile/lock/subsys \ ${localstatedir}/volatile/log \ ${localstatedir}/volatile/run \ - /mnt /media /media/card /media/cf /media/net /media/ram \ + /opt /mnt /media /media/card /media/cf /media/net /media/ram \ /media/union /media/realroot /media/hdd \ /media/mmc1"@@ -157,6 +157,12 @@ do_install_append_netbook-pro () { mkdir -p ${D}/initrd }
recipes/base-files/base-files_3.0.14.bb do_install_append_netbook-pro () { · line 168
Quoted 10 lines
recipes/base-files/base-files_3.0.14.bb +6
-0+do_install_append_tb5200l() { + rmdir ${D}/tmp + ln -s var/tmp ${D}/tmp +} + + PACKAGES = "${PN}-dbg ${PN}-doc ${PN}" FILES_${PN} = "/*" FILES_${PN}-doc = "${docdir} ${datadir}/common-licenses"
Cordiali Saluti / Kindest Regards / mit freundlichen Grüssen --
Marco Cavallini | KOAN sas | Bergamo - Italia
embedded and real-time software engineering
Atmel third party certified consultant
Phone:+39-035-255.235 - Fax:+39-178-22.39.748
http://www.KoanSoftware.com
http://www.KaeilOS.com
Koen Kooi
NAKRe: [PATCH 2/5] base-files: tb5200l specific changes
In reply to Vitus Jensen-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
recipes/base-files/base-files_3.0.14.bb dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \ · line 45
Quoted 6 lines · Vitus Jensen
* create /opt directory
+++ b/recipes/base-files/base-files_3.0.14.bb
recipes/base-files/base-files_3.0.14.bb +1
-1- /mnt /media /media/card /media/cf /media/net /media/ram \ + /opt /mnt /media /media/card /media/cf /media/net /media/ram \
NACK!
/opt will automatically get created when a package gets installed to it, so base-files is the wrong place to create it.
Using /opt is almost as bad as poking at $HOME from inside packages...
regards,
Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFLyuQNMkyGM64RGpERAlkFAJwPvhWmX6Kv6dziLxTZ/rFb0z3f5ACgl21t rIzVxHylc3vfpiV+XyebK2o=
=oGck
-----END PGP SIGNATURE-----
Re: [PATCH 2/5] base-files: tb5200l specific changes
Quoted 5 lines · Koen Kooi
Quoted 3 lines · Vitus Jensen
* create /opt directory
+++ b/recipes/base-files/base-files_3.0.14.bb
Quoted 8 lines
recipes/base-files/base-files_3.0.14.bb dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \ · line 45
Quoted 2 lines
recipes/base-files/base-files_3.0.14.bb +1
-1- /mnt /media /media/card /media/cf /media/net /media/ram \ + /opt /mnt /media /media/card /media/cf /media/net /media/ram \NACK!
/opt will automatically get created when a package gets installed to it, so base-files is the wrong place to create it.
Using /opt is almost as bad as poking at $HOME from inside packages...
I would like to mount the second half of internal flash to /opt, so that packages which install there actually have a enough room. See fstab contained in the patch.
Do you propose another directory? I've found no free directory in the list created by base-files. If this is considered a local issue I will move the changes in our local overlay and remove the patch from the list.
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
PATCH 3/5 netbase: add tb5200l specific /etc/network/interfaces
In reply to Vitus Jensen* eth0, usb for host connectivity
* can0, can1 to control CAN devices
--- recipes/netbase/netbase/tb5200l/interfaces | 33 ++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) create mode 100644 recipes/netbase/netbase/tb5200l/interfaces
recipes/netbase/netbase/tb5200l/interfaces new file +33 -0
@@ -0,0 +1,33 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + + +# Wired ethernet interface of "tiny box" +auto eth0 +iface eth0 inet dhcp + + +# Ethernet/RNDIS gadget (g_ether) +# ... or on host side, usbnet and random hwaddr +iface usb0 inet static + address 192.168.0.202 + netmask 255.255.255.0 + network 192.168.0.0 + gateway 192.168.0.200 + +# CAN interfaces +auto can0 +iface can0 inet manual + pre-up ip link set $IFACE type can bitrate 125000 listen-only off + up /sbin/ifconfig $IFACE up + down /sbin/ifconfig $IFACE down + +auto can1 +iface can1 inet manual + pre-up ip link set $IFACE type can bitrate 125000 listen-only off + up /sbin/ifconfig $IFACE up + down /sbin/ifconfig $IFACE down +
Signature · 1 line
1.5.6.5
Re: [PATCH 3/5] netbase: add tb5200l specific /etc/network/interfaces
Vitus Jensen ha scritto, Il 16/04/2010 18:53:
Quoted 38 lines
* eth0, usb for host connectivity
* can0, can1 to control CAN devicesSigned-off-by Vitus Jensen <[email protected]>--- recipes/netbase/netbase/tb5200l/interfaces | 33 ++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) create mode 100644 recipes/netbase/netbase/tb5200l/interfacesrecipes/netbase/netbase/tb5200l/interfaces new file +23
-0@@ -0,0 +1,33 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + + +# Wired ethernet interface of "tiny box" +auto eth0 +iface eth0 inet dhcp + + +# Ethernet/RNDIS gadget (g_ether) +# ... or on host side, usbnet and random hwaddr +iface usb0 inet static + address 192.168.0.202 + netmask 255.255.255.0 + network 192.168.0.0 + gateway 192.168.0.200 + +# CAN interfaces +auto can0 +iface can0 inet manual
recipes/netbase/netbase/tb5200l/interfaces line 33
Quoted 10 lines
recipes/netbase/netbase/tb5200l/interfaces new file +10
-0+ pre-up ip link set $IFACE type can bitrate 125000 listen-only off + up /sbin/ifconfig $IFACE up + down /sbin/ifconfig $IFACE down + +auto can1 +iface can1 inet manual + pre-up ip link set $IFACE type can bitrate 125000 listen-only off + up /sbin/ifconfig $IFACE up + down /sbin/ifconfig $IFACE down +
Cordiali Saluti / Kindest Regards / mit freundlichen Grüssen --
Marco Cavallini | KOAN sas | Bergamo - Italia
embedded and real-time software engineering
Atmel third party certified consultant
Phone:+39-035-255.235 - Fax:+39-178-22.39.748
http://www.KoanSoftware.com
http://www.KaeilOS.com
PATCH 4/5 linux_2.6.32: add tb5200l support
In reply to Vitus Jensen[PATCH 4/5] linux_2.6.32: add tb5200l support
--- recipes/linux/linux_2.6.32.bb | 1 + recipes/linux/tb5200l/defconfig | 1436 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 1437 insertions(+), 0 deletions(-) create mode 100644 recipes/linux/tb5200l/defconfig
recipes/linux/linux_2.6.32.bb +1 -0
@@ -7,6 +7,7 @@ S = "${WORKDIR}/linux-${PV}" # Mark archs/machines that this kernel supports DEFAULT_PREFERENCE = "-1" DEFAULT_PREFERENCE_simone = "1" +DEFAULT_PREFERENCE_tb5200l = "1" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \ file://defconfig"
recipes/linux/tb5200l/defconfig new file +1436 -0
1,436 lines not on this page · raw message
Signature · 1 line
1.5.6.5
Re: [PATCH 4/5] linux_2.6.32: add tb5200l support
Vitus Jensen ha scritto, Il 16/04/2010 18:54:
Quoted 14 lines
[PATCH 4/5] linux_2.6.32: add tb5200l support
Signed-off-by Vitus Jensen <[email protected]>--- recipes/linux/linux_2.6.32.bb | 1 + recipes/linux/tb5200l/defconfig | 1436 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 1437 insertions(+), 0 deletions(-) create mode 100644 recipes/linux/tb5200l/defconfigrecipes/linux/linux_2.6.32.bb +0
-0
recipes/linux/linux_2.6.32.bb S = "${WORKDIR}/linux-${PV}" · line 13
Quoted 7 lines
recipes/linux/linux_2.6.32.bb +1
-0@@ -7,6 +7,7 @@ S = "${WORKDIR}/linux-${PV}" # Mark archs/machines that this kernel supports DEFAULT_PREFERENCE = "-1" DEFAULT_PREFERENCE_simone = "1" +DEFAULT_PREFERENCE_tb5200l = "1" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \ file://defconfig"
The /linux/linux_2.6.32.bb part of this patch doesn't apply and it is composed by two files, next time submit each file in a single patch, moreover you forgot to bump PR.
Please correct and resubmit.
Cordiali Saluti / Kindest Regards / mit freundlichen Grüssen --
Marco Cavallini | KOAN sas | Bergamo - Italia
embedded and real-time software engineering
Phone:+39-035-255.235 - Fax:+39-178-22.39.748
http://www.KoanSoftware.com
Re: [PATCH 4/5] linux_2.6.32: add tb5200l support
Quoted 28 lines · Marco Cavallini
Vitus Jensen ha scritto, Il 16/04/2010 18:54:
Quoted 14 lines
[PATCH 4/5] linux_2.6.32: add tb5200l support
Signed-off-by Vitus Jensen <[email protected]>--- recipes/linux/linux_2.6.32.bb | 1 + recipes/linux/tb5200l/defconfig | 1436 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 1437 insertions(+), 0 deletions(-) create mode 100644 recipes/linux/tb5200l/defconfigrecipes/linux/linux_2.6.32.bb +0
-0recipes/linux/linux_2.6.32.bb S = "${WORKDIR}/linux-${PV}" · line 13
Quoted 7 lines
recipes/linux/linux_2.6.32.bb +1
-0@@ -7,6 +7,7 @@ S = "${WORKDIR}/linux-${PV}" # Mark archs/machines that this kernel supports DEFAULT_PREFERENCE = "-1" DEFAULT_PREFERENCE_simone = "1" +DEFAULT_PREFERENCE_tb5200l = "1" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \ file://defconfig"The /linux/linux_2.6.32.bb part of this patch doesn't apply and it is composed by two files, next time submit each file in a single patch, moreover you forgot to bump PR.
Quoted 1 line
Please correct and resubmit.
OK, will split the patch.
Sorry, had base the patch on old revision and will rebase it. But do you really think it's neccessary to bump PR? The patch won't change the contents of a recreated package, nothing needs to be rebuild, an installed package doesn't have to be updated. So I think it's fine to keep PR when adding DEFAULT_PREFERENCE.
Vitus
Signature · 2 lines
Vitus Jensen, Hannover, Germany, Universe (current) pgp public key available from keyservers
PATCH 5/5 linux_2.6.33: add recipe
In reply to Vitus JensenAdds recipe for 2.6.33 which contains some CAN-related changes which are usefull for tb5200l.
--- recipes/linux/linux_2.6.33.bb | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) create mode 100644 recipes/linux/linux_2.6.33.bb
recipes/linux/linux_2.6.33.bb new file +15 -0
@@ -0,0 +1,15 @@ +require linux.inc + +PR = "r0" + +S = "${WORKDIR}/linux-${PV}" + +# Mark archs/machines that this kernel supports +DEFAULT_PREFERENCE = "-1" +DEFAULT_PREFERENCE_tb5200l = "1" + +SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \ + file://defconfig" + +SRC_URI[kernel.md5sum] = "d6249654087f0bcafaa860ac573316a4" +SRC_URI[kernel.sha256sum] = "91806347cb386002a8bfd20ee66e536e4a7dfb01f207dd751341f2971090d9ac"
Signature · 1 line
1.5.6.5