diff --git a/layers/meta-balena-raspberrypi/conf/layer.conf b/layers/meta-balena-raspberrypi/conf/layer.conf index 0722793a6..1f6d23743 100644 --- a/layers/meta-balena-raspberrypi/conf/layer.conf +++ b/layers/meta-balena-raspberrypi/conf/layer.conf @@ -137,7 +137,7 @@ RPI_KERNEL_DEVICETREE:append:revpi-connect-s = " broadcom/bcm2711-rpi-cm4s.dtb" RPI_KERNEL_DEVICETREE:remove:revpi-connect = "bcm2711-rpi-cm4s.dtb" RPI_KERNEL_DEVICETREE:remove:revpi-core-3 = "bcm2711-rpi-cm4s.dtb" -PREFERRED_VERSION:linux-raspberrypi = "5.10.%" +PREFERRED_VERSION_linux-raspberrypi = "6.1%" FIRMWARE_COMPRESSION:raspberrypi4-64 ?= "1" FIRMWARE_COMPRESSION:raspberrypi0-2w-64 ?= "1" diff --git a/layers/meta-balena-raspberrypi/conf/machine/raspberrypi3-unipi-neuron.conf b/layers/meta-balena-raspberrypi/conf/machine/raspberrypi3-unipi-neuron.conf index 3cc9be195..5a06ac6aa 100644 --- a/layers/meta-balena-raspberrypi/conf/machine/raspberrypi3-unipi-neuron.conf +++ b/layers/meta-balena-raspberrypi/conf/machine/raspberrypi3-unipi-neuron.conf @@ -6,3 +6,5 @@ MACHINEOVERRIDES = "raspberrypi3:${MACHINE}" include conf/machine/raspberrypi3.conf IMAGE_INSTALL:append = " unipi-kernel-modules unipi-tools" + +PREFERRED_VERSION_linux-raspberrypi = "5.15.%" diff --git a/layers/meta-balena-raspberrypi/conf/machine/raspberrypi4-unipi-neuron.conf b/layers/meta-balena-raspberrypi/conf/machine/raspberrypi4-unipi-neuron.conf index a91c05121..c64f35d2d 100644 --- a/layers/meta-balena-raspberrypi/conf/machine/raspberrypi4-unipi-neuron.conf +++ b/layers/meta-balena-raspberrypi/conf/machine/raspberrypi4-unipi-neuron.conf @@ -10,3 +10,5 @@ include conf/machine/raspberrypi4-64.conf MACHINEOVERRIDES := "${@'${MACHINEOVERRIDES}'.replace(':${MACHINE}',':raspberrypi4-64:${MACHINE}')}" IMAGE_INSTALL:append = " unipi-kernel-modules unipi-tools" + +PREFERRED_VERSION_linux-raspberrypi = "5.15.%" diff --git a/layers/meta-balena-raspberrypi/conf/machine/rt-rpi-300.conf b/layers/meta-balena-raspberrypi/conf/machine/rt-rpi-300.conf index 5468bedc3..452b82366 100644 --- a/layers/meta-balena-raspberrypi/conf/machine/rt-rpi-300.conf +++ b/layers/meta-balena-raspberrypi/conf/machine/rt-rpi-300.conf @@ -2,9 +2,8 @@ #@NAME: Rocktech-RPI-300 #@DESCRIPTION: Machine configuration for Rocktech-RPI-300 -MACHINEOVERRIDES = "raspberrypi4-64:${MACHINE}" +MACHINEOVERRIDES =. "raspberrypi4-64:" + include conf/machine/raspberrypi4-64.conf -# because we override the raspberrypi4-64 machine which in turn is an override of raspberrypi4, we need to do the following gimmick: -# courtesy of https://github.com/balena-os/balena-jetson/pull/112/commits/9d21df6899e595b4aeab4cc9a939ae6c564c669a -MACHINEOVERRIDES := "${@'${MACHINEOVERRIDES}'.replace(':${MACHINE}',':raspberrypi4-64:${MACHINE}')}" +PREFERRED_VERSION_linux-raspberrypi = "5.15.%" diff --git a/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-Add-tpm-slb9670-tis-spi-DT-overlay.patch b/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-Add-tpm-slb9670-tis-spi-DT-overlay.patch index 3e104ae84..936ad92ce 100644 --- a/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-Add-tpm-slb9670-tis-spi-DT-overlay.patch +++ b/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0001-Add-tpm-slb9670-tis-spi-DT-overlay.patch @@ -1,4 +1,3 @@ -From d211b4e01d2621ce03854f722f8db5acfe457ae0 Mon Sep 17 00:00:00 2001 From: Michal Toman Date: Mon, 1 Feb 2021 16:05:38 +0100 Subject: [PATCH] Add tpm-slb9670-tis-spi DT overlay @@ -11,17 +10,17 @@ Signed-off-by: Michal Toman create mode 100644 arch/arm/boot/dts/overlays/tpm-slb9670-tis-spi-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index d8a3677b583e..696b5789e64c 100644 +index 9203448db803..f6d410d31f8c 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile -@@ -194,6 +194,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ +@@ -276,6 +276,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ tc358743-audio.dtbo \ tinylcd35.dtbo \ tpm-slb9670.dtbo \ + tpm-slb9670-tis-spi.dtbo \ + tpm-slb9673.dtbo \ uart0.dtbo \ - uart1.dtbo \ - uart2.dtbo \ + uart0-pi5.dtbo \ diff --git a/arch/arm/boot/dts/overlays/tpm-slb9670-tis-spi-overlay.dts b/arch/arm/boot/dts/overlays/tpm-slb9670-tis-spi-overlay.dts new file mode 100644 index 000000000000..e43f8cd248ec @@ -49,6 +48,3 @@ index 000000000000..e43f8cd248ec + }; + }; +}; --- -2.26.2 - diff --git a/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0006-overlays-Add-Hyperpixel4-overlays.patch b/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0006-overlays-Add-Hyperpixel4-overlays.patch index 9a8de59f7..6c05171ba 100644 --- a/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0006-overlays-Add-Hyperpixel4-overlays.patch +++ b/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0006-overlays-Add-Hyperpixel4-overlays.patch @@ -1,4 +1,3 @@ -From ee5c0bab10e280cf54d3d2c06c6a4cc6b6ed627b Mon Sep 17 00:00:00 2001 From: Florin Sarbu Date: Thu, 17 Oct 2019 11:16:39 +0200 Subject: [PATCH] overlays: Add Hyperpixel4 overlays @@ -13,11 +12,11 @@ They each are taken from: Upstream-status: Inappropriate [not author] Signed-off-by: Florin Sarbu --- - arch/arm/boot/dts/overlays/Makefile | 4 + - .../boot/dts/overlays/hyperpixel4-pi3-overlay.dts | 98 ++++++++++++++++++++ - .../boot/dts/overlays/hyperpixel4-pi4-overlay.dts | 98 ++++++++++++++++++++ - .../overlays/hyperpixel4-square-pi3-overlay.dts | 103 +++++++++++++++++++++ - .../overlays/hyperpixel4-square-pi4-overlay.dts | 103 +++++++++++++++++++++ + arch/arm/boot/dts/overlays/Makefile | 4 + + .../dts/overlays/hyperpixel4-pi3-overlay.dts | 98 +++++++++++++++++ + .../dts/overlays/hyperpixel4-pi4-overlay.dts | 98 +++++++++++++++++ + .../hyperpixel4-square-pi3-overlay.dts | 103 ++++++++++++++++++ + .../hyperpixel4-square-pi4-overlay.dts | 103 ++++++++++++++++++ 5 files changed, 406 insertions(+) create mode 100644 arch/arm/boot/dts/overlays/hyperpixel4-pi3-overlay.dts create mode 100644 arch/arm/boot/dts/overlays/hyperpixel4-pi4-overlay.dts @@ -25,10 +24,10 @@ Signed-off-by: Florin Sarbu create mode 100644 arch/arm/boot/dts/overlays/hyperpixel4-square-pi4-overlay.dts diff --git a/arch/arm/boot/dts/overlays/Makefile b/arch/arm/boot/dts/overlays/Makefile -index 87082d6..554756c 100644 +index dd34b091565d..9203448db803 100644 --- a/arch/arm/boot/dts/overlays/Makefile +++ b/arch/arm/boot/dts/overlays/Makefile -@@ -59,6 +59,10 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ +@@ -99,6 +99,10 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \ hy28a.dtbo \ hy28b.dtbo \ hy28b-2017.dtbo \ @@ -38,10 +37,10 @@ index 87082d6..554756c 100644 + hyperpixel4-square-pi4.dtbo \ i-sabre-q2m.dtbo \ i2c-bcm2708.dtbo \ - i2c-gpio.dtbo \ + i2c-fan.dtbo \ diff --git a/arch/arm/boot/dts/overlays/hyperpixel4-pi3-overlay.dts b/arch/arm/boot/dts/overlays/hyperpixel4-pi3-overlay.dts new file mode 100644 -index 0000000..78bf59e +index 000000000000..78bf59ebcf19 --- /dev/null +++ b/arch/arm/boot/dts/overlays/hyperpixel4-pi3-overlay.dts @@ -0,0 +1,98 @@ @@ -145,7 +144,7 @@ index 0000000..78bf59e +}; diff --git a/arch/arm/boot/dts/overlays/hyperpixel4-pi4-overlay.dts b/arch/arm/boot/dts/overlays/hyperpixel4-pi4-overlay.dts new file mode 100644 -index 0000000..3757a99 +index 000000000000..3757a996aabd --- /dev/null +++ b/arch/arm/boot/dts/overlays/hyperpixel4-pi4-overlay.dts @@ -0,0 +1,98 @@ @@ -249,7 +248,7 @@ index 0000000..3757a99 +}; diff --git a/arch/arm/boot/dts/overlays/hyperpixel4-square-pi3-overlay.dts b/arch/arm/boot/dts/overlays/hyperpixel4-square-pi3-overlay.dts new file mode 100644 -index 0000000..f544a6c +index 000000000000..f544a6c7592f --- /dev/null +++ b/arch/arm/boot/dts/overlays/hyperpixel4-square-pi3-overlay.dts @@ -0,0 +1,103 @@ @@ -358,7 +357,7 @@ index 0000000..f544a6c + diff --git a/arch/arm/boot/dts/overlays/hyperpixel4-square-pi4-overlay.dts b/arch/arm/boot/dts/overlays/hyperpixel4-square-pi4-overlay.dts new file mode 100644 -index 0000000..f544a6c +index 000000000000..f544a6c7592f --- /dev/null +++ b/arch/arm/boot/dts/overlays/hyperpixel4-square-pi4-overlay.dts @@ -0,0 +1,103 @@ @@ -465,6 +464,3 @@ index 0000000..f544a6c + }; +}; + --- -2.7.4 - diff --git a/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.15.bbappend b/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.15.bbappend index d7f2980b7..f41e4a98d 100644 --- a/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.15.bbappend +++ b/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_5.15.bbappend @@ -17,8 +17,6 @@ SRC_URI:append:raspberrypi4-superhub = " \ SRC_URI:append = " \ file://0002-wireless-wext-Bring-back-ndo_do_ioctl-fallback.patch \ file://0001-Add-npe-x500-m3-overlay.patch \ - file://0006-overlays-Add-Hyperpixel4-overlays.patch \ - file://0001-Add-tpm-slb9670-tis-spi-DT-overlay.patch \ file://0010-dts-overlays-Add-UniPi-overlays.patch \ file://0001-seeed-studio-can-bus-v2-Add-dtbo-for-this-can-bus.patch \ file://0011-USB-serial-Add-support-for-more-Quectel-modules.patch \ diff --git a/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.1%.bbappend b/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.1%.bbappend new file mode 100644 index 000000000..b39d7d25c --- /dev/null +++ b/layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_6.1%.bbappend @@ -0,0 +1,213 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:${THISDIR}/${MACHINE}:" + +SRC_URI:append:raspberrypi4-superhub = " \ + file://0001-Add-gpio-wdt-DT-overlay-for-Phoenix-Board.patch \ + file://0002-Add-infineon-tpm-DT-overlay-for-Phoenix-Board.patch \ + file://0003-Add-spi1-DT-overlay-for-Phoenix-Board.patch \ + file://0004-Add-SD-host-DT-overlay-for-Phoenix-Board.patch \ +" + +SRC_URI:append = " \ + file://0002-wireless-wext-Bring-back-ndo_do_ioctl-fallback.patch \ + file://0001-Add-npe-x500-m3-overlay.patch \ + file://0006-overlays-Add-Hyperpixel4-overlays.patch \ + file://0001-Add-tpm-slb9670-tis-spi-DT-overlay.patch \ + file://0010-dts-overlays-Add-UniPi-overlays.patch \ + file://0001-seeed-studio-can-bus-v2-Add-dtbo-for-this-can-bus.patch \ + file://0011-USB-serial-Add-support-for-more-Quectel-modules.patch \ + file://0001-waveshare-sim7600-Add-dtbo-for-this-modem.patch \ + file://0001-overlays-Add-overlay-for-Seeed-reComputer-R1000.patch \ +" + +SRC_URI:append:rt-rpi-300 = " \ + file://rt-rpi-300-Add-changes-for-this-dt.patch \ + file://rt-rpi-Add-ch-432t-driver-for-this-chip.patch \ +" + +# BalenaOS already disables gcc plugins, +# however the unipi-neuron adds an extra module +# which seems to override the default configuration +SRC_URI:append:raspberrypi3-unipi-neuron = " \ + file://0001-pi3neuron-disable-gccplugins.patch \ +" + +BALENA_CONFIGS:append = " fbtft" +BALENA_CONFIGS[fbtft] = " \ + CONFIG_STAGING=y \ + CONFIG_FB_TFT=m \ + CONFIG_FB_TFT_AGM1264K_FL=m \ + CONFIG_FB_TFT_BD663474=m \ + CONFIG_FB_TFT_HX8340BN=m \ + CONFIG_FB_TFT_HX8347D=m \ + CONFIG_FB_TFT_HX8353D=m \ + CONFIG_FB_TFT_ILI9163=m \ + CONFIG_FB_TFT_ILI9320=m \ + CONFIG_FB_TFT_ILI9325=m \ + CONFIG_FB_TFT_ILI9340=m \ + CONFIG_FB_TFT_ILI9341=m \ + CONFIG_FB_TFT_ILI9481=m \ + CONFIG_FB_TFT_ILI9486=m \ + CONFIG_FB_TFT_PCD8544=m \ + CONFIG_FB_TFT_RA8875=m \ + CONFIG_FB_TFT_S6D02A1=m \ + CONFIG_FB_TFT_S6D1121=m \ + CONFIG_FB_TFT_SSD1289=m \ + CONFIG_FB_TFT_SSD1306=m \ + CONFIG_FB_TFT_SSD1331=m \ + CONFIG_FB_TFT_SSD1351=m \ + CONFIG_FB_TFT_ST7735R=m \ + CONFIG_FB_TFT_TINYLCD=m \ + CONFIG_FB_TFT_TLS8204=m \ + CONFIG_FB_TFT_UC1701=m \ + CONFIG_FB_TFT_UPD161704=m \ + " + + +BALENA_CONFIGS:append = " ${@configure_from_version("5.17", "", " fb_tft_watterott", d)}" +BALENA_CONFIGS[fb_tft_watterott] = "CONFIG_FB_TFT_WATTEROTT=m" + +BALENA_CONFIGS:append = " pca955_gpio_expander" +BALENA_CONFIGS[pca955_gpio_expander] = " \ + CONFIG_GPIO_PCA953X=y \ + CONFIG_GPIO_PCA953X_IRQ=y \ + " + +KERNEL_MODULE_PROBECONF += "rtl8192cu" +module_conf_rtl8192cu = "blacklist rtl8192cu" + +# requested by customer (support for Kontron PLD devices) +BALENA_CONFIGS:append = " gpio_i2c_kempld" +BALENA_CONFIGS_DEPS[gpio_i2c_kempld] = " \ + CONFIG_GPIOLIB=y \ + CONFIG_I2C=y \ + CONFIG_HAS_IOMEM=y \ + CONFIG_MFD_KEMPLD=m \ +" +BALENA_CONFIGS[gpio_i2c_kempld] = " \ + CONFIG_GPIO_KEMPLD=m \ + CONFIG_I2C_KEMPLD=m \ +" + +# make sure watchdog gets enabled no matter of the BSP changes +BALENA_CONFIGS:append = " rpi_watchdog" +BALENA_CONFIGS_DEPS[rpi_watchdog] = " \ + CONFIG_WATCHDOG=y \ +" +BALENA_CONFIGS[rpi_watchdog] = " \ + CONFIG_BCM2835_WDT=y \ +" + +BALENA_CONFIGS:append = " kvaser_usb_can_driver" + +BALENA_CONFIGS[kvaser_usb_can_driver] = " \ + CONFIG_CAN_KVASER_USB=m \ +" + +BALENA_CONFIGS:append = " mcp251x_can_driver" + +BALENA_CONFIGS[mcp251x_can_driver] = " \ + CONFIG_CAN_MCP251X=m \ +" + +BALENA_CONFIGS_DEPS[mcp251x_can_driver] = " \ + CONFIG_SPI=y \ + CONFIG_HAS_DMA=y \ +" + +BALENA_CONFIGS:append = " can_calc_bittiming" + +BALENA_CONFIGS[can_calc_bittiming] = " \ + CONFIG_CAN_CALC_BITTIMING=y \ +" + +BALENA_CONFIGS_DEPS[can_calc_bittiming] = " \ + CONFIG_CAN_DEV=y \ +" + +BALENA_CONFIGS:append = " ds1307_rtc_driver" + +BALENA_CONFIGS[ds1307_rtc_driver] = " \ + CONFIG_RTC_DRV_DS1307=m \ +" + +BALENA_CONFIGS_DEPS[ds1307_rtc_driver] = " \ + CONFIG_I2C=y \ +" + +BALENA_CONFIGS:append = " sc16is7xx_serial_driver" + +BALENA_CONFIGS[sc16is7xx_serial_driver] = " \ + CONFIG_SERIAL_SC16IS7XX=m \ +" + +BALENA_CONFIGS_DEPS[sc16is7xx_serial_driver] = " \ + CONFIG_I2C=y \ +" + +BALENA_CONFIGS:append = " mcp3422_adc_driver" + +BALENA_CONFIGS[mcp3422_adc_driver] = " \ + CONFIG_MCP3422=m \ +" + +BALENA_CONFIGS_DEPS[mcp3422_adc_driver] = " \ + CONFIG_I2C=y \ +" + +BALENA_CONFIGS:append = " sd8787_pwrseq_driver" + +BALENA_CONFIGS[sd8787_pwrseq_driver] = " \ + CONFIG_PWRSEQ_SD8787=m \ +" + +BALENA_CONFIGS_DEPS[sd8787_pwrseq_driver] = " \ + CONFIG_OF=y \ +" + +BALENA_CONFIGS:append = " serial_8250" +BALENA_CONFIGS[serial_8250] = " \ + CONFIG_SERIAL_8250=y \ + CONFIG_SERIAL_8250_CONSOLE=y \ + CONFIG_SERIAL_8250_NR_UARTS=1 \ + CONFIG_SERIAL_8250_EXTENDED=y \ + CONFIG_SERIAL_8250_SHARE_IRQ=y \ + CONFIG_SERIAL_8250_BCM2835AUX=y \ +" + +BALENA_CONFIGS:append:rt-rpi-300 = " rtrpi300cfgs" +BALENA_CONFIGS[rtrpi300cfgs] = " \ + CONFIG_RTC_DRV_RX8010=m \ + CONFIG_SPI=y \ + CONFIG_SPI_BCM2835=m \ + CONFIG_CH432T_SPI=m \ +" + +# The Pi3-64 and Pi4-64 are the only boards very low on rootfs space for now +# so we add this as per https://github.com/balena-os/meta-balena/pull/2411 +BALENA_CONFIGS:append:raspberrypi4-64 = " optimize-size" +BALENA_CONFIGS:append:raspberrypi3-64 = " optimize-size" +BALENA_CONFIGS[optimize-size] = " \ + CONFIG_CC_OPTIMIZE_FOR_SIZE=y \ +" + +BALENA_CONFIGS:append = " iio_pressure_drivers" +BALENA_CONFIGS[iio_pressure_drivers] = " \ + CONFIG_BMP280=m \ +" + +# Fix dtbo loading on 64bits, +# see commit 949b88bb for details +get_cc_option () { + # Check if KERNEL_CC supports the option "file-prefix-map". + # This option allows us to build images with __FILE__ values that do not + # contain the host build path. + if ${KERNEL_CC} -Q --help=joined | grep -q "\-ffile-prefix-map="; then + echo "-ffile-prefix-map=${S}=/kernel-source/" + fi +} +do_compile:append() { + if [ "${SITEINFO_BITS}" = "64" ]; then + cc_extra=$(get_cc_option) + oe_runmake dtbs CC="${KERNEL_CC} $cc_extra " LD="${KERNEL_LD}" ${KERNEL_EXTRA_ARGS} + fi +}