diff --git a/recipes-sysmobts/firmware/sysmobts-firmware_3.0.1pre.bb b/recipes-sysmobts/firmware/sysmobts-firmware_3.0.1pre.bb deleted file mode 100644 index 7180024..0000000 --- a/recipes-sysmobts/firmware/sysmobts-firmware_3.0.1pre.bb +++ /dev/null @@ -1,14 +0,0 @@ -COMPATIBLE_MACHINE = "sysmobts-v2" -FIRMWARE-VERSION = "superfemto_v${PV}" -PR = "r2.${INC_PR}" - -require ${PN}.inc - -do_install() { - install -d ${D}/lib/firmware/ - - install -m 0666 ${S}/Image/Dsp/superfemto.out ${D}/lib/firmware/sysmobts-v2.out - install -m 0666 ${S}/Image/Fpga/superfemto.bit ${D}/lib/firmware/sysmobts-v2.bit -} - -FILES_${PN} = "/lib/firmware/sysmobts-v2*" diff --git a/recipes-sysmobts/firmware/sysmobts-firmware_3.1.bb b/recipes-sysmobts/firmware/sysmobts-firmware_3.1.bb new file mode 100644 index 0000000..7afe5f4 --- /dev/null +++ b/recipes-sysmobts/firmware/sysmobts-firmware_3.1.bb @@ -0,0 +1,48 @@ +COMPATIBLE_MACHINE = "sysmobts-v2" +FIRMWARE-VERSION = "superfemto_v${PV}" +PR = "r6.${INC_PR}" + +require ${PN}.inc + +S2 = "${WORKDIR}/sysmobts-firmware-superfemto_v3.0.1pre" + +# Currently there is no common Firmware for RevC and RevD Hardware and we +# need to handle this differently for now. + +SRC_URI = "file://sysmobts-firmware-${FIRMWARE-VERSION}.tar.bz2 \ + file://sysmobts-firmware-superfemto_v3.0.1pre.tar.bz2" + + +do_install() { + install -d ${D}/lib/firmware/ + + # Install the firmware for revD + install -m 0666 ${S}/Image/Dsp/superfemto.out ${D}/lib/firmware/sysmobts-v2-revd.out + install -m 0666 ${S}/Image/Fpga/superfemto.bit ${D}/lib/firmware/sysmobts-v2-revd.bit + + # Install the firmware for revC + install -m 0666 ${S2}/Image/Dsp/superfemto.out ${D}/lib/firmware/sysmobts-v2-revc.out + install -m 0666 ${S2}/Image/Fpga/superfemto.bit ${D}/lib/firmware/sysmobts-v2-revc.bit +} + +# Change a symlink depending on revC or revD. We are using the EEPROM size +# as an indicator for revC and revD +pkg_postinst_${PN} () { +# Building the rootfs? +if [ "x$D" != "x" ]; then + exit 1 +fi + +EEPROM_SIZE=`stat -c '%s' /sys/bus/i2c/devices/1-0050/eeprom` +if [ $EEPROM_SIZE -eq 256 ]; then + cd /lib/firmware + ln -fs sysmobts-v2-revc.out sysmobts-v2.out + ln -fs sysmobts-v2-revc.bit sysmobts-v2.bit +else + cd /lib/firmware + ln -fs sysmobts-v2-revd.out sysmobts-v2.out + ln -fs sysmobts-v2-revd.bit sysmobts-v2.bit +fi +} + +FILES_${PN} = "/lib/firmware/sysmobts-v2*"