From 8fbaa22d3ea23efdb052b1e56f2891daea4b0ee9 Mon Sep 17 00:00:00 2001 From: Sugandha Gupta Date: Tue, 7 May 2019 20:59:49 +0000 Subject: [PATCH] meta-e31x: Update for E310 prerelease - UHD-3.15.0.0 Add E310 fpga images, dts (sg1 and sg3) and install them in /lib/firmware and /usr/share/uhd/images based on machine name. Update UHD and MPM to support E310 (MPM version). UHD and MPM now point to a commit on master in order to support E310 filesystems only. Signed-off-by: Sugandha Gupta --- README | 2 +- .../linux-firmware_git.bbappend | 50 +++++++++++++++++++ .../uhd/uhd-fpga-images_git.bbappend | 50 ++++++++----------- .../recipes-support/uhd/uhd_git.bbappend | 8 +-- .../recipes-support/uhd/uhd_git_src.inc | 6 ++- .../recipes-support/uhd/version.inc | 4 +- 6 files changed, 83 insertions(+), 37 deletions(-) create mode 100644 meta-e31x/recipes-kernel/linux-firmware/linux-firmware_git.bbappend diff --git a/README b/README index a4410faf..10756910 100644 --- a/README +++ b/README @@ -8,7 +8,7 @@ Supported devices - NI USRP N310/N300 series (meta-sulfur) - NI USRP E320 series (meta-neon) - - NI USRP E310/E312/E313 (meta-e31x, work in progress, boots but not functional) + - NI USRP E310/E312/E313 (meta-e31x) Repository organization diff --git a/meta-e31x/recipes-kernel/linux-firmware/linux-firmware_git.bbappend b/meta-e31x/recipes-kernel/linux-firmware/linux-firmware_git.bbappend new file mode 100644 index 00000000..71aa544d --- /dev/null +++ b/meta-e31x/recipes-kernel/linux-firmware/linux-firmware_git.bbappend @@ -0,0 +1,50 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI_append = " http://files.ettus.com/binaries/cache/e3xx/fpga-f52a643/e3xx_e310_sg1_fpga_default-gf52a643.zip;name=e31x-sg1-fpga \ + http://files.ettus.com/binaries/cache/e3xx/fpga-f52a643/e3xx_e310_sg3_fpga_default-gf52a643.zip;name=e31x-sg3-fpga \ + " +SRC_URI[e31x-sg1-fpga.sha256sum] = "03450918a7c312d53926f3318ea91a57162c545ada4058b9e83a4e0efd4755a4" +SRC_URI[e31x-sg3-fpga.sha256sum] = "e8264dd48c3c3f6e65c8e5ef34a3629aa79a3f17ba845659e553bdcf3dfac303" + +PACKAGES =+ " \ + ${PN}-ni-e31x-sg1-fpga \ + ${PN}-ni-e31x-sg3-fpga \ + " + +DEPENDS += "dtc-native python3-native" + +do_compile_append_ni-e31x() { + dtc -@ -o ${WORKDIR}/e310_sg1.dtbo ${WORKDIR}/usrp_e310_sg1_fpga.dts + dtc -@ -o ${WORKDIR}/e310_sg1_idle.dtbo ${WORKDIR}/usrp_e310_sg1_idle_fpga.dts + python3 ${WORKDIR}/fpga_bit_to_bin.py -f ${WORKDIR}/usrp_e310_sg1_fpga.bit ${WORKDIR}/e310_sg1.bin + python3 ${WORKDIR}/fpga_bit_to_bin.py -f ${WORKDIR}/usrp_e310_sg1_idle_fpga.bit ${WORKDIR}/e310_sg1_idle.bin + dtc -@ -o ${WORKDIR}/e310_sg3.dtbo ${WORKDIR}/usrp_e310_sg3_fpga.dts + dtc -@ -o ${WORKDIR}/e310_sg3_idle.dtbo ${WORKDIR}/usrp_e310_sg3_idle_fpga.dts + python3 ${WORKDIR}/fpga_bit_to_bin.py -f ${WORKDIR}/usrp_e310_sg3_fpga.bit ${WORKDIR}/e310_sg3.bin + python3 ${WORKDIR}/fpga_bit_to_bin.py -f ${WORKDIR}/usrp_e310_sg3_idle_fpga.bit ${WORKDIR}/e310_sg3_idle.bin +} + +do_install_append_ni-e31x() { + install -m 0644 ${WORKDIR}/e310_sg1.bin ${D}/lib/firmware/e310_sg1.bin + install -m 0644 ${WORKDIR}/e310_sg1.dtbo ${D}/lib/firmware/e310_sg1.dtbo + install -m 0644 ${WORKDIR}/e310_sg1_idle.bin ${D}/lib/firmware/e310_sg1_idle.bin + install -m 0644 ${WORKDIR}/e310_sg1_idle.dtbo ${D}/lib/firmware/e310_sg1_idle.dtbo + install -m 0644 ${WORKDIR}/e310_sg3.bin ${D}/lib/firmware/e310_sg3.bin + install -m 0644 ${WORKDIR}/e310_sg3.dtbo ${D}/lib/firmware/e310_sg3.dtbo + install -m 0644 ${WORKDIR}/e310_sg3_idle.bin ${D}/lib/firmware/e310_sg3_idle.bin + install -m 0644 ${WORKDIR}/e310_sg3_idle.dtbo ${D}/lib/firmware/e310_sg3_idle.dtbo +} + +FILES_${PN}-ni-e31x-sg1-fpga = " \ + /lib/firmware/e310_sg1.bin \ + /lib/firmware/e310_sg1.dtbo \ + /lib/firmware/e310_sg1_idle.bin \ + /lib/firmware/e310_sg1_idle.dtbo \ + " + +FILES_${PN}-ni-e31x-sg3-fpga = " \ + /lib/firmware/e310_sg3.bin \ + /lib/firmware/e310_sg3.dtbo \ + /lib/firmware/e310_sg3_idle.bin \ + /lib/firmware/e310_sg3_idle.dtbo \ + " diff --git a/meta-e31x/recipes-support/uhd/uhd-fpga-images_git.bbappend b/meta-e31x/recipes-support/uhd/uhd-fpga-images_git.bbappend index 47030a93..490c2e2d 100644 --- a/meta-e31x/recipes-support/uhd/uhd-fpga-images_git.bbappend +++ b/meta-e31x/recipes-support/uhd/uhd-fpga-images_git.bbappend @@ -1,49 +1,43 @@ FILESEXTRAPATHS_prepend_ni-e31x := "${THISDIR}/files:" -SRC_URI_append_ni-e31x-sg1 = " http://files.ettus.com/binaries/cache/e3xx/fpga-abdc445a/e3xx_e31x_fpga_default-gabdc445a.zip;name=e31x-sg1-fpga \ +SRC_URI_append_ni-e31x = " http://files.ettus.com/binaries/cache/e3xx/fpga-f52a643/e3xx_e310_sg1_fpga_default-gf52a643.zip;name=e31x-sg1-fpga \ + http://files.ettus.com/binaries/cache/e3xx/fpga-f52a643/e3xx_e310_sg3_fpga_default-gf52a643.zip;name=e31x-sg3-fpga \ " -SRC_URI_append_ni-e31x-sg3 = " http://files.ettus.com/binaries/cache/e3xx/fpga-abdc445a/e3xx_e1x_fpga_default-gabdc445a.zip;name=e31x-sg3-fpga \ - " - -SRC_URI[e31x-sg1-fpga.md5sum] = "46ac1fe80d7c8e8cf242ef0189f6bcbe" -SRC_URI[e31x-sg1-fpga.sha256sum] = "82e5af3742245f1f8ea5dd334b1ceb7920e3c31306d86b0dbf31bedd696879c4" - -SRC_URI[e31x-sg3-fpga.md5sum] = "46ac1fe80d7c8e8cf242ef0189f6bcbe" -SRC_URI[e31x-sg3-fpga.sha256sum] = "82e5af3742245f1f8ea5dd334b1ceb7920e3c31306d86b0dbf31bedd696879c4" +SRC_URI[e31x-sg1-fpga.sha256sum] = "03450918a7c312d53926f3318ea91a57162c545ada4058b9e83a4e0efd4755a4" +SRC_URI[e31x-sg3-fpga.sha256sum] = "e8264dd48c3c3f6e65c8e5ef34a3629aa79a3f17ba845659e553bdcf3dfac303" do_install_append_ni-e31x-sg1(){ mkdir -p ${D}/usr/share/uhd/images - install -m 0644 ${WORKDIR}/usrp_e31x_fpga.bit ${D}/usr/share/uhd/images/usrp_e31x_fpga.bit - install -m 0644 ${WORKDIR}/usrp_e31x_fpga_idle.bit ${D}/usr/share/uhd/images/usrp_e31x_fpga_idle.bit - - install -m 0644 ${WORKDIR}/usrp_e31x_fpga.dts ${D}/usr/share/uhd/images/usrp_e31x_fpga.dts - install -m 0644 ${WORKDIR}/usrp_e31x_fpga_idle.dts ${D}/usr/share/uhd/images/usrp_e31x_fpga_idle.dts + install -m 0644 ${WORKDIR}/usrp_e310_sg1_fpga.bit ${D}/usr/share/uhd/images/usrp_e310_sg1_fpga.bit + install -m 0644 ${WORKDIR}/usrp_e310_sg1_fpga.dts ${D}/usr/share/uhd/images/usrp_e310_sg1_fpga.dts + install -m 0644 ${WORKDIR}/usrp_e310_sg1_idle_fpga.bit ${D}/usr/share/uhd/images/usrp_e310_sg1_idle_fpga.bit + install -m 0644 ${WORKDIR}/usrp_e310_sg1_idle_fpga.dts ${D}/usr/share/uhd/images/usrp_e310_sg1_idle_fpga.dts } do_install_append_ni-e31x-sg3(){ mkdir -p ${D}/usr/share/uhd/images - install -m 0644 ${WORKDIR}/usrp_e31x_fpga_sg3.bit ${D}/usr/share/uhd/images/usrp_e31x_fpga.bit - install -m 0644 ${WORKDIR}/usrp_e31x_fpga_sg3_idle.bit ${D}/usr/share/uhd/images/usrp_e31x_fpga_idle.bit - - install -m 0644 ${WORKDIR}/usrp_e31x_fpga_sg3.dts ${D}/usr/share/uhd/images/usrp_e31x_fpga_sg3.dts - install -m 0644 ${WORKDIR}/usrp_e31x_fpga_sg3_idle.dts ${D}/usr/share/uhd/images/usrp_e31x_fpga_sg3_idle.dts + install -m 0644 ${WORKDIR}/usrp_e310_sg3_fpga.bit ${D}/usr/share/uhd/images/usrp_e310_sg3_fpga.bit + install -m 0644 ${WORKDIR}/usrp_e310_sg3_fpga.dts ${D}/usr/share/uhd/images/usrp_e310_sg3_fpga.dts + install -m 0644 ${WORKDIR}/usrp_e310_sg3_idle_fpga.bit ${D}/usr/share/uhd/images/usrp_e310_sg3_idle_fpga.bit + install -m 0644 ${WORKDIR}/usrp_e310_sg3_idle_fpga.dts ${D}/usr/share/uhd/images/usrp_e310_sg3_idle_fpga.dts } PACKAGES_append_ni-e31x = " \ - ${PN}-e31x \ + ${PN}-e31x-sg1 \ + ${PN}-e31x-sg3 \ " FILES_${PN}-e31x-sg1 = " \ - /usr/share/uhd/images/usrp_e31x_fpga.bit \ - /usr/share/uhd/images/usrp_e31x_fpga_idle.bit \ - /usr/share/uhd/images/usrp_e31x_fpga.dts \ - /usr/share/uhd/images/usrp_e31x_fpga_idle.dts \ + /usr/share/uhd/images/usrp_e310_sg1_fpga.bit \ + /usr/share/uhd/images/usrp_e310_sg1_fpga.dts \ + /usr/share/uhd/images/usrp_e310_sg1_idle_fpga.bit \ + /usr/share/uhd/images/usrp_e310_sg1_idle_fpga.dts \ " FILES_${PN}-e31x-sg3 = " \ - /usr/share/uhd/images/usrp_e31x_fpga_sg3.bit \ - /usr/share/uhd/images/usrp_e31x_fpga_sg3_idle.bit \ - /usr/share/uhd/images/usrp_e31x_fpga_sg3.dts \ - /usr/share/uhd/images/usrp_e31x_fpga_sg3_idle.dts \ + /usr/share/uhd/images/usrp_e310_sg3_fpga.bit \ + /usr/share/uhd/images/usrp_e310_sg3_fpga.dts \ + /usr/share/uhd/images/usrp_e310_sg3_idle_fpga.bit \ + /usr/share/uhd/images/usrp_e310_sg3_idle_fpga.dts \ " diff --git a/meta-e31x/recipes-support/uhd/uhd_git.bbappend b/meta-e31x/recipes-support/uhd/uhd_git.bbappend index 61d2b08c..d8bde765 100644 --- a/meta-e31x/recipes-support/uhd/uhd_git.bbappend +++ b/meta-e31x/recipes-support/uhd/uhd_git.bbappend @@ -1,6 +1,6 @@ -RDEPENDS_${PN}_append_ni-e31x = " uhd-fpga-images-e31x-sg1 \ - uhd-fpga-images-e31x-sg3 \ +RDEPENDS_${PN}_append_ni-e31x-sg1 = " uhd-fpga-images-e31x-sg1 \ " - -PACKAGECONFIG_ni-e31x = "mpmd liberio" +RDEPENDS_${PN}_append_ni-e31x-sg3 = " uhd-fpga-images-e31x-sg3 \ + " +PACKAGECONFIG_ni-e31x = "e300 mpmd liberio" diff --git a/meta-ettus-core/recipes-support/uhd/uhd_git_src.inc b/meta-ettus-core/recipes-support/uhd/uhd_git_src.inc index 1136e60d..a7eb0047 100644 --- a/meta-ettus-core/recipes-support/uhd/uhd_git_src.inc +++ b/meta-ettus-core/recipes-support/uhd/uhd_git_src.inc @@ -1,5 +1,7 @@ -SRC_URI = "git://github.com/EttusResearch/uhd.git;branch=UHD-3.14" -SRCREV = "6875d061d8dd3cc59427638d35f76079beb34e70" +SRC_URI = "git://github.com/EttusResearch/uhd.git;branch=master \ + " +SRCREV = "6563c53743617215a18542db7d7050a04a0d409d" + python () { d.setVar('UHD_GIT_HASH', "g" + d.getVar('SRCREV', True)[0:8]) } diff --git a/meta-ettus-core/recipes-support/uhd/version.inc b/meta-ettus-core/recipes-support/uhd/version.inc index 925a73e2..d4db3015 100644 --- a/meta-ettus-core/recipes-support/uhd/version.inc +++ b/meta-ettus-core/recipes-support/uhd/version.inc @@ -1,2 +1,2 @@ -PV = "3.14.0.0" -PR = "r1" +PV = "3.15.0.0" +PR = "e310_prerelease"