diff options
author | Jesse Gilles <jgilles@multitech.com> | 2010-04-30 10:50:57 -0500 |
---|---|---|
committer | Jesse Gilles <jgilles@multitech.com> | 2010-04-30 10:50:57 -0500 |
commit | 0431f878edd38a1af264e5727e1e4d604f1a95fd (patch) | |
tree | 8fbede06fa2bf4835e9d032d1263ae120eb99837 /recipes/multitech | |
parent | 15028387890effa23f9cd0479b586f31c0752b88 (diff) |
add Multi-Tech-specific recipes
Diffstat (limited to 'recipes/multitech')
-rw-r--r-- | recipes/multitech/config/config.init | 59 | ||||
-rw-r--r-- | recipes/multitech/config/group | 40 | ||||
-rw-r--r-- | recipes/multitech/config/network/interfaces | 12 | ||||
-rw-r--r-- | recipes/multitech/config/passwd | 18 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/chap-secrets | 3 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/options | 17 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/pap-secrets | 3 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/peers/cdma | 9 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/peers/cdma_chat | 18 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/peers/gsm | 10 | ||||
-rw-r--r-- | recipes/multitech/config/ppp/peers/gsm_chat | 23 | ||||
-rw-r--r-- | recipes/multitech/config_1.0.bb | 36 | ||||
-rw-r--r-- | recipes/multitech/helloworld-autotools_git.bb | 14 | ||||
-rw-r--r-- | recipes/multitech/mts-io/mts-io.init | 20 | ||||
-rw-r--r-- | recipes/multitech/mts-io_git.bb | 59 | ||||
-rw-r--r-- | recipes/multitech/sms-utils_git.bb | 15 | ||||
-rw-r--r-- | recipes/multitech/u-boot-linux-utils_git.bb | 16 | ||||
-rw-r--r-- | recipes/multitech/upgrade-reboot_git.bb | 14 | ||||
-rw-r--r-- | recipes/multitech/venus-gps_git.bb | 14 |
19 files changed, 400 insertions, 0 deletions
diff --git a/recipes/multitech/config/config.init b/recipes/multitech/config/config.init new file mode 100644 index 0000000000..770be18e23 --- /dev/null +++ b/recipes/multitech/config/config.init @@ -0,0 +1,59 @@ +#!/bin/sh + +CONFIG_MTDC=/dev/mtd6 +CONFIG_DIR=/var/config + +FILES="network/interfaces \ +ppp/options \ +ppp/pap-secrets \ +ppp/chap-secrets \ +ppp/peers \ +passwd \ +group" + +case $1 in + start) + echo "Mounting ${CONFIG_DIR}" + mkdir -p ${CONFIG_DIR} + mount ${CONFIG_DIR} + + # Prepare flash for JFFS2 if mount fails + if [ $? -ne 0 ]; then + echo "Creating ${CONFIG_DIR}" + flash_eraseall -j ${CONFIG_MTDC} + mount ${CONFIG_DIR} + fi + + # Default all config files if requested + cd ${CONFIG_DIR} + if [ -f force_defaults ]; then + echo "Extracting default config files" + tar -xvf /etc/defaults.tar.gz + rm -f force_defaults + fi + + # Extract any missing files + TARFILES=`tar -tf /etc/defaults.tar.gz` + for file in $TARFILES; do + if [ ! -e $file ]; then + tar -xvf /etc/defaults.tar.gz $file + fi + done + + # Create links in /etc + for file in $FILES; do + if [ ! -L /etc/$file ]; then + echo "Creating link to ${CONFIG_DIR}/$file" + rm -rf /etc/$file + ln -sf ${CONFIG_DIR}/$file /etc/$file + fi + done + + ;; + + *) + echo "Usage: $0 {start}" + exit 2 + ;; + +esac diff --git a/recipes/multitech/config/group b/recipes/multitech/config/group new file mode 100644 index 0000000000..ee59d5c24b --- /dev/null +++ b/recipes/multitech/config/group @@ -0,0 +1,40 @@ +root:*:0: +daemon:*:1: +bin:*:2: +sys:*:3: +adm:*:4: +tty:*:5: +disk:*:6: +lp:*:7: +mail:*:8: +news:*:9: +uucp:*:10: +man:*:12: +proxy:*:13: +kmem:*:15: +dialout:*:20: +fax:*:21: +voice:*:22: +cdrom:*:24: +floppy:*:25: +tape:*:26: +sudo:*:27: +audio:*:29: +dip:*:30: +www-data:*:33: +backup:*:34: +operator:*:37: +list:*:38: +irc:*:39: +src:*:40: +gnats:*:41: +shadow:*:42: +utmp:*:43: +video:*:44: +sasl:*:45: +plugdev:*:46: +staff:*:50: +games:*:60: +users:*:100: +mysql:*:64001: +nogroup:*:65534: diff --git a/recipes/multitech/config/network/interfaces b/recipes/multitech/config/network/interfaces new file mode 100644 index 0000000000..b5f625a9e2 --- /dev/null +++ b/recipes/multitech/config/network/interfaces @@ -0,0 +1,12 @@ +# /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) + +# The loopback interface +auto lo +iface lo inet loopback + +# Wired interface +auto eth0 +iface eth0 inet static +address 192.168.2.1 +netmask 255.255.255.0 + diff --git a/recipes/multitech/config/passwd b/recipes/multitech/config/passwd new file mode 100644 index 0000000000..2dea53f23e --- /dev/null +++ b/recipes/multitech/config/passwd @@ -0,0 +1,18 @@ +root:zFiVnQRfb1qvQ:0:0:root:/home/root:/bin/bash +daemon:*:1:1:daemon:/usr/sbin:/bin/sh +bin:*:2:2:bin:/bin:/bin/sh +sys:*:3:3:sys:/dev:/bin/sh +sync:*:4:65534:sync:/bin:/bin/sync +games:*:5:60:games:/usr/games:/bin/sh +man:*:6:12:man:/var/cache/man:/bin/sh +lp:*:7:7:lp:/var/spool/lpd:/bin/sh +mail:*:8:8:mail:/var/mail:/bin/sh +news:*:9:9:news:/var/spool/news:/bin/sh +uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh +proxy:*:13:13:proxy:/bin:/bin/sh +www-data:*:33:33:www-data:/var/www:/bin/sh +backup:*:34:34:backup:/var/backups:/bin/sh +list:*:38:38:Mailing List Manager:/var/list:/bin/sh +irc:*:39:39:ircd:/var/run/ircd:/bin/sh +gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh +nobody:*:65534:65534:nobody:/nonexistent:/bin/sh diff --git a/recipes/multitech/config/ppp/chap-secrets b/recipes/multitech/config/ppp/chap-secrets new file mode 100644 index 0000000000..60efe8f54d --- /dev/null +++ b/recipes/multitech/config/ppp/chap-secrets @@ -0,0 +1,3 @@ +# Secrets for authentication using CHAP +# client server secret IP addresses +* * "" * diff --git a/recipes/multitech/config/ppp/options b/recipes/multitech/config/ppp/options new file mode 100644 index 0000000000..1126510694 --- /dev/null +++ b/recipes/multitech/config/ppp/options @@ -0,0 +1,17 @@ +# Select tty device +# +# MTSMC-E +/dev/ttyS1 +# MTSMC-H +#/dev/ttyACM0 +# USB device +#/dev/ttyUSB0 + +# Uncomment below to run in foreground +#nodetach + +# Uncomment below to emit debug +#debug + +lock + diff --git a/recipes/multitech/config/ppp/pap-secrets b/recipes/multitech/config/ppp/pap-secrets new file mode 100644 index 0000000000..f782b4a874 --- /dev/null +++ b/recipes/multitech/config/ppp/pap-secrets @@ -0,0 +1,3 @@ +# Secrets for authentication using PAP +# client server secret IP addresses +* * "" * diff --git a/recipes/multitech/config/ppp/peers/cdma b/recipes/multitech/config/ppp/peers/cdma new file mode 100644 index 0000000000..3fc231f21f --- /dev/null +++ b/recipes/multitech/config/ppp/peers/cdma @@ -0,0 +1,9 @@ +linkname ppp0 +230400 +defaultroute +replacedefaultroute +usepeerdns +noauth +crtscts +novj +connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/cdma_chat' diff --git a/recipes/multitech/config/ppp/peers/cdma_chat b/recipes/multitech/config/ppp/peers/cdma_chat new file mode 100644 index 0000000000..6ff750e24a --- /dev/null +++ b/recipes/multitech/config/ppp/peers/cdma_chat @@ -0,0 +1,18 @@ +SAY "CDMA chat\n" +ECHO OFF +ABORT 'NO DIAL TONE' +ABORT 'NO DIALTONE' +ABORT 'NO ANSWER' +ABORT 'NO CARRIER' +ABORT 'DELAYED' +ABORT 'VOICE' +ABORT 'BUSY' +'' 'AT' +OK 'ATZ' +OK 'AT+CSQ' +SAY "Dialing...\n" +OK 'ATD#777' +SAY "Waiting for CONNECT...\n" +TIMEOUT 120 +CONNECT '' +SAY "Connected\n" diff --git a/recipes/multitech/config/ppp/peers/gsm b/recipes/multitech/config/ppp/peers/gsm new file mode 100644 index 0000000000..fed62a34b5 --- /dev/null +++ b/recipes/multitech/config/ppp/peers/gsm @@ -0,0 +1,10 @@ +linkname ppp0 +230400 +defaultroute +replacedefaultroute +usepeerdns +ipcp-max-failure 4 +noauth +crtscts +novj +connect '/usr/sbin/chat -v -t 90 -f /etc/ppp/peers/gsm_chat' diff --git a/recipes/multitech/config/ppp/peers/gsm_chat b/recipes/multitech/config/ppp/peers/gsm_chat new file mode 100644 index 0000000000..88877775bb --- /dev/null +++ b/recipes/multitech/config/ppp/peers/gsm_chat @@ -0,0 +1,23 @@ +SAY "GSM chat\n" +ECHO OFF +ABORT 'NO DIAL TONE' +ABORT 'NO DIALTONE' +ABORT 'NO ANSWER' +ABORT 'NO CARRIER' +ABORT 'DELAYED' +ABORT 'VOICE' +ABORT 'BUSY' +'' 'AT' +OK 'ATZ' +OK 'AT+CSQ' +#OK 'AT+CGDCONT=1,"IP","proxy"' +#OK 'AT+CGDCONT=1,"IP","ISP.CINGULAR"' +#OK 'AT+CGDCONT=1,"IP","internet2.voicestream.com"' +OK 'AT+CGDCONT=1,"IP","internet"' +SAY "Dialing...\n" +#OK 'ATD*99#' +OK 'ATD*99***1#' +SAY "Waiting for CONNECT...\n" +TIMEOUT 120 +CONNECT '' +SAY "Connected\n" diff --git a/recipes/multitech/config_1.0.bb b/recipes/multitech/config_1.0.bb new file mode 100644 index 0000000000..e07bb7d7f9 --- /dev/null +++ b/recipes/multitech/config_1.0.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "Provides default system config files and /var/config fs" +SECTION = "base" +LICENSE = "GPL" +PR = "r11" + +inherit update-rc.d + +INITSCRIPT_NAME = "config" +INITSCRIPT_PARAMS = "start 31 S ." + +SRC_URI = "\ + file://network \ + file://ppp \ + file://passwd \ + file://group \ + file://config.init \ +" + +CONFIGFILES = "network ppp passwd group" + +fakeroot do_install () { + cd ${WORKDIR} + + # default config files + rm -f defaults.tar.gz + tar czf defaults.tar.gz ${CONFIGFILES} + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/defaults.tar.gz ${D}${sysconfdir}/defaults.tar.gz + + # init script + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/config.init ${D}${sysconfdir}/init.d/config +} + +FILES_${PN} = "${sysconfdir}/defaults.tar.gz" +FILES_${PN} += "${sysconfdir}/init.d/config" diff --git a/recipes/multitech/helloworld-autotools_git.bb b/recipes/multitech/helloworld-autotools_git.bb new file mode 100644 index 0000000000..fe1208432e --- /dev/null +++ b/recipes/multitech/helloworld-autotools_git.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Hello World Recipe using autotools" +HOMEPAGE = "http://www.multitech.net/" +SECTION = "console/utils" +PRIORITY = "optional" +LICENSE = "GPL" +PV = "${SRCPV}" +PR = "r0" + +SRC_URI = "git://multitech.net/helloworld-autotools.git;protocol=git;tag=master" +S = "${WORKDIR}/git" + +inherit autotools + +PARALLEL_MAKE = "" diff --git a/recipes/multitech/mts-io/mts-io.init b/recipes/multitech/mts-io/mts-io.init new file mode 100644 index 0000000000..77dd0e290d --- /dev/null +++ b/recipes/multitech/mts-io/mts-io.init @@ -0,0 +1,20 @@ +#!/bin/sh + +case $1 in + start) + echo "Loading mts-io module" + modprobe mts_io + ;; + + stop) + echo "Unloading mts-io module" + modprobe -r mts_io + ;; + + *) + echo "Usage: $0 {start|stop}" + exit 2 + ;; +esac + + diff --git a/recipes/multitech/mts-io_git.bb b/recipes/multitech/mts-io_git.bb new file mode 100644 index 0000000000..59034581cd --- /dev/null +++ b/recipes/multitech/mts-io_git.bb @@ -0,0 +1,59 @@ +DESCRIPTION = "mts-io controller and sysfs wrapper" +HOMEPAGE = "http://www.multitech.net/" +SECTION = "base" +PRIORITY = "optional" +LICENSE = "GPL" +DEPENDS = "virtual/kernel" +RDEPENDS = "kernel (${KERNEL_VERSION})" +PV = "${SRCPV}" + +SRC_URI = " \ + file://mts-io.init \ + git://multitech.net/cdp-io-controller.git;protocol=git;tag=master \ +" +S = "${WORKDIR}/git/io-module" + +inherit module-base +inherit update-rc.d + +PR = "r0" + +EXTRA_OEMAKE = " -C ${STAGING_KERNEL_DIR} \ + M=${S} \ + modules \ + " + +do_configure () { + echo "Nothing to configure for mts-io" +} + +do_compile () { + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS + oe_runmake +} + +PACKAGES = "${PN}" + +FILES_${PN} = "${base_libdir}/modules/${KERNEL_VERSION}/extra/mts_io.ko" +FILES_${PN} += "${sysconfdir}/init.d/mts-io" +FILES_${PN} += "${libdir}/mts-io-sysfs*" +FILES_${PN} += "${sbindir}/mts-io-sysfs" + +INITSCRIPT_NAME = "mts-io" +INITSCRIPT_PARAMS = "start 90 S ." + +PARALLEL_MAKE = "" + +fakeroot do_install () { + install -m 0755 -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra + # use cp instead of install so the driver doesn't get stripped + cp ${S}/mts_io.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/extra + + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/mts-io.init ${D}${sysconfdir}/init.d/mts-io + + install -m 0755 -d ${D}${sbindir} + install -d ${D}${libdir}/mts-io-sysfs + install -m 0755 ${WORKDIR}/git/io-tool/mts-io-sysfs-inc.sh ${D}${libdir}/mts-io-sysfs + install -m 0755 ${WORKDIR}/git/io-tool/mts-io-sysfs ${D}${sbindir}/mts-io-sysfs +} diff --git a/recipes/multitech/sms-utils_git.bb b/recipes/multitech/sms-utils_git.bb new file mode 100644 index 0000000000..dc8ef1a50a --- /dev/null +++ b/recipes/multitech/sms-utils_git.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "SMS Utilities" +HOMEPAGE = "http://www.multitech.net/" +SECTION = "console/utils" +PRIORITY = "optional" +LICENSE = "GPL" +DEPENDS = "libesmtp libyaml" +PV = "${SRCPV}" +PR = "r0" + +SRC_URI = "git://multitech.net/sms-utils.git;protocol=git;tag=master" +S = "${WORKDIR}/git" + +inherit autotools + +PARALLEL_MAKE = "" diff --git a/recipes/multitech/u-boot-linux-utils_git.bb b/recipes/multitech/u-boot-linux-utils_git.bb new file mode 100644 index 0000000000..b330dca8af --- /dev/null +++ b/recipes/multitech/u-boot-linux-utils_git.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "U-Boot Linux Utilities" +HOMEPAGE = "http://www.multitech.net/" +SECTION = "console/utils" +PRIORITY = "optional" +LICENSE = "GPL" +PV = "${SRCPV}" +PR = "r0" + +DEPENDS = "mtd-utils" + +SRC_URI = "git://multitech.net/u-boot-linux-utils.git;protocol=git;tag=master" +S = "${WORKDIR}/git" + +inherit autotools + +PARALLEL_MAKE = "" diff --git a/recipes/multitech/upgrade-reboot_git.bb b/recipes/multitech/upgrade-reboot_git.bb new file mode 100644 index 0000000000..1bd3952dec --- /dev/null +++ b/recipes/multitech/upgrade-reboot_git.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "Reboot command to run after firmware upgrade" +HOMEPAGE = "http://www.multitech.net/" +SECTION = "console/utils" +PRIORITY = "optional" +LICENSE = "GPL" +PV = "${SRCPV}" +PR = "r0" + +SRC_URI = "git://multitech.net/upgrade-reboot.git;protocol=git;tag=master" +S = "${WORKDIR}/git" + +inherit autotools + +PARALLEL_MAKE = "" diff --git a/recipes/multitech/venus-gps_git.bb b/recipes/multitech/venus-gps_git.bb new file mode 100644 index 0000000000..4ffde0bbcb --- /dev/null +++ b/recipes/multitech/venus-gps_git.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "SkyTraq Venus GPS Example" +HOMEPAGE = "http://www.multitech.net/" +SECTION = "console/network" +PRIORITY = "optional" +LICENSE = "GPL" +PV = "${SRCPV}" +PR = "r0" + +SRC_URI = "git://multitech.net/venus-gps.git;protocol=git;tag=master" +S = "${WORKDIR}/git" + +inherit autotools + +PARALLEL_MAKE = "" |