sysmobts-firmware: Install both 3.0.1pre and 3.1 and add symlinks

The latest release currently does not support the RevC hardware. Install
both 3.0.1pre and 3.1 (luckily ubifs compresses them) and set a symlink.
Use the EEPROM size as an indicator if we are on revD or revC hardware
and then set the symlink. It has been tested for revC and needs to be tested
on revD hardware.
This commit is contained in:
Holger Hans Peter Freyther 2012-12-22 19:11:03 +08:00 committed by Holger Hans Peter Freyther
parent f36b6907a9
commit 6f27e12588
2 changed files with 48 additions and 14 deletions

View File

@ -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*"

View File

@ -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*"