From d75cc859d0009649aa5c97731933b50ba48231ba Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 11 Nov 2020 14:22:06 -0600 Subject: MultiTech mLinux Atmel distribution OpenEmbedded layer --- COPYING.MIT | 17 ++ LICENSE | 9 + README | 39 +++ classes/mlinux-image.bbclass | 109 ++++++++ classes/mlinux-mirrors.bbclass | 14 + classes/mlinux_metadata_scm.bbclass | 14 + conf/layer.conf | 10 + prod-scripts/MTCDT-0.1/cdteep.sh | 110 ++++++++ recipes-core/base-files/fstab-at91/fstab | 10 + recipes-core/base-files/fstab-at91_1.0.bb | 17 ++ .../core-image-rorootfs-overlay-initramfs.bb | 23 ++ recipes-core/images/mlinux-base-image.bb | 75 ++++++ recipes-core/images/mlinux-basetest-image.bb | 9 + recipes-core/images/mlinux-commissioning-image.bb | 7 + recipes-core/images/mlinux-factory-image.bb | 94 +++++++ recipes-core/images/mlinux-factory-test-image.bb | 8 + recipes-core/images/mlinux-minimal-image.bb | 83 ++++++ recipes-core/images/mlinux-mono-image.bb | 3 + .../images/mlinux-mtcap-commissioning-image.bb | 17 ++ recipes-core/images/mlinux-mtcap-image.bb | 75 ++++++ recipes-core/images/mlinux-mtcap-test-image.bb | 89 +++++++ recipes-core/images/mlinux-mths-image.bb | 8 + recipes-core/images/mlinux-mtr-image.bb | 76 ++++++ recipes-core/images/mlinux-mtrv1-image.bb | 79 ++++++ recipes-core/images/mlinux-rs9113-base-image.bb | 5 + recipes-core/images/mlinux-rs9113-factory-image.bb | 5 + recipes-core/images/mlinux-rs9113-mtrv1-image.bb | 75 ++++++ recipes-core/images/mlinux-sdk.bb | 5 + recipes-core/images/mtcap-modules.inc | 286 ++++++++++++++++++++ recipes-core/images/mtr-modules.inc | 293 +++++++++++++++++++++ .../mlinux-scripts/mlinux-firmware-upgrade | 69 +++++ .../mlinux-scripts/mlinux-scripts_%.bbappend | 13 + recipes-core/udev/eudev/mtcap/mtcap.rules | 8 + .../udev/eudev/mtcdt/accessory_ethernet.rules | 21 ++ recipes-core/udev/eudev/mtcdt/mtcdt.rules | 14 + recipes-core/udev/eudev/mtr/mtr.rules | 13 + recipes-core/udev/eudev/mtrv1/mtrv1.rules | 13 + recipes-core/udev/eudev_%.bbappend | 11 + scripts/build-feed-extras.sh | 11 + 39 files changed, 1837 insertions(+) create mode 100644 COPYING.MIT create mode 100644 LICENSE create mode 100644 README create mode 100644 classes/mlinux-image.bbclass create mode 100644 classes/mlinux-mirrors.bbclass create mode 100644 classes/mlinux_metadata_scm.bbclass create mode 100644 conf/layer.conf create mode 100755 prod-scripts/MTCDT-0.1/cdteep.sh create mode 100644 recipes-core/base-files/fstab-at91/fstab create mode 100644 recipes-core/base-files/fstab-at91_1.0.bb create mode 100644 recipes-core/images/core-image-rorootfs-overlay-initramfs.bb create mode 100644 recipes-core/images/mlinux-base-image.bb create mode 100644 recipes-core/images/mlinux-basetest-image.bb create mode 100644 recipes-core/images/mlinux-commissioning-image.bb create mode 100644 recipes-core/images/mlinux-factory-image.bb create mode 100644 recipes-core/images/mlinux-factory-test-image.bb create mode 100644 recipes-core/images/mlinux-minimal-image.bb create mode 100644 recipes-core/images/mlinux-mono-image.bb create mode 100644 recipes-core/images/mlinux-mtcap-commissioning-image.bb create mode 100644 recipes-core/images/mlinux-mtcap-image.bb create mode 100644 recipes-core/images/mlinux-mtcap-test-image.bb create mode 100644 recipes-core/images/mlinux-mths-image.bb create mode 100644 recipes-core/images/mlinux-mtr-image.bb create mode 100644 recipes-core/images/mlinux-mtrv1-image.bb create mode 100644 recipes-core/images/mlinux-rs9113-base-image.bb create mode 100644 recipes-core/images/mlinux-rs9113-factory-image.bb create mode 100644 recipes-core/images/mlinux-rs9113-mtrv1-image.bb create mode 100644 recipes-core/images/mlinux-sdk.bb create mode 100644 recipes-core/images/mtcap-modules.inc create mode 100644 recipes-core/images/mtr-modules.inc create mode 100755 recipes-core/mlinux-scripts/mlinux-scripts/mlinux-firmware-upgrade create mode 100644 recipes-core/mlinux-scripts/mlinux-scripts_%.bbappend create mode 100644 recipes-core/udev/eudev/mtcap/mtcap.rules create mode 100644 recipes-core/udev/eudev/mtcdt/accessory_ethernet.rules create mode 100644 recipes-core/udev/eudev/mtcdt/mtcdt.rules create mode 100644 recipes-core/udev/eudev/mtr/mtr.rules create mode 100644 recipes-core/udev/eudev/mtrv1/mtrv1.rules create mode 100644 recipes-core/udev/eudev_%.bbappend create mode 100755 scripts/build-feed-extras.sh diff --git a/COPYING.MIT b/COPYING.MIT new file mode 100644 index 0000000..fb950dc --- /dev/null +++ b/COPYING.MIT @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5caf3b6 --- /dev/null +++ b/LICENSE @@ -0,0 +1,9 @@ +All MultiTech-copyrighted software contained in mLinux is covered by +GPL (GNU General Public License) version 2, unless provided under a different license. + +All bitbake metadata is MIT licensed unless otherwise stated. Source code +included in tree for individual recipes is under the LICENSE stated in +the associated recipe (.bb file) unless otherwise stated. + +License information for any other files is either explicitly stated +or defaults to GPL version 2. diff --git a/README b/README new file mode 100644 index 0000000..0bd2cf2 --- /dev/null +++ b/README @@ -0,0 +1,39 @@ +MultiTech mLinux distribution OpenEmbedded layer for Atmel + +This layer depends on: + +URI: git://git.openembedded.org/openembedded-core +branch: thud +revision: HEAD + +Numerous layers in: +URI: git://git.openembedded.org/meta-openembedded +branch: thud +revision: HEAD + +MultiTech hardware layer: +URI: git://git.multitech.net/meta-multitech +branch: thud +revision: HEAD + +URI: git://github.com/woglinde/meta-java.git +branch: thud +revision: HEAD + +URI: git://git.yoctoproject.org/meta-mono +branch: thud +revision: HEAD + +URI: git://github.com/imyller/meta-nodejs.git +branch: thud +revision: HEAD + +------------ + BUILDING +------------ + +mLinux should be built using the mlinux integration repo at git://git.multitech.net/mlinux +or using the downloadable tarball. See http://www.multitech.net for instructions and +downloads. + +This is mLinux 5.x.y, based on Yocto-Morty and Atmel Linux 4.9. diff --git a/classes/mlinux-image.bbclass b/classes/mlinux-image.bbclass new file mode 100644 index 0000000..dab5e5b --- /dev/null +++ b/classes/mlinux-image.bbclass @@ -0,0 +1,109 @@ +# redefine mkfs.jffs2 command and remove --faketime option so we get non-zero file times +# having file mod times of zero confuses cron +IMAGE_CMD_jffs2 = "mkfs.jffs2 --root=${IMAGE_ROOTFS} --output=${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.jffs2 ${EXTRA_IMAGECMD}" + +# set specified mtadm password in image using MTADM_PASSWORD_HASH +mlinux_set_root_password () { + if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then + sed -i 's%^mtadm:[^:]*:%mtadm:${MTADM_PASSWORD_HASH}:%' ${IMAGE_ROOTFS}/etc/shadow + elif [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then + sed -i 's%^mtadm:[^:]*:%mtadm:${MTADM_PASSWORD_HASH}:%' ${IMAGE_ROOTFS}/etc/passwd + fi +} +ROOTFS_POSTPROCESS_COMMAND += "mlinux_set_root_password;" + +# set custom product sw version to /etc/issue file +mlinux_set_product_version () { + PREV_DIR=$(pwd) + cd "$TOPDIR" + PRODUCT_VER=$(git describe) + cd "$PREV_DIR" + PRODUCT_DATE=$(date +%Y-%m-%dT%H:%M:%S) + + if [ -n "${PRODUCT_VER}" ]; then + # set issue + if cat ${IMAGE_ROOTFS}/etc/issue | grep "Version: " > /dev/null 2>&1 ; then + # replace + sed -i "s/^Version: .*$/Version: $PRODUCT_VER/g" ${IMAGE_ROOTFS}/etc/issue + sed -i "s/^Date: .*$/Date: $PRODUCT_DATE/g" ${IMAGE_ROOTFS}/etc/issue + else + # add + echo "" >> ${IMAGE_ROOTFS}/etc/issue + echo "Version: ${PRODUCT_VER}" >> ${IMAGE_ROOTFS}/etc/issue + echo "Date: $(date +%Y-%m-%dT%H:%M:%S)" >> ${IMAGE_ROOTFS}/etc/issue + fi + fi +} +ROOTFS_POSTPROCESS_COMMAND += "mlinux_set_product_version;" + +# generate upgrade.bin files -- provides single file for upgrades +do_firmware() { + cd ${DEPLOY_DIR_IMAGE} + + case "${MTBSP}" in + mtbsp-at91) + rm -f bstrap.bin* uboot.bin* uImage.bin* rootfs.jffs2* model + + cp at91bootstrap_pmecc_padded.bin bstrap.bin + cp u-boot-${MACHINE}.bin uboot.bin + cp uImage-${MACHINE}.bin uImage.bin + cp ${IMAGE_BASENAME}-${MACHINE}.jffs2 rootfs.jffs2 + + cat bstrap.bin | md5sum > bstrap.bin.md5 + cat uboot.bin | md5sum > uboot.bin.md5 + cat uImage.bin | md5sum > uImage.bin.md5 + cat rootfs.jffs2 | md5sum > rootfs.jffs2.md5 + + case "${MACHINE}" in + mtcdt) + echo "mtcdt|mtcdtip|mtcdtiphp" >model + ;; + mtrv1) + echo "mtrv1|mths" >model + ;; + *) + echo "${MACHINE}" > model + ;; + esac + + tar cvf ${IMAGE_BASENAME}-${MACHINE}-upgrade.bin uImage.bin* rootfs.jffs2* model + tar cvf ${IMAGE_BASENAME}-${MACHINE}-upgrade-withboot.bin bstrap.bin* uboot.bin* uImage.bin* rootfs.jffs2* model + rm -f bstrap.bin* uboot.bin* uImage.bin* rootfs.jffs2* model + ;; + *) + ;; + esac +} +addtask firmware after do_image_complete before do_build + +# make links to images in TFTPBOOT_DIR for ease of development +do_tftpboot_links() { + if [ -n "${TFTPBOOT_DIR}" ]; then + case "${MTBSP}" in + mtbsp-at91) + TFTPBOOT_CLEAN="oe_bootstrap.bin oe_bootstrap_pmecc_padded.bin \ + oe_u-boot.bin oe_uImage.bin oe_rootfs.jffs2 oe_images oe_upgrade.bin oe_upgrade-withboot.bin" + + install -d ${DEPLOY_DIR_IMAGE} + + for f in ${TFTPBOOT_CLEAN}; do + rm -f ${TFTPBOOT_DIR}/$f + done + + ln -nfs ${DEPLOY_DIR_IMAGE}/at91bootstrap.bin ${TFTPBOOT_DIR}/oe_bootstrap.bin + if [ -f ${DEPLOY_DIR_IMAGE}/at91bootstrap_pmecc_padded.bin ]; then + ln -nfs ${DEPLOY_DIR_IMAGE}/at91bootstrap_pmecc_padded.bin ${TFTPBOOT_DIR}/oe_bootstrap_pmecc_padded.bin + fi + ln -nfs ${DEPLOY_DIR_IMAGE}/u-boot-${MACHINE}.bin ${TFTPBOOT_DIR}/oe_u-boot.bin + ln -nfs ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}.bin ${TFTPBOOT_DIR}/oe_uImage.bin + ln -nfs ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.jffs2 ${TFTPBOOT_DIR}/oe_rootfs.jffs2 + ln -nfs ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}-upgrade.bin ${TFTPBOOT_DIR}/oe_upgrade.bin + ln -nfs ${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}-upgrade-withboot.bin ${TFTPBOOT_DIR}/oe_upgrade-withboot.bin + ln -nfs ${DEPLOY_DIR_IMAGE} ${TFTPBOOT_DIR}/oe_images + ;; + *) + ;; + esac + fi +} +addtask tftpboot_links after do_firmware before do_build diff --git a/classes/mlinux-mirrors.bbclass b/classes/mlinux-mirrors.bbclass new file mode 100644 index 0000000..5a88695 --- /dev/null +++ b/classes/mlinux-mirrors.bbclass @@ -0,0 +1,14 @@ +MIRRORS_append () { +cvs://.*/.* http://multitech.net/mlinux/sources/ +svn://.*/.* http://multitech.net/mlinux/sources/ +git://.*/.* http://multitech.net/mlinux/sources/ +hg://.*/.* http://multitech.net/mlinux/sources/ +bzr://.*/.* http://multitech.net/mlinux/sources/ +osc://.*/.* http://multitech.net/mlinux/sources/ +p4://.*/.* http://multitech.net/mlinux/sources/ +ftp://.*/.* http://multitech.net/mlinux/sources/ +https?$://.*/.* http://multitech.net/mlinux/sources/ +http?$://.*/.* http://multitech.net/mlinux/sources/ +} + +SAVANNAH_GNU_MIRROR = "http://download-mirror.savannah.gnu.org/releases" diff --git a/classes/mlinux_metadata_scm.bbclass b/classes/mlinux_metadata_scm.bbclass new file mode 100644 index 0000000..b220344 --- /dev/null +++ b/classes/mlinux_metadata_scm.bbclass @@ -0,0 +1,14 @@ +MLINUX_METADATA_REVISION = "${@base_get_metadata_git_revision("${OEROOT}",None)}" +MLINUX_METADATA_BRANCH = "${@base_get_metadata_git_branch("${OEROOT}",None).strip()}" +MLINUX_LAYERS = "${@mlinux_layers(bb,d)}" + +def mlinux_layers(bb, d): + layers = (d.getVar("BBLAYERS", d, 1) or "").split() + layer_revs = "" + + for layer in layers: + branch = base_get_metadata_git_branch(layer, d).strip() + rev = base_get_metadata_git_revision(layer, d) + layer_revs += "%-20s = %s:%s\n" % (os.path.basename(layer), branch, rev) + + return layer_revs diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..0d3356d --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,10 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have recipes-* directories, add to BBFILES +BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ + ${LAYERDIR}/recipes-*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-mlinux-atmel" +BBFILE_PATTERN_meta-mlinux-atmel = "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-mlinux-atmel = "55" diff --git a/prod-scripts/MTCDT-0.1/cdteep.sh b/prod-scripts/MTCDT-0.1/cdteep.sh new file mode 100755 index 0000000..c0e1e14 --- /dev/null +++ b/prod-scripts/MTCDT-0.1/cdteep.sh @@ -0,0 +1,110 @@ +#!/bin/sh +# This scripts follows old school option rules, and all +# options must come before parameters. Four parameters +# are required. Options requiring parameters must be +# followed by their parameter, with or without a space. +# Options not requiring parameters can be ganged, and may +# precede a single option requiring a parameter. +# +MYNAME=cdteep.sh +out="/sys/bus/i2c/devices/0-0056/eeprom" +vendor_id="Multi-Tech Systems" +hw_version="MTCDT-0.1" + + +# Set the MTCDT EEPROM +function usage { + echo "${MYNAME}"' -d -g -b "bt_mac_addr" -w "wifi_mac_addr" -i "imei number" -l "product-id" "device-id" "uuid" "eth_mac_addr"' >&2 + cat <&2 + assumptions: + All options are optional and must come first. + -b and -w require a following mac address + -d displays the PROM, do not write. Ignores other parameters. + -g GPS capability. + -l lora capability. + -i requires a following imei number + + Example + cdteep.sh -lb 01:12:AB:C3:23:FE MTCDT-210L 3489235379 125-6356-2283-9792 12:34:AB:CD:8F:34 + To add wifimac and remove lora: + ${MYNAME} -b 01:12:AB:C3:23:FE -w 04:16:3C:C3:45:75 MTCDT-210L 3489235379 125-6356-2283-9792 12:34:AB:CD:8F:34 + + product-id, device-id, uuid and eth_mac_addr are required. + + -d display EEPROM + -g capa-GPS + -l capa-Lora + The following fields are fixed: + out-file ${out} + vendor-id ${vendor_id} + hw-version ${hw_version} +!EOF + exit 1 +} + +((display=0)) + +while getopts b:dgw:i:l opt ; do +echo looking at opt $opt + case $opt in + b) + bt_mac_addr="$OPTARG" + barg="--mac-bluetooth ${OPTARG} --capa-bluetooth" + ;; + w) + wifi_mac_addr="$OPTARG" + warg="--mac-wifi ${OPTARG} --capa-wifi" + ;; + i) + imei="$OPTARG" + if ((${#imei} == 0)) ; then + echo "i option requires an imei number." >&2 + usage + fi + iarg="--imei ${OPTARG}" + ;; + l) + larg="--capa-lora" + ;; + d) + echo -e "\n\nEEPROM contents" + echo "-----------------" + mts-id-eeprom --in-file $out + exit + ;; + g) + gps="--capa-gps" + ;; + \?) + usage + ;; + :) + echo "Option -$OPTARG requires an argument." >&2 + usage + ;; + esac +done + + +shift $((OPTIND-1)) + +if (($# != 4)) ; then + echo Need 4 parameters beyond the options. >&2 + echo "You specified $#." >&2 + usage + exit 1 +fi +product_id=$1 +device_id=$2 +uuid=$3 +mac=$4 + +mts-id-eeprom --out-file $out --out-format bin --vendor-id "$vendor_id" \ + --product-id "$product_id" --device-id "$device_id" \ + --hw-version "$hw_version" --mac-addr $mac \ + ${warg} ${barg} \ + ${iarg} ${larg} ${gps} --uuid "$uuid" + +echo -e "\n\nNew contents" +echo "-----------------" +mts-id-eeprom --in-file $out diff --git a/recipes-core/base-files/fstab-at91/fstab b/recipes-core/base-files/fstab-at91/fstab new file mode 100644 index 0000000..8922faf --- /dev/null +++ b/recipes-core/base-files/fstab-at91/fstab @@ -0,0 +1,10 @@ +rootfs / auto defaults 1 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts mode=0620,gid=5 0 0 +usbdevfs /proc/bus/usb usbdevfs noauto 0 0 +tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0 +tmpfs /var/volatile tmpfs defaults 0 0 +configfs /sys/kernel/config configfs defaults 0 0 + +/dev/mtdblock6 /var/config jffs2 defaults 0 0 +/dev/mtdblock7 /var/oem jffs2 defaults,ro 0 0 diff --git a/recipes-core/base-files/fstab-at91_1.0.bb b/recipes-core/base-files/fstab-at91_1.0.bb new file mode 100644 index 0000000..cd2102a --- /dev/null +++ b/recipes-core/base-files/fstab-at91_1.0.bb @@ -0,0 +1,17 @@ +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" +inherit allarch +PR = "r1" +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" +PROVIDES = "fstab" +DEPENDS = "base-files" +RDEPENDS_${PN} = "base-files" + +SRC_URI = "file://fstab" + +FILES_${PN} = "${sysconfdir}/fstab" + +do_install() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir} +} diff --git a/recipes-core/images/core-image-rorootfs-overlay-initramfs.bb b/recipes-core/images/core-image-rorootfs-overlay-initramfs.bb new file mode 100644 index 0000000..47946c5 --- /dev/null +++ b/recipes-core/images/core-image-rorootfs-overlay-initramfs.bb @@ -0,0 +1,23 @@ +# Simple initramfs image. Mostly used for live images. +# Derived from https://github.com/cmhe/meta-readonly-rootfs-overlay +DESCRIPTION = "Small image capable of booting a device. The kernel includes \ +the Minimal RAM-based Initial Root Filesystem (initramfs), mounts the root fs \ +read only and uses a file system overlay for written data." + +PACKAGE_INSTALL = "initramfs-readonly-rootfs-overlay ${VIRTUAL-RUNTIME_base-utils} udev base-passwd gptfdisk ${ROOTFS_BOOTSTRAP_INSTALL}" + +# Do not pollute the initrd image with rootfs features +IMAGE_FEATURES = "" + +export IMAGE_BASENAME = "${PN}" +IMAGE_LINGUAS = "" + +LICENSE = "MIT" + +IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" +inherit core-image + +IMAGE_ROOTFS_SIZE = "8192" +IMAGE_ROOTFS_EXTRA_SPACE = "0" + +BAD_RECOMMENDATIONS += "busybox-syslog" diff --git a/recipes-core/images/mlinux-base-image.bb b/recipes-core/images/mlinux-base-image.bb new file mode 100644 index 0000000..e61a7f7 --- /dev/null +++ b/recipes-core/images/mlinux-base-image.bb @@ -0,0 +1,75 @@ +# Conduit 0.0 or 0.1 without RS9113 +DESCRIPTION = "mLinux base image" +LICENSE = "MIT" + +require mlinux-minimal-image.bb + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES_append = " \ + bridge-utils \ + inetutils-ftp \ + openssl \ + rsync \ + iperf3 \ + lldpd \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +WIFI_FEATURES = " \ + libnl \ + wpa-supplicant \ + iw \ + hostapd \ + hostapd-cfg \ + " + +BLUETOOTH_FEATURES = "bluez5" +BLUETOOTH_INIT ??= "bluez5-mlinit" + +# Add all timezones available +# ntpdate will sync time every 30 min by default via cron +TIME_FEATURES = "tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic \ + tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \ + tzdata-misc \ + cronie \ + ntpdate \ + " + +# u-boot-linux-utils: U-Boot environment access from Linux +# mlinux-scripts: sample scripts for setting up Conduit for various tasks +# reset-handler: default reset button handler +# radio-cmd: supports cellular radio activation and other configuration commands +# radio-query: queries cellular radio for common info (IMEI, RSSI, etc) +# jsparser: command line tool to parse JSON files +MULTITECH_FEATURES_append = " \ + u-boot-linux-utils \ + mlinux-scripts \ + reset-handler \ + radio-cmd radio-query \ + jsparser \ + " + +MISC_FEATURES = "minicom lrzsz nano" + +DEBUG_FEATURES = "" + +# Extra stuff to install +IMAGE_INSTALL_append = " \ + kernel-modules \ + ${WIFI_FEATURES} \ + ${BLUETOOTH_FEATURES} \ + ${BLUETOOTH_INIT} \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + ${DEBUG_FEATURES} \ + " diff --git a/recipes-core/images/mlinux-basetest-image.bb b/recipes-core/images/mlinux-basetest-image.bb new file mode 100644 index 0000000..807b16e --- /dev/null +++ b/recipes-core/images/mlinux-basetest-image.bb @@ -0,0 +1,9 @@ +# Conduit 0.0 or 0.1 without RS9113 +DESCRIPTION = "mLinux base test image" +LICENSE = "MIT" + +require mlinux-base-image.bb + +# Open console for test image +CONSOLE = "sysvinit-inittab-start-open" + diff --git a/recipes-core/images/mlinux-commissioning-image.bb b/recipes-core/images/mlinux-commissioning-image.bb new file mode 100644 index 0000000..5ba16a6 --- /dev/null +++ b/recipes-core/images/mlinux-commissioning-image.bb @@ -0,0 +1,7 @@ +require mlinux-rs9113-factory-image.bb +DESCRIPTION = "mLinux factory image with commissioning support" + +# Extra stuff to install +IMAGE_INSTALL_append = " dnsmasq bluez5-noinst-tools python-dbus commissioning commissioning-php-fpm rs9113-rm" +IMAGE_INSTALL_remove = "useradd" +ROOTFS_POSTPROCESS_COMMAND_remove = "mlinux_set_root_password;" diff --git a/recipes-core/images/mlinux-factory-image.bb b/recipes-core/images/mlinux-factory-image.bb new file mode 100644 index 0000000..49cab1f --- /dev/null +++ b/recipes-core/images/mlinux-factory-image.bb @@ -0,0 +1,94 @@ +# Conduit 0.0 or 0.1 without RS9113 +# +# The correct syntax for a machine append is: +# VARIABLE_append_mtcdt +# append must be before the machine name. +# +require mlinux-base-image.bb +DESCRIPTION = "mLinux factory image" + +# For now we don't put this in MTR or AEP +# Password restrictions library from Redhat +IMAGE_INSTALL_append = " libpwquality" + +LIGHTTPD = "lighttpd \ + lighttpd-module-cgi lighttpd-module-indexfile \ + lighttpd-module-redirect lighttpd-module-auth \ + lighttpd-module-access lighttpd-module-accesslog \ + lighttpd-module-rewrite lighttpd-module-proxy lighttpd-module-fastcgi \ + lighttpd-module-scgi lighttpd-module-alias \ + lighttpd-module-dirlisting lighttpd-module-staticfile \ + " + +# Lighttpd web server +IMAGE_INSTALL_append = " ${LIGHTTPD}" + +IMAGE_INSTALL_append = " sqlite3" + +IMAGE_INSTALL_append= " autossh" + +# Monit system/process monitor +IMAGE_INSTALL_append = " monit" + +# LoRa support (MTAC-LORA accessory card) +IMAGE_INSTALL_append = " lora-gateway-utils lora-query lora-network-server lora-packet-forwarder-usb" +IMAGE_INSTALL_append_mtcdt = " lora-gateway-geolocation-utils lora-packet-forwarder-geolocation" +IMAGE_INSTALL_append_mtcdt = " mtac-xdot-util" + +# MQTT server +IMAGE_INSTALL_append = " mosquitto mosquitto-clients" + + +# Perl support +IMAGE_INSTALL_append = " perl" +IMAGE_INSTALL_append = " perl-module-io perl-module-fcntl" +# not in meta-oe or oe-core... +#IMAGE_INSTALL_append = " libdevice-serialport-perl" +#IMAGE_INSTALL_append = " libexpect-perl" + +# Python support +IMAGE_INSTALL_append = " python" +# Python modules +IMAGE_INSTALL_append = " python-argparse \ +python-compression \ +python-dateutil \ +python-html \ +python-psutil \ +python-pyopenssl \ +python-pyserial \ +python-pyudev \ +python-pyusb \ +python-simplejson \ +python-sqlite3 \ +python-syslog \ +python-textutils \ +python-unixadmin \ +python-xml \ +" + +# OpenJDK Java runtime +# IMAGE_INSTALL_append = " openjdk-8" +# OpenJDK with JamVM VM (Multi-Tech default) +# IMAGE_INSTALL_append = " jamvm" +# OpenJDK with CACAO VM (run with 'java -cacao') +# IMAGE_INSTALL_append = " openjdk-7-vm-cacao" +# OpenJDK Zero VM (run with 'java -zero') +# IMAGE_INSTALL_append = " openjdk-7-vm-zero" + +# PHP support +IMAGE_INSTALL_append = " php php-cli php-fpm" + +# Node.js support not available for Atmel any more. +# IMAGE_INSTALL_append = " nodejs nodejs-npm" + +# Multi-Tech SMS Utility (see http://git.multitech.net) +IMAGE_INSTALL_append = " sms-utils" +# Multi-Tech GPS Utility +IMAGE_INSTALL_append = " venus-gps" +IMAGE_INSTALL_append = " pps-tools" +IMAGE_INSTALL_append = " dnsmasq bluez5-pand bluez5-rfcomm" + +# When ntp is to use the GPS, gps-utils is required +IMAGE_INSTALL_append = " gpsd libgps ntp ntp-utils gpspipe gps-utils" + +IMAGE_INSTALL_append = " uxfp uvccapture" diff --git a/recipes-core/images/mlinux-factory-test-image.bb b/recipes-core/images/mlinux-factory-test-image.bb new file mode 100644 index 0000000..e517734 --- /dev/null +++ b/recipes-core/images/mlinux-factory-test-image.bb @@ -0,0 +1,8 @@ +DESCRIPTION = "mLinux factory test image" +LICENSE = "MIT" + +require mlinux-rs9113-factory-image.bb + +IMAGE_INSTALL_append = " strace i2c-tools spitools devmem2" +#Open console for testing +CONSOLE = "sysvinit-inittab-start-open" diff --git a/recipes-core/images/mlinux-minimal-image.bb b/recipes-core/images/mlinux-minimal-image.bb new file mode 100644 index 0000000..d10210f --- /dev/null +++ b/recipes-core/images/mlinux-minimal-image.bb @@ -0,0 +1,83 @@ +# The correct syntax for a machine append is: +# VARIABLE_append_mtcdt +# append must be before the machine name. +DESCRIPTION = "mLinux minimal image" +LICENSE = "MIT" + +inherit core-image +inherit mlinux-image + +IMAGE_LINGUAS = "" +IMAGE_FEATURES_append = " ssh-server-openssh package-management" + +# Don't wipe out CORE_FEATURES from minimal image +CORE_FEATURES_append = " \ + packagegroup-core-boot packagegroup-distro-base \ + packagegroup-base-ext2 \ + packagegroup-base-usbhost packagegroup-base-usbgadget \ + udev-extraconf usb-gadget-mode \ + sysfsutils module-init-tools \ + bash procps \ + openssh-sftp-server \ + util-linux-mount util-linux-umount \ + start-stop-daemon \ + sudo \ + ${CORE_IMAGE_EXTRA_INSTALL} \ + mlinux-feed-configs \ + useradd \ + mts-io-sysfs \ + " + +CORE_FEATURES_append = " mtd-utils mtd-utils-jffs2 fstab-at91" + +CORE_FEATURES_append_mtcap = " mt-dt-overlay " + +NETWORKING_FEATURES = "ppp curl iproute2 \ + iptables iputils \ + " + +# mts-io: IO Controller for Multi-Tech hardware. +# (LEDs, temp sensor, serial lines, and more) +# +# config: Handles default config files stored in /var/config. +# /var/config is mounted on a separate flash partition so that config +# files survive flashing of rootfs. See recipe for details. +# +# set-rs485: enables RS485 half-duplex mode for a given tty device +# +# mtcap does not need mts-io-util, but it is required for LoRa 2.1 images + +MULTITECH_FEATURES = "kernel-module-mts-io \ + mts-io-noarch \ + mts-io-util \ + config \ + mts-id-eeprom \ + set-rs485 \ + radio-reset \ + upgrade-reboot" + +MULTITECH_MTAC = "" +MULTITECH_MTAC_append_mtcdt = " \ + kernel-module-mtac \ + kernel-module-mtac-eth \ + kernel-module-mtac-gpiob \ + kernel-module-mtac-lora \ + kernel-module-mtac-mfser \ + kernel-module-mtac-pulse \ + kernel-module-mtac-xdot" + +MULTITECH_BB = "" + +UPGRADE_FEATURES = "mtd-utils-static" + +CONSOLE = "sysvinit-inittab-start" + +IMAGE_INSTALL = "${CORE_FEATURES} \ + ${NETWORKING_FEATURES} \ + ${UPGRADE_FEATURES} \ + ${MULTITECH_FEATURES} \ + ${MULTITECH_MTAC} \ + ${MULTITECH_BB} \ + ${CONSOLE} \ + " + diff --git a/recipes-core/images/mlinux-mono-image.bb b/recipes-core/images/mlinux-mono-image.bb new file mode 100644 index 0000000..d066ae9 --- /dev/null +++ b/recipes-core/images/mlinux-mono-image.bb @@ -0,0 +1,3 @@ +require mlinux-base-image.bb + +IMAGE_INSTALL_append = " mono mono-helloworld" diff --git a/recipes-core/images/mlinux-mtcap-commissioning-image.bb b/recipes-core/images/mlinux-mtcap-commissioning-image.bb new file mode 100644 index 0000000..b1edd03 --- /dev/null +++ b/recipes-core/images/mlinux-mtcap-commissioning-image.bb @@ -0,0 +1,17 @@ +require mlinux-mtcap-image.bb +DESCRIPTION = "mtcap image with commissioning support" + +LIGHTTPD = "lighttpd \ + lighttpd-module-cgi lighttpd-module-indexfile \ + lighttpd-module-redirect lighttpd-module-auth \ + lighttpd-module-access lighttpd-module-accesslog \ + lighttpd-module-rewrite lighttpd-module-proxy lighttpd-module-fastcgi \ + lighttpd-module-scgi lighttpd-module-alias \ + lighttpd-module-dirlisting lighttpd-module-staticfile \ + " + +#install +IMAGE_INSTALL += "${LIGHTTPD}" +IMAGE_INSTALL_append = " commissioning commissioning-php-fpm" +IMAGE_INSTALL_remove = "useradd" +ROOTFS_POSTPROCESS_COMMAND_remove = "mlinux_set_root_password;" diff --git a/recipes-core/images/mlinux-mtcap-image.bb b/recipes-core/images/mlinux-mtcap-image.bb new file mode 100644 index 0000000..3fe349c --- /dev/null +++ b/recipes-core/images/mlinux-mtcap-image.bb @@ -0,0 +1,75 @@ +DESCRIPTION = "mLinux Conduit Access Point image" + +require mlinux-minimal-image.bb +require mtcap-modules.inc + +# For now we don't put this in MTR or AEP +# Password restrictions library from Redhat +IMAGE_INSTALL_append = " libpwquality" + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES_append = " \ + bridge-utils \ + inetutils-ftp \ + openssl \ + rsync \ + iperf3 \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +TIME_FEATURES = "tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic \ + tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \ + tzdata-misc \ + cronie \ + ntpdate \ + " + +WIFI_FEATURES = "libnl \ + wpa-supplicant \ + iw \ + hostapd \ + hostapd-cfg \ + wilc1000 \ + " + +MULTITECH_FEATURES_append = " \ + u-boot-linux-utils \ + mlinux-scripts \ + reset-handler \ + radio-cmd radio-query \ + cell-radio-carrierswitch \ + jsparser \ + protobuf \ + " + +IMAGE_INSTALL_append = " \ + lora-gateway-utils \ + lora-query \ + lora-packet-forwarder \ + lora-network-server \ + logrotate \ + mosquitto mosquitto-clients \ + " + +MISC_FEATURES = "minicom lrzsz nano uxfp" + +# Extra stuff to install +IMAGE_INSTALL_append = " gpsd libgps libgps24 ntp ntp-utils gpspipe gps-utils" + +IMAGE_INSTALL_append = " \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + " + +# Multi-Tech SMS Utility (see http://git.multitech.net) +IMAGE_INSTALL_append = " sms-utils" diff --git a/recipes-core/images/mlinux-mtcap-test-image.bb b/recipes-core/images/mlinux-mtcap-test-image.bb new file mode 100644 index 0000000..57808cf --- /dev/null +++ b/recipes-core/images/mlinux-mtcap-test-image.bb @@ -0,0 +1,89 @@ +DESCRIPTION = "mLinux Conduit Access Point image" + +require mlinux-minimal-image.bb +require mtcap-modules.inc + +# For now we don't put this in MTR or AEP +# Password restrictions library from Redhat +IMAGE_INSTALL += "libpwquality" + + +# Test image features +IMAGE_INSTALL += "i2c-tools \ + spitools \ + strace \ + devmem2 \ + " + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES += "bridge-utils \ + inetutils-ftp \ + openssl \ + rsync \ + iperf2 \ + iperf3 \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +# No accessory cards for MTAC +MULTITECH_MTAC = "" + +TIME_FEATURES = "tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic \ + tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \ + tzdata-misc \ + cronie \ + ntpdate \ + " + +WIFI_FEATURES = "libnl \ + wpa-supplicant \ + iw \ + hostapd \ + hostapd-cfg \ + wilc1000 \ + " + +MULTITECH_FEATURES += " \ + u-boot-linux-utils \ + mlinux-scripts \ + reset-handler \ + radio-cmd radio-query \ + cell-radio-carrierswitch \ + jsparser \ + protobuf \ + " + +IMAGE_INSTALL += "lora-gateway-utils \ + lora-query \ + lora-packet-forwarder \ + lora-network-server \ + logrotate \ + mosquitto mosquitto-clients \ + " + +MISC_FEATURES = "minicom lrzsz nano uxfp" + +# Extra stuff to install +# Someday add wifi features +# ${WIFI_FEATURES} +# +IMAGE_INSTALL += " \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + " + +# Open console for testing +CONSOLE = "sysvinit-inittab-start-open" + +# Multi-Tech SMS Utility (see http://git.multitech.net) +IMAGE_INSTALL += "sms-utils" diff --git a/recipes-core/images/mlinux-mths-image.bb b/recipes-core/images/mlinux-mths-image.bb new file mode 100644 index 0000000..9a90eea --- /dev/null +++ b/recipes-core/images/mlinux-mths-image.bb @@ -0,0 +1,8 @@ +# Factory testing image for MTHS. +# config-mths is needed for factory +# reset. +require mlinux-rs9113-mtrv1-image.bb +DESCRIPTION = "MTHS images for Factory Testing" + +# Extra stuff to install +IMAGE_INSTALL += "config-mths dnsmasq" diff --git a/recipes-core/images/mlinux-mtr-image.bb b/recipes-core/images/mlinux-mtr-image.bb new file mode 100644 index 0000000..baa2aef --- /dev/null +++ b/recipes-core/images/mlinux-mtr-image.bb @@ -0,0 +1,76 @@ +require mtr-modules.inc +DESCRIPTION = "mLinux base mtr image" +LICENSE = "MIT" + +require mlinux-minimal-image.bb + +CONSOLE = "sysvinit-inittab-start-open" + +TEST_FEATURES = "i2c-tools \ + spitools \ + strace \ + devmem2 \ + " + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES_append = " bridge-utils \ + inetutils-ftp \ + openssl \ + rsync \ + iperf3 \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +WIFI_FEATURES = " \ + libnl \ + wpa-supplicant \ + iw \ + hostapd \ + hostapd-cfg \ + " + +BLUETOOTH_FEATURES = "bluez5" + +# Add all timezones available +# ntpdate will sync time every 30 min by default via cron +TIME_FEATURES = "tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic \ + tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \ + tzdata-misc \ + cronie \ + ntpdate \ + " + +# u-boot-linux-utils: U-Boot environment access from Linux +# mlinux-scripts: sample scripts for setting up Conduit for various tasks +# reset-handler: default reset button handler +# radio-cmd: supports cellular radio activation and other configuration commands +# radio-query: queries cellular radio for common info (IMEI, RSSI, etc) +# jsparser: command line tool to parse JSON files +MULTITECH_FEATURES_append = " \ + u-boot-linux-utils \ + mlinux-scripts \ + reset-handler \ + radio-cmd radio-query \ + jsparser \ + " + +MISC_FEATURES = "minicom lrzsz nano" + +# Extra stuff to install +IMAGE_INSTALL_append = " \ + ${TEST_FEATURES} \ + ${WIFI_FEATURES} \ + ${BLUETOOTH_FEATURES} \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + " diff --git a/recipes-core/images/mlinux-mtrv1-image.bb b/recipes-core/images/mlinux-mtrv1-image.bb new file mode 100644 index 0000000..f72eb2d --- /dev/null +++ b/recipes-core/images/mlinux-mtrv1-image.bb @@ -0,0 +1,79 @@ +require mtr-modules.inc +DESCRIPTION = "mLinux base mtr image" +LICENSE = "MIT" + +require mlinux-minimal-image.bb + +CONSOLE = "sysvinit-inittab-start-open" + +TEST_FEATURES = "i2c-tools \ + spitools \ + strace \ + devmem2 \ + " + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES_append = " bridge-utils \ + inetutils-ftp \ + openssl \ + rsync \ + iperf3 \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +WIFI_FEATURES = " \ + libnl \ + wpa-supplicant \ + iw \ + hostapd \ + hostapd-cfg \ + " + +BLUETOOTH_FEATURES = "bluez5 bluez5-pand" + +# Add all timezones available +# ntpdate will sync time every 30 min by default via cron +TIME_FEATURES = "tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic \ + tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \ + tzdata-misc \ + cronie \ + ntpdate \ + " + +# u-boot-linux-utils: U-Boot environment access from Linux +# mlinux-scripts: sample scripts for setting up Conduit for various tasks +# reset-handler: default reset button handler +# radio-cmd: supports cellular radio activation and other configuration commands +# radio-query: queries cellular radio for common info (IMEI, RSSI, etc) +# jsparser: command line tool to parse JSON files +MULTITECH_FEATURES_append = " \ + u-boot-linux-utils \ + mlinux-scripts \ + reset-handler \ + radio-cmd radio-query \ + jsparser \ + " + +MISC_FEATURES = "minicom lrzsz nano pps-tools" + +# Extra stuff to install +IMAGE_INSTALL_append = " kernel-module-rs9113 rs9113-util rs9113-autostart" +IMAGE_INSTALL_append = " gpsd libgps libgps24 ntp ntp-utils gpspipe gps-utils" + +IMAGE_INSTALL_append = " \ + ${TEST_FEATURES} \ + ${WIFI_FEATURES} \ + ${BLUETOOTH_FEATURES} \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + " diff --git a/recipes-core/images/mlinux-rs9113-base-image.bb b/recipes-core/images/mlinux-rs9113-base-image.bb new file mode 100644 index 0000000..ed2fc83 --- /dev/null +++ b/recipes-core/images/mlinux-rs9113-base-image.bb @@ -0,0 +1,5 @@ +require mlinux-base-image.bb +DESCRIPTION = "mLinux base image with rs9113 drivers" + +# Extra stuff to install +IMAGE_INSTALL_append = " kernel-module-rs9113 rs9113-autostart rs9113-util" diff --git a/recipes-core/images/mlinux-rs9113-factory-image.bb b/recipes-core/images/mlinux-rs9113-factory-image.bb new file mode 100644 index 0000000..40a4610 --- /dev/null +++ b/recipes-core/images/mlinux-rs9113-factory-image.bb @@ -0,0 +1,5 @@ +require mlinux-factory-image.bb +DESCRIPTION = "mLinux factory image with rs9113 drivers" + +# Extra stuff to install +IMAGE_INSTALL_append = " dnsmasq bluez5-noinst-tools python-dbus kernel-module-rs9113 rs9113-autostart rs9113-util rs9113-misc rs9113-utils-extra" diff --git a/recipes-core/images/mlinux-rs9113-mtrv1-image.bb b/recipes-core/images/mlinux-rs9113-mtrv1-image.bb new file mode 100644 index 0000000..da5632c --- /dev/null +++ b/recipes-core/images/mlinux-rs9113-mtrv1-image.bb @@ -0,0 +1,75 @@ +require mtr-modules.inc +DESCRIPTION = "mLinux base mtr image" +LICENSE = "MIT" + +require mlinux-minimal-image.bb +MULTITECH_MTAC = "" + +FILESYSTEM_FEATURES = "dosfstools \ + cifs-utils \ + lsof \ + " + +NETWORKING_FEATURES += "bridge-utils \ + dnsmasq \ + inetutils-ftp \ + openssl \ + rsync \ + iperf2 \ + iperf3 \ + mii-diag \ + tcpdump \ + netcat \ + wget \ + strongswan \ + busybox-ifplugd \ + " + +WIFI_FEATURES = " \ + libnl \ + wpa-supplicant \ + iw \ + hostapd \ + hostapd-cfg \ + " + +BLUETOOTH_FEATURES = "bluez5 bluez5-pand" + +# Add all timezones available +# ntpdate will sync time every 30 min by default via cron +TIME_FEATURES = "tzdata tzdata-africa tzdata-americas tzdata-antarctica tzdata-arctic \ + tzdata-asia tzdata-atlantic tzdata-australia tzdata-europe tzdata-pacific \ + tzdata-misc \ + cronie \ + ntpdate \ + " + +# u-boot-linux-utils: U-Boot environment access from Linux +# mlinux-scripts: sample scripts for setting up Conduit for various tasks +# reset-handler: default reset button handler +# radio-cmd: supports cellular radio activation and other configuration commands +# radio-query: queries cellular radio for common info (IMEI, RSSI, etc) +# jsparser: command line tool to parse JSON files +MULTITECH_FEATURES += " \ + u-boot-linux-utils \ + mlinux-scripts \ + reset-handler \ + radio-cmd radio-query \ + jsparser \ + " + +MISC_FEATURES = "minicom lrzsz nano pps-tools" + +# Extra stuff to install +IMAGE_INSTALL += "kernel-module-rs9113 rs9113rf rs9113-util rs9113-utils-extra rs9113-misc rs9113-autostart" +IMAGE_INSTALL += "gpsd libgps libgps24 ntp ntp-utils gpspipe gps-utils" +IMAGE_INSTALL += "uxfp" +CONSOLE = "sysvinit-inittab-start-open" + +IMAGE_INSTALL += " \ + ${WIFI_FEATURES} \ + ${BLUETOOTH_FEATURES} \ + ${FILESYSTEM_FEATURES} \ + ${TIME_FEATURES} \ + ${MISC_FEATURES} \ + " diff --git a/recipes-core/images/mlinux-sdk.bb b/recipes-core/images/mlinux-sdk.bb new file mode 100644 index 0000000..abdadbf --- /dev/null +++ b/recipes-core/images/mlinux-sdk.bb @@ -0,0 +1,5 @@ +# Conduit 0.0 or 0.1 without RS9113 +require mlinux-factory-image.bb +DESCRIPTION = "mLinux SDK" + +IMAGE_INSTALL_append = " boost i2c-tools" diff --git a/recipes-core/images/mtcap-modules.inc b/recipes-core/images/mtcap-modules.inc new file mode 100644 index 0000000..ed3ca51 --- /dev/null +++ b/recipes-core/images/mtcap-modules.inc @@ -0,0 +1,286 @@ +# This file could be improved +# by removing modules not needed +# by MTR. It could also be +# improved by not includeing +# modules that are dependency's +# of other modules. + +IMAGE_INSTALL_append = " \ + kernel-module-8021q \ + kernel-module-af-alg \ + kernel-module-algif-hash \ + kernel-module-algif-skcipher \ + kernel-module-ansi-cprng \ + kernel-module-anubis \ + kernel-module-arc4 \ + kernel-module-asix \ + kernel-module-at24 \ + kernel-module-at91-udc \ + kernel-module-atmel-mci \ + kernel-module-atmel-usba-udc \ + kernel-module-ax88179-178a \ + kernel-module-bcm203x \ + kernel-module-bfusb \ + kernel-module-blowfish-common \ + kernel-module-blowfish-generic \ + kernel-module-bluetooth \ + kernel-module-bnep \ + kernel-module-bpa10x \ + kernel-module-bridge \ + kernel-module-br-netfilter \ + kernel-module-bsd-comp \ + kernel-module-btbcm \ + kernel-module-btintel \ + kernel-module-btmrvl \ + kernel-module-btmrvl-sdio \ + kernel-module-btqca \ + kernel-module-btsdio \ + kernel-module-cast5-generic \ + kernel-module-cast6-generic \ + kernel-module-cast-common \ + kernel-module-catc \ + kernel-module-ccm \ + kernel-module-cdc-acm \ + kernel-module-cdc-ether \ + kernel-module-cdc-ncm \ + kernel-module-cdc-subset \ + kernel-module-cdc-wdm \ + kernel-module-cfg80211 \ + kernel-module-cmac \ + kernel-module-crc32c-generic \ + kernel-module-crc32-generic \ + kernel-module-ctr \ + kernel-module-cts \ + kernel-module-dm9000 \ + kernel-module-dm9601 \ + kernel-module-dm-log \ + kernel-module-dm-log-userspace \ + kernel-module-dm-mirror \ + kernel-module-dm-mod \ + kernel-module-dm-region-hash \ + kernel-module-dns-resolver \ + kernel-module-dummy \ + kernel-module-ecb \ + kernel-module-eeprom-93cx6 \ + kernel-module-encrypted-keys \ + kernel-module-ext4 \ + kernel-module-fcrypt \ + kernel-module-fscrypto \ + kernel-module-g-acm-ms \ + kernel-module-gadgetfs \ + kernel-module-garp \ + kernel-module-g-cdc \ + kernel-module-gcm \ + kernel-module-g-ether \ + kernel-module-gf128mul \ + kernel-module-ghash-generic \ + kernel-module-gluebi \ + kernel-module-g-mass-storage \ + kernel-module-g-serial \ + kernel-module-g-zero \ + kernel-module-hci-uart \ + kernel-module-hci-vhci \ + kernel-module-hidp \ + kernel-module-i2c-at91 \ + kernel-module-i2c-dev \ + kernel-module-i2c-gpio \ + kernel-module-i2c-slave-eeprom \ + kernel-module-ip6-gre \ + kernel-module-ip6table-filter \ + kernel-module-ip6table-mangle \ + kernel-module-ip6table-nat \ + kernel-module-ip6table-raw \ + kernel-module-ip6-tables \ + kernel-module-ip6t-ah \ + kernel-module-ip6t-eui64 \ + kernel-module-ip6t-frag \ + kernel-module-ip6t-hbh \ + kernel-module-ip6t-ipv6header \ + kernel-module-ip6t-masquerade \ + kernel-module-ip6t-mh \ + kernel-module-ip6t-npt \ + kernel-module-ip6t-reject \ + kernel-module-ip6t-rpfilter \ + kernel-module-ip6t-rt \ + kernel-module-ip6t-synproxy \ + kernel-module-ip6-tunnel \ + kernel-module-ip6-udp-tunnel \ + kernel-module-ip6-vti \ + kernel-module-ipip \ + kernel-module-iptable-filter \ + kernel-module-iptable-mangle \ + kernel-module-iptable-nat \ + kernel-module-iptable-raw \ + kernel-module-ip-tables \ + kernel-module-ipt-ah \ + kernel-module-ipt-clusterip \ + kernel-module-ipt-ecn \ + kernel-module-ipt-masquerade \ + kernel-module-ipt-reject \ + kernel-module-ipt-rpfilter \ + kernel-module-ipt-synproxy \ + kernel-module-ip-vs \ + kernel-module-iscsi-tcp \ + kernel-module-jbd2 \ + kernel-module-khazad \ + kernel-module-l2tp-core \ + kernel-module-l2tp-ppp \ + kernel-module-leds-blinkm \ + kernel-module-leds-regulator \ + kernel-module-ledtrig-gpio \ + kernel-module-ledtrig-heartbeat \ + kernel-module-ledtrig-netdev \ + kernel-module-ledtrig-timer \ + kernel-module-ledtrig-usbport \ + kernel-module-libcomposite \ + kernel-module-libiscsi \ + kernel-module-libiscsi-tcp \ + kernel-module-llc \ + kernel-module-mac80211 \ + kernel-module-mbcache \ + kernel-module-md4 \ + kernel-module-micrel \ + kernel-module-microchip \ + kernel-module-mrp \ + kernel-module-mtd-dataflash \ + kernel-module-mtd-nandbiterrs \ + kernel-module-mtd-nandecctest \ + kernel-module-mtd-oobtest \ + kernel-module-mtd-pagetest \ + kernel-module-mtd-readtest \ + kernel-module-mtd-speedtest \ + kernel-module-mtd-stresstest \ + kernel-module-mtd-subpagetest \ + kernel-module-mtd-torturetest \ + kernel-module-nf-conntrack-broadcast \ + kernel-module-nf-conntrack-ftp \ + kernel-module-nf-conntrack-h323 \ + kernel-module-nf-conntrack-ipv4 \ + kernel-module-nf-conntrack-ipv6 \ + kernel-module-nf-conntrack-netbios-ns \ + kernel-module-nf-conntrack-netlink \ + kernel-module-nf-conntrack-pptp \ + kernel-module-nf-conntrack-proto-gre \ + kernel-module-nf-conntrack-sip \ + kernel-module-nf-conntrack-snmp \ + kernel-module-nf-defrag-ipv4 \ + kernel-module-nf-defrag-ipv6 \ + kernel-module-nf-dup-ipv4 \ + kernel-module-nf-dup-ipv6 \ + kernel-module-nf-log-arp \ + kernel-module-nf-log-common \ + kernel-module-nf-log-ipv4 \ + kernel-module-nf-log-ipv6 \ + kernel-module-nf-nat-ftp \ + kernel-module-nf-nat-h323 \ + kernel-module-nf-nat-ipv4 \ + kernel-module-nf-nat-ipv6 \ + kernel-module-nf-nat-masquerade-ipv4 \ + kernel-module-nf-nat-masquerade-ipv6 \ + kernel-module-nf-nat-pptp \ + kernel-module-nf-nat-proto-gre \ + kernel-module-nf-nat-redirect \ + kernel-module-nf-nat-sip \ + kernel-module-nf-nat-snmp-basic \ + kernel-module-nfnetlink-cttimeout \ + kernel-module-nf-reject-ipv4 \ + kernel-module-nf-reject-ipv6 \ + kernel-module-nf-synproxy-core \ + kernel-module-nf-tables-inet \ + kernel-module-nf-tables-ipv4 \ + kernel-module-nf-tables-ipv6 \ + kernel-module-nf-tables-netdev \ + kernel-module-nft-chain-nat-ipv4 \ + kernel-module-nft-exthdr \ + kernel-module-nft-meta \ + kernel-module-option \ + kernel-module-p8022 \ + kernel-module-ppp-async \ + kernel-module-ppp-deflate \ + kernel-module-ppp-generic \ + kernel-module-ppp-mppe \ + kernel-module-pppoe \ + kernel-module-pppox \ + kernel-module-pps-core \ + kernel-module-pps-gpio \ + kernel-module-pps-ktimer \ + kernel-module-pps-ldisc \ + kernel-module-pptp \ + kernel-module-psnap \ + kernel-module-ptp \ + kernel-module-pwm-atmel-tcb \ + kernel-module-qmi-wwan \ + kernel-module-rfcomm \ + kernel-module-rfkill \ + kernel-module-rfkill-gpio \ + kernel-module-rfkill-regulator \ + kernel-module-rndis-host \ + kernel-module-rndis-wlan \ + kernel-module-salsa20-generic \ + kernel-module-scsi-transport-iscsi \ + kernel-module-seed \ + kernel-module-seqiv \ + kernel-module-serpent-generic \ + kernel-module-sha512-generic \ + kernel-module-sit \ + kernel-module-slhc \ + kernel-module-spi-atmel \ + kernel-module-spidev \ + kernel-module-spi-nor \ + kernel-module-stp \ + kernel-module-tea \ + kernel-module-tun \ + kernel-module-twofish-common \ + kernel-module-twofish-generic \ + kernel-module-udc-core \ + kernel-module-udp-tunnel \ + kernel-module-u-ether \ + kernel-module-uio \ + kernel-module-uio-pdrv-genirq \ + kernel-module-usb-f-acm \ + kernel-module-usb-f-ecm \ + kernel-module-usb-f-ecm-subset \ + kernel-module-usb-f-mass-storage \ + kernel-module-usb-f-obex \ + kernel-module-usb-f-rndis \ + kernel-module-usb-f-serial \ + kernel-module-usb-f-ss-lb \ + kernel-module-usbmon \ + kernel-module-usbnet \ + kernel-module-usbserial \ + kernel-module-usb-serial-simple \ + kernel-module-usb-storage \ + kernel-module-u-serial \ + kernel-module-xfrm6-mode-tunnel \ + kernel-module-x-tables \ + kernel-module-xt-classify \ + kernel-module-xt-connmark \ + kernel-module-xt-conntrack \ + kernel-module-xt-ct \ + kernel-module-xt-ecn \ + kernel-module-xt-esp \ + kernel-module-xt-hashlimit \ + kernel-module-xt-hl \ + kernel-module-xt-iprange \ + kernel-module-xt-l2tp \ + kernel-module-xt-led \ + kernel-module-xt-limit \ + kernel-module-xt-log \ + kernel-module-xt-mac \ + kernel-module-xt-mark \ + kernel-module-xt-multiport \ + kernel-module-xt-nat \ + kernel-module-xt-netmap \ + kernel-module-xt-nflog \ + kernel-module-xt-nfqueue \ + kernel-module-xt-policy \ + kernel-module-xt-recent \ + kernel-module-xt-redirect \ + kernel-module-xts \ + kernel-module-xt-set \ + kernel-module-xt-state \ + kernel-module-xt-tcpudp \ + kernel-module-xt-tee \ + kernel-module-xt-time \ + kernel-module-xt-tproxy \ +" diff --git a/recipes-core/images/mtr-modules.inc b/recipes-core/images/mtr-modules.inc new file mode 100644 index 0000000..f5a57b3 --- /dev/null +++ b/recipes-core/images/mtr-modules.inc @@ -0,0 +1,293 @@ +# This file could be improved +# by removing modules not needed +# by MTR. It could also be +# improved by not includeing +# modules that are dependency's +# of other modules. + +IMAGE_INSTALL_append_mtr = "\ + kernel-module-wl12xx \ + kernel-module-wlcore \ + kernel-module-wlcore-sdio \ +" +# Modules for mtrv1 and mtr + +IMAGE_INSTALL_append = " \ + kernel-module-8021q \ + kernel-module-af-alg \ + kernel-module-algif-hash \ + kernel-module-algif-skcipher \ + kernel-module-ansi-cprng \ + kernel-module-anubis \ + kernel-module-arc4 \ + kernel-module-asix \ + kernel-module-at24 \ + kernel-module-at91-udc \ + kernel-module-atmel-mci \ + kernel-module-atmel-usba-udc \ + kernel-module-ax88179-178a \ + kernel-module-bcm203x \ + kernel-module-bfusb \ + kernel-module-blowfish-common \ + kernel-module-blowfish-generic \ + kernel-module-bluetooth \ + kernel-module-bnep \ + kernel-module-bpa10x \ + kernel-module-bridge \ + kernel-module-br-netfilter \ + kernel-module-bsd-comp \ + kernel-module-btbcm \ + kernel-module-btintel \ + kernel-module-btmrvl \ + kernel-module-btmrvl-sdio \ + kernel-module-btqca \ + kernel-module-btsdio \ + kernel-module-cast5-generic \ + kernel-module-cast6-generic \ + kernel-module-cast-common \ + kernel-module-catc \ + kernel-module-ccm \ + kernel-module-cdc-acm \ + kernel-module-cdc-ether \ + kernel-module-cdc-ncm \ + kernel-module-cdc-subset \ + kernel-module-cdc-wdm \ + kernel-module-cfg80211 \ + kernel-module-cmac \ + kernel-module-crc32c-generic \ + kernel-module-crc32-generic \ + kernel-module-ctr \ + kernel-module-cts \ + kernel-module-dm9000 \ + kernel-module-dm9601 \ + kernel-module-dm-log \ + kernel-module-dm-log-userspace \ + kernel-module-dm-mirror \ + kernel-module-dm-mod \ + kernel-module-dm-region-hash \ + kernel-module-dns-resolver \ + kernel-module-dummy \ + kernel-module-ecb \ + kernel-module-eeprom-93cx6 \ + kernel-module-encrypted-keys \ + kernel-module-ext4 \ + kernel-module-fcrypt \ + kernel-module-fscrypto \ + kernel-module-g-acm-ms \ + kernel-module-gadgetfs \ + kernel-module-garp \ + kernel-module-g-cdc \ + kernel-module-gcm \ + kernel-module-g-ether \ + kernel-module-gf128mul \ + kernel-module-ghash-generic \ + kernel-module-gluebi \ + kernel-module-g-mass-storage \ + kernel-module-g-serial \ + kernel-module-g-zero \ + kernel-module-hci-uart \ + kernel-module-hci-vhci \ + kernel-module-hidp \ + kernel-module-i2c-at91 \ + kernel-module-i2c-dev \ + kernel-module-i2c-gpio \ + kernel-module-i2c-slave-eeprom \ + kernel-module-ip6-gre \ + kernel-module-ip6table-filter \ + kernel-module-ip6table-mangle \ + kernel-module-ip6table-nat \ + kernel-module-ip6table-raw \ + kernel-module-ip6-tables \ + kernel-module-ip6t-ah \ + kernel-module-ip6t-eui64 \ + kernel-module-ip6t-frag \ + kernel-module-ip6t-hbh \ + kernel-module-ip6t-ipv6header \ + kernel-module-ip6t-masquerade \ + kernel-module-ip6t-mh \ + kernel-module-ip6t-npt \ + kernel-module-ip6t-reject \ + kernel-module-ip6t-rpfilter \ + kernel-module-ip6t-rt \ + kernel-module-ip6t-synproxy \ + kernel-module-ip6-tunnel \ + kernel-module-ip6-udp-tunnel \ + kernel-module-ip6-vti \ + kernel-module-ipip \ + kernel-module-iptable-filter \ + kernel-module-iptable-mangle \ + kernel-module-iptable-nat \ + kernel-module-iptable-raw \ + kernel-module-ip-tables \ + kernel-module-ipt-ah \ + kernel-module-ipt-clusterip \ + kernel-module-ipt-ecn \ + kernel-module-ipt-masquerade \ + kernel-module-ipt-reject \ + kernel-module-ipt-rpfilter \ + kernel-module-ipt-synproxy \ + kernel-module-ip-vs \ + kernel-module-iscsi-tcp \ + kernel-module-jbd2 \ + kernel-module-khazad \ + kernel-module-l2tp-core \ + kernel-module-l2tp-ppp \ + kernel-module-leds-blinkm \ + kernel-module-leds-regulator \ + kernel-module-ledtrig-gpio \ + kernel-module-ledtrig-heartbeat \ + kernel-module-ledtrig-netdev \ + kernel-module-ledtrig-timer \ + kernel-module-ledtrig-usbport \ + kernel-module-libcomposite \ + kernel-module-libiscsi \ + kernel-module-libiscsi-tcp \ + kernel-module-llc \ + kernel-module-mac80211 \ + kernel-module-mbcache \ + kernel-module-md4 \ + kernel-module-micrel \ + kernel-module-microchip \ + kernel-module-mii \ + kernel-module-mrp \ + kernel-module-mtd-dataflash \ + kernel-module-mtd-nandbiterrs \ + kernel-module-mtd-nandecctest \ + kernel-module-mtd-oobtest \ + kernel-module-mtd-pagetest \ + kernel-module-mtd-readtest \ + kernel-module-mtd-speedtest \ + kernel-module-mtd-stresstest \ + kernel-module-mtd-subpagetest \ + kernel-module-mtd-torturetest \ + kernel-module-nf-conntrack-broadcast \ + kernel-module-nf-conntrack-ftp \ + kernel-module-nf-conntrack-h323 \ + kernel-module-nf-conntrack-ipv4 \ + kernel-module-nf-conntrack-ipv6 \ + kernel-module-nf-conntrack-netbios-ns \ + kernel-module-nf-conntrack-netlink \ + kernel-module-nf-conntrack-pptp \ + kernel-module-nf-conntrack-proto-gre \ + kernel-module-nf-conntrack-sip \ + kernel-module-nf-conntrack-snmp \ + kernel-module-nf-defrag-ipv4 \ + kernel-module-nf-defrag-ipv6 \ + kernel-module-nf-dup-ipv4 \ + kernel-module-nf-dup-ipv6 \ + kernel-module-nf-log-arp \ + kernel-module-nf-log-common \ + kernel-module-nf-log-ipv4 \ + kernel-module-nf-log-ipv6 \ + kernel-module-nf-nat-ftp \ + kernel-module-nf-nat-h323 \ + kernel-module-nf-nat-ipv4 \ + kernel-module-nf-nat-ipv6 \ + kernel-module-nf-nat-masquerade-ipv4 \ + kernel-module-nf-nat-masquerade-ipv6 \ + kernel-module-nf-nat-pptp \ + kernel-module-nf-nat-proto-gre \ + kernel-module-nf-nat-redirect \ + kernel-module-nf-nat-sip \ + kernel-module-nf-nat-snmp-basic \ + kernel-module-nfnetlink-cttimeout \ + kernel-module-nf-reject-ipv4 \ + kernel-module-nf-reject-ipv6 \ + kernel-module-nf-synproxy-core \ + kernel-module-nf-tables-inet \ + kernel-module-nf-tables-ipv4 \ + kernel-module-nf-tables-ipv6 \ + kernel-module-nf-tables-netdev \ + kernel-module-nft-chain-nat-ipv4 \ + kernel-module-nft-exthdr \ + kernel-module-nft-meta \ + kernel-module-option \ + kernel-module-p8022 \ + kernel-module-ppp-async \ + kernel-module-ppp-deflate \ + kernel-module-ppp-generic \ + kernel-module-ppp-mppe \ + kernel-module-pppoe \ + kernel-module-pppox \ + kernel-module-pps-core \ + kernel-module-pps-gpio \ + kernel-module-pps-ktimer \ + kernel-module-pps-ldisc \ + kernel-module-pptp \ + kernel-module-psnap \ + kernel-module-ptp \ + kernel-module-pwm-atmel-tcb \ + kernel-module-qmi-wwan \ + kernel-module-rfcomm \ + kernel-module-rfkill \ + kernel-module-rfkill-gpio \ + kernel-module-rfkill-regulator \ + kernel-module-rndis-host \ + kernel-module-rndis-wlan \ + kernel-module-salsa20-generic \ + kernel-module-scsi-transport-iscsi \ + kernel-module-seed \ + kernel-module-seqiv \ + kernel-module-serpent-generic \ + kernel-module-sha512-generic \ + kernel-module-sit \ + kernel-module-slhc \ + kernel-module-spidev \ + kernel-module-spi-nor \ + kernel-module-stp \ + kernel-module-tea \ + kernel-module-tun \ + kernel-module-twofish-common \ + kernel-module-twofish-generic \ + kernel-module-udc-core \ + kernel-module-udp-tunnel \ + kernel-module-u-ether \ + kernel-module-uio \ + kernel-module-uio-pdrv-genirq \ + kernel-module-usb-f-acm \ + kernel-module-usb-f-ecm \ + kernel-module-usb-f-ecm-subset \ + kernel-module-usb-f-mass-storage \ + kernel-module-usb-f-obex \ + kernel-module-usb-f-rndis \ + kernel-module-usb-f-serial \ + kernel-module-usb-f-ss-lb \ + kernel-module-usbmon \ + kernel-module-usbnet \ + kernel-module-usbserial \ + kernel-module-usb-serial-simple \ + kernel-module-usb-storage \ + kernel-module-u-serial \ + kernel-module-xfrm6-mode-tunnel \ + kernel-module-x-tables \ + kernel-module-xt-classify \ + kernel-module-xt-connmark \ + kernel-module-xt-conntrack \ + kernel-module-xt-ct \ + kernel-module-xt-ecn \ + kernel-module-xt-esp \ + kernel-module-xt-hashlimit \ + kernel-module-xt-hl \ + kernel-module-xt-iprange \ + kernel-module-xt-l2tp \ + kernel-module-xt-led \ + kernel-module-xt-limit \ + kernel-module-xt-log \ + kernel-module-xt-mac \ + kernel-module-xt-mark \ + kernel-module-xt-multiport \ + kernel-module-xt-nat \ + kernel-module-xt-netmap \ + kernel-module-xt-nflog \ + kernel-module-xt-nfqueue \ + kernel-module-xt-policy \ + kernel-module-xt-recent \ + kernel-module-xt-redirect \ + kernel-module-xts \ + kernel-module-xt-set \ + kernel-module-xt-state \ + kernel-module-xt-tcpudp \ + kernel-module-xt-tee \ + kernel-module-xt-time \ + kernel-module-xt-tproxy \ +" diff --git a/recipes-core/mlinux-scripts/mlinux-scripts/mlinux-firmware-upgrade b/recipes-core/mlinux-scripts/mlinux-scripts/mlinux-firmware-upgrade new file mode 100755 index 0000000..a377309 --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts/mlinux-firmware-upgrade @@ -0,0 +1,69 @@ +#!/bin/bash +dofile=/var/volatile/do_flash_upgrade + +if [ $# != 1 ]; then + echo "Usage: $0 upgrade.bin" + exit 1 +fi + +set -e +upgrade=$1 + +mkdir -p /var/volatile +cd /var/volatile + +# make sure firmware is for this device +hw_version=$(cat /sys/devices/platform/mts-io/hw-version) +firmware_model=$(tar -xO -f $upgrade model) +shopt -s nocasematch +if [[ ! "$hw_version" =~ ^$firmware_model- ]]; then + logger -s -t firmware_upgrade "Wrong firmware for this hardware" + logger -s -t firmware_upgrade "hw version: $hw_version" + logger -s -t firmware_upgrade "firmware model: $firmware_model" + exit 1 +fi + +files=(bstrap.bin uboot.bin uImage.bin config.jffs2 oem.jffs2 rootfs.jffs2 install.sh) + +tobeflashed=0 +# verify all MD5 sums +for (( i = 0; i < ${#files[@]}; i++ )); do + file=${files[i]} + # if the file is in the tar, md5sum it + if tar -t -f $upgrade | grep -F -q "$file"; then + logger -s -t firmware_upgrade "Checking MD5 for $file..." + if ! tar -x -f $upgrade $file.md5; then + logger -s -t firmware_upgrade "MD5 is not found for the $file, upgrade aborted" + exit 1 + fi + if ! tar -xO -f $upgrade $file | md5sum -c $file.md5; then + logger -s -t firmware_upgrade "MD5 check failed, upgrade aborted" + exit 1 + fi + tobeflashed=1 + fi +done + +if (( $tobeflashed )); then + mkdir -p /var/volatile/flash-upgrade + mv -f $upgrade /var/volatile/flash-upgrade/upgrade.bin + touch "${dofile}" + chown "root:root" "${dofile}" || true + uid=$(stat -c %u "${dofile}") || true + result=$? + if ((result != 0)) ; then + logger -s -t firmware_upgrade "Cannot create ${dofile}" + exit 1 + fi + if ((uid != 0)) ; then + logger -s -t firmware_upgrade "Cannot set ownership of ${dofile} to root" + exit 1 + fi + logger -s -t firmware_upgrade "Rebooting" + sleep 1 + reboot + exit 0 +else + logger -s -t firmware_upgrade "Nothing to be flashed!" + exit 1 +fi diff --git a/recipes-core/mlinux-scripts/mlinux-scripts_%.bbappend b/recipes-core/mlinux-scripts/mlinux-scripts_%.bbappend new file mode 100644 index 0000000..ecda287 --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts_%.bbappend @@ -0,0 +1,13 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PR .= ".mlinux0" + +SRC_URI += " \ + file://mlinux-firmware-upgrade \ +" + +do_install_append() { + install -d ${D}${sbindir} ${D}${sbindir} + install -m 755 ${WORKDIR}/mlinux-firmware-upgrade ${D}${sbindir} +} + diff --git a/recipes-core/udev/eudev/mtcap/mtcap.rules b/recipes-core/udev/eudev/mtcap/mtcap.rules new file mode 100644 index 0000000..a0dc9fb --- /dev/null +++ b/recipes-core/udev/eudev/mtcap/mtcap.rules @@ -0,0 +1,8 @@ +ACTION=="remove", GOTO="mlinux_end" +SUBSYSTEM!="tty", GOTO="mlinux_end" +KERNEL!="ttyXRUSB[0-9]*", GOTO="mlinux_end" + +SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" +ENV{ID_IFACE}=="", GOTO="mlinux_end" + +LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtcdt/accessory_ethernet.rules b/recipes-core/udev/eudev/mtcdt/accessory_ethernet.rules new file mode 100644 index 0000000..376486b --- /dev/null +++ b/recipes-core/udev/eudev/mtcdt/accessory_ethernet.rules @@ -0,0 +1,21 @@ +#To add new rule for new device you have to run (in case if you want to add eth1 interface) +#admin@mtcdt:~# udevadm info --attribute-walk --path=/sys/class/net/eth1 +# looking at device '/devices/ahb.0/700000.ehci/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.0/net/eth1': +# KERNEL=="eth1" +# SUBSYSTEM=="net" +# DRIVER=="" +# ATTR{mtu}=="1500" +# ATTR{type}=="1" +# ........... +# ........... + +# looking at parent device '/devices/ahb.0/700000.ehci/usb1/1-2/1-2.1/1-2.1.1/1-2.1.1:1.0': +# KERNELS=="1-2.1.1:1.0" <------------------- extract this record to add to the rule +# SUBSYSTEMS=="usb" +# DRIVERS=="smsc75xx" +# ATTRS{bInterfaceClass}=="ff" +# ATTRS{bInterfaceSubClass}=="00" +# ........... + +KERNELS=="1-2.1.1:1.0", SUBSYSTEMS=="usb", DRIVERS=="smsc75xx", NAME="eth1" +KERNELS=="1-2.1.2:1.0", SUBSYSTEMS=="usb", DRIVERS=="smsc75xx", NAME="eth2" diff --git a/recipes-core/udev/eudev/mtcdt/mtcdt.rules b/recipes-core/udev/eudev/mtcdt/mtcdt.rules new file mode 100644 index 0000000..5d528e6 --- /dev/null +++ b/recipes-core/udev/eudev/mtcdt/mtcdt.rules @@ -0,0 +1,14 @@ +ACTION=="remove", GOTO="mlinux_end" +SUBSYSTEM!="tty", GOTO="mlinux_end" +KERNEL!="ttyXRUSB[0-9]*", GOTO="mlinux_end" + +SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" +ENV{ID_IFACE}=="", GOTO="mlinux_end" + +# Accessory Ports +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="00", SYMLINK+="ttyAP1" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1414", ENV{ID_IFACE}=="02", SYMLINK+="ttyAP2" + +LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtr/mtr.rules b/recipes-core/udev/eudev/mtr/mtr.rules new file mode 100644 index 0000000..239a846 --- /dev/null +++ b/recipes-core/udev/eudev/mtr/mtr.rules @@ -0,0 +1,13 @@ +ACTION=="remove", GOTO="mlinux_end" +SUBSYSTEM!="tty", GOTO="mlinux_end" +KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*|ttyXRUSB[0-9]*|ttyS*", GOTO="mlinux_end" + +SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" +ENV{ID_IFACE}=="", GOTO="mlinux_end" + +# mtr revA: bluetooth on exar chip (ACM0, iface 0) +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="bt" +# mtr revA: external serial on exar chip (ACM1, iface 2) +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ext_serial" + +LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev/mtrv1/mtrv1.rules b/recipes-core/udev/eudev/mtrv1/mtrv1.rules new file mode 100644 index 0000000..239a846 --- /dev/null +++ b/recipes-core/udev/eudev/mtrv1/mtrv1.rules @@ -0,0 +1,13 @@ +ACTION=="remove", GOTO="mlinux_end" +SUBSYSTEM!="tty", GOTO="mlinux_end" +KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*|ttyXRUSB[0-9]*|ttyS*", GOTO="mlinux_end" + +SUBSYSTEMS=="usb", ENV{ID_IFACE}="$attr{bInterfaceNumber}" +ENV{ID_IFACE}=="", GOTO="mlinux_end" + +# mtr revA: bluetooth on exar chip (ACM0, iface 0) +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="00", SYMLINK+="bt" +# mtr revA: external serial on exar chip (ACM1, iface 2) +ATTRS{idVendor}=="04e2", ATTRS{idProduct}=="1412", ENV{ID_IFACE}=="02", SYMLINK+="ext_serial" + +LABEL="mlinux_end" diff --git a/recipes-core/udev/eudev_%.bbappend b/recipes-core/udev/eudev_%.bbappend new file mode 100644 index 0000000..ac17fc2 --- /dev/null +++ b/recipes-core/udev/eudev_%.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PR .= ".mlinux6" + +SRC_URI_append_mtcdt = " \ + file://accessory_ethernet.rules \ + " + +do_install_append_mtcdt() { + install -m 644 ${WORKDIR}/accessory_ethernet.rules ${D}${sysconfdir}/udev/rules.d/ +} diff --git a/scripts/build-feed-extras.sh b/scripts/build-feed-extras.sh new file mode 100755 index 0000000..99b9e40 --- /dev/null +++ b/scripts/build-feed-extras.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Extra packages to build for mLinux feed +FS_PACKAGES="sshfs-fuse fuse-exfat exfat-utils" +NET_PACKAGES="wget netcat ipsec-tools openvpn iftop dnsmasq strongswan stunnel tunctl ethtool openobex obexftp socat openldap" +RS9113TEST_PACKAGES="config-wifi-bt-ap rs9113rf" +UTIL_PACKAGES="logrotate fatrace stressapptest gawk rsyslog zip gnupg rrdtool i2c-tools spitools memtester" +DEV_PACKAGES="strace mono gdb git vim python-pip python3-pip python-pyopenssl python-pygobject openjdk-8 strace python-gatt-server python-cryptography" +SUP_PACKAGES="pps-tools setserial boost diffutils postgresql devmem2" + +bitbake linux-firmware $FS_PACKAGES $NET_PACKAGES $UTIL_PACKAGES $DEV_PACKAGES $SUP_PACKAGES $RS9113TEST_PACKAGES -- cgit v1.2.3