From 99bd0e9c636eaf20e4b391ae145f15e4d0a0388a Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 7 Dec 2021 12:41:52 -0600 Subject: Support for MTCDTIP with overlay --- recipes-bsp/multitech/mt-dt-overlay_1.1.1.bb | 96 ---------------------------- recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb | 96 ++++++++++++++++++++++++++++ recipes-bsp/multitech/mts-io.inc | 2 +- recipes-bsp/multitech/mts-io/mts-io.conf | 3 + recipes-bsp/multitech/mts-io/mts-io.init | 2 +- recipes-bsp/multitech/mts-io_4.8.0.bb | 2 - recipes-bsp/multitech/mts-io_4.8.2.bb | 2 + 7 files changed, 103 insertions(+), 100 deletions(-) delete mode 100644 recipes-bsp/multitech/mt-dt-overlay_1.1.1.bb create mode 100644 recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb delete mode 100644 recipes-bsp/multitech/mts-io_4.8.0.bb create mode 100644 recipes-bsp/multitech/mts-io_4.8.2.bb diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.1.1.bb b/recipes-bsp/multitech/mt-dt-overlay_1.1.1.bb deleted file mode 100644 index 09c8f4a..0000000 --- a/recipes-bsp/multitech/mt-dt-overlay_1.1.1.bb +++ /dev/null @@ -1,96 +0,0 @@ -DESCRIPTION = "Compile MT board device tree overlays" -LICENSE = "(GPLv2+)" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit update-rc.d -INITSCRIPT_NAME = "${PN}" -# mt-dt-overlay must start before mts-io -# because the gpio-leds driver will not load -# after mts-io. -INITSCRIPT_PARAMS = "start 39 S ." -DEPENDS = "dtc-native linux-at91" -RDEPENDS_${PN} = "bash" - - -COMPATIBLE_MACHINE = "(mtcap|mtrv1|mtcdt)" - -# By using an overlay, we should be able to support multiple pinouts -# using the same image. The overlays go into /lib/dtoverlays. -# There names are: [hw-version]-driver.dtbo -# e.g. /lib/dtoverlays/MTRV1-0.0-pps.dtbo -# The idea is that mts-io will search for the overlays, and install the -# appropriate device tree overlay for the current hw-version. - -dt_dir = "/lib/dtoverlays" - -PR = "r3" - -SRC_URI = " \ - git://git.multitech.net/mt-dt-overlay.git;protocol=git \ - file://init \ -" - -SRCREV = "${PV}" - -DEPENDS = "virtual/kernel u-boot-mkimage-native" - -S = "${WORKDIR}/git" - -do_compile[depends] += "virtual/kernel:do_deploy virtual/kernel:do_shared_workdir" -do_compile[nostamp] = "1" - -# Make sure we are using the Yocto version of DTC, not what is installed in /usr/bin -DTC_BIN_DIR = "${COMPONENTS_DIR}/x86_64/dtc-native/usr/bin" - -do_compile () { - echo MACHINE is ${MACHINE} - oe_runmake DTC=${DTC_BIN_DIR}/dtc KERNEL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${KERNEL_PATH} ${MACHINE}_dtbos -} - -FILES_${PN} = "${dt_dir} ${sysconfdir}" - -addtask install after do_compile - -# The destination and any symlinks are defined in the source file. -# -# A line starting as follows " * Put: [destination]" in the source -# defines the destination file name for the device tree binaries. -# -# A line starting as follows " * Link: [destination]" defines a symlink -# to the device tree binary file. -# -do_install () { - install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/${PN} - # Copy files to /lib/dt-overlay/main (mtac cards will be in mtac) - if [ -e ${AT91BOOTSTRAP_MACHINE} ]; then - install -d ${D}/${dt_dir} - ( - cd ${MACHINE} - echo "Current directory is $(pwd)" - for f in *.dtbo ; do - s=$(basename -s .dtbo $f).dtso - location_ln=$(egrep '^[[:space:]]*\*[[:space:]]*Put:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Put:[[:space:]]*//') - echo "Binary: $f Source: $s" - echo "Destination: $location_ln" - dirname=$(dirname $location_ln) - install -d ${D}/${dt_dir}/$dirname - install ${f} ${D}/${dt_dir}/$location_ln - links=$(egrep '^[[:space:]]*\*[[:space:]]*Link:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Link:[[:space:]]*//') - echo "All Links: " - echo "$links" - echo "End links" - for l in $links ; do - ldirname=$(dirname $l) - if ! [ -d "${D}/$ldirname" ] ; then - install -d ${D}/${dt_dir}/$ldirname - fi - echo ln -sf ${dt_dir}/$dirname/$f ${D}/${dt_dir}/$l - ln -sf ${dt_dir}/$location_ln ${D}/${dt_dir}/$l - done - done - ) - fi -} - diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb b/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb new file mode 100644 index 0000000..09c8f4a --- /dev/null +++ b/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb @@ -0,0 +1,96 @@ +DESCRIPTION = "Compile MT board device tree overlays" +LICENSE = "(GPLv2+)" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit update-rc.d +INITSCRIPT_NAME = "${PN}" +# mt-dt-overlay must start before mts-io +# because the gpio-leds driver will not load +# after mts-io. +INITSCRIPT_PARAMS = "start 39 S ." +DEPENDS = "dtc-native linux-at91" +RDEPENDS_${PN} = "bash" + + +COMPATIBLE_MACHINE = "(mtcap|mtrv1|mtcdt)" + +# By using an overlay, we should be able to support multiple pinouts +# using the same image. The overlays go into /lib/dtoverlays. +# There names are: [hw-version]-driver.dtbo +# e.g. /lib/dtoverlays/MTRV1-0.0-pps.dtbo +# The idea is that mts-io will search for the overlays, and install the +# appropriate device tree overlay for the current hw-version. + +dt_dir = "/lib/dtoverlays" + +PR = "r3" + +SRC_URI = " \ + git://git.multitech.net/mt-dt-overlay.git;protocol=git \ + file://init \ +" + +SRCREV = "${PV}" + +DEPENDS = "virtual/kernel u-boot-mkimage-native" + +S = "${WORKDIR}/git" + +do_compile[depends] += "virtual/kernel:do_deploy virtual/kernel:do_shared_workdir" +do_compile[nostamp] = "1" + +# Make sure we are using the Yocto version of DTC, not what is installed in /usr/bin +DTC_BIN_DIR = "${COMPONENTS_DIR}/x86_64/dtc-native/usr/bin" + +do_compile () { + echo MACHINE is ${MACHINE} + oe_runmake DTC=${DTC_BIN_DIR}/dtc KERNEL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${KERNEL_PATH} ${MACHINE}_dtbos +} + +FILES_${PN} = "${dt_dir} ${sysconfdir}" + +addtask install after do_compile + +# The destination and any symlinks are defined in the source file. +# +# A line starting as follows " * Put: [destination]" in the source +# defines the destination file name for the device tree binaries. +# +# A line starting as follows " * Link: [destination]" defines a symlink +# to the device tree binary file. +# +do_install () { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/${PN} + # Copy files to /lib/dt-overlay/main (mtac cards will be in mtac) + if [ -e ${AT91BOOTSTRAP_MACHINE} ]; then + install -d ${D}/${dt_dir} + ( + cd ${MACHINE} + echo "Current directory is $(pwd)" + for f in *.dtbo ; do + s=$(basename -s .dtbo $f).dtso + location_ln=$(egrep '^[[:space:]]*\*[[:space:]]*Put:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Put:[[:space:]]*//') + echo "Binary: $f Source: $s" + echo "Destination: $location_ln" + dirname=$(dirname $location_ln) + install -d ${D}/${dt_dir}/$dirname + install ${f} ${D}/${dt_dir}/$location_ln + links=$(egrep '^[[:space:]]*\*[[:space:]]*Link:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Link:[[:space:]]*//') + echo "All Links: " + echo "$links" + echo "End links" + for l in $links ; do + ldirname=$(dirname $l) + if ! [ -d "${D}/$ldirname" ] ; then + install -d ${D}/${dt_dir}/$ldirname + fi + echo ln -sf ${dt_dir}/$dirname/$f ${D}/${dt_dir}/$l + ln -sf ${dt_dir}/$location_ln ${D}/${dt_dir}/$l + done + done + ) + fi +} + diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc index 10d4527..9fa0cc7 100644 --- a/recipes-bsp/multitech/mts-io.inc +++ b/recipes-bsp/multitech/mts-io.inc @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://io-module/COPYING;md5=94d55d512a9ba36caa9b7df079bae19 file://io-tool/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ " do_fetch[depends] += "virtual/kernel:do_shared_workdir" -INC_PR = "r6" +INC_PR = "r1" SRCREV = "${PV}" PR = "${INC_PR}.0" diff --git a/recipes-bsp/multitech/mts-io/mts-io.conf b/recipes-bsp/multitech/mts-io/mts-io.conf index 4ed5e31..977346e 100644 --- a/recipes-bsp/multitech/mts-io/mts-io.conf +++ b/recipes-bsp/multitech/mts-io/mts-io.conf @@ -17,3 +17,6 @@ SUPERCAPFULL=1 # SUPERCAPFULL_MAXWAIT=180 +# Print dynamic debug for mts-io to kernel +# ring buffer (dmesg) +# MTS_IO_PARAMS="dyndbg==pmf" diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init index cd93fbb..6331818 100755 --- a/recipes-bsp/multitech/mts-io/mts-io.init +++ b/recipes-bsp/multitech/mts-io/mts-io.init @@ -325,7 +325,7 @@ case $1 in echo -n ${i2c} > /sys/module/firmware_class/parameters/path /usr/bin/logger -t "mts-io" -p daemon.info -s "Loading mts-io module" - if ! modprobe mts_io ; then + if ! modprobe mts_io "$MTS_IO_PARAMS" ; then ((fail++)) fi # MTCDTBB driver is needed to determine the product type on MTCDT3 diff --git a/recipes-bsp/multitech/mts-io_4.8.0.bb b/recipes-bsp/multitech/mts-io_4.8.0.bb deleted file mode 100644 index ee4fcfa..0000000 --- a/recipes-bsp/multitech/mts-io_4.8.0.bb +++ /dev/null @@ -1,2 +0,0 @@ -require mts-io.inc - diff --git a/recipes-bsp/multitech/mts-io_4.8.2.bb b/recipes-bsp/multitech/mts-io_4.8.2.bb new file mode 100644 index 0000000..ee4fcfa --- /dev/null +++ b/recipes-bsp/multitech/mts-io_4.8.2.bb @@ -0,0 +1,2 @@ +require mts-io.inc + -- cgit v1.2.3 From 7ed54c3d2cb9300da440f85c1a077a013aefee4a Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 7 Dec 2021 13:22:18 -0600 Subject: suppress rs9113 reset until /etc/init.d/rs9113 --- recipes-bsp/multitech/mts-io/mts-io.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init index 6331818..6bb9e69 100755 --- a/recipes-bsp/multitech/mts-io/mts-io.init +++ b/recipes-bsp/multitech/mts-io/mts-io.init @@ -362,7 +362,7 @@ case $1 in # MTCDT-0.2 has issues with resetting RS9113 twice. # RS9113 is reset in /etc/init.d/rs9113. # Remove for MTRV1 reset as well, as it is redundant. - if [[ $hw_name == MTCDT ]] || [[ $hw_name == MTRV1 ]] ; then + if [[ $hw_name == MTCDT ]] || [[ $hw_name == MTRV1 ]] || [[ $hw_name == MTCDTIP ]] ; then RST[${WIFIBTRESET}]="/dev/null" fi reset_array -- cgit v1.2.3 From da51ac1e7b46ed68ed46b57bbae464b8c43f6b31 Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 14 Dec 2021 12:41:28 -0600 Subject: Enable EHCI (High speed USB) for MTCDT-0.0 and MTCDT-0.1 --- recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb | 96 ---------------------------- recipes-bsp/multitech/mt-dt-overlay_1.1.3.bb | 96 ++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 96 deletions(-) delete mode 100644 recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb create mode 100644 recipes-bsp/multitech/mt-dt-overlay_1.1.3.bb diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb b/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb deleted file mode 100644 index 09c8f4a..0000000 --- a/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb +++ /dev/null @@ -1,96 +0,0 @@ -DESCRIPTION = "Compile MT board device tree overlays" -LICENSE = "(GPLv2+)" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit update-rc.d -INITSCRIPT_NAME = "${PN}" -# mt-dt-overlay must start before mts-io -# because the gpio-leds driver will not load -# after mts-io. -INITSCRIPT_PARAMS = "start 39 S ." -DEPENDS = "dtc-native linux-at91" -RDEPENDS_${PN} = "bash" - - -COMPATIBLE_MACHINE = "(mtcap|mtrv1|mtcdt)" - -# By using an overlay, we should be able to support multiple pinouts -# using the same image. The overlays go into /lib/dtoverlays. -# There names are: [hw-version]-driver.dtbo -# e.g. /lib/dtoverlays/MTRV1-0.0-pps.dtbo -# The idea is that mts-io will search for the overlays, and install the -# appropriate device tree overlay for the current hw-version. - -dt_dir = "/lib/dtoverlays" - -PR = "r3" - -SRC_URI = " \ - git://git.multitech.net/mt-dt-overlay.git;protocol=git \ - file://init \ -" - -SRCREV = "${PV}" - -DEPENDS = "virtual/kernel u-boot-mkimage-native" - -S = "${WORKDIR}/git" - -do_compile[depends] += "virtual/kernel:do_deploy virtual/kernel:do_shared_workdir" -do_compile[nostamp] = "1" - -# Make sure we are using the Yocto version of DTC, not what is installed in /usr/bin -DTC_BIN_DIR = "${COMPONENTS_DIR}/x86_64/dtc-native/usr/bin" - -do_compile () { - echo MACHINE is ${MACHINE} - oe_runmake DTC=${DTC_BIN_DIR}/dtc KERNEL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${KERNEL_PATH} ${MACHINE}_dtbos -} - -FILES_${PN} = "${dt_dir} ${sysconfdir}" - -addtask install after do_compile - -# The destination and any symlinks are defined in the source file. -# -# A line starting as follows " * Put: [destination]" in the source -# defines the destination file name for the device tree binaries. -# -# A line starting as follows " * Link: [destination]" defines a symlink -# to the device tree binary file. -# -do_install () { - install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/${PN} - # Copy files to /lib/dt-overlay/main (mtac cards will be in mtac) - if [ -e ${AT91BOOTSTRAP_MACHINE} ]; then - install -d ${D}/${dt_dir} - ( - cd ${MACHINE} - echo "Current directory is $(pwd)" - for f in *.dtbo ; do - s=$(basename -s .dtbo $f).dtso - location_ln=$(egrep '^[[:space:]]*\*[[:space:]]*Put:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Put:[[:space:]]*//') - echo "Binary: $f Source: $s" - echo "Destination: $location_ln" - dirname=$(dirname $location_ln) - install -d ${D}/${dt_dir}/$dirname - install ${f} ${D}/${dt_dir}/$location_ln - links=$(egrep '^[[:space:]]*\*[[:space:]]*Link:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Link:[[:space:]]*//') - echo "All Links: " - echo "$links" - echo "End links" - for l in $links ; do - ldirname=$(dirname $l) - if ! [ -d "${D}/$ldirname" ] ; then - install -d ${D}/${dt_dir}/$ldirname - fi - echo ln -sf ${dt_dir}/$dirname/$f ${D}/${dt_dir}/$l - ln -sf ${dt_dir}/$location_ln ${D}/${dt_dir}/$l - done - done - ) - fi -} - diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.1.3.bb b/recipes-bsp/multitech/mt-dt-overlay_1.1.3.bb new file mode 100644 index 0000000..09c8f4a --- /dev/null +++ b/recipes-bsp/multitech/mt-dt-overlay_1.1.3.bb @@ -0,0 +1,96 @@ +DESCRIPTION = "Compile MT board device tree overlays" +LICENSE = "(GPLv2+)" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit update-rc.d +INITSCRIPT_NAME = "${PN}" +# mt-dt-overlay must start before mts-io +# because the gpio-leds driver will not load +# after mts-io. +INITSCRIPT_PARAMS = "start 39 S ." +DEPENDS = "dtc-native linux-at91" +RDEPENDS_${PN} = "bash" + + +COMPATIBLE_MACHINE = "(mtcap|mtrv1|mtcdt)" + +# By using an overlay, we should be able to support multiple pinouts +# using the same image. The overlays go into /lib/dtoverlays. +# There names are: [hw-version]-driver.dtbo +# e.g. /lib/dtoverlays/MTRV1-0.0-pps.dtbo +# The idea is that mts-io will search for the overlays, and install the +# appropriate device tree overlay for the current hw-version. + +dt_dir = "/lib/dtoverlays" + +PR = "r3" + +SRC_URI = " \ + git://git.multitech.net/mt-dt-overlay.git;protocol=git \ + file://init \ +" + +SRCREV = "${PV}" + +DEPENDS = "virtual/kernel u-boot-mkimage-native" + +S = "${WORKDIR}/git" + +do_compile[depends] += "virtual/kernel:do_deploy virtual/kernel:do_shared_workdir" +do_compile[nostamp] = "1" + +# Make sure we are using the Yocto version of DTC, not what is installed in /usr/bin +DTC_BIN_DIR = "${COMPONENTS_DIR}/x86_64/dtc-native/usr/bin" + +do_compile () { + echo MACHINE is ${MACHINE} + oe_runmake DTC=${DTC_BIN_DIR}/dtc KERNEL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${KERNEL_PATH} ${MACHINE}_dtbos +} + +FILES_${PN} = "${dt_dir} ${sysconfdir}" + +addtask install after do_compile + +# The destination and any symlinks are defined in the source file. +# +# A line starting as follows " * Put: [destination]" in the source +# defines the destination file name for the device tree binaries. +# +# A line starting as follows " * Link: [destination]" defines a symlink +# to the device tree binary file. +# +do_install () { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/${PN} + # Copy files to /lib/dt-overlay/main (mtac cards will be in mtac) + if [ -e ${AT91BOOTSTRAP_MACHINE} ]; then + install -d ${D}/${dt_dir} + ( + cd ${MACHINE} + echo "Current directory is $(pwd)" + for f in *.dtbo ; do + s=$(basename -s .dtbo $f).dtso + location_ln=$(egrep '^[[:space:]]*\*[[:space:]]*Put:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Put:[[:space:]]*//') + echo "Binary: $f Source: $s" + echo "Destination: $location_ln" + dirname=$(dirname $location_ln) + install -d ${D}/${dt_dir}/$dirname + install ${f} ${D}/${dt_dir}/$location_ln + links=$(egrep '^[[:space:]]*\*[[:space:]]*Link:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Link:[[:space:]]*//') + echo "All Links: " + echo "$links" + echo "End links" + for l in $links ; do + ldirname=$(dirname $l) + if ! [ -d "${D}/$ldirname" ] ; then + install -d ${D}/${dt_dir}/$ldirname + fi + echo ln -sf ${dt_dir}/$dirname/$f ${D}/${dt_dir}/$l + ln -sf ${dt_dir}/$location_ln ${D}/${dt_dir}/$l + done + done + ) + fi +} + -- cgit v1.2.3 From 74db6dc904c912146af39d423474ed35612be4b7 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 15 Dec 2021 07:17:41 -0600 Subject: Set EHCI (High Speed USB) by default for MTCDT --- recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb | 96 ++++++++++++++++++++++++++++ recipes-bsp/multitech/mt-dt-overlay_1.1.3.bb | 96 ---------------------------- 2 files changed, 96 insertions(+), 96 deletions(-) create mode 100644 recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb delete mode 100644 recipes-bsp/multitech/mt-dt-overlay_1.1.3.bb diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb b/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb new file mode 100644 index 0000000..09c8f4a --- /dev/null +++ b/recipes-bsp/multitech/mt-dt-overlay_1.1.2.bb @@ -0,0 +1,96 @@ +DESCRIPTION = "Compile MT board device tree overlays" +LICENSE = "(GPLv2+)" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +PACKAGE_ARCH = "${MACHINE_ARCH}" + +inherit update-rc.d +INITSCRIPT_NAME = "${PN}" +# mt-dt-overlay must start before mts-io +# because the gpio-leds driver will not load +# after mts-io. +INITSCRIPT_PARAMS = "start 39 S ." +DEPENDS = "dtc-native linux-at91" +RDEPENDS_${PN} = "bash" + + +COMPATIBLE_MACHINE = "(mtcap|mtrv1|mtcdt)" + +# By using an overlay, we should be able to support multiple pinouts +# using the same image. The overlays go into /lib/dtoverlays. +# There names are: [hw-version]-driver.dtbo +# e.g. /lib/dtoverlays/MTRV1-0.0-pps.dtbo +# The idea is that mts-io will search for the overlays, and install the +# appropriate device tree overlay for the current hw-version. + +dt_dir = "/lib/dtoverlays" + +PR = "r3" + +SRC_URI = " \ + git://git.multitech.net/mt-dt-overlay.git;protocol=git \ + file://init \ +" + +SRCREV = "${PV}" + +DEPENDS = "virtual/kernel u-boot-mkimage-native" + +S = "${WORKDIR}/git" + +do_compile[depends] += "virtual/kernel:do_deploy virtual/kernel:do_shared_workdir" +do_compile[nostamp] = "1" + +# Make sure we are using the Yocto version of DTC, not what is installed in /usr/bin +DTC_BIN_DIR = "${COMPONENTS_DIR}/x86_64/dtc-native/usr/bin" + +do_compile () { + echo MACHINE is ${MACHINE} + oe_runmake DTC=${DTC_BIN_DIR}/dtc KERNEL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${KERNEL_PATH} ${MACHINE}_dtbos +} + +FILES_${PN} = "${dt_dir} ${sysconfdir}" + +addtask install after do_compile + +# The destination and any symlinks are defined in the source file. +# +# A line starting as follows " * Put: [destination]" in the source +# defines the destination file name for the device tree binaries. +# +# A line starting as follows " * Link: [destination]" defines a symlink +# to the device tree binary file. +# +do_install () { + install -d ${D}/${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/${PN} + # Copy files to /lib/dt-overlay/main (mtac cards will be in mtac) + if [ -e ${AT91BOOTSTRAP_MACHINE} ]; then + install -d ${D}/${dt_dir} + ( + cd ${MACHINE} + echo "Current directory is $(pwd)" + for f in *.dtbo ; do + s=$(basename -s .dtbo $f).dtso + location_ln=$(egrep '^[[:space:]]*\*[[:space:]]*Put:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Put:[[:space:]]*//') + echo "Binary: $f Source: $s" + echo "Destination: $location_ln" + dirname=$(dirname $location_ln) + install -d ${D}/${dt_dir}/$dirname + install ${f} ${D}/${dt_dir}/$location_ln + links=$(egrep '^[[:space:]]*\*[[:space:]]*Link:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Link:[[:space:]]*//') + echo "All Links: " + echo "$links" + echo "End links" + for l in $links ; do + ldirname=$(dirname $l) + if ! [ -d "${D}/$ldirname" ] ; then + install -d ${D}/${dt_dir}/$ldirname + fi + echo ln -sf ${dt_dir}/$dirname/$f ${D}/${dt_dir}/$l + ln -sf ${dt_dir}/$location_ln ${D}/${dt_dir}/$l + done + done + ) + fi +} + diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.1.3.bb b/recipes-bsp/multitech/mt-dt-overlay_1.1.3.bb deleted file mode 100644 index 09c8f4a..0000000 --- a/recipes-bsp/multitech/mt-dt-overlay_1.1.3.bb +++ /dev/null @@ -1,96 +0,0 @@ -DESCRIPTION = "Compile MT board device tree overlays" -LICENSE = "(GPLv2+)" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -PACKAGE_ARCH = "${MACHINE_ARCH}" - -inherit update-rc.d -INITSCRIPT_NAME = "${PN}" -# mt-dt-overlay must start before mts-io -# because the gpio-leds driver will not load -# after mts-io. -INITSCRIPT_PARAMS = "start 39 S ." -DEPENDS = "dtc-native linux-at91" -RDEPENDS_${PN} = "bash" - - -COMPATIBLE_MACHINE = "(mtcap|mtrv1|mtcdt)" - -# By using an overlay, we should be able to support multiple pinouts -# using the same image. The overlays go into /lib/dtoverlays. -# There names are: [hw-version]-driver.dtbo -# e.g. /lib/dtoverlays/MTRV1-0.0-pps.dtbo -# The idea is that mts-io will search for the overlays, and install the -# appropriate device tree overlay for the current hw-version. - -dt_dir = "/lib/dtoverlays" - -PR = "r3" - -SRC_URI = " \ - git://git.multitech.net/mt-dt-overlay.git;protocol=git \ - file://init \ -" - -SRCREV = "${PV}" - -DEPENDS = "virtual/kernel u-boot-mkimage-native" - -S = "${WORKDIR}/git" - -do_compile[depends] += "virtual/kernel:do_deploy virtual/kernel:do_shared_workdir" -do_compile[nostamp] = "1" - -# Make sure we are using the Yocto version of DTC, not what is installed in /usr/bin -DTC_BIN_DIR = "${COMPONENTS_DIR}/x86_64/dtc-native/usr/bin" - -do_compile () { - echo MACHINE is ${MACHINE} - oe_runmake DTC=${DTC_BIN_DIR}/dtc KERNEL_DIR=${STAGING_KERNEL_DIR} KERNEL_BUILD_DIR=${KERNEL_PATH} ${MACHINE}_dtbos -} - -FILES_${PN} = "${dt_dir} ${sysconfdir}" - -addtask install after do_compile - -# The destination and any symlinks are defined in the source file. -# -# A line starting as follows " * Put: [destination]" in the source -# defines the destination file name for the device tree binaries. -# -# A line starting as follows " * Link: [destination]" defines a symlink -# to the device tree binary file. -# -do_install () { - install -d ${D}/${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/${PN} - # Copy files to /lib/dt-overlay/main (mtac cards will be in mtac) - if [ -e ${AT91BOOTSTRAP_MACHINE} ]; then - install -d ${D}/${dt_dir} - ( - cd ${MACHINE} - echo "Current directory is $(pwd)" - for f in *.dtbo ; do - s=$(basename -s .dtbo $f).dtso - location_ln=$(egrep '^[[:space:]]*\*[[:space:]]*Put:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Put:[[:space:]]*//') - echo "Binary: $f Source: $s" - echo "Destination: $location_ln" - dirname=$(dirname $location_ln) - install -d ${D}/${dt_dir}/$dirname - install ${f} ${D}/${dt_dir}/$location_ln - links=$(egrep '^[[:space:]]*\*[[:space:]]*Link:[[:space:]]*[^[:space:]]+' $s | sed -r 's/.*Link:[[:space:]]*//') - echo "All Links: " - echo "$links" - echo "End links" - for l in $links ; do - ldirname=$(dirname $l) - if ! [ -d "${D}/$ldirname" ] ; then - install -d ${D}/${dt_dir}/$ldirname - fi - echo ln -sf ${dt_dir}/$dirname/$f ${D}/${dt_dir}/$l - ln -sf ${dt_dir}/$location_ln ${D}/${dt_dir}/$l - done - done - ) - fi -} - -- cgit v1.2.3 From 67528be3ab4580eb0f09618777a9c0d72a4c8e3e Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 20 Dec 2021 11:52:22 -0600 Subject: Add mts-wait-for-cell-reset to detect cellular reset completion --- recipes-bsp/multitech/mts-id-eeprom_0.6.2.bb | 3 --- recipes-bsp/multitech/mts-id-eeprom_0.6.3.bb | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 recipes-bsp/multitech/mts-id-eeprom_0.6.2.bb create mode 100644 recipes-bsp/multitech/mts-id-eeprom_0.6.3.bb diff --git a/recipes-bsp/multitech/mts-id-eeprom_0.6.2.bb b/recipes-bsp/multitech/mts-id-eeprom_0.6.2.bb deleted file mode 100644 index 12c32c4..0000000 --- a/recipes-bsp/multitech/mts-id-eeprom_0.6.2.bb +++ /dev/null @@ -1,3 +0,0 @@ -require mts-id-eeprom.inc - -PR = "${INC_PR}.1" diff --git a/recipes-bsp/multitech/mts-id-eeprom_0.6.3.bb b/recipes-bsp/multitech/mts-id-eeprom_0.6.3.bb new file mode 100644 index 0000000..12c32c4 --- /dev/null +++ b/recipes-bsp/multitech/mts-id-eeprom_0.6.3.bb @@ -0,0 +1,3 @@ +require mts-id-eeprom.inc + +PR = "${INC_PR}.1" -- cgit v1.2.3 From 35f846b025cee5603de47a562155413962941914 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 27 Dec 2021 16:27:49 -0600 Subject: Set reset length to 1250mS for new MTCDT-0.2 and MTCDTIP-0.1 --- recipes-bsp/multitech/mts-io_4.8.2.bb | 2 -- recipes-bsp/multitech/mts-io_4.8.3.bb | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 recipes-bsp/multitech/mts-io_4.8.2.bb create mode 100644 recipes-bsp/multitech/mts-io_4.8.3.bb diff --git a/recipes-bsp/multitech/mts-io_4.8.2.bb b/recipes-bsp/multitech/mts-io_4.8.2.bb deleted file mode 100644 index ee4fcfa..0000000 --- a/recipes-bsp/multitech/mts-io_4.8.2.bb +++ /dev/null @@ -1,2 +0,0 @@ -require mts-io.inc - diff --git a/recipes-bsp/multitech/mts-io_4.8.3.bb b/recipes-bsp/multitech/mts-io_4.8.3.bb new file mode 100644 index 0000000..ee4fcfa --- /dev/null +++ b/recipes-bsp/multitech/mts-io_4.8.3.bb @@ -0,0 +1,2 @@ +require mts-io.inc + -- cgit v1.2.3 From 8f7ef428b1bfcb11e396a873764b116f05f3edbb Mon Sep 17 00:00:00 2001 From: John Klug Date: Tue, 4 Jan 2022 15:54:26 -0600 Subject: Remove extra resets caused by new at91bootstrap --- recipes-bsp/multitech/mts-io.inc | 2 +- recipes-bsp/multitech/mts-io/mts-io.init | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-bsp/multitech/mts-io.inc b/recipes-bsp/multitech/mts-io.inc index 9fa0cc7..d810d32 100644 --- a/recipes-bsp/multitech/mts-io.inc +++ b/recipes-bsp/multitech/mts-io.inc @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://io-module/COPYING;md5=94d55d512a9ba36caa9b7df079bae19 file://io-tool/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ " do_fetch[depends] += "virtual/kernel:do_shared_workdir" -INC_PR = "r1" +INC_PR = "r2" SRCREV = "${PV}" PR = "${INC_PR}.0" diff --git a/recipes-bsp/multitech/mts-io/mts-io.init b/recipes-bsp/multitech/mts-io/mts-io.init index 6bb9e69..b62bcb1 100755 --- a/recipes-bsp/multitech/mts-io/mts-io.init +++ b/recipes-bsp/multitech/mts-io/mts-io.init @@ -131,7 +131,7 @@ reset_path() { pin=$1 ${LOGDBG} -t "mts-io" -p daemon.info Reset $pin if [[ -f ${pin} ]] ; then - if ! ( (echo 1 >${pin}) && ${WAIT} && (echo 0 >${pin}) && ${WAIT} && (echo 1 >${pin}) ) ; then + if ! ( (echo 0 >${pin}) && ${WAIT} && (echo 1 >${pin}) ) ; then /usr/bin/logger -t "mts-io" -p daemon.error -s "Failed write to ${pin}" return 1 fi -- cgit v1.2.3