From e6edea0cdbc6c735e954b0c99c3e554b91dd87dc Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 23 Mar 2016 13:52:35 +0100 Subject: [PATCH 01/41] layer: Allow to have entire recipes in the yocto-VER directory In case of the upcoming glib-2.0 change we only want to use our version on Dora. Look for *.bb in the yocto-dora/*/ as well. --- conf/layer.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/layer.conf b/conf/layer.conf index b79b034da5..0e0fa8e127 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -10,6 +10,7 @@ BBFILES += "${BBFILES_SYSMOCOM_BSP}" # selects specific distro or master when DISTRO_VERSION contains snapshot BBFILES_SYSMOCOM_BSP = "${LAYERDIR}/yocto-${@dict([('1.5', 'dora')]).get(d.getVar('DISTRO_VERSION', True)[0:3],'master')}/*.bbappend" +BBFILES_SYSMOCOM_BSP += "${LAYERDIR}/yocto-${@dict([('1.5', 'dora')]).get(d.getVar('DISTRO_VERSION', True)[0:3],'master')}/*/*.bb" BBFILE_COLLECTIONS += "sysmocom-bsp" BBFILE_PATTERN_sysmocom-bsp := "^${LAYERDIR}/" From 9460fb650f9abcdda6dcf62335add637a7615a88 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 23 Mar 2016 13:48:11 +0100 Subject: [PATCH 02/41] glib-2.0: Move recipes to yocto-dora/ This glib-2.0 version was required by rauc and should have been placed in the recipes-extra (or recipes-fixes) directory. Yocto master has imported gobject-introspecition and this requires a newer version of glib-2.0. For Yocto master this recipe has replaced the newer one. By moving it to the yocto-dora directory we continue to use the old version on dora and the default version on master. --- ...001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch | 0 .../glib-2.0/add-march-i486-into-CFLAGS-automatically.patch | 0 .../allow-run-media-sdX-drive-mount-if-username-root.patch | 0 .../glib-2.0/glib-2.0/configure-libtool.patch | 0 .../glib-2.0/glib-2.0/fix-conflicting-rand.patch | 0 .../glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch | 0 .../glib-2.0/glib-2.0/glib-gettextize-dir.patch | 0 {recipes-core => yocto-dora}/glib-2.0/glib-2.0/ptest-paths.patch | 0 {recipes-core => yocto-dora}/glib-2.0/glib-2.0/uclibc.patch | 0 {recipes-core => yocto-dora}/glib-2.0/glib-2.0_2.40.0.bb | 0 {recipes-core => yocto-dora}/glib-2.0/glib.inc | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename {recipes-core => yocto-dora}/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch (100%) rename {recipes-core => yocto-dora}/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch (100%) rename {recipes-core => yocto-dora}/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch (100%) rename {recipes-core => yocto-dora}/glib-2.0/glib-2.0/configure-libtool.patch (100%) rename {recipes-core => yocto-dora}/glib-2.0/glib-2.0/fix-conflicting-rand.patch (100%) rename {recipes-core => yocto-dora}/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch (100%) rename {recipes-core => yocto-dora}/glib-2.0/glib-2.0/glib-gettextize-dir.patch (100%) rename {recipes-core => yocto-dora}/glib-2.0/glib-2.0/ptest-paths.patch (100%) rename {recipes-core => yocto-dora}/glib-2.0/glib-2.0/uclibc.patch (100%) rename {recipes-core => yocto-dora}/glib-2.0/glib-2.0_2.40.0.bb (100%) rename {recipes-core => yocto-dora}/glib-2.0/glib.inc (100%) diff --git a/recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch b/yocto-dora/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch similarity index 100% rename from recipes-core/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch rename to yocto-dora/glib-2.0/glib-2.0/0001-configure.ac-Do-not-use-readlink-when-cross-compilin.patch diff --git a/recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch b/yocto-dora/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch similarity index 100% rename from recipes-core/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch rename to yocto-dora/glib-2.0/glib-2.0/add-march-i486-into-CFLAGS-automatically.patch diff --git a/recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch b/yocto-dora/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch similarity index 100% rename from recipes-core/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch rename to yocto-dora/glib-2.0/glib-2.0/allow-run-media-sdX-drive-mount-if-username-root.patch diff --git a/recipes-core/glib-2.0/glib-2.0/configure-libtool.patch b/yocto-dora/glib-2.0/glib-2.0/configure-libtool.patch similarity index 100% rename from recipes-core/glib-2.0/glib-2.0/configure-libtool.patch rename to yocto-dora/glib-2.0/glib-2.0/configure-libtool.patch diff --git a/recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch b/yocto-dora/glib-2.0/glib-2.0/fix-conflicting-rand.patch similarity index 100% rename from recipes-core/glib-2.0/glib-2.0/fix-conflicting-rand.patch rename to yocto-dora/glib-2.0/glib-2.0/fix-conflicting-rand.patch diff --git a/recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch b/yocto-dora/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch similarity index 100% rename from recipes-core/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch rename to yocto-dora/glib-2.0/glib-2.0/glib-2.0-configure-readlink.patch diff --git a/recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch b/yocto-dora/glib-2.0/glib-2.0/glib-gettextize-dir.patch similarity index 100% rename from recipes-core/glib-2.0/glib-2.0/glib-gettextize-dir.patch rename to yocto-dora/glib-2.0/glib-2.0/glib-gettextize-dir.patch diff --git a/recipes-core/glib-2.0/glib-2.0/ptest-paths.patch b/yocto-dora/glib-2.0/glib-2.0/ptest-paths.patch similarity index 100% rename from recipes-core/glib-2.0/glib-2.0/ptest-paths.patch rename to yocto-dora/glib-2.0/glib-2.0/ptest-paths.patch diff --git a/recipes-core/glib-2.0/glib-2.0/uclibc.patch b/yocto-dora/glib-2.0/glib-2.0/uclibc.patch similarity index 100% rename from recipes-core/glib-2.0/glib-2.0/uclibc.patch rename to yocto-dora/glib-2.0/glib-2.0/uclibc.patch diff --git a/recipes-core/glib-2.0/glib-2.0_2.40.0.bb b/yocto-dora/glib-2.0/glib-2.0_2.40.0.bb similarity index 100% rename from recipes-core/glib-2.0/glib-2.0_2.40.0.bb rename to yocto-dora/glib-2.0/glib-2.0_2.40.0.bb diff --git a/recipes-core/glib-2.0/glib.inc b/yocto-dora/glib-2.0/glib.inc similarity index 100% rename from recipes-core/glib-2.0/glib.inc rename to yocto-dora/glib-2.0/glib.inc From a8b955125793a087a766bfc70302f0b62778e26f Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 9 Apr 2016 18:23:28 +0200 Subject: [PATCH 03/41] ca-cacert-rootcert: Add the letsencrypt certificate here as well This is not quite "ca-cacert" anymore, more like "ca-sysmocom" for the root certificates needed for us. Fixes: SYS#2499 --- .../ca-certificates/ca-cacert-rootcert.bb | 5 ++++- .../ca-certificates/files/DST_Root_CA_X3.pem | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 recipes-extra/ca-certificates/files/DST_Root_CA_X3.pem diff --git a/recipes-extra/ca-certificates/ca-cacert-rootcert.bb b/recipes-extra/ca-certificates/ca-cacert-rootcert.bb index 271b43c296..9ddf95cc81 100644 --- a/recipes-extra/ca-certificates/ca-cacert-rootcert.bb +++ b/recipes-extra/ca-certificates/ca-cacert-rootcert.bb @@ -5,18 +5,21 @@ LICENSE = "RDL-COD14" LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" PR = "r6" -SRC_URI = "file://root.crt file://class3.crt" +SRC_URI = "file://root.crt file://class3.crt file://DST_Root_CA_X3.pem" do_install() { install -d ${D}${libdir}/ssl/certs install -m 0644 ${WORKDIR}/root.crt ${D}${libdir}/ssl/certs/cacert.org.pem cat ${WORKDIR}/class3.crt >> ${D}${libdir}/ssl/certs/cacert.org.pem + install -m 0644 ${WORKDIR}/DST_Root_CA_X3.pem ${D}${libdir}/ssl/certs/ # Create hash symlinks cd ${D}${libdir}/ssl/certs ln -s cacert.org.pem e5662767.0 ln -s cacert.org.pem 5ed36f99.0 ln -s cacert.org.pem 99d0fa06.0 + + ln -s DST_Root_CA_X3.pem 2e5ac55d.0 } FILES_${PN} = "${libdir}/ssl/certs/*" diff --git a/recipes-extra/ca-certificates/files/DST_Root_CA_X3.pem b/recipes-extra/ca-certificates/files/DST_Root_CA_X3.pem new file mode 100644 index 0000000000..b2e43c9381 --- /dev/null +++ b/recipes-extra/ca-certificates/files/DST_Root_CA_X3.pem @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/ +MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT +DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow +PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD +Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O +rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq +OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b +xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw +7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD +aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV +HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG +SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69 +ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr +AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz +R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5 +JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo +Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ +-----END CERTIFICATE----- From 90a5fad2b7f25f2daf5d321f17b0793533ab4da9 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 21 Apr 2016 13:06:13 +0200 Subject: [PATCH 04/41] glib: Enable static libraries for glib I want to use static libraries of glib in rauc to shrink the rescue image to a reasonable amount. --- yocto-dora/glib-2.0/glib-2.0_2.40.0.bb | 2 ++ yocto-master/glib-2.0_%.bbappend | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 yocto-master/glib-2.0_%.bbappend diff --git a/yocto-dora/glib-2.0/glib-2.0_2.40.0.bb b/yocto-dora/glib-2.0/glib-2.0_2.40.0.bb index 245b91c34e..8d61f49fbc 100644 --- a/yocto-dora/glib-2.0/glib-2.0_2.40.0.bb +++ b/yocto-dora/glib-2.0/glib-2.0_2.40.0.bb @@ -19,3 +19,5 @@ SRC_URI_append_class-native = " file://glib-gettextize-dir.patch" SRC_URI[md5sum] = "05fb7cb17eacbc718e90366a1eae60d9" SRC_URI[sha256sum] = "0d27f195966ecb1995dcce0754129fd66ebe820c7cd29200d264b02af1aa28b5" + +EXTRA_OECONF += " --enable-static " diff --git a/yocto-master/glib-2.0_%.bbappend b/yocto-master/glib-2.0_%.bbappend new file mode 100644 index 0000000000..53e9c016a9 --- /dev/null +++ b/yocto-master/glib-2.0_%.bbappend @@ -0,0 +1,2 @@ +EXTRA_OECONF += " --enable-static " + From 719af51ad051f2d8ba0e37303de1ad44da31af29 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 7 May 2016 23:00:11 +0200 Subject: [PATCH 05/41] image-rauc-ubi: Add license file checksums ERROR: image-rauc-ubi-1.0-r0 do_populate_lic: QA Issue: image-rauc-ubi: Recipe file does not have license file information (LIC_FILES_CHKSUM) [license-checksum] --- recipes-core/images/image-rauc-ubi.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-core/images/image-rauc-ubi.bb b/recipes-core/images/image-rauc-ubi.bb index e8b1a63785..cfee19f06c 100644 --- a/recipes-core/images/image-rauc-ubi.bb +++ b/recipes-core/images/image-rauc-ubi.bb @@ -1,6 +1,8 @@ DESCRIPTION = "ubi with rescue slot" LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" PACKAGES = "" PACKAGE_ARCH = "${MACHINE_ARCH}" From 5bdf5bc9f9de5576e5fb643ce2b98e1899cbccce Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 15 May 2016 15:23:43 +0200 Subject: [PATCH 06/41] image-rauc-ubi: Make sure mkfs.ubifs is present The DEPENDS is not enough to have it ready in time. Add a task dependency for mtd-utils-native. --- recipes-core/images/image-rauc-ubi.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/images/image-rauc-ubi.bb b/recipes-core/images/image-rauc-ubi.bb index cfee19f06c..b369e2c5a8 100644 --- a/recipes-core/images/image-rauc-ubi.bb +++ b/recipes-core/images/image-rauc-ubi.bb @@ -22,7 +22,7 @@ do_package_write_ipk[noexec] = "1" do_package_write_deb[noexec] = "1" do_package_write_rpm[noexec] = "1" -do_fetch[depends] = "virtual/kernel:do_build image-rauc-rescue-initramfs:do_build" +do_fetch[depends] = "virtual/kernel:do_build image-rauc-rescue-initramfs:do_build mtd-utils-native:do_populate_sysroot" S = "${WORKDIR}" From 2ed575b506f9a203c5532112e6743dd37652f957 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Tue, 24 May 2016 14:39:29 +0200 Subject: [PATCH 07/41] uboot: Avoid QA error on packaging I didn't know that u-boot was creating a package and installing the bin into /boot. The detection of the file seems to have changed and a new QA error comes up. ERROR: u-boot-v2011.12+gitAUTOINC+f6453a3911-r0 do_package: QA Issue: split_and_strip_files: 'file /home/oebuilds/jenkins/workspace/Yocto-Master/label/OE/build/tmp/work/sysmobts_v2-poky-linux-gnueabi/u-boot/v2011.12+gitAUTOINC+f6453a3911-r0/package/boot/u-boot-sysmobts-v2-v2011.12+gitAUTOINC+f6453a3911-r0' failed [split-strip] This seems to have been introduced by changing the LC_ALL to en_US.UTF-8. I have started a dialogue with upstream development but as we do not need a u-boot package, let's just remove the files. --- recipes-sysmobts/uboot/u-boot_sysmocom.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/recipes-sysmobts/uboot/u-boot_sysmocom.inc b/recipes-sysmobts/uboot/u-boot_sysmocom.inc index 64b73db9fc..47e60787e3 100644 --- a/recipes-sysmobts/uboot/u-boot_sysmocom.inc +++ b/recipes-sysmobts/uboot/u-boot_sysmocom.inc @@ -13,6 +13,10 @@ COMPATIBLE_MACHINE = "(sysmobts-v2)" UBOOT_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}" UBOOT_SYMLINK = "u-boot-${MACHINE}" +do_install_append() { + rm ${D}/boot/* +} + do_deploy_prepend () { install -d ${DEPLOYDIR} install ${S}/u-boot.bin ${DEPLOYDIR}/${UBOOT_IMAGE}.bin From bce73d1dc75e82e480d29e6fc80ecc5311924c74 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 2 Jun 2016 18:08:38 +0200 Subject: [PATCH 08/41] image-rauc-ubi: Deal with different kernel types I might end up using a zImage and then it should be used. Use the variable exported by the ${MACHINE}.conf to work with it. --- recipes-core/images/image-rauc-ubi.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-core/images/image-rauc-ubi.bb b/recipes-core/images/image-rauc-ubi.bb index b369e2c5a8..ab49545bca 100644 --- a/recipes-core/images/image-rauc-ubi.bb +++ b/recipes-core/images/image-rauc-ubi.bb @@ -29,7 +29,7 @@ S = "${WORKDIR}" do_fetch() { mkdir -p "${S}/fs" - cp "${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}.bin" "${S}/fs/kernel" + cp "${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin" "${S}/fs/kernel" cp "${DEPLOY_DIR_IMAGE}/image-rauc-rescue-initramfs-${MACHINE}.cpio.xz" "${S}/fs/initramfs" } From 0673324a5ddf817664d37100506f706a7922d005 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 6 Jun 2016 14:23:31 +0200 Subject: [PATCH 09/41] ubl: Add reivision G and later support The nWP handling was only present for RevF but applies to later HW revisions too. --- recipes-sysmobts/ubl/ubl_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-sysmobts/ubl/ubl_git.bb b/recipes-sysmobts/ubl/ubl_git.bb index 7bbb36e938..ae571f28e6 100644 --- a/recipes-sysmobts/ubl/ubl_git.bb +++ b/recipes-sysmobts/ubl/ubl_git.bb @@ -7,7 +7,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://ubl.c;beginline=1;endline=22;md5=806283bb3c475d9082e41f09020373ff" SRC_URI = "git://git.sysmocom.de/sysmo-bts/ubl;protocol=git;branch=master" -SRCREV = "0974846c2d2eb506d1443ee338aad4400f59bc70" +SRCREV = "77aac3693b45df7154ada64341fd67e41f990f22" PV = "v0.2.11+git${SRCPV}" PR = "r3" S = "${WORKDIR}/git" From 86baca7ed81c8690f559e7ca7cd095ad5ffb0600 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 6 Jun 2016 14:27:54 +0200 Subject: [PATCH 10/41] u-boot: Add revision G and later support as well --- recipes-sysmobts/uboot/u-boot_sysmocom.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-sysmobts/uboot/u-boot_sysmocom.inc b/recipes-sysmobts/uboot/u-boot_sysmocom.inc index 47e60787e3..5a162f8ad6 100644 --- a/recipes-sysmobts/uboot/u-boot_sysmocom.inc +++ b/recipes-sysmobts/uboot/u-boot_sysmocom.inc @@ -1,5 +1,5 @@ SRC_URI = "git://git.sysmocom.de/sysmo-bts/u-boot;branch=v2011.12;protocol=git" -SRCREV = "f6453a391125f824ebf5bab00ee03b6d73ae5695" +SRCREV = "ab8a84d9ac4c9d938ec6fa85e3f4f640d883c774" PV = "v2011.12+git${SRCPV}" S = "${WORKDIR}/git" From a09e6a2fec8e72c0ad68a870cc048655b5fd2757 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 6 Jun 2016 14:36:43 +0200 Subject: [PATCH 11/41] barebox-sysmobts: Prepare the system for revisionG as well --- recipes-bsp/barebox/barebox-sysmobts_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/barebox/barebox-sysmobts_git.bb b/recipes-bsp/barebox/barebox-sysmobts_git.bb index 5b19c9ea69..e9ac5b4493 100644 --- a/recipes-bsp/barebox/barebox-sysmobts_git.bb +++ b/recipes-bsp/barebox/barebox-sysmobts_git.bb @@ -1,6 +1,6 @@ require barebox.inc -SRCREV = "34a48171a699560d8a41d00d2c07ed37a79c00d8" +SRCREV = "f2b03e21a869b8df30e428ac9408d7988d55279a" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ file://defconfig \ From ddb2f88230ebb9e2690d92d5878cbf3022839d20 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 12 Jun 2016 21:47:34 +0200 Subject: [PATCH 12/41] u-boot: Build newer version of U-Boot not touching A1CR UBL is setting up the flash timings (A1CR) and so far U-Boot was overwriting it with a timing for the EVB development board of TI. Let UBL define ECC/ChipSelect and the A1CR timings. This might now cause different kind of flash issues because the per chip timings might be "wrong". This is why this commit should needs to stay in testing a bit longer. We should use this commit on RevC, D, E and F hardware ourselves a bit. --- recipes-sysmobts/uboot/u-boot_sysmocom.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-sysmobts/uboot/u-boot_sysmocom.inc b/recipes-sysmobts/uboot/u-boot_sysmocom.inc index 5a162f8ad6..6e1f15a6f6 100644 --- a/recipes-sysmobts/uboot/u-boot_sysmocom.inc +++ b/recipes-sysmobts/uboot/u-boot_sysmocom.inc @@ -1,5 +1,5 @@ SRC_URI = "git://git.sysmocom.de/sysmo-bts/u-boot;branch=v2011.12;protocol=git" -SRCREV = "ab8a84d9ac4c9d938ec6fa85e3f4f640d883c774" +SRCREV = "32c1294d62c134137d4a65b6e9101b1172b60789" PV = "v2011.12+git${SRCPV}" S = "${WORKDIR}/git" From 1c6616736c3e8ac21fe184a5daffc197d4550256 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 31 Oct 2015 20:46:35 +0100 Subject: [PATCH 13/41] OWHW: Add barebox recipe --- recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb | 2 +- recipes-bsp/barebox/barebox-gsmk-owhw_git.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb b/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb index ea246357d7..6fa0c16645 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb +++ b/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb @@ -1,6 +1,6 @@ require barebox.inc -SRCREV = "4d1c656aa7ba155d8a555602d832ff1fc76d63f8" +SRCREV = "4e4776272a81522253d391ed505c6864e1a8e8ba" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ file://defconfig \ diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb index 15908845b7..689940a219 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb +++ b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb @@ -2,7 +2,7 @@ require barebox.inc RDEPENDS_${PN} += "${PN}-mlo" -SRCREV = "4d1c656aa7ba155d8a555602d832ff1fc76d63f8" +SRCREV = "4e4776272a81522253d391ed505c6864e1a8e8ba" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ file://defconfig \ From 89435bf483dcaf5086c846f81523b808cda7142a Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 1 Nov 2015 15:20:24 +0100 Subject: [PATCH 14/41] usb2514: make it more modular/configurable --- recipes-bsp/sob-odu/files/usb2514.c | 307 +++++++++++++++++++++++----- 1 file changed, 255 insertions(+), 52 deletions(-) diff --git a/recipes-bsp/sob-odu/files/usb2514.c b/recipes-bsp/sob-odu/files/usb2514.c index 2669a2066c..5366e013d1 100644 --- a/recipes-bsp/sob-odu/files/usb2514.c +++ b/recipes-bsp/sob-odu/files/usb2514.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -30,11 +31,94 @@ /* #include */ #include "i2c-dev.h" +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#define USB2514_SLAVE_ADDR 0x2C +enum compare_op { + EQUAL, + NOT_EQUAL, + LESS_THAN_OR_EQUAL, + GREATER_THAN_OR_EQUAL, +}; + +struct usb2514_board { + const char *name; + + unsigned int i2c_bus; + uint8_t i2c_addr; + + const char *board_version_file; + unsigned int board_version; + enum compare_op board_version_op; + + uint8_t ports_swap; + + const char *reset_gpio_path; + int reset_low_active; +}; + +struct board_group { + /* new /sys/firmware/devicetree/base/model */ + const char *device_tree_name; + /* old pre-device tree kernels, "Hardware :" in /proc/cpuinfo */ + const char *proc_name; + + const struct usb2514_board *boards; + unsigned int num_boards; +}; + +static const struct usb2514_board odu_boards[] = { + { + .name = "sob-odu v1", + .i2c_bus = 0, + .i2c_addr = 0x2C, + .board_version_file = "/sys/devices/platform/sob-odu.0/board_version", + .board_version = 1, + .board_version_op = EQUAL, + .ports_swap = 0x00, /* ports are still swapped in hardware */ + .reset_gpio_path = "/sys/devices/platform/sob-odu.0/gpio_hub_reset/value", + .reset_low_active = 1, + }, { + .name = "sob-odu v2", + .i2c_bus = 0, + .i2c_addr = 0x2C, + .board_version_file = "/sys/devices/platform/sob-odu.0/board_version", + .board_version = 2, + .board_version_op = EQUAL, + .ports_swap = 0x0E, /* swap DN1, DN2, DN3 */ + .reset_gpio_path = "/sys/devices/platform/sob-odu.0/gpio_hub_reset/value", + .reset_low_active = 0, + }, { + .name = "sob-odu v2", + .i2c_bus = 0, + .i2c_addr = 0x2C, + .board_version_file = "/sys/devices/platform/sob-odu.0/board_version", + .board_version = 0, /* EEPROM Empty ?!? */ + .board_version_op = EQUAL, + .ports_swap = 0x0E, /* swap DN1, DN2, DN3 */ + .reset_gpio_path = "/sys/devices/platform/sob-odu.0/gpio_hub_reset/value", + .reset_low_active = 0, + }, { + .name = "sob-odu v3+", + .i2c_bus = 0, + .i2c_addr = 0x2C, + .board_version_file = "/sys/devices/platform/sob-odu.0/board_version", + .board_version = 3, + .board_version_op = GREATER_THAN_OR_EQUAL, + .ports_swap = 0x0C, /* swap only DN2 and DN3 */ + .reset_gpio_path = "/sys/devices/platform/sob-odu.0/gpio_hub_reset/value", + .reset_low_active = 0, + }, +}; + +static const struct board_group boards[] = { + { + .proc_name = "sob-odu", + .device_tree_name = "sysmocom ODU", + .boards = odu_boards, + .num_boards = ARRAY_SIZE(odu_boards), + }, +}; -#define BOARD_VER_PATH "/sys/devices/platform/sob-odu.0/board_version" -#define RESET_PATH "/sys/devices/platform/sob-odu.0/gpio_hub_reset/value" #define RESET_PATH_OLD "/sys/class/gpio/gpio62/value" /* Default configuration as per data sheet */ @@ -119,7 +203,7 @@ static int g_fd; static unsigned long get_support(void) { int rc; - unsigned long funcs; + unsigned long funcs = 0; rc = ioctl(g_fd, I2C_FUNCS, funcs); @@ -128,7 +212,6 @@ static unsigned long get_support(void) return funcs; } - static int write_regs(const uint8_t *regs) { unsigned int i; @@ -145,12 +228,12 @@ static int write_regs(const uint8_t *regs) } /* attempt to obtain the board version from sysfs */ -static int get_board_version(void) +static int get_board_version(const char *ver_file) { FILE *f; unsigned int ver; - f = fopen(BOARD_VER_PATH, "r"); + f = fopen(ver_file, "r"); if (!f) return -1; @@ -164,20 +247,143 @@ static int get_board_version(void) return ver; } -/* attempt to reset the hub via sysfs */ -static int reset_hub(void) +static int board_ver_matches(const struct usb2514_board *board, + unsigned int version) +{ + switch (board->board_version_op) { + case EQUAL: + return (version == board->board_version); + case NOT_EQUAL: + return (version != board->board_version); + case LESS_THAN_OR_EQUAL: + return (version <= board->board_version); + case GREATER_THAN_OR_EQUAL: + return (version >= board->board_version); + default: + return 0; + } +} + +static char *get_proc_name(void) +{ + FILE *f = fopen("/proc/cpuinfo", "r"); + char linebuf[256]; + + while (fgets(linebuf, sizeof(linebuf), f)) { + /* strip LF at the end of line */ + char *lf = strrchr(linebuf, '\n'); + if (lf) + *lf = '\0'; + + if (strncmp(linebuf, "Hardware", 8) && + strncmp(linebuf, "machine", 7)) + continue; + + /* search for the colon */ + char *colon = strchr(linebuf, ':'); + if (!colon) + continue; + colon++; + + /* strip any leading whitespace */ + while (*colon == ' ' || *colon == '\t') + colon++; + + fclose(f); + return strdup(colon); + } + + fclose(f); + return NULL; +} + +static char *get_dt_name(void) { FILE *f; - int invert_logic = 0; + char *name = NULL; + char linebuf[256]; - f = fopen(RESET_PATH, "w"); - if (!f) { - f = fopen(RESET_PATH_OLD, "w"); - if (!f) - return -1; - invert_logic = 1; + f = fopen("/sys/firmware/devicetree/base/model", "r"); + if (!f) + return NULL; + + if (!fgets(linebuf, sizeof(linebuf), f)) { + fclose(f); + return NULL; } + fclose(f); + + return strdup(linebuf); +} + + +static const struct board_group *find_matching_board_group() +{ + int i; + char *proc_name, *dt_name; + + proc_name = get_proc_name(); + dt_name = get_dt_name(); + + for (i = 0; i < ARRAY_SIZE(boards); i++) { + const struct board_group *bgrp = &boards[i]; + + if (dt_name && bgrp->device_tree_name && + !strcmp(dt_name, bgrp->device_tree_name)) { + free(proc_name); + free(dt_name); + return bgrp; + } + + if (proc_name && bgrp->proc_name && + !strcmp(proc_name, bgrp->proc_name)) { + free(proc_name); + free(dt_name); + return bgrp; + } + } + + free(proc_name); + free(dt_name); + + return NULL; +} + + +static const struct usb2514_board * +find_matching_board(const struct board_group *bgrp) +{ + int i; + + for (i = 0; i < bgrp->num_boards; i++) { + const struct usb2514_board *board = &bgrp->boards[i]; + int ver; + + if (board->board_version_file) { + /* get board version and compare */ + ver = get_board_version(board->board_version_file); + if (ver < 0) + continue; + if (!board_ver_matches(board, ver)) + continue; + } + + return board; + } + + return NULL; +} + +/* attempt to reset the hub via sysfs */ +static int reset_hub(const char *reset_path, int invert_logic) +{ + FILE *f; + + f = fopen(reset_path, "w"); + if (!f) + return -1; + if (invert_logic) fputs("0", f); else @@ -198,56 +404,53 @@ static int reset_hub(void) int main(int argc, char **argv) { int rc; - int board_version; - int adapter_nr; - long slave_addr = USB2514_SLAVE_ADDR; char filename[PATH_MAX]; + const struct board_group *bgrp; + const struct usb2514_board *board; - if (argc < 2) { - fprintf(stderr, "You have to specify I2C bus number\n"); - exit(2); - } - - adapter_nr = atoi(argv[1]); - snprintf(filename, sizeof(filename)-1, "/dev/i2c-%d", adapter_nr); - rc = open(filename, O_RDWR); - if (rc < 0) { - fprintf(stderr, "Error opening the device: %d\n", rc); + bgrp = find_matching_board_group(); + if (!bgrp) { + fprintf(stderr, "Cannot find matching board group for this system\n"); exit(1); } + printf("Found matching board group %s(%s)\n", bgrp->proc_name, bgrp->device_tree_name); + board = find_matching_board(bgrp); + if (!board) { + fprintf(stderr, "Cannot find matching config for this system\n"); + exit(1); + } + printf("Found matching board %s\n", board->name); + + /* open the I2C bus device */ + + snprintf(filename, sizeof(filename)-1, "/dev/i2c-%d", board->i2c_bus); + rc = open(filename, O_RDWR); + if (rc < 0) { + fprintf(stderr, "Error opening the device %s: %d\n", filename, rc); + exit(1); + } g_fd = rc; - get_support(); - board_version = get_board_version(); - if (board_version >= 3) { - /* on board version 3 and later we don't need to swap - * USB downlink port 1 */ - printf("Detected board >= v3, not swapping DN1\n"); - usb2514_odu[0xFA] = 0x0C; - } else if (board_version == 1) { - /* ports are still swapped in hardware */ - printf("Detected board v1, not swapping any ports\n"); - usb2514_odu[0xFA] = 0x00; - } else if (board_version == 2) { - printf("Detected board v2, swapping DN1, DN2 and DN3\n"); - /* default */ - } else { - printf("Assuming board v2, swapping DN1, DN2 and DN3\n"); - /* default */ - } + /* set the slave address */ - rc = ioctl(g_fd, I2C_SLAVE, slave_addr); + rc = ioctl(g_fd, I2C_SLAVE, board->i2c_addr); if (rc < 0) { fprintf(stderr, "Error setting slave addr: %d\n", rc); exit(1); } - /* First reset the USB hub before loading data into it */ - if (reset_hub() < 0) { - fprintf(stderr, "Couldn't reset the USB hub!\n"); - } + if (board->reset_gpio_path) { + /* First reset the USB hub before loading data into it */ + if (reset_hub(board->reset_gpio_path, board->reset_low_active) < 0) { + fprintf(stderr, "Couldn't reset the USB hub!\n"); + } + } else + fprintf(stderr, "board config doesn't indicate USB hub reset GPIO\n"); + + /* patch the port inversion byte into the array */ + usb2514_odu[0xFA] = board->ports_swap; rc = write_regs(usb2514_odu); if (rc < 0) { From a224a88891187bd430a76be51189fcf89c08d3b0 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 1 Nov 2015 15:32:42 +0100 Subject: [PATCH 15/41] usb2514.c: Add support for GSMK OWHW board we only need to swap a single port (DN4) here. --- recipes-bsp/sob-odu/files/usb2514.c | 16 ++++++++++++++++ recipes-bsp/sob-odu/usb2514_1.bb | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/recipes-bsp/sob-odu/files/usb2514.c b/recipes-bsp/sob-odu/files/usb2514.c index 5366e013d1..d0963236a1 100644 --- a/recipes-bsp/sob-odu/files/usb2514.c +++ b/recipes-bsp/sob-odu/files/usb2514.c @@ -110,12 +110,28 @@ static const struct usb2514_board odu_boards[] = { }, }; +static const struct usb2514_board owhw_boards[] = { + { + .name = "OWHW", + .i2c_bus = 1, + .i2c_addr = 0x2C, + .board_version_op = EQUAL, + .ports_swap = 0x10, /* swap only DN4 */ + .reset_gpio_path = "/sys/devices/platform/sob-odu.0/gpio_hub_reset/value", + .reset_low_active = 1, + }, +}; + static const struct board_group boards[] = { { .proc_name = "sob-odu", .device_tree_name = "sysmocom ODU", .boards = odu_boards, .num_boards = ARRAY_SIZE(odu_boards), + }, { + .device_tree_name = "GSMK OWHW", + .boards = owhw_boards, + .num_boards = ARRAY_SIZE(owhw_boards), }, }; diff --git a/recipes-bsp/sob-odu/usb2514_1.bb b/recipes-bsp/sob-odu/usb2514_1.bb index 1b25e6506b..4cdaa83e99 100644 --- a/recipes-bsp/sob-odu/usb2514_1.bb +++ b/recipes-bsp/sob-odu/usb2514_1.bb @@ -4,7 +4,7 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://${WORKDIR}/usb2514.c;beginline=1;endline=18;md5=3b8421a1c05d21add65cc20fccfa29cd" DEPENDS += "lmsensors-apps" -PR = "r3" +PR = "r4" SRC_URI = "file://usb2514.c \ file://gpio_usb2514 \ From fe3fe6e3d3bfe4122593d388fe1443c1f04e6bf9 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 1 Nov 2015 20:55:31 +0100 Subject: [PATCH 16/41] OWHW: add GPIO export script for this board ... and use the new GPIO location from usb2514 tool --- .../sob-odu/files/gsmk-owhw/gpio_usb2514 | 75 +++++++++++++++++++ recipes-bsp/sob-odu/files/usb2514.c | 4 +- 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 diff --git a/recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 b/recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 new file mode 100644 index 0000000000..1d92c26d05 --- /dev/null +++ b/recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 @@ -0,0 +1,75 @@ +#!/bin/sh + +SYSGPIO=/sys/class/gpio +DEVGPIO=/dev/gpio + +[ -d "$DEVGPIO " ] || mkdir "$DEVGPIO" + +export_gpio() +{ + NUM="$1" + DIR="$2" + + GPIOPATH="$SYSGPIO/gpio$NUM" + + [ -d "$GPIOPATH" ] || echo $1 > "$SYSGPIO/export" + echo $2 > "$GPIOPATH/direction" +} + +export_gpio_out() +{ + NUM="$1" + NAME="$2" + VAL="$3" + INV="$4" + + GPIOPATH="$SYSGPIO/gpio$NUM" + + export_gpio $NUM out + ln -sfn "$GPIOPATH" "$DEVGPIO/$NAME" + + if [ "x$INV" != "x" ]; then + echo 1 > "$GPIOPATH/active_low" + else + echo 0 > "$GPIOPATH/active_low" + fi + + echo $VAL > "$GPIOPATH/value" +} + +export_gpio_in() +{ + NUM="$1" + NAME="$2" + INV="$3" + + GPIOPATH="$SYSGPIO/gpio$NUM" + + export_gpio $NUM in + ln -sfn "$GPIOPATH" "$DEVGPIO/$NAME" + + if [ "x$INV" != "x" ]; then + echo 1 > "$GPIOPATH/active_low" + else + echo 0 > "$GPIOPATH/active_low" + fi +} + + +export_gpio_out 48 pse_i2c_buf_en 0 active_low +export_gpio_in 52 pse_int active_low +export_gpio_out 23 connect_st_usim1 0 +export_gpio_out 27 connect_st_usim2 0 +export_gpio_out 26 mdm1_rst 0 +export_gpio_out 59 mdm1_on 1 +export_gpio_out 58 mdm_ldo_en 1 +#export_gpio_in 57 button active_low +export_gpio_out 55 mdm2_rst 0 +#export_gpio_out 54 system_led active_low 1 +export_gpio_out 51 eeprom_wp 0 +export_gpio_out 50 mdm2_on 1 +export_gpio_out 113 simtrace_erase 0 +export_gpio_out 115 simtrace_bootloader 0 +export_gpio_out 114 simtrace_reset 0 +export_gpio_in 104 acc_int active_low +export_gpio_out 62 hub_reset active_low 1 diff --git a/recipes-bsp/sob-odu/files/usb2514.c b/recipes-bsp/sob-odu/files/usb2514.c index d0963236a1..7d06cb0bb0 100644 --- a/recipes-bsp/sob-odu/files/usb2514.c +++ b/recipes-bsp/sob-odu/files/usb2514.c @@ -117,8 +117,8 @@ static const struct usb2514_board owhw_boards[] = { .i2c_addr = 0x2C, .board_version_op = EQUAL, .ports_swap = 0x10, /* swap only DN4 */ - .reset_gpio_path = "/sys/devices/platform/sob-odu.0/gpio_hub_reset/value", - .reset_low_active = 1, + .reset_gpio_path = "/dev/gpio/hub_reset/value", + .reset_low_active = 0, }, }; From 8cde214b955a05daad0da35ffaeab2cf194486ad Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 1 Nov 2015 15:53:58 +0100 Subject: [PATCH 17/41] rauc: support OWHW --- .../images/image-rauc-rescue-initramfs.bb | 1 + recipes-core/images/image-rauc-ubi.bb | 4 ++ .../gsmk-owhw/hardcode-layout-values.patch | 41 +++++++++++++++++++ .../rauc/files/gsmk-owhw/system.conf | 27 ++++++++++++ recipes-extra/rauc/rauc.bb | 3 +- 5 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 recipes-extra/barebox-state/barebox-state/gsmk-owhw/hardcode-layout-values.patch create mode 100644 recipes-extra/rauc/files/gsmk-owhw/system.conf diff --git a/recipes-core/images/image-rauc-rescue-initramfs.bb b/recipes-core/images/image-rauc-rescue-initramfs.bb index c4a5eac7c5..e78adc738d 100644 --- a/recipes-core/images/image-rauc-rescue-initramfs.bb +++ b/recipes-core/images/image-rauc-rescue-initramfs.bb @@ -17,6 +17,7 @@ IMAGE_FSTYPES = "cpio.xz" BAD_RECOMMENDATIONS_append = " busybox-syslog kbd kbd-consolefonts kbd-keymaps" BAD_RECOMMENDATIONS_append_sysmobts-v2 = " e2fsprogs-e2fsck" BAD_RECOMMENDATIONS_append_sysmocom-odu = " e2fsprogs-e2fsck" +BAD_RECOMMENDATIONS_append_gsmk-owhw = " e2fsprogs-e2fsck" inherit core-image require recipes-apps/images/image-manifest.inc diff --git a/recipes-core/images/image-rauc-ubi.bb b/recipes-core/images/image-rauc-ubi.bb index ab49545bca..2cd494239a 100644 --- a/recipes-core/images/image-rauc-ubi.bb +++ b/recipes-core/images/image-rauc-ubi.bb @@ -33,6 +33,10 @@ do_fetch() { cp "${DEPLOY_DIR_IMAGE}/image-rauc-rescue-initramfs-${MACHINE}.cpio.xz" "${S}/fs/initramfs" } +do_fetch_append_gsmk-owhw() { + cp "${DEPLOY_DIR_IMAGE}/uImage-am335x-gsmk-owhw.dtb" "${S}/fs/devicetree" +} + IMAGE_ROOTFS = "${S}/fs" IMAGE_NAME = "${PN}-${MACHINE}-${DATETIME}" # Don't include the DATETIME variable in the sstate package sigantures diff --git a/recipes-extra/barebox-state/barebox-state/gsmk-owhw/hardcode-layout-values.patch b/recipes-extra/barebox-state/barebox-state/gsmk-owhw/hardcode-layout-values.patch new file mode 100644 index 0000000000..5bb0b617d5 --- /dev/null +++ b/recipes-extra/barebox-state/barebox-state/gsmk-owhw/hardcode-layout-values.patch @@ -0,0 +1,41 @@ +From 4cc63588211df7bf328e55820cfe19b56ea776b6 Mon Sep 17 00:00:00 2001 +From: Jan Luebbe +Date: Sat, 30 May 2015 20:00:10 +0200 +Subject: [PATCH 3/3] hardcode symocom-odu values + +Signed-off-by: Jan Luebbe +--- + src/barebox-state.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/barebox-state.c b/src/barebox-state.c +index f56275f..002ee5c 100644 +--- a/src/barebox-state.c ++++ b/src/barebox-state.c +@@ -1738,6 +1738,7 @@ static struct state *state_get(const char *name) + return ERR_CAST(state); + } + ++#if 0 + partition_node = of_parse_phandle(node, "backend", 0); + if (!partition_node) { + fprintf(stderr, "cannot find backend node in %s\n", node->full_name); +@@ -1750,9 +1751,14 @@ static struct state *state_get(const char *name) + return ERR_PTR(ret); + } + ++#endif ++ devpath = "/sys/bus/i2c/devices/1-0050/eeprom"; ++ offset = 0xc0; ++ size = 0x40; ++ + of_property_read_string(node, "backend-type", &backend_type); + if (!strcmp(backend_type, "raw")) +- ret = state_backend_raw_file(state, partition_node->full_name, devpath, offset, size); ++ ret = state_backend_raw_file(state, "/i2c/eeprom@50/partition@0", devpath, offset, size); + else + fprintf(stderr, "invalid backend type: %s\n", backend_type); + +-- +2.1.4 + diff --git a/recipes-extra/rauc/files/gsmk-owhw/system.conf b/recipes-extra/rauc/files/gsmk-owhw/system.conf new file mode 100644 index 0000000000..c716db3639 --- /dev/null +++ b/recipes-extra/rauc/files/gsmk-owhw/system.conf @@ -0,0 +1,27 @@ +[system] +compatible=gsmk-owhw +bootloader=barebox +mountprefix=/mnt/rauc + +[keyring] +path=ca.pem + +[slot.rescue.0] +device=/dev/ubi0_rescue +type=ubifs +bootname=rescue +readonly=true + +[slot.rootfs.0] +device=/dev/ubi0_system0 +type=ubifs +bootname=system0 + +[slot.rootfs.1] +device=/dev/ubi0_system1 +type=ubifs +bootname=system1 + +[slot.data.0] +device=/dev/ubi0_data +type=ubifs diff --git a/recipes-extra/rauc/rauc.bb b/recipes-extra/rauc/rauc.bb index 9f607a79b3..f96da09106 100644 --- a/recipes-extra/rauc/rauc.bb +++ b/recipes-extra/rauc/rauc.bb @@ -1,7 +1,7 @@ DESCRIPTION = "rauc update controller" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" -PR = "r0" +PR = "r1" SRC_URI = "git://github.com/jluebbe/rauc.git;protocol=https \ file://dev-ca.pem \ @@ -20,6 +20,7 @@ DEPENDS = "curl openssl glib-2.0" # rauc is invoking these depending the machine RDEPENDS_${PN}_append_sysmobts-v2 = " barebox-state" RDEPENDS_${PN}_append_sysmocom-odu = " barebox-state" +RDEPENDS_${PN}_append_gsmk-owhw = " barebox-state" RDEPENDS_${PN}_append_sysmocom-bsc = " grub" FILES_${PN} += "/mnt/rauc" From 3bacf883bd0812d8bb3c010483d21c79d45cf9e6 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 1 Nov 2015 22:29:57 +0100 Subject: [PATCH 18/41] OWHW: persistent modem serial device names --- .../gsmk-owhw/odu-persistens-serial.rules | 19 +++++++++++++++++++ .../odu-persistens-serial.rules | 0 2 files changed, 19 insertions(+) create mode 100644 recipes-bsp/odu-static-devicenames/files/gsmk-owhw/odu-persistens-serial.rules rename recipes-bsp/odu-static-devicenames/files/{ => sysmocom-odu}/odu-persistens-serial.rules (100%) diff --git a/recipes-bsp/odu-static-devicenames/files/gsmk-owhw/odu-persistens-serial.rules b/recipes-bsp/odu-static-devicenames/files/gsmk-owhw/odu-persistens-serial.rules new file mode 100644 index 0000000000..ca0ea6d30b --- /dev/null +++ b/recipes-bsp/odu-static-devicenames/files/gsmk-owhw/odu-persistens-serial.rules @@ -0,0 +1,19 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="owhw_persistent_serial_end" +SUBSYSTEM!="tty", GOTO="owhw_persistent_serial_end" +KERNEL!="ttyUSB[0-9]*", GOTO="owhw_persistent_serial_end" + +KERNELS=="2-1.2:1.0", SYMLINK+="ttyModem1DM" +KERNELS=="2-1.2:1.1", SYMLINK+="ttyModem1NMEA" +KERNELS=="2-1.2:1.2", SYMLINK+="ttyModem1AT" +KERNELS=="2-1.2:1.3", SYMLINK+="ttyModem1PPP" +KERNELS=="2-1.2:1.4", SYMLINK+="ttyModem1NDIS" + +KERNELS=="2-1.3:1.0", SYMLINK+="ttyModem2DM" +KERNELS=="2-1.3:1.1", SYMLINK+="ttyModem2NMEA" +KERNELS=="2-1.3:1.2", SYMLINK+="ttyModem2AT" +KERNELS=="2-1.3:1.3", SYMLINK+="ttyModem2PPP" +KERNELS=="2-1.3:1.4", SYMLINK+="ttyModem2NDIS" + +LABEL="owhw_persistent_serial_end" diff --git a/recipes-bsp/odu-static-devicenames/files/odu-persistens-serial.rules b/recipes-bsp/odu-static-devicenames/files/sysmocom-odu/odu-persistens-serial.rules similarity index 100% rename from recipes-bsp/odu-static-devicenames/files/odu-persistens-serial.rules rename to recipes-bsp/odu-static-devicenames/files/sysmocom-odu/odu-persistens-serial.rules From 5c4b0827e6a79ce6a3d71f9c8a8ebf5da40b49d5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 2 Nov 2015 22:52:40 +0100 Subject: [PATCH 19/41] OWHW: fix gpio_usb2514 syntax error --- recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 b/recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 index 1d92c26d05..01c0ddf34c 100644 --- a/recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 +++ b/recipes-bsp/sob-odu/files/gsmk-owhw/gpio_usb2514 @@ -65,11 +65,11 @@ export_gpio_out 59 mdm1_on 1 export_gpio_out 58 mdm_ldo_en 1 #export_gpio_in 57 button active_low export_gpio_out 55 mdm2_rst 0 -#export_gpio_out 54 system_led active_low 1 +#export_gpio_out 54 system_led 1 active_low export_gpio_out 51 eeprom_wp 0 export_gpio_out 50 mdm2_on 1 export_gpio_out 113 simtrace_erase 0 export_gpio_out 115 simtrace_bootloader 0 export_gpio_out 114 simtrace_reset 0 export_gpio_in 104 acc_int active_low -export_gpio_out 62 hub_reset active_low 1 +export_gpio_out 62 hub_reset 1 active_low From 87ba2df8103256825c17a97b54e3965e11af7c97 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 5 Nov 2015 16:23:05 +0100 Subject: [PATCH 20/41] OWHW: update barebox to fix button GPIO --- recipes-bsp/barebox/barebox-gsmk-owhw_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb index 689940a219..b0854d16ff 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb +++ b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb @@ -2,7 +2,7 @@ require barebox.inc RDEPENDS_${PN} += "${PN}-mlo" -SRCREV = "4e4776272a81522253d391ed505c6864e1a8e8ba" +SRCREV = "238fc4b1309e1ea07deb75b48b56b351dd97db3a" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ file://defconfig \ From aa5249a22db245110cb8f0af7ec1830b98a3741d Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 7 Nov 2015 17:15:48 +0100 Subject: [PATCH 21/41] OWHW: add recipe for bossa (Atmel SAM flasher) --- recipes-bsp/bossa/bossa_git.bb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 recipes-bsp/bossa/bossa_git.bb diff --git a/recipes-bsp/bossa/bossa_git.bb b/recipes-bsp/bossa/bossa_git.bb new file mode 100644 index 0000000000..3ceaaf1420 --- /dev/null +++ b/recipes-bsp/bossa/bossa_git.bb @@ -0,0 +1,22 @@ +SUMMARY = "flash programming utility for Atmel's SAM family of flash-based ARM microcontrollers" +HOMEPAGE = "http://sourceforge.net/projects/b-o-s-s-a/" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d32239bcb673463ab874e80d47fae504" +SRCREV = "05bfcc39bc0453c3028b1161175b95a81af7a901" +SRC_URI = "git://git.code.sf.net/p/b-o-s-s-a/code" + +PV = "v0.0+git${SRCPV}" +PR = "r1" + +S = "${WORKDIR}/git" + +do_compile() { + mkdir -p obj/arm-dis + oe_runmake -f Makefile bin/bossac bin/bossash +} + +do_install() { + install -d ${D}${bindir}/ + install -m 0755 ${S}/bin/bossac ${D}${bindir}/bossac + install -m 0755 ${S}/bin/bossash ${D}${bindir}/bossash +} From 5bf8ff55714ceb2f33ad85fec38aa45e6533d0e0 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 7 Nov 2015 17:17:06 +0100 Subject: [PATCH 22/41] OWHW: add 'sysmocom-owhw-image' and ensure usb2514 + bossa is included --- conf/machine/gsmk-owhw.conf | 4 +-- recipes-apps/images/sysmocom-owhw-image.bb | 28 +++++++++++++++++++ .../files/gsmk-owhw/data.mount | 7 +++++ recipes-apps/tasks/task-owhw-image.bb | 21 ++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 recipes-apps/images/sysmocom-owhw-image.bb create mode 100644 recipes-apps/sysmocom-backup-data/files/gsmk-owhw/data.mount create mode 100644 recipes-apps/tasks/task-owhw-image.bb diff --git a/conf/machine/gsmk-owhw.conf b/conf/machine/gsmk-owhw.conf index f99f88d596..8b20f53063 100644 --- a/conf/machine/gsmk-owhw.conf +++ b/conf/machine/gsmk-owhw.conf @@ -4,7 +4,7 @@ require conf/machine/include/ti33x.inc -IMAGE_FSTYPES += "ubi tar.gz" +IMAGE_FSTYPES += "ubifs" SERIAL_CONSOLE = "115200 ttyO0" @@ -37,5 +37,5 @@ PREFERRED_PROVIDER_virtual/bootloader = "barebox-gsmk-owhw" EXTRA_IMAGEDEPENDS += "barebox-gsmk-owhw" MACHINE_ESSENTIAL_EXTRA_RDEPENDS = "\ - kernel usb2514 \ + kernel usb2514 mtd-utils-ubifs bossa \ " diff --git a/recipes-apps/images/sysmocom-owhw-image.bb b/recipes-apps/images/sysmocom-owhw-image.bb new file mode 100644 index 0000000000..4ab9a70487 --- /dev/null +++ b/recipes-apps/images/sysmocom-owhw-image.bb @@ -0,0 +1,28 @@ +require recipes-apps/images/sysmocom-image.inc +require recipes-apps/images/image-passwd.inc +require recipes-apps/images/image-sshkey.inc + +# have enough space for log files and db +IMAGE_INSTALL = "task-core-boot ${ROOTFS_PKGMANAGE} \ + task-owhw-image task-sysmocom-debug \ + task-sysmocom-tools" + +# vim: tabstop=8 shiftwidth=8 noexpandtab + +# create what the rauc slots expect... +link_kernel() { + echo "Linking the current uImage to /kernel" + OLD_PWD=$PWD + + cd ${IMAGE_ROOTFS}/ + ln -s ./boot/uImage-* ./kernel || true + + echo "Copying devicetree to /devicetree" + cp "${DEPLOY_DIR_IMAGE}/uImage-am335x-gsmk-owhw.dtb" ./devicetree + + touch ./initramfs + + cd $OLD_PWD +} + +IMAGE_PREPROCESS_COMMAND += "link_kernel; " diff --git a/recipes-apps/sysmocom-backup-data/files/gsmk-owhw/data.mount b/recipes-apps/sysmocom-backup-data/files/gsmk-owhw/data.mount new file mode 100644 index 0000000000..f07f6b0ce2 --- /dev/null +++ b/recipes-apps/sysmocom-backup-data/files/gsmk-owhw/data.mount @@ -0,0 +1,7 @@ +[Unit] +Description=/data + +[Mount] +What=ubi0:data +Where=/data +Type=ubifs diff --git a/recipes-apps/tasks/task-owhw-image.bb b/recipes-apps/tasks/task-owhw-image.bb new file mode 100644 index 0000000000..dbf5b5f020 --- /dev/null +++ b/recipes-apps/tasks/task-owhw-image.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "Task for OWHW hardware" +LICENSE = "MIT" +LIC_FILES_CHKSUM = " \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +ALLOW_EMPTY_${PN} = "1" +PR = "r1" + +RDEPENDS_${PN} = "usbutils openvpn gpsd gps-utils dropbear \ + wget ntp ca-cacert-rootcert early-date i2c-tools \ + wireless-tools gpsdate \ + kernel-module-cfg80211 \ + kernel-module-mac80211 \ + kernel-module-rt2x00lib \ + kernel-module-rt2x00usb \ + kernel-module-rt2800lib \ + kernel-module-rt2800usb \ + linux-firmware-ralink \ + procps iputils \ +" + +# vim: tabstop=8 shiftwidth=8 noexpandtab From b45f8f591f8d1d891566c1a17b751224898b6384 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 19 Nov 2015 12:39:05 +0100 Subject: [PATCH 23/41] bossa: add missing readline build dependency --- recipes-bsp/bossa/bossa_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-bsp/bossa/bossa_git.bb b/recipes-bsp/bossa/bossa_git.bb index 3ceaaf1420..ff73830f9c 100644 --- a/recipes-bsp/bossa/bossa_git.bb +++ b/recipes-bsp/bossa/bossa_git.bb @@ -4,9 +4,10 @@ LICENSE = "GPLv3" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d32239bcb673463ab874e80d47fae504" SRCREV = "05bfcc39bc0453c3028b1161175b95a81af7a901" SRC_URI = "git://git.code.sf.net/p/b-o-s-s-a/code" +DEPENDS = "readline" PV = "v0.0+git${SRCPV}" -PR = "r1" +PR = "r2" S = "${WORKDIR}/git" From 843770cb60286b8e16ec4a665497d4f258055832 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 19 Nov 2015 14:31:50 +0100 Subject: [PATCH 24/41] import iw 3.11 recipe from meta-openembedded dora branch. I completley fail to understand why the most fundamental tool for wifi configuration is missing from poky/dora. --- ...on-t-use-git-describe-for-versioning.patch | 44 +++++++++++++++++++ recipes-connectivity/iw/iw_3.11.bb | 23 ++++++++++ 2 files changed, 67 insertions(+) create mode 100644 recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch create mode 100644 recipes-connectivity/iw/iw_3.11.bb diff --git a/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch b/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch new file mode 100644 index 0000000000..97c00cd2d2 --- /dev/null +++ b/recipes-connectivity/iw/iw/0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch @@ -0,0 +1,44 @@ +From 5310abba864cfe3a8b65af130729447604190b29 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Tue, 29 Nov 2011 17:03:27 +0100 +Subject: [PATCH] iw: version.sh: don't use git describe for versioning + +It will detect top-level git repositories like the Angstrom setup-scripts and break. + +Upstream-Status: Unknown + +Signed-off-by: Koen Kooi +--- + version.sh | 16 +--------------- + 1 files changed, 1 insertions(+), 15 deletions(-) + +diff --git a/version.sh b/version.sh +index 3fb9f6d..e4a56cb 100755 +--- a/version.sh ++++ b/version.sh +@@ -3,21 +3,7 @@ + VERSION="3.2" + OUT="$1" + +-if head=`git rev-parse --verify HEAD 2>/dev/null`; then +- git update-index --refresh --unmerged > /dev/null +- descr=$(git describe) +- +- # on git builds check that the version number above +- # is correct... +- [ "${descr%%-*}" = "v$VERSION" ] || exit 2 +- +- v="${descr#v}" +- if git diff-index --name-only HEAD | read dummy ; then +- v="$v"-dirty +- fi +-else +- v="$VERSION" +-fi ++v="$VERSION" + + echo '#include "iw.h"' > "$OUT" + echo "const char iw_version[] = \"$v\";" >> "$OUT" +-- +1.7.7.3 + diff --git a/recipes-connectivity/iw/iw_3.11.bb b/recipes-connectivity/iw/iw_3.11.bb new file mode 100644 index 0000000000..42477e717a --- /dev/null +++ b/recipes-connectivity/iw/iw_3.11.bb @@ -0,0 +1,23 @@ +SUMMARY = "nl80211 based CLI configuration utility for wireless devices" +DESCRIPTION = "iw is a new nl80211 based CLI configuration utility for \ +wireless devices. It supports almost all new drivers that have been added \ +to the kernel recently. " +HOMEPAGE = "http://wireless.kernel.org/en/users/Documentation/iw" +SECTION = "base" +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774" + +DEPENDS = "libnl pkgconfig" + +SRC_URI = "http://www.kernel.org/pub/software/network/iw/${P}.tar.bz2 \ + file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \ +" + +SRC_URI[md5sum] = "e633cf7c875c7d8b547abafc0d95f6c4" +SRC_URI[sha256sum] = "09348d4f7371fad00c07cfb67b9e34f24403cbd9361f9634cfb4dff9cdd40139" + +EXTRA_OEMAKE = "" + +do_install() { + oe_runmake DESTDIR=${D} install +} From d5c8bcd3b72ad80c420a4f6f53e3148f8368e4ac Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 19 Nov 2015 15:10:29 +0100 Subject: [PATCH 25/41] add crda (wifi regulatory database) and its [build] dependencies --- ...o-not-run-ldconfig-if-destdir-is-set.patch | 21 +++ ...-linking-of-libraries-used-by-reglib.patch | 50 ++++++ recipes-connectivity/crda/crda_3.18.bb | 41 +++++ .../0001-M2Crypto-Error-fix.patch | 162 ++++++++++++++++++ ...k-in-sysroot-not-in-host-directories.patch | 39 +++++ .../python-m2crypto/python-m2crypto_0.21.1.bb | 45 +++++ recipes-devtools/swig/swig.inc | 63 +++++++ ...e-for-swig-swiglib-on-non-Win32-plat.patch | 69 ++++++++ ...re-use-pkg-config-for-pcre-detection.patch | 64 +++++++ recipes-devtools/swig/swig_3.0.6.bb | 8 + 10 files changed, 562 insertions(+) create mode 100644 recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch create mode 100644 recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch create mode 100644 recipes-connectivity/crda/crda_3.18.bb create mode 100644 recipes-devtools/python-m2crypto/python-m2crypto/0001-M2Crypto-Error-fix.patch create mode 100644 recipes-devtools/python-m2crypto/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch create mode 100644 recipes-devtools/python-m2crypto/python-m2crypto_0.21.1.bb create mode 100644 recipes-devtools/swig/swig.inc create mode 100644 recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch create mode 100644 recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch create mode 100644 recipes-devtools/swig/swig_3.0.6.bb diff --git a/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch b/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch new file mode 100644 index 0000000000..3ef35ee549 --- /dev/null +++ b/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch @@ -0,0 +1,21 @@ +From: Ben Hutchings +Date: Sat, 23 Aug 2014 12:27:34 -0700 +Subject: crda: Do not run ldconfig if DESTDIR is set + +Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126028.html] + +Signed-off-by: Ben Hutchings +Signed-off-by: Joe MacDonald + +--- a/Makefile ++++ b/Makefile +@@ -132,7 +132,9 @@ install-libreg: + $(NQ) ' INSTALL libreg' + $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) + $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/ ++ifndef DESTDIR + $(Q)ldconfig ++endif + + %.o: %.c regdb.h $(LIBREG) + $(NQ) ' CC ' $@ diff --git a/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch b/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch new file mode 100644 index 0000000000..aceb56df74 --- /dev/null +++ b/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch @@ -0,0 +1,50 @@ +From: Ben Hutchings +Date: Sat, 23 Aug 2014 12:26:37 -0700 +Subject: Fix linking of libraries used by libreg + +The math and crypto libraries are called by and need to be linked to +libreg.so, not to the executables. + +Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126027.html] + +Signed-off-by: Ben Hutchings +Signed-off-by: Joe MacDonald + +--- a/Makefile ++++ b/Makefile +@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -peda + CFLAGS += -Wall -g + LDLIBREG += -lreg + LDLIBS += $(LDLIBREG) +-LDLIBS += -lm ++LIBREGLDLIBS += -lm + LIBREG += libreg.so + LDFLAGS += -L ./ + +@@ -40,7 +40,7 @@ all_noverify: $(LIBREG) crda intersect r + + ifeq ($(USE_OPENSSL),1) + CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` +-LDLIBS += `pkg-config --libs openssl` ++LIBREGLDLIBS += `pkg-config --libs openssl` + + ifeq ($(RUNTIME_PUBKEY_ONLY),1) + CFLAGS += -DRUNTIME_PUBKEY_ONLY +@@ -51,7 +51,7 @@ endif + + else + CFLAGS += -DUSE_GCRYPT +-LDLIBS += -lgcrypt ++LIBREGLDLIBS += -lgcrypt + + $(LIBREG): keys-gcrypt.c + +@@ -121,7 +121,7 @@ keys-%.c: utils/key2pub.py $(wildcard $( + + $(LIBREG): regdb.h reglib.h reglib.c + $(NQ) ' CC ' $@ +- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ ++ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLDLIBS) + + install-libreg-headers: + $(NQ) ' INSTALL libreg-headers' diff --git a/recipes-connectivity/crda/crda_3.18.bb b/recipes-connectivity/crda/crda_3.18.bb new file mode 100644 index 0000000000..931a053528 --- /dev/null +++ b/recipes-connectivity/crda/crda_3.18.bb @@ -0,0 +1,41 @@ +SUMMARY = "Wireless Central Regulatory Domain Agent" +HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA" +SECTION = "net" +LICENSE = "copyleft-next-0.3.0 & ISC" +LIC_FILES_CHKSUM = "file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe \ + file://${WORKDIR}/wireless-regdb-2014.11.18/LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c" + +DEPENDS = "python-m2crypto-native python-native libgcrypt libnl" + +SRC_URI = "https://www.kernel.org/pub/software/network/crda/${BP}.tar.xz;name=crda \ + https://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-2014.11.18.tar.xz;name=bin \ + file://do-not-run-ldconfig-if-destdir-is-set.patch \ + file://fix-linking-of-libraries-used-by-reglib.patch \ +" +SRC_URI[crda.md5sum] = "0431fef3067bf503dfb464069f06163a" +SRC_URI[crda.sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf" + +SRC_URI[bin.md5sum] = "d750c402c5510add7380edcb1d9b75b2" +SRC_URI[bin.sha256sum] = "eab6b50f30748a8b0065ba38cf3df05aac161a5861ae0a6c3cfd01d38a71c9dd" + +inherit python-dir pythonnative +# Recursive make problem +EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg'" + +do_compile() { + oe_runmake all_noverify +} + +do_install() { + oe_runmake SBINDIR=${sbindir}/ install + + install -d ${D}${libdir}/crda/ + + install -m 0644 ${WORKDIR}/wireless-regdb-2014.11.18/regulatory.bin ${D}${libdir}/crda/regulatory.bin +} + + +RDEPENDS_${PN} = "udev" +FILES_${PN} += "${libdir}crda/regulatory.bin \ + ${base_libdir}/udev/rules.d/85-regulatory.rules \ +" diff --git a/recipes-devtools/python-m2crypto/python-m2crypto/0001-M2Crypto-Error-fix.patch b/recipes-devtools/python-m2crypto/python-m2crypto/0001-M2Crypto-Error-fix.patch new file mode 100644 index 0000000000..2a74b68505 --- /dev/null +++ b/recipes-devtools/python-m2crypto/python-m2crypto/0001-M2Crypto-Error-fix.patch @@ -0,0 +1,162 @@ +From 02a24ac541df68033d4efd7e2f8a1b92dc49328d Mon Sep 17 00:00:00 2001 +From: Li xin +Date: Mon, 27 Jul 2015 05:06:20 +0900 +Subject: [PATCH] M2Crypto: Error fix. + +After swig upgrade from 3.0.2 to 3.0.6,build the recipes which +depends on python-m2crypto will occur errors like this: +SALT_LEN = m2.PKCS5_SALT_LEN +AttributeError: 'module' object has no attribute 'PKCS5_SALT_LEN' +since python-m2crypto depends on swig-native + +Ref: +https://github.com/martinpaljak/M2Crypto/issues/60#issuecomment-75735489 + +This patch is from: +http://pkgs.fedoraproject.org/cgit/m2crypto.git/tree/m2crypto-0.21.1-swig-3.0.5.patch + +Upstream-Status: pending + +Signed-off-by: Li Xin +--- + M2Crypto/__init__.py | 4 ++-- + M2Crypto/m2.py | 2 +- + SWIG/_lib.i | 4 ++++ + SWIG/_pkcs7.i | 1 + + setup.py | 26 +++++++++++++++++++++++++- + 5 files changed, 33 insertions(+), 4 deletions(-) + +diff --git a/M2Crypto/__init__.py b/M2Crypto/__init__.py +index e7acfe7..02f4d28 100644 +--- a/M2Crypto/__init__.py ++++ b/M2Crypto/__init__.py +@@ -19,7 +19,7 @@ Copyright 2008-2011 Heikki Toivonen. All rights reserved. + version_info = (0, 21, 1) + version = '.'.join([str(_v) for _v in version_info]) + +-import __m2crypto ++import _m2crypto + import m2 + import ASN1 + import AuthCookie +@@ -57,4 +57,4 @@ import util + encrypt=1 + decrypt=0 + +-__m2crypto.lib_init() ++_m2crypto.lib_init() +diff --git a/M2Crypto/m2.py b/M2Crypto/m2.py +index e4bb695..822143f 100644 +--- a/M2Crypto/m2.py ++++ b/M2Crypto/m2.py +@@ -25,7 +25,7 @@ Portions created by Open Source Applications Foundation (OSAF) are + Copyright (C) 2004 OSAF. All Rights Reserved. + """ + +-from __m2crypto import * ++from _m2crypto import * + lib_init() + + +diff --git a/SWIG/_lib.i b/SWIG/_lib.i +index 42dc180..47a53b8 100644 +--- a/SWIG/_lib.i ++++ b/SWIG/_lib.i +@@ -100,6 +100,7 @@ int ssl_verify_callback(int ok, X509_STORE_CTX *ctx) { + int cret; + int new_style_callback = 0, warning_raised_exception=0; + PyGILState_STATE gilstate; ++ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + ssl = (SSL *)X509_STORE_CTX_get_app_data(ctx); + +@@ -185,6 +186,7 @@ int ssl_verify_callback(int ok, X509_STORE_CTX *ctx) { + void ssl_info_callback(const SSL *s, int where, int ret) { + PyObject *argv, *retval, *_SSL; + PyGILState_STATE gilstate; ++ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + gilstate = PyGILState_Ensure(); + +@@ -204,6 +206,7 @@ DH *ssl_set_tmp_dh_callback(SSL *ssl, int is_export, int keylength) { + PyObject *argv, *ret, *_ssl; + DH *dh; + PyGILState_STATE gilstate; ++ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + gilstate = PyGILState_Ensure(); + +@@ -227,6 +230,7 @@ RSA *ssl_set_tmp_rsa_callback(SSL *ssl, int is_export, int keylength) { + PyObject *argv, *ret, *_ssl; + RSA *rsa; + PyGILState_STATE gilstate; ++ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + gilstate = PyGILState_Ensure(); + +diff --git a/SWIG/_pkcs7.i b/SWIG/_pkcs7.i +index 174f40a..7bffbfc 100644 +--- a/SWIG/_pkcs7.i ++++ b/SWIG/_pkcs7.i +@@ -157,6 +157,7 @@ PyObject *smime_read_pkcs7(BIO *bio) { + BIO *bcont = NULL; + PKCS7 *p7; + PyObject *tuple, *_p7, *_BIO; ++ PyObject *self = NULL; /* bug in SWIG_NewPointerObj as of 3.0.5 */ + + if (BIO_method_type(bio) == BIO_TYPE_MEM) { + /* OpenSSL FAQ explains that this is needed for mem BIO to return EOF, +diff --git a/setup.py b/setup.py +index e7c49eb..b98abe0 100644 +--- a/setup.py ++++ b/setup.py +@@ -20,6 +20,7 @@ except ImportError: + from distutils.command import build_ext + + from distutils.core import Extension ++from distutils.file_util import copy_file + + + class _M2CryptoBuildExt(build_ext.build_ext): +@@ -57,7 +58,17 @@ class _M2CryptoBuildExt(build_ext.build_ext): + self.swig_opts.append('-includeall') + #self.swig_opts.append('-D__i386__') # Uncomment for early OpenSSL 0.9.7 versions, or on Fedora Core if build fails + #self.swig_opts.append('-DOPENSSL_NO_EC') # Try uncommenting if you can't build with EC disabled +- ++ self.swig_opts.append('-modern') ++ self.swig_opts.append('-builtin') ++ ++ # These two lines are a workaround for ++ # http://bugs.python.org/issue2624 , hard-coding that we are only ++ # building a single extension with a known path; a proper patch to ++ # distutils would be in the run phase, when extension name and path are ++ # known. ++ self.swig_opts.append('-outdir') ++ self.swig_opts.append(os.path.join(self.build_lib, 'M2Crypto')) ++ + self.include_dirs += [os.path.join(self.openssl, opensslIncludeDir), + os.path.join(os.getcwd(), 'SWIG')] + +@@ -71,6 +82,19 @@ class _M2CryptoBuildExt(build_ext.build_ext): + + self.library_dirs += [os.path.join(self.openssl, opensslLibraryDir)] + ++ def run(self): ++ '''Overloaded build_ext implementation to allow inplace=1 to work, ++ which is needed for (python setup.py test).''' ++ # This is another workaround for http://bugs.python.org/issue2624 + the ++ # corresponding lack of support in setuptools' test command. Note that ++ # just using self.inplace in finalize_options() above does not work ++ # because swig is not rerun if the __m2crypto.so extension exists. ++ # Again, hard-coding our extension name and location. ++ build_ext.build_ext.run(self) ++ if self.inplace: ++ copy_file(os.path.join(self.build_lib, 'M2Crypto', '_m2crypto.py'), ++ os.path.join('M2Crypto', '_m2crypto.py'), ++ verbose=self.verbose, dry_run=self.dry_run) + + if sys.version_info < (2,4): + +-- +1.8.4.2 + diff --git a/recipes-devtools/python-m2crypto/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch b/recipes-devtools/python-m2crypto/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch new file mode 100644 index 0000000000..bcbdf24bb5 --- /dev/null +++ b/recipes-devtools/python-m2crypto/python-m2crypto/0001-setup.py-link-in-sysroot-not-in-host-directories.patch @@ -0,0 +1,39 @@ +From f11b9c71080513f9b867ba8f40613ba2ebc6e960 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Fri, 29 Mar 2013 15:17:17 +0100 +Subject: [PATCH] setup.py: link in sysroot, not in host directories + +Signed-off-by: Koen Kooi + +Upstream-status: Unknown +--- + setup.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/setup.py b/setup.py +index e7c49eb..8deaa34 100644 +--- a/setup.py ++++ b/setup.py +@@ -40,7 +40,7 @@ class _M2CryptoBuildExt(build_ext.build_ext): + self.openssl = 'c:\\pkg' + else: + self.libraries = ['ssl', 'crypto'] +- self.openssl = '/usr' ++ self.openssl = os.environ.get( "STAGING_DIR" ) + + + def finalize_options(self): +@@ -49,8 +49,8 @@ class _M2CryptoBuildExt(build_ext.build_ext): + + build_ext.build_ext.finalize_options(self) + +- opensslIncludeDir = os.path.join(self.openssl, 'include') +- opensslLibraryDir = os.path.join(self.openssl, 'lib') ++ opensslIncludeDir = os.environ.get( "STAGING_INCDIR" ) ++ opensslLibraryDir = os.environ.get( "STAGING_LIBDIR" ) + + self.swig_opts = ['-I%s' % i for i in self.include_dirs + \ + [opensslIncludeDir]] +-- +1.8.1.4 + diff --git a/recipes-devtools/python-m2crypto/python-m2crypto_0.21.1.bb b/recipes-devtools/python-m2crypto/python-m2crypto_0.21.1.bb new file mode 100644 index 0000000000..ff6203f205 --- /dev/null +++ b/recipes-devtools/python-m2crypto/python-m2crypto_0.21.1.bb @@ -0,0 +1,45 @@ +SUMMARY = "A Python crypto and SSL toolkit" +HOMEPAGE = "http://chandlerproject.org/bin/view/Projects/MeTooCrypto" + +DEPENDS = "openssl swig-native python" + +LICENSE = "BSD" +LIC_FILES_CHKSUM = "file://LICENCE;md5=b0e1f0b7d0ce8a62c18b1287b991800e" + +SRC_URI = "http://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-${PV}.tar.gz \ + file://0001-setup.py-link-in-sysroot-not-in-host-directories.patch \ + file://0001-M2Crypto-Error-fix.patch" + +SRC_URI[md5sum] = "f93d8462ff7646397a9f77a2fe602d17" +SRC_URI[sha256sum] = "25b94498505c2d800ee465db0cc1aff097b1615adc3ac042a1c85ceca264fc0a" + +S = "${WORKDIR}/M2Crypto-${PV}" + +inherit setuptools + +SWIG_FEATURES_x86-64 = "-D__x86_64__" +SWIG_FEATURES ?= "" +export SWIG_FEATURES + +# Get around a problem with swig, but only if the +# multilib header file exists. +# +do_compile_prepend() { + if [ "${SITEINFO_BITS}" = "64" ];then + bit="64" + else + bit="32" + fi + + if [ -e ${STAGING_INCDIR}/openssl/opensslconf-${bit}.h ] ;then + for i in SWIG/_ec.i SWIG/_evp.i; do + sed -i -e "s/opensslconf.*\./opensslconf-${bit}\./" "$i" + done + elif [ -e ${STAGING_INCDIR}/openssl/opensslconf-n${bit}.h ] ;then + for i in SWIG/_ec.i SWIG/_evp.i; do + sed -i -e "s/opensslconf.*\./opensslconf-n${bit}\./" "$i" + done + fi +} + +BBCLASSEXTEND = "native" diff --git a/recipes-devtools/swig/swig.inc b/recipes-devtools/swig/swig.inc new file mode 100644 index 0000000000..9da40df55e --- /dev/null +++ b/recipes-devtools/swig/swig.inc @@ -0,0 +1,63 @@ +SUMMARY = "SWIG - Simplified Wrapper and Interface Generator" +HOMEPAGE = "http://swig.sourceforge.net/" +LICENSE = "BSD & GPLv3" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \ + file://LICENSE-GPL;md5=d32239bcb673463ab874e80d47fae504 \ + file://LICENSE-UNIVERSITIES;md5=8ce9dcc8f7c994de4a408b205c72ba08" + +SECTION = "devel" + +DEPENDS = "libpcre python" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz" + +inherit autotools pythonnative + +EXTRA_OECONF = " \ + --with-python=${PYTHON} \ + --without-allegrocl \ + --without-android \ + --without-boost \ + --without-chicken \ + --without-clisp \ + --without-csharp \ + --without-d \ + --without-gcj \ + --without-go \ + --without-guile \ + --without-java \ + --without-lua \ + --without-mzscheme \ + --without-ocaml \ + --without-octave \ + --without-perl5 \ + --without-pike \ + --without-php \ + --without-python3 \ + --without-r \ + --without-ruby \ + --without-tcl \ +" + +BBCLASSEXTEND = "native nativesdk" + +do_configure() { + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/Tools/config + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/Tools/config + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} + install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} + oe_runconf +} + +do_install_append_class-nativesdk() { + cd ${D}${bindir} + ln -s swig swig2.0 +} + +def swiglib_relpath(d): + swiglib = d.getVar('datadir', True) + "/" + d.getVar('BPN', True) + "/" + d.getVar('PV', True) + return os.path.relpath(swiglib, d.getVar('bindir', True)) + +do_install_append_class-native() { + create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)} +} diff --git a/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch b/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch new file mode 100644 index 0000000000..81df3e264f --- /dev/null +++ b/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch @@ -0,0 +1,69 @@ +From a4a0440a644c6c5e5da096efe3cf05ba309a284f Mon Sep 17 00:00:00 2001 +From: "NODA, Kai" +Date: Sun, 22 Apr 2012 17:01:02 +0900 +Subject: [PATCH] Use /proc/self/exe for "swig -swiglib" on non-Win32 + platforms. + +If it wasn't found, then fall back to a fixed string just as before. + +Upstream-Status: Submitted +http://sourceforge.net/mailarchive/message.php?msg_id=29179733 + +--- + Source/Modules/main.cxx | 24 ++++++++++++++++++++++-- + 1 file changed, 22 insertions(+), 2 deletions(-) + +diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx +index d2f5d3b..cbb0a12 100644 +--- a/Source/Modules/main.cxx ++++ b/Source/Modules/main.cxx +@@ -26,6 +26,11 @@ char cvsroot_main_cxx[] = "$Id$"; + #include "cparse.h" + #include + #include // for INT_MAX ++#ifndef _WIN32 ++#include ++#include // for readlink ++#include // for stat ++#endif + + // Global variables + +@@ -902,9 +907,9 @@ int SWIG_main(int argc, char *argv[], Language *l) { + + // Check for SWIG_LIB environment variable + if ((c = getenv("SWIG_LIB")) == (char *) 0) { ++ char *p; + #if defined(_WIN32) + char buf[MAX_PATH]; +- char *p; + if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) { + *(p + 1) = '\0'; + SwigLib = NewStringf("%sLib", buf); // Native windows installation path +@@ -914,7 +919,22 @@ int SWIG_main(int argc, char *argv[], Language *l) { + if (Len(SWIG_LIB_WIN_UNIX) > 0) + SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw) + #else +- SwigLib = NewString(SWIG_LIB); ++ char buf[PATH_MAX]; ++ if (0 < ::readlink("/proc/self/exe", buf, sizeof(buf)) && ++ (p = ::strstr(buf, "/bin/swig"))) { ++ int major, minor, patch; ++ const int ret = ::sscanf(VERSION, "%d.%d.%d", &major, &minor, &patch); ++ if (3 == ret) { ++ const ::ptrdiff_t dir_part_len = p - buf; ++ ::snprintf(p, PATH_MAX - dir_part_len, "/share/swig/%d.%d.%d", major, minor, patch); ++ struct ::stat stat_res; ++ if (0 == ::stat(buf, &stat_res) && S_ISDIR(stat_res.st_mode)) { ++ SwigLib = NewString(buf); ++ } ++ } ++ } ++ if (NULL == SwigLib) ++ SwigLib = NewString(SWIG_LIB); + #endif + } else { + SwigLib = NewString(c); +-- +1.7.9.5 + diff --git a/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch b/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch new file mode 100644 index 0000000000..1b1128acab --- /dev/null +++ b/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch @@ -0,0 +1,64 @@ +From 5c4d6d8538994d5fe9b3b46bfafaf0a605e3bda6 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Tue, 17 Jun 2014 08:18:17 +0200 +Subject: [PATCH] configure: use pkg-config for pcre detection + +Signed-off-by: Koen Kooi +Upstream-Status: pending +--- + configure.ac | 38 +++++++------------------------------- + 1 file changed, 7 insertions(+), 31 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0c984b7..6edcec1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -70,38 +70,14 @@ AC_MSG_RESULT([$with_pcre]) + + dnl To make configuring easier, check for a locally built PCRE using the Tools/pcre-build.sh script + if test x"${with_pcre}" = xyes ; then +- AC_MSG_CHECKING([whether to use local PCRE]) +- local_pcre_config=no +- if test -z $PCRE_CONFIG; then +- if test -f `pwd`/pcre/pcre-swig-install/bin/pcre-config; then +- PCRE_CONFIG=`pwd`/pcre/pcre-swig-install/bin/pcre-config +- local_pcre_config=$PCRE_CONFIG +- fi +- fi +- AC_MSG_RESULT([$local_pcre_config]) +-fi +-AS_IF([test "x$with_pcre" != xno], +- [AX_PATH_GENERIC([pcre], +- [], dnl Minimal version of PCRE we need -- accept any +- [], dnl custom sed script for version parsing is not needed +- [AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library]) +- LIBS="$LIBS $PCRE_LIBS" +- CPPFLAGS="$CPPFLAGS $PCRE_CFLAGS" +- ], +- [AC_MSG_FAILURE([ +- Cannot find pcre-config script from PCRE (Perl Compatible Regular Expressions) +- library package. This dependency is needed for configure to complete, +- Either: +- - Install the PCRE developer package on your system (preferred approach). +- - Download the PCRE source tarball, build and install on your system +- as you would for any package built from source distribution. +- - Use the Tools/pcre-build.sh script to build PCRE just for SWIG to statically +- link against. Run 'Tools/pcre-build.sh --help' for instructions. +- (quite easy and does not require privileges to install PCRE on your system) +- - Use configure --without-pcre to disable regular expressions support in SWIG +- (not recommended).]) +- ]) ++ PKG_CHECK_MODULES([PCRE], [libpcre], [ ++ AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library]) ++ LIBS="$LIBS $PCRE_LIBS" ++ CPPFLAGS="$CPPFLAGS $PCRE_CFLAGS" ++ ], [ ++ AC_MSG_WARN([$PCRE_PKG_ERRORS]) + ]) ++fi + + + dnl CCache +-- +1.9.3 + diff --git a/recipes-devtools/swig/swig_3.0.6.bb b/recipes-devtools/swig/swig_3.0.6.bb new file mode 100644 index 0000000000..2a0917e4e9 --- /dev/null +++ b/recipes-devtools/swig/swig_3.0.6.bb @@ -0,0 +1,8 @@ +require ${BPN}.inc + +SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \ + file://0001-configure-use-pkg-config-for-pcre-detection.patch \ + " +SRC_URI[md5sum] = "df43ae271642bcfa61c1e59f970f9963" +SRC_URI[sha256sum] = "c67f63ea11956106e4cda66416d5020330dc4ce2ee45057d39a9494ce33eca05" + From b917d5b19a4428ff7350a5a351973b9a44323031 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 19 Nov 2015 16:00:52 +0100 Subject: [PATCH 26/41] task-owhw-image: Add crda and iw for wifi --- recipes-apps/tasks/task-owhw-image.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-apps/tasks/task-owhw-image.bb b/recipes-apps/tasks/task-owhw-image.bb index dbf5b5f020..7a957abc52 100644 --- a/recipes-apps/tasks/task-owhw-image.bb +++ b/recipes-apps/tasks/task-owhw-image.bb @@ -3,11 +3,11 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = " \ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" ALLOW_EMPTY_${PN} = "1" -PR = "r1" +PR = "r2" RDEPENDS_${PN} = "usbutils openvpn gpsd gps-utils dropbear \ wget ntp ca-cacert-rootcert early-date i2c-tools \ - wireless-tools gpsdate \ + wireless-tools iw crda gpsdate \ kernel-module-cfg80211 \ kernel-module-mac80211 \ kernel-module-rt2x00lib \ From 08406f0a8c57f52e7a2059c38485abaa935bae71 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 19 Nov 2015 17:32:52 +0100 Subject: [PATCH 27/41] barebox: update to 'initramfs is optional' boot config --- recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb | 2 +- recipes-bsp/barebox/barebox-gsmk-owhw_git.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb b/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb index 6fa0c16645..55b019a090 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb +++ b/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb @@ -1,6 +1,6 @@ require barebox.inc -SRCREV = "4e4776272a81522253d391ed505c6864e1a8e8ba" +SRCREV = "8a75b87fb2f6c7970265ebd77f0338be46421fe2" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ file://defconfig \ diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb index b0854d16ff..bc394d428e 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb +++ b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb @@ -2,7 +2,7 @@ require barebox.inc RDEPENDS_${PN} += "${PN}-mlo" -SRCREV = "238fc4b1309e1ea07deb75b48b56b351dd97db3a" +SRCREV = "8a75b87fb2f6c7970265ebd77f0338be46421fe2" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ file://defconfig \ From b53807060ba4dc3bff9934b84dc6ad57251bcf77 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 19 Nov 2015 17:54:11 +0100 Subject: [PATCH 28/41] sysmocom-owhw-image: no initramfs, hard-link for kernel for some reason barebox is not able to resolve the symlink, so let's create a hard link instead. --- recipes-apps/images/sysmocom-owhw-image.bb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipes-apps/images/sysmocom-owhw-image.bb b/recipes-apps/images/sysmocom-owhw-image.bb index 4ab9a70487..ec1e2943b2 100644 --- a/recipes-apps/images/sysmocom-owhw-image.bb +++ b/recipes-apps/images/sysmocom-owhw-image.bb @@ -15,13 +15,11 @@ link_kernel() { OLD_PWD=$PWD cd ${IMAGE_ROOTFS}/ - ln -s ./boot/uImage-* ./kernel || true + ln ./boot/uImage-* ./kernel || true echo "Copying devicetree to /devicetree" cp "${DEPLOY_DIR_IMAGE}/uImage-am335x-gsmk-owhw.dtb" ./devicetree - touch ./initramfs - cd $OLD_PWD } From 6eef6d8fb3bfb596442dcca6144c00ae4f1d387b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 17 Feb 2016 20:06:17 +0100 Subject: [PATCH 29/41] OWHW: update barebox to include v2 changes --- .../barebox/barebox-gsmk-owhw-mlo_git.bb | 2 +- recipes-bsp/barebox/barebox-gsmk-owhw/defconfig | 17 ++++++++++++++--- recipes-bsp/barebox/barebox-gsmk-owhw_git.bb | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb b/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb index 55b019a090..7615b20c62 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb +++ b/recipes-bsp/barebox/barebox-gsmk-owhw-mlo_git.bb @@ -1,6 +1,6 @@ require barebox.inc -SRCREV = "8a75b87fb2f6c7970265ebd77f0338be46421fe2" +SRCREV = "ce8849b03a40718fdaa9d7fc30312eeeb0fafcac" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ file://defconfig \ diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw/defconfig b/recipes-bsp/barebox/barebox-gsmk-owhw/defconfig index 65734251da..46892e5785 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw/defconfig +++ b/recipes-bsp/barebox/barebox-gsmk-owhw/defconfig @@ -343,6 +343,7 @@ CONFIG_CMD_GPIO=y CONFIG_CMD_I2C=y CONFIG_CMD_LED=y CONFIG_CMD_NAND=y +CONFIG_CMD_SPI=y CONFIG_CMD_LED_TRIGGER=y CONFIG_CMD_USBGADGET=y @@ -393,7 +394,9 @@ CONFIG_PHYLIB=y # CONFIG_DRIVER_NET_CALXEDA_XGMAC is not set CONFIG_DRIVER_NET_CPSW=y # CONFIG_DRIVER_NET_DESIGNWARE is not set +# CONFIG_DRIVER_NET_ENC28J60 is not set # CONFIG_DRIVER_NET_KS8851_MLL is not set +# CONFIG_DRIVER_NET_MICREL is not set # CONFIG_DRIVER_NET_SMC911X is not set # CONFIG_DRIVER_NET_SMC91111 is not set @@ -418,13 +421,16 @@ CONFIG_MICREL_PHY=y # # SPI drivers # -# CONFIG_SPI is not set +CONFIG_SPI=y +CONFIG_DRIVER_SPI_GPIO=y +CONFIG_DRIVER_SPI_OMAP3=y CONFIG_I2C=y +CONFIG_I2C_ALGOBIT=y # # I2C Hardware Bus support # -# CONFIG_I2C_GPIO is not set +CONFIG_I2C_GPIO=y CONFIG_I2C_OMAP=y CONFIG_MTD=y CONFIG_MTD_WRITE=y @@ -434,6 +440,8 @@ CONFIG_MTD_OOB_DEVICE=y # # Self contained MTD devices # +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set # CONFIG_MTD_DOCG3 is not set # CONFIG_MTD_MTDRAM is not set # CONFIG_DRIVER_CFI is not set @@ -504,7 +512,8 @@ CONFIG_LED_TRIGGERS=y # # EEPROM support # -CONFIG_EEPROM_AT24=y +CONFIG_EEPROM_AT25=y +# CONFIG_EEPROM_AT24 is not set # # Input device support @@ -523,6 +532,7 @@ CONFIG_GPIOLIB=y # GPIO # CONFIG_GPIO_GENERIC=y +# CONFIG_GPIO_74164 is not set CONFIG_GPIO_GENERIC_PLATFORM=y # CONFIG_GPIO_IMX is not set # CONFIG_GPIO_MXS is not set @@ -544,6 +554,7 @@ CONFIG_BUS_OMAP_GPMC=y # # Firmware Drivers # +# CONFIG_FIRMWARE_ALTERA_SERIAL is not set # # PHY Subsystem diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb index bc394d428e..7936eb9e91 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb +++ b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb @@ -2,7 +2,7 @@ require barebox.inc RDEPENDS_${PN} += "${PN}-mlo" -SRCREV = "8a75b87fb2f6c7970265ebd77f0338be46421fe2" +SRCREV = "ce8849b03a40718fdaa9d7fc30312eeeb0fafcac" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ file://defconfig \ From 4a8db6dbea1426b67eb50fe3b1c8939ffb143ae0 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 22 Feb 2016 23:39:14 +0100 Subject: [PATCH 30/41] update barebox-state to current dt-utils master which (at least for owhw-v2) fixes the automatic discovery of the bootstate backend EEPROM. I suspect it should now also work without the hardc-de-layout-values.patch on sysmobts-v2 and sysmocom-odu, but that remains to be tested (and thus the patches remain). --- recipes-extra/barebox-state/barebox-state.bb | 9 ++- ...tate-add-support-for-uint8-variables.patch | 73 ------------------- .../gsmk-owhw/hardcode-layout-values.patch | 41 ----------- 3 files changed, 5 insertions(+), 118 deletions(-) delete mode 100644 recipes-extra/barebox-state/barebox-state/0002-barebox-state-add-support-for-uint8-variables.patch delete mode 100644 recipes-extra/barebox-state/barebox-state/gsmk-owhw/hardcode-layout-values.patch diff --git a/recipes-extra/barebox-state/barebox-state.bb b/recipes-extra/barebox-state/barebox-state.bb index ed76fa34d9..02b1aa24c8 100644 --- a/recipes-extra/barebox-state/barebox-state.bb +++ b/recipes-extra/barebox-state/barebox-state.bb @@ -1,15 +1,16 @@ DESCRIPTION = "barebox state tool (dt)" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=9ac2e7cff1ddaf48b6eab6028f23ef88" -PR = "r3" +PR = "r4" SRC_URI = "\ git://git.pengutronix.de/git/tools/dt-utils.git\ file://0001-barebox-state-fix-typo.patch\ - file://0002-barebox-state-add-support-for-uint8-variables.patch\ - file://hardcode-layout-values.patch\ " +SRC_URI_append_sysmocom-odu = "file://hardcode-layout-values.patch" +SRC_URI_append_sysmobts-v2 = "file://hardcode-layout-values.patch" + PACKAGES =+ "libdt-utils barebox-fdtdump" FILES_libdt-utils = "${libdir}/libdt-utils.so.*" @@ -17,7 +18,7 @@ FILES_barebox-fdtdump = "${bindir}/fdtdump" S = "${WORKDIR}/git" -SRCREV = "2e87b7e47752380219c1f12b3dcbb5db706936e5" +SRCREV = "f0bddb4f82deaf73cf20aeda5bbf64c50a59dd60" DEPENDS = "udev" diff --git a/recipes-extra/barebox-state/barebox-state/0002-barebox-state-add-support-for-uint8-variables.patch b/recipes-extra/barebox-state/barebox-state/0002-barebox-state-add-support-for-uint8-variables.patch deleted file mode 100644 index 25188955f9..0000000000 --- a/recipes-extra/barebox-state/barebox-state/0002-barebox-state-add-support-for-uint8-variables.patch +++ /dev/null @@ -1,73 +0,0 @@ -From cada2ed0b4ca0d467621fa90de304421e17b4869 Mon Sep 17 00:00:00 2001 -From: Jan Luebbe -Date: Sat, 30 May 2015 19:52:55 +0200 -Subject: [PATCH 2/3] barebox-state: add support for uint8 variables - -Signed-off-by: Jan Luebbe ---- - src/barebox-state.c | 35 +++++++++++++++++++++++++++++++++++ - 1 file changed, 35 insertions(+) - -diff --git a/src/barebox-state.c b/src/barebox-state.c -index 57305c4..f56275f 100644 ---- a/src/barebox-state.c -+++ b/src/barebox-state.c -@@ -81,6 +81,7 @@ struct state_backend { - enum state_variable_type { - STATE_TYPE_INVALID = 0, - STATE_TYPE_ENUM, -+ STATE_TYPE_U8, - STATE_TYPE_U32, - STATE_TYPE_MAC, - }; -@@ -185,6 +186,32 @@ static int state_uint32_import(struct state_variable *sv, - return 0; - } - -+static struct state_variable *state_uint8_create(struct state *state, -+ const char *name, struct device_node *node) -+{ -+ struct state_uint32 *su32; -+ struct param_d *param; -+ -+ su32 = xzalloc(sizeof(*su32)); -+ -+ param = dev_add_param_int(&state->dev, name, state_set_dirty, -+ NULL, &su32->value, "%u", state); -+ if (IS_ERR(param)) { -+ free(su32); -+ return ERR_CAST(param); -+ } -+ -+ su32->param = param; -+ su32->var.size = sizeof(uint8_t); -+#ifdef __LITTLE_ENDIAN -+ su32->var.raw = &su32->value; -+#else -+ su32->var.raw = &su32->value + 3; -+#endif -+ -+ return &su32->var; -+} -+ - static struct state_variable *state_uint32_create(struct state *state, - const char *name, struct device_node *node) - { -@@ -395,6 +422,14 @@ out: - - static struct variable_type types[] = { - { -+ .type = STATE_TYPE_U8, -+ .type_name = "uint8", -+ .export = state_uint32_export, -+ .import = state_uint32_import, -+ .create = state_uint8_create, -+ .set = state_uint32_set, -+ .get = state_uint32_get, -+ }, { - .type = STATE_TYPE_U32, - .type_name = "uint32", - .export = state_uint32_export, --- -2.1.4 - diff --git a/recipes-extra/barebox-state/barebox-state/gsmk-owhw/hardcode-layout-values.patch b/recipes-extra/barebox-state/barebox-state/gsmk-owhw/hardcode-layout-values.patch deleted file mode 100644 index 5bb0b617d5..0000000000 --- a/recipes-extra/barebox-state/barebox-state/gsmk-owhw/hardcode-layout-values.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 4cc63588211df7bf328e55820cfe19b56ea776b6 Mon Sep 17 00:00:00 2001 -From: Jan Luebbe -Date: Sat, 30 May 2015 20:00:10 +0200 -Subject: [PATCH 3/3] hardcode symocom-odu values - -Signed-off-by: Jan Luebbe ---- - src/barebox-state.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/src/barebox-state.c b/src/barebox-state.c -index f56275f..002ee5c 100644 ---- a/src/barebox-state.c -+++ b/src/barebox-state.c -@@ -1738,6 +1738,7 @@ static struct state *state_get(const char *name) - return ERR_CAST(state); - } - -+#if 0 - partition_node = of_parse_phandle(node, "backend", 0); - if (!partition_node) { - fprintf(stderr, "cannot find backend node in %s\n", node->full_name); -@@ -1750,9 +1751,14 @@ static struct state *state_get(const char *name) - return ERR_PTR(ret); - } - -+#endif -+ devpath = "/sys/bus/i2c/devices/1-0050/eeprom"; -+ offset = 0xc0; -+ size = 0x40; -+ - of_property_read_string(node, "backend-type", &backend_type); - if (!strcmp(backend_type, "raw")) -- ret = state_backend_raw_file(state, partition_node->full_name, devpath, offset, size); -+ ret = state_backend_raw_file(state, "/i2c/eeprom@50/partition@0", devpath, offset, size); - else - fprintf(stderr, "invalid backend type: %s\n", backend_type); - --- -2.1.4 - From f54c291c859f6d8ed054dff4c43d2ad1ea78c78b Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 22 Feb 2016 23:51:14 +0100 Subject: [PATCH 31/41] OWHW: add patch to hard-code the boot-state back-end EEPROM path --- ...hard-code-the-bootstate-backend-node.patch | 29 +++++++++++++++++++ recipes-bsp/barebox/barebox-gsmk-owhw_git.bb | 1 + 2 files changed, 30 insertions(+) create mode 100644 recipes-bsp/barebox/barebox-gsmk-owhw/0001-OWHW-HACK-hard-code-the-bootstate-backend-node.patch diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw/0001-OWHW-HACK-hard-code-the-bootstate-backend-node.patch b/recipes-bsp/barebox/barebox-gsmk-owhw/0001-OWHW-HACK-hard-code-the-bootstate-backend-node.patch new file mode 100644 index 0000000000..8a34475cae --- /dev/null +++ b/recipes-bsp/barebox/barebox-gsmk-owhw/0001-OWHW-HACK-hard-code-the-bootstate-backend-node.patch @@ -0,0 +1,29 @@ +From 5661d2be63f55e5cbaa72e1da1dae32e7a5c3071 Mon Sep 17 00:00:00 2001 +From: Harald Welte +Date: Mon, 22 Feb 2016 23:42:44 +0100 +Subject: [PATCH] OWHW HACK: hard-code the bootstate backend-node + +this is required as the spi controller used in barebox is spi-gpio, +while on Linux we use the hardware spi controller of the am335x, +resulting in different devicetree paths. +--- + common/state.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/common/state.c b/common/state.c +index 9c0b218..1571b53 100644 +--- a/common/state.c ++++ b/common/state.c +@@ -758,7 +758,8 @@ static int of_state_fixup(struct device_node *root, void *ctx) + } + + /* backend phandle */ +- backend_node = of_find_node_by_path_from(root, state->backend->of_path); ++ //backend_node = of_find_node_by_path_from(root, state->backend->of_path); ++ backend_node = of_find_node_by_path_from(root, "/ocp/spi@481a0000/m95m02@0"); + if (!backend_node) { + ret = -ENODEV; + goto out; +-- +2.7.0 + diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb index 7936eb9e91..c432c30d63 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb +++ b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb @@ -5,6 +5,7 @@ RDEPENDS_${PN} += "${PN}-mlo" SRCREV = "ce8849b03a40718fdaa9d7fc30312eeeb0fafcac" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ + file://0001-OWHW-HACK-hard-code-the-bootstate-backend-node.patch \ file://defconfig \ " From 27d5493687301661c683a4adf773c845a2f77e18 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 23 Feb 2016 00:36:31 +0100 Subject: [PATCH 32/41] OWHW: update barebox recipe (move eeprom bootstate to offset 0) --- recipes-bsp/barebox/barebox-gsmk-owhw_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb index c432c30d63..fc111d9b7e 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb +++ b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb @@ -2,7 +2,7 @@ require barebox.inc RDEPENDS_${PN} += "${PN}-mlo" -SRCREV = "ce8849b03a40718fdaa9d7fc30312eeeb0fafcac" +SRCREV = "341203778b60ff3b27bf90f11c13eba2a0384b34" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ file://0001-OWHW-HACK-hard-code-the-bootstate-backend-node.patch \ From 78f5bc0867fdbe34af9f2436f6fc5017d2083287 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 23 Feb 2016 19:22:55 +0100 Subject: [PATCH 33/41] OWHW: add image definitio for OWHW related files + rauc-slot files for OWHW, one should build sysmocom-owhw-rauc-image, not sysmocom-owhw-image! --- recipes-apps/images/sysmocom-owhw-rauc-image.bb | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 recipes-apps/images/sysmocom-owhw-rauc-image.bb diff --git a/recipes-apps/images/sysmocom-owhw-rauc-image.bb b/recipes-apps/images/sysmocom-owhw-rauc-image.bb new file mode 100644 index 0000000000..b4fb6aad47 --- /dev/null +++ b/recipes-apps/images/sysmocom-owhw-rauc-image.bb @@ -0,0 +1,2 @@ +require sysmocom-owhw-image.bb +require sysmocom-rauc-slot.inc From b021331415be564ca0b42cf9c433b94aaaff57b3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 8 Apr 2016 21:59:38 +0200 Subject: [PATCH 34/41] OWHW: Enable hardware watchdog from systemd We had this enabled on odu/idu/sysmobts already, but didn't do so on owhw. --- .../systemd/systemd/gsmk-owhw/system.conf | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 recipes-fixes/systemd/systemd/gsmk-owhw/system.conf diff --git a/recipes-fixes/systemd/systemd/gsmk-owhw/system.conf b/recipes-fixes/systemd/systemd/gsmk-owhw/system.conf new file mode 100644 index 0000000000..ff9ecb874e --- /dev/null +++ b/recipes-fixes/systemd/systemd/gsmk-owhw/system.conf @@ -0,0 +1,43 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. +# +# See systemd.conf(5) for details + +[Manager] +#LogLevel=info +#LogTarget=journal-or-kmsg +#LogColor=yes +#LogLocation=no +#DumpCore=yes +#CrashShell=no +#ShowStatus=yes +#CrashChVT=1 +#CPUAffinity=1 2 +#DefaultControllers=cpu +#DefaultStandardOutput=journal +#DefaultStandardError=inherit +#JoinControllers=cpu,cpuacct,cpuset net_cls,net_prio +RuntimeWatchdogSec=60 +ShutdownWatchdogSec=60 +#CapabilityBoundingSet= +#TimerSlackNSec= +#DefaultLimitCPU= +#DefaultLimitFSIZE= +#DefaultLimitDATA= +#DefaultLimitSTACK= +#DefaultLimitCORE= +#DefaultLimitRSS= +#DefaultLimitNOFILE= +#DefaultLimitAS= +#DefaultLimitNPROC= +#DefaultLimitMEMLOCK= +#DefaultLimitLOCKS= +#DefaultLimitSIGPENDING= +#DefaultLimitMSGQUEUE= +#DefaultLimitNICE= +#DefaultLimitRTPRIO= +#DefaultLimitRTTIME= From 2025596913a2842c9db90e82ee2ed0c61a6dc1a0 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 10 Apr 2016 13:05:02 +0200 Subject: [PATCH 35/41] OWHW: update barebox for SWITCH_RESET pulse generation on cold boot --- recipes-bsp/barebox/barebox-gsmk-owhw_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb index fc111d9b7e..e02c79211d 100644 --- a/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb +++ b/recipes-bsp/barebox/barebox-gsmk-owhw_git.bb @@ -2,7 +2,7 @@ require barebox.inc RDEPENDS_${PN} += "${PN}-mlo" -SRCREV = "341203778b60ff3b27bf90f11c13eba2a0384b34" +SRCREV = "ec82959f054af3e4a27267290905cfd895f75331" SRC_URI = " \ git://git.sysmocom.de/barebox.git;branch=v2015.06 \ file://0001-OWHW-HACK-hard-code-the-bootstate-backend-node.patch \ From 7c07fdaa46341ee4073c3ff34cc48f9935622d22 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 23 Jun 2016 09:23:40 +0200 Subject: [PATCH 36/41] barebox-state.bb: add missing spaces at end of line of FILES lines --- recipes-extra/barebox-state/barebox-state.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-extra/barebox-state/barebox-state.bb b/recipes-extra/barebox-state/barebox-state.bb index 02b1aa24c8..1037241449 100644 --- a/recipes-extra/barebox-state/barebox-state.bb +++ b/recipes-extra/barebox-state/barebox-state.bb @@ -4,8 +4,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9ac2e7cff1ddaf48b6eab6028f23ef88" PR = "r4" SRC_URI = "\ - git://git.pengutronix.de/git/tools/dt-utils.git\ - file://0001-barebox-state-fix-typo.patch\ + git://git.pengutronix.de/git/tools/dt-utils.git \ + file://0001-barebox-state-fix-typo.patch \ " SRC_URI_append_sysmocom-odu = "file://hardcode-layout-values.patch" From 959ae40f342d4ba0bcd0ceb72a4c1eea84c3f13d Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 2 Jul 2016 21:49:21 +0200 Subject: [PATCH 37/41] sysmocom-archiver: Make it somehow work with python3 Yocto master has switched to use python3 and this means all of our bbclasses must work with it. The cmp function has been removed and the closest is this dropin routine. Start to use it. --- classes/sysmocom-archiver.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/classes/sysmocom-archiver.bbclass b/classes/sysmocom-archiver.bbclass index 3bc84b01a2..b3ac8773cd 100644 --- a/classes/sysmocom-archiver.bbclass +++ b/classes/sysmocom-archiver.bbclass @@ -7,6 +7,10 @@ ARCHIVE_TYPE ?= "TAR SRPM" DISTRO ?= "poky" PATCHES_ARCHIVE_WITH_SERIES = 'TRUE' + +def compat_cmp(a, b): + return (a>b)-(a Date: Mon, 1 Aug 2016 14:01:23 +0200 Subject: [PATCH 38/41] update gpsdate to fixed init script revision ... using variables from /etc/default/gpsdate not only in systemd service file, but also init script. --- recipes-extra/gpsdate/gpsdate_git.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-extra/gpsdate/gpsdate_git.bb b/recipes-extra/gpsdate/gpsdate_git.bb index 753d9ba57f..c880218bfa 100644 --- a/recipes-extra/gpsdate/gpsdate_git.bb +++ b/recipes-extra/gpsdate/gpsdate_git.bb @@ -6,13 +6,13 @@ DEPENDS = "gpsd" RDEPENDS_${PN} = "libgps" PE = "1" -PR = "r13" +PR = "r14" PV = "0.2+git${SRCPV}" SRC_URI = "git://git.sysmocom.de/gpsdate.git;branch=master \ file://gpsdate.default \ " -SRCREV = "8c0f608643504b14c42ecb0d436354fad3cc7929" +SRCREV = "81690ca78e816f86e0da11bbe8cba725fa1a634d" S = "${WORKDIR}/git" INITSCRIPT_NAME = "gpsdate" From 8698210e1d686fa4e64a7b8a181be1d84cd1a8ab Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 5 Sep 2016 14:39:23 +0200 Subject: [PATCH 39/41] u-boot: Go back just supporting RevG hardware We need some more testing/experience with the AEMIF related fixed that it is better to ship what we have right now. Discussed in the sob chat. --- recipes-sysmobts/uboot/u-boot_sysmocom.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-sysmobts/uboot/u-boot_sysmocom.inc b/recipes-sysmobts/uboot/u-boot_sysmocom.inc index 6e1f15a6f6..5a162f8ad6 100644 --- a/recipes-sysmobts/uboot/u-boot_sysmocom.inc +++ b/recipes-sysmobts/uboot/u-boot_sysmocom.inc @@ -1,5 +1,5 @@ SRC_URI = "git://git.sysmocom.de/sysmo-bts/u-boot;branch=v2011.12;protocol=git" -SRCREV = "32c1294d62c134137d4a65b6e9101b1172b60789" +SRCREV = "ab8a84d9ac4c9d938ec6fa85e3f4f640d883c774" PV = "v2011.12+git${SRCPV}" S = "${WORKDIR}/git" From 98335513613b60289b16eb821af18c307df419ca Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Mon, 28 Nov 2016 17:36:19 +0100 Subject: [PATCH 40/41] sysmocom-bsc: Install dnsmasq in the image with correct config Ticket: SYS#3081, SYS#2439 --- recipes-apps/images/sysmocom-bsc-image.bb | 1 + recipes-extra/dnsmasq/dnsmasq.inc | 2 +- .../dnsmasq/files/sysmocom-bsc/dnsmasq.conf | 288 ++++++++++++++++++ 3 files changed, 290 insertions(+), 1 deletion(-) create mode 100755 recipes-extra/dnsmasq/files/sysmocom-bsc/dnsmasq.conf diff --git a/recipes-apps/images/sysmocom-bsc-image.bb b/recipes-apps/images/sysmocom-bsc-image.bb index 6e74f8534b..37e0f542dc 100644 --- a/recipes-apps/images/sysmocom-bsc-image.bb +++ b/recipes-apps/images/sysmocom-bsc-image.bb @@ -1,6 +1,7 @@ require sysmocom-image.inc IMAGE_LINGUAS = " " +IMAGE_INSTALL_append = " dnsmasq " # This variant of the image will run osmo-bts and osmo-bsc activate_bsc() { diff --git a/recipes-extra/dnsmasq/dnsmasq.inc b/recipes-extra/dnsmasq/dnsmasq.inc index d988f1c274..e17dfefb1b 100644 --- a/recipes-extra/dnsmasq/dnsmasq.inc +++ b/recipes-extra/dnsmasq/dnsmasq.inc @@ -15,7 +15,7 @@ SRC_URI = "http://www.thekelleys.org.uk/dnsmasq/${@['archive/', ''][float(d.getV inherit pkgconfig update-rc.d systemd -PR = "r3" +PR = "r4" INITSCRIPT_NAME = "dnsmasq" INITSCRIPT_PARAMS = "defaults" diff --git a/recipes-extra/dnsmasq/files/sysmocom-bsc/dnsmasq.conf b/recipes-extra/dnsmasq/files/sysmocom-bsc/dnsmasq.conf new file mode 100755 index 0000000000..e885eeb17b --- /dev/null +++ b/recipes-extra/dnsmasq/files/sysmocom-bsc/dnsmasq.conf @@ -0,0 +1,288 @@ +# Configuration file for dnsmasq. +# +# Format is one option per line, legal options are the same +# as the long options legal on the command line. See +# "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details. + +# Change these lines if you want dnsmasq to serve MX records. +# Only one of mx-host and mx-target need be set, the other defaults +# to the name of the host running dnsmasq. +#mx-host= +#mx-target= +#selfmx +#localmx + +# The following two options make you a better netizen, since they +# tell dnsmasq to filter out queries which the public DNS cannot +# answer, and which load the servers (especially the root servers) +# uneccessarily. If you have a dial-on-demand link they also stop +# these requests from bringing up the link uneccessarily. + +# Never forward plain names (with a dot or domain part) +domain-needed +# Never forward addresses in the non-routed address spaces. +bogus-priv + + +# Uncomment this to filter useless windows-originated DNS requests +# which can trigger dial-on-demand links needlessly. +# Note that (amongst other things) this blocks all SRV requests, +# so don't use it if you use eg Kerberos. +#filterwin2k + +# Change this line if you want dns to get its upstream servers from +# somewhere other that /etc/resolv.conf +#resolv-file= + +# By default, dnsmasq will send queries to any of the upstream +# servers it knows about and tries to favour servers to are known +# to be up. Uncommenting this forces dnsmasq to try each query +# with each server strictly in the order they appear in +# /etc/resolv.conf +#strict-order + +# If you don't want dnsmasq to read /etc/resolv.conf or any other +# file, getting its servers for this file instead (see below), then +# uncomment this +#no-resolv + +# If you don't want dnsmasq to poll /etc/resolv.conf or other resolv +# files for changes and re-read them then uncomment this. +#no-poll + +# Add other name servers here, with domain specs if they are for +# non-public domains. +#server=/localnet/192.168.0.1 + +# Add local-only domains here, queries in these domains are answered +# from /etc/hosts or DHCP only. +#local=/localnet/ + +# Add domains which you want to force to an IP address here. +# The example below send any host in doubleclick.net to a local +# webserver. +#address=/doubleclick.net/127.0.0.1 + +# You no longer (as of version 1.7) need to set these to enable +# dnsmasq to read /etc/ppp/resolv.conf since dnsmasq now uses the +# "dip" group to achieve this. +#user= +#group= + +# If you want dnsmasq to listen for requests only on specified interfaces +# (and the loopback) give the name of the interface (eg eth0) here. +# Repeat the line for more than one interface. +interface=eth1 +# Or you can specify which interface _not_ to listen on +#except-interface= +# Or which to listen on by address (remember to include 127.0.0.1 if +# you use this.) +#listen-address= + +# On systems which support it, dnsmasq binds the wildcard address, +# even when it is listening on only some interfaces. It then discards +# requests that it shouldn't reply to. This has the advantage of +# working even when interfaces come and go and change address. If you +# want dnsmasq to really bind only the interfaces it is listening on, +# uncomment this option. About the only time you may need this is when +# running another nameserver on the same machine. +#bind-interfaces + +# If you don't want dnsmasq to read /etc/hosts, uncomment the +# following line. +#no-hosts +# or if you want it to read another file, as well as /etc/hosts, use +# this. +#addn-hosts=/etc/banner_add_hosts + +# Set this (and domain: see below) if you want to have a domain +# automatically added to simple names in a hosts-file. +#expand-hosts + +# Set the domain for dnsmasq. this is optional, but if it is set, it +# does the following things. +# 1) Allows DHCP hosts to have fully qualified domain names, as long +# as the domain part matches this setting. +# 2) Sets the "domain" DHCP option thereby potentially setting the +# domain of all systems configured by DHCP +# 3) Provides the domain part for "expand-hosts" +#domain=thekelleys.org.uk + +# Uncomment this to enable the integrated DHCP server, you need +# to supply the range of addresses available for lease and optionally +# a lease time. If you have more than one network, you will need to +# repeat this for each network on which you want to supply DHCP +# service. +#dhcp-range=192.168.0.50,192.168.0.150,12h +dhcp-range=10.23.24.10,10.23.24.200,2h + +# This is an example of a DHCP range where the netmask is given. This +# is needed for networks we reach the dnsmasq DHCP server via a relay +# agent. If you don't know what a DHCP relay agent is, you probably +# don't need to worry about this. +#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h + +# This is an example of a DHCP range with a network-id, so that +# some DHCP options may be set only for this network. +#dhcp-range=red,192.168.0.50,192.168.0.150 + +# Supply parameters for specified hosts using DHCP. There are lots +# of valid alternatives, so we will give examples of each. Note that +# IP addresses DO NOT have to be in the range given above, they just +# need to be on the same network. The order of the parameters in these +# do not matter, it's permissble to give name,adddress and MAC in any order + +# Always allocate the host with ethernet address 11:22:33:44:55:66 +# The IP address 192.168.0.60 +#dhcp-host=11:22:33:44:55:66,192.168.0.60 + +# Always set the name of the host with hardware address +# 11:22:33:44:55:66 to be "fred" +#dhcp-host=11:22:33:44:55:66,fred + +# Always give the host with ethernet address 11:22:33:44:55:66 +# the name fred and IP address 192.168.0.60 and lease time 45 minutes +#dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,45m + +# Give the machine which says it's name is "bert" IP address +# 192.168.0.70 and an infinite lease +#dhcp-host=bert,192.168.0.70,infinite + +# Always give the host with client identifier 01:02:02:04 +# the IP address 192.168.0.60 +#dhcp-host=id:01:02:02:04,192.168.0.60 + +# Always give the host with client identifier "marjorie" +# the IP address 192.168.0.60 +#dhcp-host=id:marjorie,192.168.0.60 + +# Enable the address given for "judge" in /etc/hosts +# to be given to a machine presenting the name "judge" when +# it asks for a DHCP lease. +#dhcp-host=judge + +# Never offer DHCP service to a machine whose ethernet +# address is 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,ignore + +# Ignore any client-id presented by the machine with ethernet +# address 11:22:33:44:55:66. This is useful to prevent a machine +# being treated differently when running under different OS's or +# between PXE boot and OS boot. +#dhcp-host=11:22:33:44:55:66,id:* + +# Send extra options which are tagged as "red" to +# the machine with ethernet address 11:22:33:44:55:66 +#dhcp-host=11:22:33:44:55:66,net:red + +# Send extra options which are tagged as "red" to any machine whose +# DHCP vendorclass string includes the substring "Linux" +#dhcp-vendorclass=red,Linux + +# Send extra options which are tagged as "red" to any machine one +# of whose DHCP userclass strings includes the substring "accounts" +#dhcp-userclass=red,accounts + +# If this line is uncommented, dnsmasq will read /etc/ethers and act +# on the ethernet-address/IP pairs found there just as if they had +# been given as --dhcp-host options. Useful if you keep +# MAC-address/host mappings there for other purposes. +#read-ethers + +# Send options to hosts which ask for a DHCP lease. +# See RFC 2132 for details of available options. +# Note that all the common settings, such as netmask and +# broadcast address, DNS server and default route, are given +# sane defaults by dnsmasq. You very likely will not need any +# any dhcp-options. If you use Windows clients and Samba, there +# are some options which are recommended, they are detailed at the +# end of this section. +# For reference, the common options are: +# subnet mask - 1 +# default router - 3 +# DNS server - 6 +# broadcast address - 28 + +# Set the NTP time server addresses to 192.168.0.4 and 10.10.0.5 +#dhcp-option=42,192.168.0.4,10.10.0.5 + +# Set the NTP time server address to be the same machine as +# is running dnsmasq +#dhcp-option=42,0.0.0.0 + +# Set the NIS domain name to "welly" +#dhcp-option=40,welly + +# Set the default time-to-live to 50 +#dhcp-option=23,50 + +# Set the "all subnets are local" flag +#dhcp-option=27,1 + +# Send the etherboot magic flag and then etherboot options (a string). +#dhcp-option=128,e4:45:74:68:00:00 +#dhcp-option=129,NIC=eepro100 + +# Specify an option which will only be sent to the "red" network +# (see dhcp-range for the declaration of the "red" network) +#dhcp-option=red,42,192.168.1.1 + +# The following DHCP options set up dnsmasq in the same way as is specified +# for the ISC dhcpcd in +# http://www.samba.org/samba/ftp/docs/textdocs/DHCP-Server-Configuration.txt +# adapted for a typical dnsmasq installation where the host running +# dnsmasq is also the host running samba. +# you may want to uncomment them if you use Windows clients and Samba. +#dhcp-option=19,0 # option ip-forwarding off +#dhcp-option=44,0.0.0.0 # set netbios-over-TCP/IP nameserver(s) aka WINS server(s) +#dhcp-option=45,0.0.0.0 # netbios datagram distribution server +#dhcp-option=46,8 # netbios node type +#dhcp-option=47 # empty netbios scope. + + +# Set the boot filename and tftpd server name and address +# for BOOTP. You will only need this is you want to +# boot machines over the network. +#dhcp-boot=/var/ftpd/pxelinux.0,boothost,192.168.0.3 + +# Set the limit on DHCP leases, the default is 150 +#dhcp-lease-max=150 + +# The DHCP server needs somewhere on disk to keep its lease database. +# This defaults to a sane location, but if you want to change it, use +# the line below. +#dhcp-leasefile=/var/lib/misc/dnsmasq.leases + +# Set the cachesize here. +#cache-size=150 + +# If you want to disable negative caching, uncomment this. +#no-negcache + +# Normally responses which come form /etc/hosts and the DHCP lease +# file have Time-To-Live set as zero, which conventionally means +# do not cache further. If you are happy to trade lower load on the +# server for potentially stale date, you can set a time-to-live (in +# seconds) here. +#local-ttl= + +# If you want dnsmasq to detect attempts by Verisign to send queries +# to unregistered .com and .net hosts to its sitefinder service and +# have dnsmasq instead return the correct NXDOMAIN response, uncomment +# this line. You can add similar lines to do the same for other +# registries which have implemented wildcard A records. +#bogus-nxdomain=64.94.110.11 + +# If you want to fix up DNS results from upstream servers, use the +# alias option. This only works for IPv4. +# This alias makes a result of 1.2.3.4 appear as 5.6.7.8 +#alias=1.2.3.4,5.6.7.8 +# and this maps 1.2.3.x to 5.6.7.x +#alias=1.2.3.0,5.6.7.0,255.255.255.0 + +# For debugging purposes, log each DNS query as it passes through +# dnsmasq. +#log-queries + +# Include a another lot of configuration options. +#conf-file=/etc/dnsmasq.more.conf From 29dd84c82a756afcc44209f89fd2fd0d77307d73 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Tue, 29 Nov 2016 20:54:14 +0100 Subject: [PATCH 41/41] task-sysmocom-feed: Add task-gprscore Just build the gprs corenet related packages in our regular feed so they are built for the sysmobsc as well. Ticket: SYS#3096 --- recipes-apps/tasks/task-sysmocom-feed.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-apps/tasks/task-sysmocom-feed.bb b/recipes-apps/tasks/task-sysmocom-feed.bb index 1838b629fe..96c5892638 100644 --- a/recipes-apps/tasks/task-sysmocom-feed.bb +++ b/recipes-apps/tasks/task-sysmocom-feed.bb @@ -16,4 +16,4 @@ RDEPENDS_${PN} = "\ logrotate python-jsonrpclib python-enum iputils \ packagegroup-sysmobts-sob rtl8169-eeprom autossh \ perl libdbd-sqlite-perl libdbi-perl libjson-perl \ - netcat-openbsd perf lksctp-tools" + netcat-openbsd perf lksctp-tools task-gprscore"