From f27bdd5a35e1af32ca3e200810222230d5fbee44 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Mon, 7 May 2018 15:42:31 +0200 Subject: meta-raspberrypi: sumo refresh 05f21adb99..ade31d6d01 Update meta-raspberrypi to sumo HEAD. Andrei Gherzan (4): raspberrypi3-64.conf: Include cm3 dtb linux-raspberrypi: Update to v4.14.58 rpi-base.inc: Split overlays and dtbs from KERNEL_DEVICETREE raspberrypi3-64.conf: Define only the dtb files that are available for arch64 Anton Gerasimov (3): rpi-base.inc: install at86rf233 overlay rpi-config: load at86rf233 overlay docs: document support for 802.15.4 hat Eduardo Abinader (1): config_git.bb: Remove extra space Hugo Hromic (5): formfactor: use `rpi` instead of `raspberrypi` to apply to all rpi machines meta-raspberrypi: use `_%` suffix instead of specific versions for bbappends pi-bluetooth: use `_git` suffix in recipe filename meta-raspberrypi: use generic licenses in ${COMMON_LICENSE_DIR} from Poky wiringpi: use lower-case in recipe directory name Khem Raj (2): firmware: Update to 20180619 release linux-raspberrypi: Update to 4.14.52+ Martin Jansa (3): sdcard_image-rpi.bbclass: copy the DTB files with canonical name sdcard_image-rpi: add dependency on rpi-u-boot-scr sdcard_image-rpi.bbclass: use 4 spaces for indentation instead of mix of tabs and spaces Steve Pavao (1): rpi-hwup-image.bb: Modified the warning message in do_image_prepend() Change-Id: If6ee02907ad0f08816eb4d5dad9c92f0d93e252c Signed-off-by: Brad Bishop --- meta-raspberrypi/classes/sdcard_image-rpi.bbclass | 219 ++++++----- meta-raspberrypi/conf/machine/include/rpi-base.inc | 28 +- meta-raspberrypi/conf/machine/raspberrypi3-64.conf | 22 +- meta-raspberrypi/docs/extra-build-config.md | 8 + .../recipes-bsp/bootfiles/rpi-config_git.bb | 10 +- meta-raspberrypi/recipes-bsp/common/firmware.inc | 8 +- .../formfactor/formfactor/raspberrypi/machconfig | 6 - .../formfactor/formfactor/rpi/machconfig | 6 + .../recipes-bsp/formfactor/formfactor_%.bbappend | 1 + .../recipes-bsp/formfactor/formfactor_0.0.bbappend | 1 - .../recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb | 2 +- .../pi-bluetooth/pi-bluetooth.bb | 22 -- .../pi-bluetooth/pi-bluetooth_git.bb | 22 ++ .../recipes-core/images/rpi-hwup-image.bb | 2 +- .../packagegroups/packagegroup-rpi-test.bb | 2 +- .../recipes-core/psplash/psplash_%.bbappend | 4 + .../recipes-core/psplash/psplash_git.bbappend | 4 - .../recipes-core/udev/udev-rules-rpi.bb | 2 +- .../0001-Add-initial-cross-compile-support.patch | 413 --------------------- .../recipes-devtools/wiringPi/wiringpi_git.bb | 33 -- .../0001-Add-initial-cross-compile-support.patch | 413 +++++++++++++++++++++ .../recipes-devtools/wiringpi/wiringpi_git.bb | 33 ++ .../xorg-xserver/xserver-xf86-config_%.bbappend | 21 ++ .../xorg-xserver/xserver-xf86-config_0.1.bbappend | 21 -- .../recipes-kernel/linux/linux-raspberrypi_4.14.bb | 4 +- .../recipes-multimedia/x264/x264_%.bbappend | 2 + .../recipes-multimedia/x264/x264_git.bbappend | 2 - 27 files changed, 654 insertions(+), 657 deletions(-) delete mode 100644 meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi/machconfig create mode 100644 meta-raspberrypi/recipes-bsp/formfactor/formfactor/rpi/machconfig create mode 100644 meta-raspberrypi/recipes-bsp/formfactor/formfactor_%.bbappend delete mode 100644 meta-raspberrypi/recipes-bsp/formfactor/formfactor_0.0.bbappend delete mode 100644 meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth.bb create mode 100644 meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb create mode 100644 meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend delete mode 100644 meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend delete mode 100644 meta-raspberrypi/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch delete mode 100644 meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb create mode 100644 meta-raspberrypi/recipes-devtools/wiringpi/files/0001-Add-initial-cross-compile-support.patch create mode 100644 meta-raspberrypi/recipes-devtools/wiringpi/wiringpi_git.bb create mode 100644 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend delete mode 100644 meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend create mode 100644 meta-raspberrypi/recipes-multimedia/x264/x264_%.bbappend delete mode 100644 meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend diff --git a/meta-raspberrypi/classes/sdcard_image-rpi.bbclass b/meta-raspberrypi/classes/sdcard_image-rpi.bbclass index f03595c2c..e7c34c63f 100644 --- a/meta-raspberrypi/classes/sdcard_image-rpi.bbclass +++ b/meta-raspberrypi/classes/sdcard_image-rpi.bbclass @@ -50,13 +50,14 @@ SDIMG_ROOTFS_TYPE ?= "ext3" SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${SDIMG_ROOTFS_TYPE}" do_image_rpi_sdimg[depends] = " \ - parted-native:do_populate_sysroot \ - mtools-native:do_populate_sysroot \ - dosfstools-native:do_populate_sysroot \ - virtual/kernel:do_deploy \ - ${IMAGE_BOOTLOADER}:do_deploy \ - ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ - " + parted-native:do_populate_sysroot \ + mtools-native:do_populate_sysroot \ + dosfstools-native:do_populate_sysroot \ + virtual/kernel:do_deploy \ + ${IMAGE_BOOTLOADER}:do_deploy \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'u-boot:do_deploy', '',d)} \ + ${@bb.utils.contains('RPI_USE_U_BOOT', '1', 'rpi-u-boot-scr:do_deploy', '',d)} \ +" do_image_rpi_sdimg[recrdeps] = "do_build" @@ -79,6 +80,7 @@ SDIMG_LINK_VFAT = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.vfat" def split_overlays(d, out, ver=None): dts = d.getVar("KERNEL_DEVICETREE") + # Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' (4.1.x) or by '.dtbo' (4.4.9+) string and will be put in a dedicated folder if out: overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', dts, d) overlays = oe.utils.str_filter_out('\S+\.dtbo$', overlays, d) @@ -90,114 +92,107 @@ def split_overlays(d, out, ver=None): IMAGE_CMD_rpi-sdimg () { - # Align partitions - BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) - BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) - SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE) - - echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB" - - # Check if we are building with device tree support - DTS="${KERNEL_DEVICETREE}" - - # Initialize sdcard image file - dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE} - - # Create partition table - parted -s ${SDIMG} mklabel msdos - # Create boot partition and mark it as bootable - parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) - parted -s ${SDIMG} set 1 boot on - # Create rootfs partition to the end of disk - parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s - parted ${SDIMG} print - - # Create a vfat image with boot files - BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') - rm -f ${WORKDIR}/boot.img - mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ - if test -n "${DTS}"; then - # Device Tree Overlays are assumed to be suffixed by '-overlay.dtb' (4.1.x) or by '.dtbo' (4.4.9+) string and will be put in a dedicated folder - DT_OVERLAYS="${@split_overlays(d, 0)}" - DT_ROOT="${@split_overlays(d, 1)}" - - # Copy board device trees to root folder - for DTB in $DT_ROOT; do - DTB_BASE_NAME=`basename ${DTB} .dtb` - - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.dtb ::${DTB_BASE_NAME}.dtb - done - - # Copy device tree overlays to dedicated folder - mmd -i ${WORKDIR}/boot.img overlays - for DTB in $DT_OVERLAYS; do - DTB_EXT=${DTB##*.} - DTB_BASE_NAME=`basename ${DTB} ."${DTB_EXT}"` - - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${DTB_BASE_NAME}.${DTB_EXT} ::overlays/${DTB_BASE_NAME}.${DTB_EXT} - done - fi - if [ "${RPI_USE_U_BOOT}" = "1" ]; then - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${KERNEL_IMAGETYPE} - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr - else - mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE} - fi - - if [ -n ${FATPAYLOAD} ] ; then - echo "Copying payload into VFAT" - for entry in ${FATPAYLOAD} ; do - # add the || true to stop aborting on vfat issues like not supporting .~lock files - mcopy -i ${WORKDIR}/boot.img -s -v ${IMAGE_ROOTFS}$entry :: || true - done - fi - - # Add stamp file - echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info - mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info :: - - # Deploy vfat partition (for u-boot case only) - if [ "${RPI_USE_U_BOOT}" = "1" ]; then - cp ${WORKDIR}/boot.img ${IMGDEPLOYDIR}/${SDIMG_VFAT} - ln -sf ${SDIMG_VFAT} ${SDIMG_LINK_VFAT} - fi - - # Burn Partitions - dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) - # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat - if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz" - then - xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) - else - dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) - fi - - # Optionally apply compression - case "${SDIMG_COMPRESSION}" in - "gzip") - gzip -k9 "${SDIMG}" - ;; - "bzip2") - bzip2 -k9 "${SDIMG}" - ;; - "xz") - xz -k "${SDIMG}" - ;; - esac + # Align partitions + BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE} + ${IMAGE_ROOTFS_ALIGNMENT} - 1) + BOOT_SPACE_ALIGNED=$(expr ${BOOT_SPACE_ALIGNED} - ${BOOT_SPACE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT}) + SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + $ROOTFS_SIZE) + + echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS $ROOTFS_SIZE KiB" + + # Check if we are building with device tree support + DTS="${KERNEL_DEVICETREE}" + + # Initialize sdcard image file + dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE} + + # Create partition table + parted -s ${SDIMG} mklabel msdos + # Create boot partition and mark it as bootable + parted -s ${SDIMG} unit KiB mkpart primary fat32 ${IMAGE_ROOTFS_ALIGNMENT} $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) + parted -s ${SDIMG} set 1 boot on + # Create rootfs partition to the end of disk + parted -s ${SDIMG} -- unit KiB mkpart primary ext2 $(expr ${BOOT_SPACE_ALIGNED} \+ ${IMAGE_ROOTFS_ALIGNMENT}) -1s + parted ${SDIMG} print + + # Create a vfat image with boot files + BOOT_BLOCKS=$(LC_ALL=C parted -s ${SDIMG} unit b print | awk '/ 1 / { print substr($4, 1, length($4 -1)) / 512 /2 }') + rm -f ${WORKDIR}/boot.img + mkfs.vfat -n "${BOOTDD_VOLUME_ID}" -S 512 -C ${WORKDIR}/boot.img $BOOT_BLOCKS + mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/bcm2835-bootfiles/* ::/ + if test -n "${DTS}"; then + # Copy board device trees to root folder + for dtbf in ${@split_overlays(d, True)}; do + dtb=`basename $dtbf` + mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::$dtb + done + + # Copy device tree overlays to dedicated folder + mmd -i ${WORKDIR}/boot.img overlays + for dtbf in ${@split_overlays(d, False)}; do + dtb=`basename $dtbf` + mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/$dtb ::overlays/$dtb + done + fi + if [ "${RPI_USE_U_BOOT}" = "1" ]; then + mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} + mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${KERNEL_IMAGETYPE} + mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr + else + mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE} + fi + + if [ -n ${FATPAYLOAD} ] ; then + echo "Copying payload into VFAT" + for entry in ${FATPAYLOAD} ; do + # add the || true to stop aborting on vfat issues like not supporting .~lock files + mcopy -i ${WORKDIR}/boot.img -s -v ${IMAGE_ROOTFS}$entry :: || true + done + fi + + # Add stamp file + echo "${IMAGE_NAME}" > ${WORKDIR}/image-version-info + mcopy -i ${WORKDIR}/boot.img -v ${WORKDIR}/image-version-info :: + + # Deploy vfat partition (for u-boot case only) + if [ "${RPI_USE_U_BOOT}" = "1" ]; then + cp ${WORKDIR}/boot.img ${IMGDEPLOYDIR}/${SDIMG_VFAT} + ln -sf ${SDIMG_VFAT} ${SDIMG_LINK_VFAT} + fi + + # Burn Partitions + dd if=${WORKDIR}/boot.img of=${SDIMG} conv=notrunc seek=1 bs=$(expr ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) + # If SDIMG_ROOTFS_TYPE is a .xz file use xzcat + if echo "${SDIMG_ROOTFS_TYPE}" | egrep -q "*\.xz" + then + xzcat ${SDIMG_ROOTFS} | dd of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) + else + dd if=${SDIMG_ROOTFS} of=${SDIMG} conv=notrunc seek=1 bs=$(expr 1024 \* ${BOOT_SPACE_ALIGNED} + ${IMAGE_ROOTFS_ALIGNMENT} \* 1024) + fi + + # Optionally apply compression + case "${SDIMG_COMPRESSION}" in + "gzip") + gzip -k9 "${SDIMG}" + ;; + "bzip2") + bzip2 -k9 "${SDIMG}" + ;; + "xz") + xz -k "${SDIMG}" + ;; + esac } ROOTFS_POSTPROCESS_COMMAND += " rpi_generate_sysctl_config ; " rpi_generate_sysctl_config() { - # systemd sysctl config - test -d ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d && \ - echo "vm.min_free_kbytes = 8192" > ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d/rpi-vm.conf - - # sysv sysctl config - IMAGE_SYSCTL_CONF="${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf" - test -e ${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf && \ - sed -e "/vm.min_free_kbytes/d" -i ${IMAGE_SYSCTL_CONF} - echo "" >> ${IMAGE_SYSCTL_CONF} && echo "vm.min_free_kbytes = 8192" >> ${IMAGE_SYSCTL_CONF} + # systemd sysctl config + test -d ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d && \ + echo "vm.min_free_kbytes = 8192" > ${IMAGE_ROOTFS}${sysconfdir}/sysctl.d/rpi-vm.conf + + # sysv sysctl config + IMAGE_SYSCTL_CONF="${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf" + test -e ${IMAGE_ROOTFS}${sysconfdir}/sysctl.conf && \ + sed -e "/vm.min_free_kbytes/d" -i ${IMAGE_SYSCTL_CONF} + echo "" >> ${IMAGE_SYSCTL_CONF} && echo "vm.min_free_kbytes = 8192" >> ${IMAGE_SYSCTL_CONF} } diff --git a/meta-raspberrypi/conf/machine/include/rpi-base.inc b/meta-raspberrypi/conf/machine/include/rpi-base.inc index d76495a68..2af15886b 100644 --- a/meta-raspberrypi/conf/machine/include/rpi-base.inc +++ b/meta-raspberrypi/conf/machine/include/rpi-base.inc @@ -14,16 +14,7 @@ XSERVER = " \ ${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "xf86-video-modesetting", "xf86-video-fbdev", d)} \ " -KERNEL_DEVICETREE ?= " \ - bcm2708-rpi-0-w.dtb \ - bcm2708-rpi-b.dtb \ - bcm2708-rpi-b-plus.dtb \ - bcm2709-rpi-2-b.dtb \ - bcm2710-rpi-3-b.dtb \ - bcm2710-rpi-3-b-plus.dtb \ - bcm2708-rpi-cm.dtb \ - bcm2710-rpi-cm3.dtb \ - \ +RPI_KERNEL_DEVICETREE_OVERLAYS ?= " \ overlays/dwc2.dtbo \ overlays/hifiberry-amp.dtbo \ overlays/hifiberry-dac.dtbo \ @@ -43,6 +34,23 @@ KERNEL_DEVICETREE ?= " \ overlays/pi3-disable-bt.dtbo \ overlays/pi3-miniuart-bt.dtbo \ overlays/vc4-kms-v3d.dtbo \ + overlays/at86rf233.dtbo \ + " + +RPI_KERNEL_DEVICETREE ?= " \ + bcm2708-rpi-0-w.dtb \ + bcm2708-rpi-b.dtb \ + bcm2708-rpi-b-plus.dtb \ + bcm2709-rpi-2-b.dtb \ + bcm2710-rpi-3-b.dtb \ + bcm2710-rpi-3-b-plus.dtb \ + bcm2708-rpi-cm.dtb \ + bcm2710-rpi-cm3.dtb \ + " + +KERNEL_DEVICETREE ?= " \ + ${RPI_KERNEL_DEVICETREE} \ + ${RPI_KERNEL_DEVICETREE_OVERLAYS} \ " # By default: diff --git a/meta-raspberrypi/conf/machine/raspberrypi3-64.conf b/meta-raspberrypi/conf/machine/raspberrypi3-64.conf index 5163320da..fb21b122c 100644 --- a/meta-raspberrypi/conf/machine/raspberrypi3-64.conf +++ b/meta-raspberrypi/conf/machine/raspberrypi3-64.conf @@ -14,30 +14,10 @@ MACHINE_EXTRA_RRECOMMENDS += "\ require conf/machine/include/arm/arch-armv8.inc include conf/machine/include/rpi-base.inc -KERNEL_DEVICETREE = " \ +RPI_KERNEL_DEVICETREE = " \ broadcom/bcm2710-rpi-3-b.dtb \ broadcom/bcm2710-rpi-3-b-plus.dtb \ broadcom/bcm2837-rpi-3-b.dtb \ - \ - overlays/hifiberry-amp.dtbo \ - overlays/hifiberry-dac.dtbo \ - overlays/hifiberry-dacplus.dtbo \ - overlays/hifiberry-digi.dtbo \ - overlays/i2c-rtc.dtbo \ - overlays/iqaudio-dac.dtbo \ - overlays/iqaudio-dacplus.dtbo \ - overlays/lirc-rpi.dtbo \ - overlays/pitft22.dtbo \ - overlays/pitft28-resistive.dtbo \ - overlays/pitft35-resistive.dtbo \ - overlays/pps-gpio.dtbo \ - overlays/rpi-ft5406.dtbo \ - overlays/w1-gpio.dtbo \ - overlays/w1-gpio-pullup.dtbo \ - overlays/pi3-disable-bt.dtbo \ - overlays/pi3-miniuart-bt.dtbo \ - overlays/vc4-kms-v3d.dtbo \ - overlays/vc4-fkms-v3d.dtbo \ " SERIAL_CONSOLE ?= "115200 ttyS0" diff --git a/meta-raspberrypi/docs/extra-build-config.md b/meta-raspberrypi/docs/extra-build-config.md index 806c23803..04314aa3d 100644 --- a/meta-raspberrypi/docs/extra-build-config.md +++ b/meta-raspberrypi/docs/extra-build-config.md @@ -237,6 +237,14 @@ local.conf: ENABLE_DWC2_PERIPHERAL = "1" +## Enable Openlabs 802.15.4 radio module + +When using device tree kernels, set this variable to enable the 802.15.4 hat: + + ENABLE_AT86RF = "1" + +See: + ## Manual additions to config.txt The `RPI_EXTRA_CONFIG` variable can be used to manually add additional lines to diff --git a/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb b/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb index e0b2b58bc..a85c91630 100644 --- a/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb +++ b/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_git.bb @@ -3,7 +3,7 @@ DESCRIPTION = "Commented config.txt file for the Raspberry Pi. \ the ARM core is initialised. It can be used to set various \ system configuration parameters." LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" COMPATIBLE_MACHINE = "^rpi$" @@ -177,7 +177,13 @@ do_deploy() { echo "# Enable USB peripheral mode" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt echo "dtoverlay=dwc2,dr_mode=peripheral" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt fi - + + # AT86RF23X support + if [ "${ENABLE_AT86RF}" = "1" ]; then + echo "# Enable AT86RF23X" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + echo "dtoverlay=at86rf233,speed=3000000" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt + fi + # Append extra config if the user has provided any echo "${RPI_EXTRA_CONFIG}" >> ${DEPLOYDIR}/bcm2835-bootfiles/config.txt } diff --git a/meta-raspberrypi/recipes-bsp/common/firmware.inc b/meta-raspberrypi/recipes-bsp/common/firmware.inc index d564a49ab..26cafb746 100644 --- a/meta-raspberrypi/recipes-bsp/common/firmware.inc +++ b/meta-raspberrypi/recipes-bsp/common/firmware.inc @@ -1,10 +1,10 @@ -RPIFW_DATE ?= "20180417" -SRCREV ?= "5db8e4e1c63178e200d6fbea23ed4a9bf4656658" +RPIFW_DATE ?= "20180619" +SRCREV ?= "748fb17992426bb29d99224b93cb962fefbdc833" RPIFW_SRC_URI ?= "https://github.com/raspberrypi/firmware/archive/${SRCREV}.tar.gz" RPIFW_S ?= "${WORKDIR}/firmware-${SRCREV}" SRC_URI = "${RPIFW_SRC_URI}" -SRC_URI[md5sum] = "6bce52f22a7a005a9bcdb9912b132590" -SRC_URI[sha256sum] = "84568c4e7f5b0deee4cd76e7c0b48315885f983d6131d8148ef8af8438328a36" +SRC_URI[md5sum] = "02edb854e9b72499225f3f93d322fe12" +SRC_URI[sha256sum] = "07b2dc9d0779e15666e3ab596387e18cefc265d863c4bf6f8a0572b58a4fb793" PV = "${RPIFW_DATE}" diff --git a/meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi/machconfig b/meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi/machconfig deleted file mode 100644 index bef4ce3c9..000000000 --- a/meta-raspberrypi/recipes-bsp/formfactor/formfactor/raspberrypi/machconfig +++ /dev/null @@ -1,6 +0,0 @@ -HAVE_TOUCHSCREEN=0 -HAVE_KEYBOARD=1 - -DISPLAY_CAN_ROTATE=0 -DISPLAY_ORIENTATION=0 -DISPLAY_DPI=133 diff --git a/meta-raspberrypi/recipes-bsp/formfactor/formfactor/rpi/machconfig b/meta-raspberrypi/recipes-bsp/formfactor/formfactor/rpi/machconfig new file mode 100644 index 000000000..bef4ce3c9 --- /dev/null +++ b/meta-raspberrypi/recipes-bsp/formfactor/formfactor/rpi/machconfig @@ -0,0 +1,6 @@ +HAVE_TOUCHSCREEN=0 +HAVE_KEYBOARD=1 + +DISPLAY_CAN_ROTATE=0 +DISPLAY_ORIENTATION=0 +DISPLAY_DPI=133 diff --git a/meta-raspberrypi/recipes-bsp/formfactor/formfactor_%.bbappend b/meta-raspberrypi/recipes-bsp/formfactor/formfactor_%.bbappend new file mode 100644 index 000000000..72d991c7e --- /dev/null +++ b/meta-raspberrypi/recipes-bsp/formfactor/formfactor_%.bbappend @@ -0,0 +1 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-raspberrypi/recipes-bsp/formfactor/formfactor_0.0.bbappend b/meta-raspberrypi/recipes-bsp/formfactor/formfactor_0.0.bbappend deleted file mode 100644 index 72d991c7e..000000000 --- a/meta-raspberrypi/recipes-bsp/formfactor/formfactor_0.0.bbappend +++ /dev/null @@ -1 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" diff --git a/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb b/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb index 0106ac3ff..593fc903e 100644 --- a/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb +++ b/meta-raspberrypi/recipes-bsp/rpi-u-boot-scr/rpi-u-boot-scr.bb @@ -1,6 +1,6 @@ SUMMARY = "U-boot boot scripts for Raspberry Pi" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" COMPATIBLE_MACHINE = "^rpi$" DEPENDS = "u-boot-mkimage-native" diff --git a/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth.bb b/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth.bb deleted file mode 100644 index e185f25e2..000000000 --- a/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Script to properly configure BT-HCI on Raspberry Pi" -HOMEPAGE = "https://github.com/RPi-Distro/pi-bluetooth" -SECTION = "kernel" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "\ - file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \ -" - -SRC_URI = "git://github.com/RPi-Distro/pi-bluetooth" -SRCREV = "2a7477966bb3c69838b224f3ea92cb49a88124d5" -UPSTREAM_VERSION_UNKNOWN = "1" - -S = "${WORKDIR}/git" - -inherit allarch - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${S}/usr/bin/btuart ${D}${bindir} -} - -FILES_${PN} = "${bindir}" diff --git a/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb b/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb new file mode 100644 index 000000000..e185f25e2 --- /dev/null +++ b/meta-raspberrypi/recipes-connectivity/pi-bluetooth/pi-bluetooth_git.bb @@ -0,0 +1,22 @@ +SUMMARY = "Script to properly configure BT-HCI on Raspberry Pi" +HOMEPAGE = "https://github.com/RPi-Distro/pi-bluetooth" +SECTION = "kernel" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "\ + file://debian/copyright;md5=6af8de3c8ee71f8e91e9b22f84ff2022 \ +" + +SRC_URI = "git://github.com/RPi-Distro/pi-bluetooth" +SRCREV = "2a7477966bb3c69838b224f3ea92cb49a88124d5" +UPSTREAM_VERSION_UNKNOWN = "1" + +S = "${WORKDIR}/git" + +inherit allarch + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/usr/bin/btuart ${D}${bindir} +} + +FILES_${PN} = "${bindir}" diff --git a/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb b/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb index d2371ad25..86e9b6daf 100644 --- a/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb +++ b/meta-raspberrypi/recipes-core/images/rpi-hwup-image.bb @@ -7,5 +7,5 @@ IMAGE_INSTALL += " \ " do_image_prepend() { - bb.warn("The image 'rpi-hwup-image' is deprecated, please use 'core-image-minimal' instead") + bb.warn("The image 'rpi-hwup-image' is deprecated, please use 'core-image-base' instead") } diff --git a/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb b/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb index 029c18cb7..d91ce0b31 100644 --- a/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb +++ b/meta-raspberrypi/recipes-core/packagegroups/packagegroup-rpi-test.bb @@ -1,6 +1,6 @@ DESCRIPTION = "RaspberryPi Test Packagegroup" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" inherit packagegroup diff --git a/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend b/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend new file mode 100644 index 000000000..698564b94 --- /dev/null +++ b/meta-raspberrypi/recipes-core/psplash/psplash_%.bbappend @@ -0,0 +1,4 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" +SPLASH_IMAGES_append_rpi = " file://psplash-raspberrypi-img.h;outsuffix=raspberrypi" +ALTERNATIVE_PRIORITY_psplash-raspberrypi[psplash] = "10" + diff --git a/meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend b/meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend deleted file mode 100644 index 698564b94..000000000 --- a/meta-raspberrypi/recipes-core/psplash/psplash_git.bbappend +++ /dev/null @@ -1,4 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" -SPLASH_IMAGES_append_rpi = " file://psplash-raspberrypi-img.h;outsuffix=raspberrypi" -ALTERNATIVE_PRIORITY_psplash-raspberrypi[psplash] = "10" - diff --git a/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb b/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb index b249d9726..edef0db9e 100644 --- a/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb +++ b/meta-raspberrypi/recipes-core/udev/udev-rules-rpi.bb @@ -1,6 +1,6 @@ DESCRIPTION = "udev rules for Raspberry Pi Boards" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" SRC_URI = " file://99-com.rules" diff --git a/meta-raspberrypi/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch b/meta-raspberrypi/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch deleted file mode 100644 index 01e054634..000000000 --- a/meta-raspberrypi/recipes-devtools/wiringPi/files/0001-Add-initial-cross-compile-support.patch +++ /dev/null @@ -1,413 +0,0 @@ -From ca25788e2563bad0d554deb9f4300d1e7d062825 Mon Sep 17 00:00:00 2001 -From: Aurelian Zanoschi -Date: Mon, 31 Jul 2017 20:25:15 +0300 -Subject: [PATCH] Add initial cross compile support - ---- - devLib/Makefile | 54 +++++++++++++++++++++++++-------------------- - examples/Gertboard/Makefile | 22 +++++++++++------- - examples/Makefile | 22 +++++++++++------- - examples/PiFace/Makefile | 22 +++++++++++------- - examples/PiGlow/Makefile | 4 ++-- - examples/q2w/Makefile | 4 ++-- - gpio/Makefile | 29 ++++++++++++------------ - wiringPi/Makefile | 52 ++++++++++++++++++++++++------------------- - 8 files changed, 120 insertions(+), 89 deletions(-) - -diff --git a/devLib/Makefile b/devLib/Makefile -index cf665d6..040c03a 100644 ---- a/devLib/Makefile -+++ b/devLib/Makefile -@@ -31,15 +31,19 @@ ifneq ($V,1) - Q ?= @ - endif - --STATIC=libwiringPiDev.a --DYNAMIC=libwiringPiDev.so.$(VERSION) -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib - --#DEBUG = -g -O0 --DEBUG = -O2 --CC = gcc --INCLUDE = -I. --DEFS = -D_GNU_SOURCE --CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC -+BASE_NAME=libwiringPiDev -+STATIC=$(BASE_NAME).a -+DYNAMIC=$(BASE_NAME).so.$(VERSION) -+ -+#DEBUG ?= -g -O0 -+DEBUG ?= -O2 -+CC ?= gcc -+INCLUDE ?= -I. -+DEFS ?= -D_GNU_SOURCE -+CFLAGS ?= $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC - - LIBS = - -@@ -68,16 +72,16 @@ $(STATIC): $(OBJ) - - $(DYNAMIC): $(OBJ) - $Q echo "[Link (Dynamic)]" -- $Q $(CC) -shared -Wl,-soname,libwiringPiDev.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ) -+ $Q $(CC) -shared $(LDFLAGS) -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ) - - .c.o: - $Q echo [Compile] $< -- $Q $(CC) -c $(CFLAGS) $< -o $@ -+ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@ - - .PHONY: clean - clean: - $Q echo "[Clean]" -- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.* -+ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a - - .PHONY: tags - tags: $(SRC) -@@ -88,22 +92,22 @@ tags: $(SRC) - .PHONY: install - install: $(DYNAMIC) - $Q echo "[Install Headers]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include -- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include -+ $Q install -m 0755 -d $(INCLUDE_DIR) -+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) - $Q echo "[Install Dynamic Lib]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib -- $Q install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) -- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so -- $Q $(LDCONFIG) -+ $Q install -m 0755 -d $(LIB_DIR) -+ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC) -+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so -+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) - - .PHONY: install-static - install-static: $(STATIC) - $Q echo "[Install Headers]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include -- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include -+ $Q install -m 0755 -d $(INCLUDE_DIR) -+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) - $Q echo "[Install Static Lib]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib -- $Q install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib -+ $Q install -m 0755 -d $(LIB_DIR) -+ $Q install -m 0755 $(STATIC) $(LIB_DIR) - - .PHONY: install-deb - install-deb: $(DYNAMIC) -@@ -118,9 +122,11 @@ install-deb: $(DYNAMIC) - .PHONY: uninstall - uninstall: - $Q echo "[UnInstall]" -- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS) -- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.* -- $Q $(LDCONFIG) -+ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS) -+ $Q rm -f $(LIB_DIR)/$(STATIC) -+ $Q rm -f $(LIB_DIR)/$(DYNAMIC) -+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so -+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) - - - .PHONY: depend -diff --git a/examples/Gertboard/Makefile b/examples/Gertboard/Makefile -index 1939ad6..98d1415 100644 ---- a/examples/Gertboard/Makefile -+++ b/examples/Gertboard/Makefile -@@ -9,14 +9,20 @@ ifneq ($V,1) - Q ?= @ - endif - --#DEBUG = -g -O0 --DEBUG = -O3 --CC = gcc --INCLUDE = -I/usr/local/include --CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -- --LDFLAGS = -L/usr/local/lib --LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -+DESTDIR?=/usr -+PREFIX?=/local -+ -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib -+ -+#DEBUG ?= -g -O0 -+DEBUG ?= -O3 -+CC ?= gcc -+INCLUDE ?= -I$(INCLUDE_DIR) -+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -+ -+LDFLAGS ?= -L$(LIB_DIR) -+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm - - # Should not alter anything below this line - ############################################################################### -diff --git a/examples/Makefile b/examples/Makefile -index 6d87885..8623816 100644 ---- a/examples/Makefile -+++ b/examples/Makefile -@@ -26,14 +26,20 @@ ifneq ($V,1) - Q ?= @ - endif - --#DEBUG = -g -O0 --DEBUG = -O3 --CC = gcc --INCLUDE = -I/usr/local/include --CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -- --LDFLAGS = -L/usr/local/lib --LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt -+DESTDIR?=/usr -+PREFIX?=/local -+ -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib -+ -+#DEBUG ?= -g -O0 -+DEBUG ?= -O3 -+CC ?= gcc -+INCLUDE ?= -I$(INCLUDE_DIR) -+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -+ -+LDFLAGS ?= -L$(LIB_DIR) -+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt - - # Should not alter anything below this line - ############################################################################### -diff --git a/examples/PiFace/Makefile b/examples/PiFace/Makefile -index f937c14..ad030b3 100644 ---- a/examples/PiFace/Makefile -+++ b/examples/PiFace/Makefile -@@ -26,14 +26,20 @@ ifneq ($V,1) - Q ?= @ - endif - --#DEBUG = -g -O0 --DEBUG = -O3 --CC = gcc --INCLUDE = -I/usr/local/include --CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -- --LDFLAGS = -L/usr/local/lib --LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -+DESTDIR?=/usr -+PREFIX?=/local -+ -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib -+ -+#DEBUG ?= -g -O0 -+DEBUG ?= -O3 -+CC ?= gcc -+INCLUDE ?= -I$(INCLUDE_DIR) -+CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe -+ -+LDFLAGS ?= -L$(LIB_DIR) -+LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm - - # Should not alter anything below this line - ############################################################################### -diff --git a/examples/PiGlow/Makefile b/examples/PiGlow/Makefile -index f182db7..d1ea74f 100644 ---- a/examples/PiGlow/Makefile -+++ b/examples/PiGlow/Makefile -@@ -29,10 +29,10 @@ endif - #DEBUG = -g -O0 - DEBUG = -O3 - CC = gcc --INCLUDE = -I/usr/local/include -+INCLUDE = -I../wiringPi -I../wiringPiDev - CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe - --LDFLAGS = -L/usr/local/lib -+LDFLAGS = -L../wiringPi -L../wiringPiDev - LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm - - # Should not alter anything below this line -diff --git a/examples/q2w/Makefile b/examples/q2w/Makefile -index 8f773bf..14aa6e4 100644 ---- a/examples/q2w/Makefile -+++ b/examples/q2w/Makefile -@@ -29,10 +29,10 @@ endif - #DEBUG = -g -O0 - DEBUG = -O3 - CC = gcc --INCLUDE = -I/usr/local/include -+INCLUDE = -I../wiringPi -I../devLib - CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe - --LDFLAGS = -L/usr/local/lib -+LDFLAGS = -L../wiringPi -L../devLib - LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm - - ############################################################################### -diff --git a/gpio/Makefile b/gpio/Makefile -index f41a005..22753ee 100644 ---- a/gpio/Makefile -+++ b/gpio/Makefile -@@ -30,13 +30,17 @@ ifneq ($V,1) - Q ?= @ - endif - --#DEBUG = -g -O0 --DEBUG = -O2 --CC = gcc --INCLUDE = -I$(DESTDIR)$(PREFIX)/include --CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib -+BIN_DIR?=$(DESTDIR)$(PREFIX)/bin - --LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib -+#DEBUG ?= -g -O0 -+DEBUG ?= -O2 -+CC ?= gcc -+INCLUDE ?= -I$(INCLUDE_DIR) -+CFLAGS ?= $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe -+ -+LDFLAGS ?= -L$(LIB_DIR) - LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt - - # May not need to alter anything below this line -@@ -72,13 +76,10 @@ tags: $(SRC) - .PHONY: install - install: gpio - $Q echo "[Install]" -- $Q cp gpio $(DESTDIR)$(PREFIX)/bin --ifneq ($(WIRINGPI_SUID),0) -- $Q chown root.root $(DESTDIR)$(PREFIX)/bin/gpio -- $Q chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio --endif -- $Q mkdir -p $(DESTDIR)$(PREFIX)/man/man1 -- $Q cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1 -+ $Q install -d $(BIN_DIR) -+ $Q install -m 4755 -o root -g root gpio $(BIN_DIR) -+ $Q install -d $(DESTDIR)$(PREFIX)/share/man/man1 -+ $Q install -m 644 -o root -g root gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1 - - .PHONY: install-deb - install-deb: gpio -@@ -91,7 +92,7 @@ install-deb: gpio - .PHONY: uninstall - uninstall: - $Q echo "[UnInstall]" -- $Q rm -f $(DESTDIR)$(PREFIX)/bin/gpio -+ $Q rm -f $(BIN_DIR)/gpio - $Q rm -f $(DESTDIR)$(PREFIX)/man/man1/gpio.1 - - .PHONY: depend -diff --git a/wiringPi/Makefile b/wiringPi/Makefile -index e1868b9..750d290 100644 ---- a/wiringPi/Makefile -+++ b/wiringPi/Makefile -@@ -25,21 +25,25 @@ VERSION=$(shell cat ../VERSION) - DESTDIR?=/usr - PREFIX?=/local - -+INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include -+LIB_DIR?=$(DESTDIR)$(PREFIX)/lib -+ - LDCONFIG?=ldconfig - - ifneq ($V,1) - Q ?= @ - endif - --STATIC=libwiringPi.a --DYNAMIC=libwiringPi.so.$(VERSION) -+BASE_NAME=libwiringPi -+STATIC=$(BASE_NAME).a -+DYNAMIC=$(BASE_NAME).so.$(VERSION) - --#DEBUG = -g -O0 --DEBUG = -O2 --CC = gcc --INCLUDE = -I. -+#DEBUG ?= -g -O0 -+DEBUG ?= -O2 -+CC ?= gcc -+INCLUDE ?= -I. - DEFS = -D_GNU_SOURCE --CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC -+CFLAGS = $(DEBUG) $(DEFS) $(INCLUDE) -Wformat=2 -Wall -Wextra -Winline -pipe -fPIC - - LIBS = -lm -lpthread -lrt -lcrypt - -@@ -78,17 +82,17 @@ $(STATIC): $(OBJ) - - $(DYNAMIC): $(OBJ) - $Q echo "[Link (Dynamic)]" -- $Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) $(LIBS) $(OBJ) -+ $Q $(CC) $(LDFLAGS) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so $(OBJ) $(LIBS) - - .c.o: - $Q echo [Compile] $< -- $Q $(CC) -c $(CFLAGS) $< -o $@ -+ $Q $(CC) $(CFLAGS) $(LIBS) -c $< -o $@ - - - .PHONY: clean - clean: - $Q echo "[Clean]" -- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.* -+ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a - - .PHONY: tags - tags: $(SRC) -@@ -99,22 +103,22 @@ tags: $(SRC) - .PHONY: install - install: $(DYNAMIC) - $Q echo "[Install Headers]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include -- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include -+ $Q install -m 0755 -d $(INCLUDE_DIR) -+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) - $Q echo "[Install Dynamic Lib]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib -- $Q install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) -- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so -- $Q $(LDCONFIG) -+ $Q install -m 0755 -d $(LIB_DIR) -+ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC) -+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so -+ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) - - .PHONY: install-static - install-static: $(STATIC) - $Q echo "[Install Headers]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include -- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include -+ $Q install -m 0755 -d $(INCLUDE_DIR) -+ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) - $Q echo "[Install Static Lib]" -- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib -- $Q install -m 0755 libwiringPi.a $(DESTDIR)$(PREFIX)/lib -+ $Q install -m 0755 -d $(LIB_DIR) -+ $Q install -m 0755 $(STATIC) $(LIB_DIR) - - .PHONY: install-deb - install-deb: $(DYNAMIC) -@@ -129,9 +133,11 @@ install-deb: $(DYNAMIC) - .PHONY: uninstall - uninstall: - $Q echo "[UnInstall]" -- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS) -- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.* -- $Q $(LDCONFIG) -+ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS) -+ $Q rm -f $(LIB_DIR)/$(STATIC) -+ $Q rm -f $(LIB_DIR)/$(DYNAMIC) -+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so -+ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) - - - .PHONY: depend --- -2.7.4 - diff --git a/meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb b/meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb deleted file mode 100644 index f1b01dbe5..000000000 --- a/meta-raspberrypi/recipes-devtools/wiringPi/wiringpi_git.bb +++ /dev/null @@ -1,33 +0,0 @@ -DESCRIPTION = "A library to control Raspberry Pi GPIO channels" -HOMEPAGE = "https://projects.drogon.net/raspberry-pi/wiringpi/" -SECTION = "devel/libs" -LICENSE = "LGPLv3+" -LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02" - -# tag 2.44 -SRCREV = "96344ff7125182989f98d3be8d111952a8f74e15" - -S = "${WORKDIR}/git" - -SRC_URI = "git://git.drogon.net/wiringPi \ - file://0001-Add-initial-cross-compile-support.patch \ - " - -COMPATIBLE_MACHINE = "^rpi$" - -CFLAGS_prepend = "-I${S}/wiringPi -I${S}/devLib " - -EXTRA_OEMAKE += "'INCLUDE_DIR=${D}${includedir}' 'LIB_DIR=${D}${libdir}'" -EXTRA_OEMAKE += "'DESTDIR=${D}/usr' 'PREFIX=""'" - -do_compile() { - oe_runmake -C devLib - oe_runmake -C wiringPi - oe_runmake -C gpio 'LDFLAGS=${LDFLAGS} -L${S}/wiringPi -L${S}/devLib' -} - -do_install() { - oe_runmake -C devLib install - oe_runmake -C wiringPi install - oe_runmake -C gpio install -} diff --git a/meta-raspberrypi/recipes-devtools/wiringpi/files/0001-Add-initial-cross-compile-support.patch b/meta-raspberrypi/recipes-devtools/wiringpi/files/0001-Add-initial-cross-compile-support.patch new file mode 100644 index 000000000..01e054634 --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/wiringpi/files/0001-Add-initial-cross-compile-support.patch @@ -0,0 +1,413 @@ +From ca25788e2563bad0d554deb9f4300d1e7d062825 Mon Sep 17 00:00:00 2001 +From: Aurelian Zanoschi +Date: Mon, 31 Jul 2017 20:25:15 +0300 +Subject: [PATCH] Add initial cross compile support + +--- + devLib/Makefile | 54 +++++++++++++++++++++++++-------------------- + examples/Gertboard/Makefile | 22 +++++++++++------- + examples/Makefile | 22 +++++++++++------- + examples/PiFace/Makefile | 22 +++++++++++------- + examples/PiGlow/Makefile | 4 ++-- + examples/q2w/Makefile | 4 ++-- + gpio/Makefile | 29 ++++++++++++------------ + wiringPi/Makefile | 52 ++++++++++++++++++++++++------------------- + 8 files changed, 120 insertions(+), 89 deletions(-) + +diff --git a/devLib/Makefile b/devLib/Makefile +index cf665d6..040c03a 100644 +--- a/devLib/Makefile ++++ b/devLib/Makefile +@@ -31,15 +31,19 @@ ifneq ($V,1) + Q ?= @ + endif + +-STATIC=libwiringPiDev.a +-DYNAMIC=libwiringPiDev.so.$(VERSION) ++INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include ++LIB_DIR?=$(DESTDIR)$(PREFIX)/lib + +-#DEBUG = -g -O0 +-DEBUG = -O2 +-CC = gcc +-INCLUDE = -I. +-DEFS = -D_GNU_SOURCE +-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC ++BASE_NAME=libwiringPiDev ++STATIC=$(BASE_NAME).a ++DYNAMIC=$(BASE_NAME).so.$(VERSION) ++ ++#DEBUG ?= -g -O0 ++DEBUG ?= -O2 ++CC ?= gcc ++INCLUDE ?= -I. ++DEFS ?= -D_GNU_SOURCE ++CFLAGS ?= $(DEBUG) $(DEFS) -Wformat=2 -Wall -Winline $(INCLUDE) -pipe -fPIC + + LIBS = + +@@ -68,16 +72,16 @@ $(STATIC): $(OBJ) + + $(DYNAMIC): $(OBJ) + $Q echo "[Link (Dynamic)]" +- $Q $(CC) -shared -Wl,-soname,libwiringPiDev.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPiDev.so.$(VERSION) -lpthread $(OBJ) ++ $Q $(CC) -shared $(LDFLAGS) -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so -lpthread $(OBJ) + + .c.o: + $Q echo [Compile] $< +- $Q $(CC) -c $(CFLAGS) $< -o $@ ++ $Q $(CC) -c $(CFLAGS) -fPIC $< -o $@ + + .PHONY: clean + clean: + $Q echo "[Clean]" +- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPiDev.* ++ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a + + .PHONY: tags + tags: $(SRC) +@@ -88,22 +92,22 @@ tags: $(SRC) + .PHONY: install + install: $(DYNAMIC) + $Q echo "[Install Headers]" +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include +- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include ++ $Q install -m 0755 -d $(INCLUDE_DIR) ++ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) + $Q echo "[Install Dynamic Lib]" +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib +- $Q install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) +- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so +- $Q $(LDCONFIG) ++ $Q install -m 0755 -d $(LIB_DIR) ++ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC) ++ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so ++ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) + + .PHONY: install-static + install-static: $(STATIC) + $Q echo "[Install Headers]" +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include +- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include ++ $Q install -m 0755 -d $(INCLUDE_DIR) ++ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) + $Q echo "[Install Static Lib]" +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib +- $Q install -m 0755 libwiringPiDev.a $(DESTDIR)$(PREFIX)/lib ++ $Q install -m 0755 -d $(LIB_DIR) ++ $Q install -m 0755 $(STATIC) $(LIB_DIR) + + .PHONY: install-deb + install-deb: $(DYNAMIC) +@@ -118,9 +122,11 @@ install-deb: $(DYNAMIC) + .PHONY: uninstall + uninstall: + $Q echo "[UnInstall]" +- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS) +- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.* +- $Q $(LDCONFIG) ++ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS) ++ $Q rm -f $(LIB_DIR)/$(STATIC) ++ $Q rm -f $(LIB_DIR)/$(DYNAMIC) ++ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so ++ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) + + + .PHONY: depend +diff --git a/examples/Gertboard/Makefile b/examples/Gertboard/Makefile +index 1939ad6..98d1415 100644 +--- a/examples/Gertboard/Makefile ++++ b/examples/Gertboard/Makefile +@@ -9,14 +9,20 @@ ifneq ($V,1) + Q ?= @ + endif + +-#DEBUG = -g -O0 +-DEBUG = -O3 +-CC = gcc +-INCLUDE = -I/usr/local/include +-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe +- +-LDFLAGS = -L/usr/local/lib +-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm ++DESTDIR?=/usr ++PREFIX?=/local ++ ++INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include ++LIB_DIR?=$(DESTDIR)$(PREFIX)/lib ++ ++#DEBUG ?= -g -O0 ++DEBUG ?= -O3 ++CC ?= gcc ++INCLUDE ?= -I$(INCLUDE_DIR) ++CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe ++ ++LDFLAGS ?= -L$(LIB_DIR) ++LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm + + # Should not alter anything below this line + ############################################################################### +diff --git a/examples/Makefile b/examples/Makefile +index 6d87885..8623816 100644 +--- a/examples/Makefile ++++ b/examples/Makefile +@@ -26,14 +26,20 @@ ifneq ($V,1) + Q ?= @ + endif + +-#DEBUG = -g -O0 +-DEBUG = -O3 +-CC = gcc +-INCLUDE = -I/usr/local/include +-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe +- +-LDFLAGS = -L/usr/local/lib +-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt ++DESTDIR?=/usr ++PREFIX?=/local ++ ++INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include ++LIB_DIR?=$(DESTDIR)$(PREFIX)/lib ++ ++#DEBUG ?= -g -O0 ++DEBUG ?= -O3 ++CC ?= gcc ++INCLUDE ?= -I$(INCLUDE_DIR) ++CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe ++ ++LDFLAGS ?= -L$(LIB_DIR) ++LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm -lcrypt -lrt + + # Should not alter anything below this line + ############################################################################### +diff --git a/examples/PiFace/Makefile b/examples/PiFace/Makefile +index f937c14..ad030b3 100644 +--- a/examples/PiFace/Makefile ++++ b/examples/PiFace/Makefile +@@ -26,14 +26,20 @@ ifneq ($V,1) + Q ?= @ + endif + +-#DEBUG = -g -O0 +-DEBUG = -O3 +-CC = gcc +-INCLUDE = -I/usr/local/include +-CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe +- +-LDFLAGS = -L/usr/local/lib +-LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm ++DESTDIR?=/usr ++PREFIX?=/local ++ ++INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include ++LIB_DIR?=$(DESTDIR)$(PREFIX)/lib ++ ++#DEBUG ?= -g -O0 ++DEBUG ?= -O3 ++CC ?= gcc ++INCLUDE ?= -I$(INCLUDE_DIR) ++CFLAGS ?= $(DEBUG) -Wall $(INCLUDE) -Winline -pipe ++ ++LDFLAGS ?= -L$(LIB_DIR) ++LDLIBS ?= -lwiringPi -lwiringPiDev -lpthread -lm + + # Should not alter anything below this line + ############################################################################### +diff --git a/examples/PiGlow/Makefile b/examples/PiGlow/Makefile +index f182db7..d1ea74f 100644 +--- a/examples/PiGlow/Makefile ++++ b/examples/PiGlow/Makefile +@@ -29,10 +29,10 @@ endif + #DEBUG = -g -O0 + DEBUG = -O3 + CC = gcc +-INCLUDE = -I/usr/local/include ++INCLUDE = -I../wiringPi -I../wiringPiDev + CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe + +-LDFLAGS = -L/usr/local/lib ++LDFLAGS = -L../wiringPi -L../wiringPiDev + LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm + + # Should not alter anything below this line +diff --git a/examples/q2w/Makefile b/examples/q2w/Makefile +index 8f773bf..14aa6e4 100644 +--- a/examples/q2w/Makefile ++++ b/examples/q2w/Makefile +@@ -29,10 +29,10 @@ endif + #DEBUG = -g -O0 + DEBUG = -O3 + CC = gcc +-INCLUDE = -I/usr/local/include ++INCLUDE = -I../wiringPi -I../devLib + CFLAGS = $(DEBUG) -Wall $(INCLUDE) -Winline -pipe + +-LDFLAGS = -L/usr/local/lib ++LDFLAGS = -L../wiringPi -L../devLib + LDLIBS = -lwiringPi -lwiringPiDev -lpthread -lm + + ############################################################################### +diff --git a/gpio/Makefile b/gpio/Makefile +index f41a005..22753ee 100644 +--- a/gpio/Makefile ++++ b/gpio/Makefile +@@ -30,13 +30,17 @@ ifneq ($V,1) + Q ?= @ + endif + +-#DEBUG = -g -O0 +-DEBUG = -O2 +-CC = gcc +-INCLUDE = -I$(DESTDIR)$(PREFIX)/include +-CFLAGS = $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe ++INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include ++LIB_DIR?=$(DESTDIR)$(PREFIX)/lib ++BIN_DIR?=$(DESTDIR)$(PREFIX)/bin + +-LDFLAGS = -L$(DESTDIR)$(PREFIX)/lib ++#DEBUG ?= -g -O0 ++DEBUG ?= -O2 ++CC ?= gcc ++INCLUDE ?= -I$(INCLUDE_DIR) ++CFLAGS ?= $(DEBUG) -Wall -Wextra $(INCLUDE) -Winline -pipe ++ ++LDFLAGS ?= -L$(LIB_DIR) + LIBS = -lwiringPi -lwiringPiDev -lpthread -lrt -lm -lcrypt + + # May not need to alter anything below this line +@@ -72,13 +76,10 @@ tags: $(SRC) + .PHONY: install + install: gpio + $Q echo "[Install]" +- $Q cp gpio $(DESTDIR)$(PREFIX)/bin +-ifneq ($(WIRINGPI_SUID),0) +- $Q chown root.root $(DESTDIR)$(PREFIX)/bin/gpio +- $Q chmod 4755 $(DESTDIR)$(PREFIX)/bin/gpio +-endif +- $Q mkdir -p $(DESTDIR)$(PREFIX)/man/man1 +- $Q cp gpio.1 $(DESTDIR)$(PREFIX)/man/man1 ++ $Q install -d $(BIN_DIR) ++ $Q install -m 4755 -o root -g root gpio $(BIN_DIR) ++ $Q install -d $(DESTDIR)$(PREFIX)/share/man/man1 ++ $Q install -m 644 -o root -g root gpio.1 $(DESTDIR)$(PREFIX)/share/man/man1 + + .PHONY: install-deb + install-deb: gpio +@@ -91,7 +92,7 @@ install-deb: gpio + .PHONY: uninstall + uninstall: + $Q echo "[UnInstall]" +- $Q rm -f $(DESTDIR)$(PREFIX)/bin/gpio ++ $Q rm -f $(BIN_DIR)/gpio + $Q rm -f $(DESTDIR)$(PREFIX)/man/man1/gpio.1 + + .PHONY: depend +diff --git a/wiringPi/Makefile b/wiringPi/Makefile +index e1868b9..750d290 100644 +--- a/wiringPi/Makefile ++++ b/wiringPi/Makefile +@@ -25,21 +25,25 @@ VERSION=$(shell cat ../VERSION) + DESTDIR?=/usr + PREFIX?=/local + ++INCLUDE_DIR?=$(DESTDIR)$(PREFIX)/include ++LIB_DIR?=$(DESTDIR)$(PREFIX)/lib ++ + LDCONFIG?=ldconfig + + ifneq ($V,1) + Q ?= @ + endif + +-STATIC=libwiringPi.a +-DYNAMIC=libwiringPi.so.$(VERSION) ++BASE_NAME=libwiringPi ++STATIC=$(BASE_NAME).a ++DYNAMIC=$(BASE_NAME).so.$(VERSION) + +-#DEBUG = -g -O0 +-DEBUG = -O2 +-CC = gcc +-INCLUDE = -I. ++#DEBUG ?= -g -O0 ++DEBUG ?= -O2 ++CC ?= gcc ++INCLUDE ?= -I. + DEFS = -D_GNU_SOURCE +-CFLAGS = $(DEBUG) $(DEFS) -Wformat=2 -Wall -Wextra -Winline $(INCLUDE) -pipe -fPIC ++CFLAGS = $(DEBUG) $(DEFS) $(INCLUDE) -Wformat=2 -Wall -Wextra -Winline -pipe -fPIC + + LIBS = -lm -lpthread -lrt -lcrypt + +@@ -78,17 +82,17 @@ $(STATIC): $(OBJ) + + $(DYNAMIC): $(OBJ) + $Q echo "[Link (Dynamic)]" +- $Q $(CC) -shared -Wl,-soname,libwiringPi.so$(WIRINGPI_SONAME_SUFFIX) -o libwiringPi.so.$(VERSION) $(LIBS) $(OBJ) ++ $Q $(CC) $(LDFLAGS) -shared -Wl,-soname,$(BASE_NAME).so.$(DYN_VERS_MAJ) -o $(BASE_NAME).so $(OBJ) $(LIBS) + + .c.o: + $Q echo [Compile] $< +- $Q $(CC) -c $(CFLAGS) $< -o $@ ++ $Q $(CC) $(CFLAGS) $(LIBS) -c $< -o $@ + + + .PHONY: clean + clean: + $Q echo "[Clean]" +- $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak libwiringPi.* ++ $Q rm -f $(OBJ) $(OBJ_I2C) *~ core tags Makefile.bak $(BASE_NAME).so* $(BASE_NAME).a + + .PHONY: tags + tags: $(SRC) +@@ -99,22 +103,22 @@ tags: $(SRC) + .PHONY: install + install: $(DYNAMIC) + $Q echo "[Install Headers]" +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include +- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include ++ $Q install -m 0755 -d $(INCLUDE_DIR) ++ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) + $Q echo "[Install Dynamic Lib]" +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib +- $Q install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) +- $Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so +- $Q $(LDCONFIG) ++ $Q install -m 0755 -d $(LIB_DIR) ++ $Q install -m 0755 $(BASE_NAME).so $(LIB_DIR)/$(DYNAMIC) ++ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so ++ $Q ln -sf $(DYNAMIC) $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) + + .PHONY: install-static + install-static: $(STATIC) + $Q echo "[Install Headers]" +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/include +- $Q install -m 0644 $(HEADERS) $(DESTDIR)$(PREFIX)/include ++ $Q install -m 0755 -d $(INCLUDE_DIR) ++ $Q install -m 0644 $(HEADERS) $(INCLUDE_DIR) + $Q echo "[Install Static Lib]" +- $Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib +- $Q install -m 0755 libwiringPi.a $(DESTDIR)$(PREFIX)/lib ++ $Q install -m 0755 -d $(LIB_DIR) ++ $Q install -m 0755 $(STATIC) $(LIB_DIR) + + .PHONY: install-deb + install-deb: $(DYNAMIC) +@@ -129,9 +133,11 @@ install-deb: $(DYNAMIC) + .PHONY: uninstall + uninstall: + $Q echo "[UnInstall]" +- $Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS) +- $Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.* +- $Q $(LDCONFIG) ++ $Q cd $(INCLUDE_DIR) && rm -f $(HEADERS) ++ $Q rm -f $(LIB_DIR)/$(STATIC) ++ $Q rm -f $(LIB_DIR)/$(DYNAMIC) ++ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so ++ $Q rm -f $(LIB_DIR)/$(BASE_NAME).so.$(DYN_VERS_MAJ) + + + .PHONY: depend +-- +2.7.4 + diff --git a/meta-raspberrypi/recipes-devtools/wiringpi/wiringpi_git.bb b/meta-raspberrypi/recipes-devtools/wiringpi/wiringpi_git.bb new file mode 100644 index 000000000..f1b01dbe5 --- /dev/null +++ b/meta-raspberrypi/recipes-devtools/wiringpi/wiringpi_git.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "A library to control Raspberry Pi GPIO channels" +HOMEPAGE = "https://projects.drogon.net/raspberry-pi/wiringpi/" +SECTION = "devel/libs" +LICENSE = "LGPLv3+" +LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02" + +# tag 2.44 +SRCREV = "96344ff7125182989f98d3be8d111952a8f74e15" + +S = "${WORKDIR}/git" + +SRC_URI = "git://git.drogon.net/wiringPi \ + file://0001-Add-initial-cross-compile-support.patch \ + " + +COMPATIBLE_MACHINE = "^rpi$" + +CFLAGS_prepend = "-I${S}/wiringPi -I${S}/devLib " + +EXTRA_OEMAKE += "'INCLUDE_DIR=${D}${includedir}' 'LIB_DIR=${D}${libdir}'" +EXTRA_OEMAKE += "'DESTDIR=${D}/usr' 'PREFIX=""'" + +do_compile() { + oe_runmake -C devLib + oe_runmake -C wiringPi + oe_runmake -C gpio 'LDFLAGS=${LDFLAGS} -L${S}/wiringPi -L${S}/devLib' +} + +do_install() { + oe_runmake -C devLib install + oe_runmake -C wiringPi install + oe_runmake -C gpio install +} diff --git a/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend b/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend new file mode 100644 index 000000000..919e95e0d --- /dev/null +++ b/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_%.bbappend @@ -0,0 +1,21 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_rpi = " \ + file://xorg.conf.d/98-pitft.conf \ + file://xorg.conf.d/99-calibration.conf \ + file://xorg.conf.d/10-noglamor.conf \ +" +do_install_append_rpi () { + PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" + VC4="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" + if [ "${PITFT}" = "1" ]; then + install -d ${D}/${sysconfdir}/X11/xorg.conf.d/ + install -m 0644 ${WORKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ + install -m 0644 ${WORKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ + fi + if [ "${VC4}" = "1" ]; then + install -Dm 0644 ${WORKDIR}/xorg.conf.d/10-noglamor.conf ${D}/${sysconfdir}/X11/xorg.conf.d/10-noglamor.conf + fi +} + +FILES_${PN}_rpi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*" diff --git a/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend b/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend deleted file mode 100644 index 919e95e0d..000000000 --- a/meta-raspberrypi/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend +++ /dev/null @@ -1,21 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" - -SRC_URI_append_rpi = " \ - file://xorg.conf.d/98-pitft.conf \ - file://xorg.conf.d/99-calibration.conf \ - file://xorg.conf.d/10-noglamor.conf \ -" -do_install_append_rpi () { - PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}" - VC4="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" - if [ "${PITFT}" = "1" ]; then - install -d ${D}/${sysconfdir}/X11/xorg.conf.d/ - install -m 0644 ${WORKDIR}/xorg.conf.d/98-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ - install -m 0644 ${WORKDIR}/xorg.conf.d/99-calibration.conf ${D}/${sysconfdir}/X11/xorg.conf.d/ - fi - if [ "${VC4}" = "1" ]; then - install -Dm 0644 ${WORKDIR}/xorg.conf.d/10-noglamor.conf ${D}/${sysconfdir}/X11/xorg.conf.d/10-noglamor.conf - fi -} - -FILES_${PN}_rpi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*" diff --git a/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb b/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb index 0478576de..acbd2250c 100644 --- a/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb +++ b/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.14.bb @@ -1,6 +1,6 @@ -LINUX_VERSION ?= "4.14.39" +LINUX_VERSION ?= "4.14.58" -SRCREV = "865ddc1393f558198e7e7ce70928ff2e49c4f7f6" +SRCREV = "a06f9e522301dfacc1f382d72e6a9792d8350328" SRC_URI = " \ git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y \ file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \ diff --git a/meta-raspberrypi/recipes-multimedia/x264/x264_%.bbappend b/meta-raspberrypi/recipes-multimedia/x264/x264_%.bbappend new file mode 100644 index 000000000..505719efb --- /dev/null +++ b/meta-raspberrypi/recipes-multimedia/x264/x264_%.bbappend @@ -0,0 +1,2 @@ +EXTRA_OECONF_append_raspberrypi = " --disable-asm" +EXTRA_OECONF_append_raspberrypi0-wifi = " --disable-asm" diff --git a/meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend b/meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend deleted file mode 100644 index 505719efb..000000000 --- a/meta-raspberrypi/recipes-multimedia/x264/x264_git.bbappend +++ /dev/null @@ -1,2 +0,0 @@ -EXTRA_OECONF_append_raspberrypi = " --disable-asm" -EXTRA_OECONF_append_raspberrypi0-wifi = " --disable-asm" -- cgit v1.2.1