Skip to content

Commit

Permalink
meta-e31x: Update for E310 prerelease - UHD-3.15.0.0
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sugandhagupta committed May 24, 2019
1 parent 5c8c093 commit 8fbaa22
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 37 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 \
"
50 changes: 22 additions & 28 deletions meta-e31x/recipes-support/uhd/uhd-fpga-images_git.bbappend
Original file line number Diff line number Diff line change
@@ -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 \
"
8 changes: 4 additions & 4 deletions meta-e31x/recipes-support/uhd/uhd_git.bbappend
Original file line number Diff line number Diff line change
@@ -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"

6 changes: 4 additions & 2 deletions meta-ettus-core/recipes-support/uhd/uhd_git_src.inc
Original file line number Diff line number Diff line change
@@ -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])
}
Expand Down
4 changes: 2 additions & 2 deletions meta-ettus-core/recipes-support/uhd/version.inc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
PV = "3.14.0.0"
PR = "r1"
PV = "3.15.0.0"
PR = "e310_prerelease"

0 comments on commit 8fbaa22

Please sign in to comment.