From ca94ce8e61f5458cadab34e517400c38513fe72f Mon Sep 17 00:00:00 2001 From: Harsh Sharma Date: Thu, 17 Mar 2022 09:38:13 -0500 Subject: Updated overlay and sysfs tags --- recipes-bsp/multitech/mt-dt-overlay_1.2.0.bb | 96 ---------------------------- recipes-bsp/multitech/mt-dt-overlay_1.2.1.bb | 96 ++++++++++++++++++++++++++++ recipes-bsp/multitech/mts-io-sysfs_0.2.2.bb | 46 ------------- recipes-bsp/multitech/mts-io-sysfs_0.2.3.bb | 46 +++++++++++++ 4 files changed, 142 insertions(+), 142 deletions(-) delete mode 100644 recipes-bsp/multitech/mt-dt-overlay_1.2.0.bb create mode 100644 recipes-bsp/multitech/mt-dt-overlay_1.2.1.bb delete mode 100644 recipes-bsp/multitech/mts-io-sysfs_0.2.2.bb create mode 100644 recipes-bsp/multitech/mts-io-sysfs_0.2.3.bb diff --git a/recipes-bsp/multitech/mt-dt-overlay_1.2.0.bb b/recipes-bsp/multitech/mt-dt-overlay_1.2.0.bb deleted file mode 100644 index 8062f53..0000000 --- a/recipes-bsp/multitech/mt-dt-overlay_1.2.0.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 = "r1" - -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.2.1.bb b/recipes-bsp/multitech/mt-dt-overlay_1.2.1.bb new file mode 100644 index 0000000..8062f53 --- /dev/null +++ b/recipes-bsp/multitech/mt-dt-overlay_1.2.1.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 = "r1" + +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-sysfs_0.2.2.bb b/recipes-bsp/multitech/mts-io-sysfs_0.2.2.bb deleted file mode 100644 index a489468..0000000 --- a/recipes-bsp/multitech/mts-io-sysfs_0.2.2.bb +++ /dev/null @@ -1,46 +0,0 @@ -DESCRIPTION = "mts-io sysfs wrapper" -HOMEPAGE = "http://www.multitech.net/" -SECTION = "base" -PRIORITY = "optional" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" -inherit update-rc.d - -DEPENDS = "libmts openssl" -RDEPENDS_${PN} = "bash" -PR = "r1" - -SRCREV = "${PV}" - -SRC_URI = "git://git.multitech.net/mts-io-sysfs.git;protocol=git;branch=master \ - file://mts-io-sysfs.init" - -S = "${WORKDIR}/git" - -do_configure_append() { -} - -do_compile() { - oe_runmake -} - - -fakeroot do_install() { - install -d ${D}${sbindir} - install -m 0755 ${S}/build/mts-io-sysfs ${D}${sbindir}/mts-io-sysfs - install -d 0755 ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/mts-io-sysfs.init ${D}${sysconfdir}/init.d/eeprom-config -} - - -INITSCRIPT_NAME = "eeprom-config" -# Must start after MTS-IO to read the accessory cards. -INITSCRIPT_PARAMS = "start 40 S ." - -FILES_${PN} += "${libdir}/mts-io-sysfs*" -FILES_${PN} += "${sbindir}/mts-io-sysfs" - -# disable this on purpose for dev purposes -do_rm_work() { - echo "skipping" -} diff --git a/recipes-bsp/multitech/mts-io-sysfs_0.2.3.bb b/recipes-bsp/multitech/mts-io-sysfs_0.2.3.bb new file mode 100644 index 0000000..a489468 --- /dev/null +++ b/recipes-bsp/multitech/mts-io-sysfs_0.2.3.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "mts-io sysfs wrapper" +HOMEPAGE = "http://www.multitech.net/" +SECTION = "base" +PRIORITY = "optional" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" +inherit update-rc.d + +DEPENDS = "libmts openssl" +RDEPENDS_${PN} = "bash" +PR = "r1" + +SRCREV = "${PV}" + +SRC_URI = "git://git.multitech.net/mts-io-sysfs.git;protocol=git;branch=master \ + file://mts-io-sysfs.init" + +S = "${WORKDIR}/git" + +do_configure_append() { +} + +do_compile() { + oe_runmake +} + + +fakeroot do_install() { + install -d ${D}${sbindir} + install -m 0755 ${S}/build/mts-io-sysfs ${D}${sbindir}/mts-io-sysfs + install -d 0755 ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/mts-io-sysfs.init ${D}${sysconfdir}/init.d/eeprom-config +} + + +INITSCRIPT_NAME = "eeprom-config" +# Must start after MTS-IO to read the accessory cards. +INITSCRIPT_PARAMS = "start 40 S ." + +FILES_${PN} += "${libdir}/mts-io-sysfs*" +FILES_${PN} += "${sbindir}/mts-io-sysfs" + +# disable this on purpose for dev purposes +do_rm_work() { + echo "skipping" +} -- cgit v1.2.3