From a1aad22e4e4b4a92596e35631fabd7ad07db04fd Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 27 Oct 2012 20:20:32 +0200 Subject: [PATCH] sysmobts-firmware: Re-work the firmware and header for v1 and v2 Re-work the way we distribute the header and firmware files. The header files may be accessed by everyone but the firmware may only be used by owners of our device. Create a header only repository with all the header versions of the firmware and create tarballs for specific releases that will be provided to our customers. Use COMPATIBLE_MACHINE to pick the right firmware and API version depending on sysmoBTSv1 and sysmoBTSv2. --- .../femtobts-api/femtobts-api_2.4.bb | 26 +++++++++++++++++++ .../femtobts-api/femtobts-api_git.bb | 17 ++++++------ .../firmware/sysmobts-firmware.inc | 14 ++++++++++ .../firmware/sysmobts-firmware_2.7.bb | 15 +++++++++++ .../firmware/sysmobts-firmware_3.0.1pre.bb | 14 ++++++++++ .../firmware/sysmobts-firmware_git.bb | 25 ------------------ 6 files changed, 78 insertions(+), 33 deletions(-) create mode 100644 recipes-sysmobts/femtobts-api/femtobts-api_2.4.bb create mode 100644 recipes-sysmobts/firmware/sysmobts-firmware.inc create mode 100644 recipes-sysmobts/firmware/sysmobts-firmware_2.7.bb create mode 100644 recipes-sysmobts/firmware/sysmobts-firmware_3.0.1pre.bb delete mode 100644 recipes-sysmobts/firmware/sysmobts-firmware_git.bb diff --git a/recipes-sysmobts/femtobts-api/femtobts-api_2.4.bb b/recipes-sysmobts/femtobts-api/femtobts-api_2.4.bb new file mode 100644 index 0000000..661de48 --- /dev/null +++ b/recipes-sysmobts/femtobts-api/femtobts-api_2.4.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "sysmoBTS Layer1 API header files" +SECTION = "kernel" +LICENSE = "CLOSED" + +SRC_URI = "git://git.sysmocom.de/sysmo-bts/layer1-api.git;protocol=git;branch=master" +SRCREV = "superfemto_v2.4" +PV = "2.4" +PR = "r1" +S = "${WORKDIR}/git" + + +do_compile() { + : +} + +do_install() { + install -d ${D}${includedir}/sysmocom/femtobts + install -d ${D}${libdir}/pkgconfig + + install -m 0755 ${S}/include/* ${D}${includedir}/sysmocom/femtobts/ + echo "Name: Sysmocom sysmoBTS Layer1 API +Description: Sysmocom sysmoBTS Layer1 API +Versions: 2.0 +Libs: +Cflags: -I${includedir}/sysmocom/femtobts" > ${D}${libdir}/pkgconfig/sysmocom-btsapi.pc +} diff --git a/recipes-sysmobts/femtobts-api/femtobts-api_git.bb b/recipes-sysmobts/femtobts-api/femtobts-api_git.bb index 3e58b38..a5686ef 100644 --- a/recipes-sysmobts/femtobts-api/femtobts-api_git.bb +++ b/recipes-sysmobts/femtobts-api/femtobts-api_git.bb @@ -1,11 +1,12 @@ -DESCRIPTION = "sysmocom FemtoBTS API headers" +DESCRIPTION = "sysmoBTS Layer1 API header files" SECTION = "kernel" LICENSE = "CLOSED" -SRC_URI = "git://git.sysmocom.de/sysmo-bts/femtobts-firmware.git;protocol=git;branch=master" -SRCREV = "997a9439c8209d4b134c1fdbd2820c956f1cfe43" -PV = "2.4+git${SRCPV}" -PR = "r7" +SRC_URI = "git://git.sysmocom.de/sysmo-bts/layer1-api.git;protocol=git;branch=master" +SRCREV_sysmobts-v2 = "superfemto_v3.0.1pre" +SRCREV_sysmobts-v1 = "femtobts_v2.7" +PV = "${SRCREV}+git${SRCPV}" +PR = "r2" S = "${WORKDIR}/git" @@ -17,9 +18,9 @@ do_install() { install -d ${D}${includedir}/sysmocom/femtobts install -d ${D}${libdir}/pkgconfig - install -m 0755 ${S}/api/* ${D}${includedir}/sysmocom/femtobts/ - echo "Name: Sysmocom FemtoBTS API -Description: Sysmocom FemtoBTS API + install -m 0755 ${S}/include/* ${D}${includedir}/sysmocom/femtobts/ + echo "Name: Sysmocom sysmoBTS Layer1 API +Description: Sysmocom sysmoBTS Layer1 API Versions: 2.0 Libs: Cflags: -I${includedir}/sysmocom/femtobts" > ${D}${libdir}/pkgconfig/sysmocom-btsapi.pc diff --git a/recipes-sysmobts/firmware/sysmobts-firmware.inc b/recipes-sysmobts/firmware/sysmobts-firmware.inc new file mode 100644 index 0000000..293ff96 --- /dev/null +++ b/recipes-sysmobts/firmware/sysmobts-firmware.inc @@ -0,0 +1,14 @@ +DESCRIPTION = "sysmocom sysmoBTS DSP and FPGA firmware" +SECTION = "kernel" +LICENSE = "CLOSED" + +SRC_URI = "file://sysmobts-firmware-${FIRMWARE-VERSION}.tar.bz2" +S = "${WORKDIR}/sysmobts-firmware-${FIRMWARE-VERSION}" + +INC_PR = "1" + +do_compile() { + : +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/recipes-sysmobts/firmware/sysmobts-firmware_2.7.bb b/recipes-sysmobts/firmware/sysmobts-firmware_2.7.bb new file mode 100644 index 0000000..fc2324c --- /dev/null +++ b/recipes-sysmobts/firmware/sysmobts-firmware_2.7.bb @@ -0,0 +1,15 @@ +COMPATIBLE_MACHINE = "sysmobts-v1" +FIRMWARE-VERSION = "femtobts_v${PV}" +PR = "r2.${INC_PR}" + +require ${PN}.inc + +do_install_sysmobts() { + install -d ${D}/lib/firmware/ + + install -m 0666 ${S}/Firmware/Dsp/femtobts.out ${D}/lib/firmware/sysmobts-v1.out + install -m 0666 ${S}/Firmware/Fpga/femtobts.bit ${D}/lib/firmware/sysmobts-v1.bit +} + + +FILES_${PN} = "/lib/firmware/sysmobts-v1*" diff --git a/recipes-sysmobts/firmware/sysmobts-firmware_3.0.1pre.bb b/recipes-sysmobts/firmware/sysmobts-firmware_3.0.1pre.bb new file mode 100644 index 0000000..7180024 --- /dev/null +++ b/recipes-sysmobts/firmware/sysmobts-firmware_3.0.1pre.bb @@ -0,0 +1,14 @@ +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_git.bb b/recipes-sysmobts/firmware/sysmobts-firmware_git.bb deleted file mode 100644 index 19603f0..0000000 --- a/recipes-sysmobts/firmware/sysmobts-firmware_git.bb +++ /dev/null @@ -1,25 +0,0 @@ -DESCRIPTION = "sysmocom sysmoBTS firmware" -SECTION = "kernel" -LICENSE = "CLOSED" - - -SRC_URI = "git://git.sysmocom.de/sysmo-bts/femtobts-firmware;protocol=git;branch=master" -SRCREV = "997a9439c8209d4b134c1fdbd2820c956f1cfe43" -S = "${WORKDIR}/git" - -PV = "2.4+git${SRCPV}" -PR = "r0" - -do_compile() { - : -} - -do_install() { - install -d ${D}/lib/firmware/ - - install -m 0666 ${S}/firmware/sysmobts* ${D}/lib/firmware -} - -FILES_${PN}_sysmobts-v1 = "/lib/firmware/sysmobts-v1*" -FILES_${PN}_sysmobts-v2 = "/lib/firmware/sysmobts-v2*" -PACKAGE_ARCH = "${MACHINE_ARCH}"