diff --git a/buildroot-external/board/raspberrypi/kernel.config b/buildroot-external/board/raspberrypi/kernel.config deleted file mode 100644 index 323b34ea8..000000000 --- a/buildroot-external/board/raspberrypi/kernel.config +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_FB_SIMPLE=y -# CONFIG_FB_BCM2708 is not set \ No newline at end of file diff --git a/buildroot-external/board/raspberrypi/patches/uboot/0001-raspberrypi-Disable-simple-framebuffer-support.patch b/buildroot-external/board/raspberrypi/patches/uboot/0001-raspberrypi-Disable-simple-framebuffer-support.patch new file mode 100644 index 000000000..d7a02e335 --- /dev/null +++ b/buildroot-external/board/raspberrypi/patches/uboot/0001-raspberrypi-Disable-simple-framebuffer-support.patch @@ -0,0 +1,62 @@ +From 68e65b1e3859d4baf41d1e5f6525ff7ace778ba1 Mon Sep 17 00:00:00 2001 +From: Florin Sarbu +Date: Thu, 12 Sep 2019 12:31:31 +0200 +Subject: [PATCH] raspberrypi: Disable simple framebuffer support + +On 4.19 kernels this u-boot driver clashes with bcm2708_fb. +So let's disable it from here so that we have bcm2708_fb +enabled in the kernel, just as Raspbian users might expect. +See https://github.com/raspberrypi/linux/issues/3139 + +Upstream-Status: Inappropriate [configuration] +Signed-off-by: Florin Sarbu +--- + board/raspberrypi/rpi/rpi.c | 2 +- + common/Makefile | 2 +- + include/configs/rpi.h | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index 153a1fd..c7bd399 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -482,7 +482,7 @@ int ft_board_setup(void *blob, bd_t *bd) + * should be more intelligent, and e.g. only do this if no enabled DT + * node exists for the "real" graphics driver. + */ +- lcd_dt_simplefb_add_node(blob); ++ //lcd_dt_simplefb_add_node(blob); + + #ifdef CONFIG_EFI_LOADER + /* Reserve the spin table */ +diff --git a/common/Makefile b/common/Makefile +index 0de60b3..2848d98 100644 +--- a/common/Makefile ++++ b/common/Makefile +@@ -50,7 +50,7 @@ ifndef CONFIG_DM_VIDEO + obj-$(CONFIG_LCD) += lcd.o lcd_console.o + endif + obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o +-obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o ++//obj-$(CONFIG_LCD_DT_SIMPLEFB) += lcd_simplefb.o + obj-$(CONFIG_LYNXKDI) += lynxkdi.o + obj-$(CONFIG_MENU) += menu.o + obj-$(CONFIG_UPDATE_TFTP) += update.o +diff --git a/include/configs/rpi.h b/include/configs/rpi.h +index a38bf20..e2760b0 100644 +--- a/include/configs/rpi.h ++++ b/include/configs/rpi.h +@@ -60,8 +60,8 @@ + /* GPIO */ + #define CONFIG_BCM2835_GPIO + /* LCD */ +-#define CONFIG_LCD_DT_SIMPLEFB +-#define CONFIG_VIDEO_BCM2835 ++//#define CONFIG_LCD_DT_SIMPLEFB ++//#define CONFIG_VIDEO_BCM2835 + + #ifdef CONFIG_CMD_USB + #define CONFIG_TFTP_TSIZE +-- +2.7.4 + diff --git a/buildroot-external/board/raspberrypi/patches/uboot/0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch b/buildroot-external/board/raspberrypi/patches/uboot/0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch new file mode 100644 index 000000000..5bd08f82a --- /dev/null +++ b/buildroot-external/board/raspberrypi/patches/uboot/0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch @@ -0,0 +1,82 @@ +From 0f45c3f2f46b62f767ef225b258f927ad88ca360 Mon Sep 17 00:00:00 2001 +From: Pascal Vizeli +Date: Tue, 10 Dec 2019 09:48:46 +0000 +Subject: [PATCH 1/1] rpi: Use CONFIG_OF_BOARD instead of CONFIG_EMBED + +Signed-off-by: Pascal Vizeli +--- + configs/rpi_0_w_defconfig | 2 +- + configs/rpi_2_defconfig | 2 +- + configs/rpi_3_32b_defconfig | 2 +- + configs/rpi_3_defconfig | 2 +- + configs/rpi_defconfig | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig +index fe5a7763a6..ed7f9381e9 100644 +--- a/configs/rpi_0_w_defconfig ++++ b/configs/rpi_0_w_defconfig +@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-zero-w" + CONFIG_ENV_FAT_INTERFACE="mmc" + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" +diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig +index bf331c0ad0..52e3c3b234 100644 +--- a/configs/rpi_2_defconfig ++++ b/configs/rpi_2_defconfig +@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_DEFAULT_DEVICE_TREE="bcm2836-rpi-2-b" + CONFIG_ENV_FAT_INTERFACE="mmc" + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" +diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig +index c2417a0ec9..191962f0f7 100644 +--- a/configs/rpi_3_32b_defconfig ++++ b/configs/rpi_3_32b_defconfig +@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" + CONFIG_ENV_FAT_INTERFACE="mmc" + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" +diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig +index 4fa682539c..03a2356d3d 100644 +--- a/configs/rpi_3_defconfig ++++ b/configs/rpi_3_defconfig +@@ -18,7 +18,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b" + CONFIG_ENV_FAT_INTERFACE="mmc" + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" +diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig +index 2c04b3334e..bf00d8b669 100644 +--- a/configs/rpi_defconfig ++++ b/configs/rpi_defconfig +@@ -17,7 +17,7 @@ CONFIG_CMD_GPIO=y + CONFIG_CMD_MMC=y + CONFIG_CMD_USB=y + CONFIG_CMD_FS_UUID=y +-CONFIG_OF_EMBED=y ++CONFIG_OF_BOARD=y + CONFIG_DEFAULT_DEVICE_TREE="bcm2835-rpi-b" + CONFIG_ENV_FAT_INTERFACE="mmc" + CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" +-- +2.17.1 + diff --git a/buildroot-external/board/raspberrypi/rootfs-overlay/usr/lib/udev/rules.d/99-rpi.rules b/buildroot-external/board/raspberrypi/rootfs-overlay/usr/lib/udev/rules.d/99-rpi.rules new file mode 100644 index 000000000..6bf019bd1 --- /dev/null +++ b/buildroot-external/board/raspberrypi/rootfs-overlay/usr/lib/udev/rules.d/99-rpi.rules @@ -0,0 +1,21 @@ +KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\ + ALIASES=/proc/device-tree/aliases; \ + if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \ + echo 0;\ + elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \ + echo 1; \ + else \ + exit 1; \ + fi\ +'", SYMLINK+="serial%c" + +KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\ + ALIASES=/proc/device-tree/aliases; \ + if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \ + echo 0; \ + elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \ + echo 1; \ + else \ + exit 1; \ + fi \ +'", SYMLINK+="serial%c" diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0001-configs-rpi4-Add-defconfig-for-rpi4-64.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0001-configs-rpi4-Add-defconfig-for-rpi4-64.patch deleted file mode 100644 index f9ef6ca53..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0001-configs-rpi4-Add-defconfig-for-rpi4-64.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 9f471bee7e230bc9b99155506388fb98903bd3c3 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Sat, 6 Jul 2019 23:49:47 +0100 -Subject: [PATCH 01/17] configs: rpi4: Add defconfig for rpi4-64 - -This config is based on the the rpi3 counterpart. - -Signed-off-by: Andrei Gherzan ---- - configs/rpi_4_defconfig | 43 +++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 43 insertions(+) - create mode 100644 configs/rpi_4_defconfig - -diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig -new file mode 100644 -index 0000000000..83d1bd0cdb ---- /dev/null -+++ b/configs/rpi_4_defconfig -@@ -0,0 +1,43 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_BCM283X=y -+CONFIG_SYS_TEXT_BASE=0x00080000 -+CONFIG_TARGET_RPI_4=y -+CONFIG_SYS_MALLOC_F_LEN=0x2000 -+CONFIG_DISTRO_DEFAULTS=y -+CONFIG_NR_DRAM_BANKS=1 -+CONFIG_OF_BOARD_SETUP=y -+CONFIG_MISC_INIT_R=y -+# CONFIG_DISPLAY_CPUINFO is not set -+# CONFIG_DISPLAY_BOARDINFO is not set -+CONFIG_SYS_PROMPT="U-Boot> " -+# CONFIG_CMD_FLASH is not set -+CONFIG_CMD_GPIO=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_USB=y -+CONFIG_CMD_FS_UUID=y -+CONFIG_OF_EMBED=y -+CONFIG_DEFAULT_DEVICE_TREE="bcm2838-rpi-4-b" -+CONFIG_ENV_FAT_INTERFACE="mmc" -+CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" -+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -+CONFIG_DM_KEYBOARD=y -+CONFIG_DM_MMC=y -+CONFIG_MMC_SDHCI=y -+CONFIG_MMC_SDHCI_BCM2835=y -+CONFIG_PHYLIB=y -+CONFIG_DM_ETH=y -+CONFIG_PINCTRL=y -+# CONFIG_PINCTRL_GENERIC is not set -+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set -+CONFIG_USB=y -+CONFIG_DM_USB=y -+CONFIG_USB_DWC2=y -+CONFIG_USB_KEYBOARD=y -+CONFIG_USB_HOST_ETHER=y -+CONFIG_USB_ETHER_LAN78XX=y -+CONFIG_USB_ETHER_SMSC95XX=y -+CONFIG_DM_VIDEO=y -+CONFIG_SYS_WHITE_ON_BLACK=y -+CONFIG_CONSOLE_SCROLL_LINES=10 -+CONFIG_PHYS_TO_BUS=y -+CONFIG_OF_LIBFDT_OVERLAY=y --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0002-dts-Create-a-dtsi-for-BCM2835-6-7-specific-configura.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0002-dts-Create-a-dtsi-for-BCM2835-6-7-specific-configura.patch deleted file mode 100644 index 17b09c752..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0002-dts-Create-a-dtsi-for-BCM2835-6-7-specific-configura.patch +++ /dev/null @@ -1,208 +0,0 @@ -From 24f5e0b88b88f2e47e420e6f2f123b8726c9f396 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Sat, 6 Jul 2019 23:58:44 +0100 -Subject: [PATCH 02/17] dts: Create a dtsi for BCM2835/6/7 specific - configuration - -This follows a similar change in kernel[1]. The change moves -configuration that was not applicable for all bcm2835/6/7/8 out of -bcm283x.dtsi. The new file is bcm2835-common.dtsi and contains -conifguration that is common for bcm2835/6/7 (not bcm2838). - -[1] https://github.com/raspberrypi/linux/commit/769a7330aa5bebcc98b1ff12ecb767db4e5c644d#diff-5979fba23a5bab2cf66dde09db872dfc - -Signed-off-by: Andrei Gherzan ---- - arch/arm/dts/bcm2835-common.dtsi | 53 ++++++++++++++++++++++++++++++++ - arch/arm/dts/bcm2835.dtsi | 1 + - arch/arm/dts/bcm2836.dtsi | 1 + - arch/arm/dts/bcm2837.dtsi | 1 + - arch/arm/dts/bcm283x.dtsi | 45 +-------------------------- - 5 files changed, 57 insertions(+), 44 deletions(-) - create mode 100644 arch/arm/dts/bcm2835-common.dtsi - -diff --git a/arch/arm/dts/bcm2835-common.dtsi b/arch/arm/dts/bcm2835-common.dtsi -new file mode 100644 -index 0000000000..17771730a3 ---- /dev/null -+++ b/arch/arm/dts/bcm2835-common.dtsi -@@ -0,0 +1,53 @@ -+// SPDX-License-Identifier: GPL-2.0 -+ -+/* This include file covers the common peripherals and configuration between -+ * bcm2835, bcm2836 and bcm2837 implementations. -+ */ -+ -+/ { -+ soc { -+ timer@7e003000 { -+ compatible = "brcm,bcm2835-system-timer"; -+ reg = <0x7e003000 0x1000>; -+ interrupts = <1 0>, <1 1>, <1 2>, <1 3>; -+ /* This could be a reference to BCM2835_CLOCK_TIMER, -+ * but we don't have the driver using the common clock -+ * support yet. -+ */ -+ clock-frequency = <1000000>; -+ }; -+ -+ intc: interrupt-controller@7e00b200 { -+ compatible = "brcm,bcm2835-armctrl-ic"; -+ reg = <0x7e00b200 0x200>; -+ interrupt-controller; -+ #interrupt-cells = <2>; -+ }; -+ -+ thermal: thermal@7e212000 { -+ compatible = "brcm,bcm2835-thermal"; -+ reg = <0x7e212000 0x8>; -+ clocks = <&clocks BCM2835_CLOCK_TSENS>; -+ #thermal-sensor-cells = <0>; -+ status = "disabled"; -+ }; -+ -+ v3d: v3d@7ec00000 { -+ compatible = "brcm,bcm2835-v3d"; -+ reg = <0x7ec00000 0x1000>; -+ interrupts = <1 10>; -+ }; -+ }; -+}; -+ -+&gpio { -+ i2c_slave_gpio18: i2c_slave_gpio18 { -+ brcm,pins = <18 19 20 21>; -+ brcm,function = ; -+ }; -+ -+ jtag_gpio4: jtag_gpio4 { -+ brcm,pins = <4 5 6 12 13>; -+ brcm,function = ; -+ }; -+}; -diff --git a/arch/arm/dts/bcm2835.dtsi b/arch/arm/dts/bcm2835.dtsi -index a5c3824c80..53bf4579cc 100644 ---- a/arch/arm/dts/bcm2835.dtsi -+++ b/arch/arm/dts/bcm2835.dtsi -@@ -1,5 +1,6 @@ - // SPDX-License-Identifier: GPL-2.0 - #include "bcm283x.dtsi" -+#include "bcm2835-common.dtsi" - - / { - compatible = "brcm,bcm2835"; -diff --git a/arch/arm/dts/bcm2836.dtsi b/arch/arm/dts/bcm2836.dtsi -index c933e84138..82d6c4662a 100644 ---- a/arch/arm/dts/bcm2836.dtsi -+++ b/arch/arm/dts/bcm2836.dtsi -@@ -1,5 +1,6 @@ - // SPDX-License-Identifier: GPL-2.0 - #include "bcm283x.dtsi" -+#include "bcm2835-common.dtsi" - - / { - compatible = "brcm,bcm2836"; -diff --git a/arch/arm/dts/bcm2837.dtsi b/arch/arm/dts/bcm2837.dtsi -index beb6c502da..9e95fee78e 100644 ---- a/arch/arm/dts/bcm2837.dtsi -+++ b/arch/arm/dts/bcm2837.dtsi -@@ -1,4 +1,5 @@ - #include "bcm283x.dtsi" -+#include "bcm2835-common.dtsi" - - / { - compatible = "brcm,bcm2837"; -diff --git a/arch/arm/dts/bcm283x.dtsi b/arch/arm/dts/bcm283x.dtsi -index 9777644c6c..a024727e4d 100644 ---- a/arch/arm/dts/bcm283x.dtsi -+++ b/arch/arm/dts/bcm283x.dtsi -@@ -56,17 +56,6 @@ - #address-cells = <1>; - #size-cells = <1>; - -- timer@7e003000 { -- compatible = "brcm,bcm2835-system-timer"; -- reg = <0x7e003000 0x1000>; -- interrupts = <1 0>, <1 1>, <1 2>, <1 3>; -- /* This could be a reference to BCM2835_CLOCK_TIMER, -- * but we don't have the driver using the common clock -- * support yet. -- */ -- clock-frequency = <1000000>; -- }; -- - txp@7e004000 { - compatible = "brcm,bcm2835-txp"; - reg = <0x7e004000 0x20>; -@@ -114,13 +103,6 @@ - brcm,dma-channel-mask = <0x7f35>; - }; - -- intc: interrupt-controller@7e00b200 { -- compatible = "brcm,bcm2835-armctrl-ic"; -- reg = <0x7e00b200 0x200>; -- interrupt-controller; -- #interrupt-cells = <2>; -- }; -- - pm: watchdog@7e100000 { - compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt"; - #power-domain-cells = <1>; -@@ -184,8 +166,7 @@ - interrupt-controller; - #interrupt-cells = <2>; - -- /* Defines pin muxing groups according to -- * BCM2835-ARM-Peripherals.pdf page 102. -+ /* Defines common pin muxing groups - * - * While each pin can have its mux selected - * for various functions individually, some -@@ -263,15 +244,6 @@ - brcm,pins = <44 45>; - brcm,function = ; - }; -- i2c_slave_gpio18: i2c_slave_gpio18 { -- brcm,pins = <18 19 20 21>; -- brcm,function = ; -- }; -- -- jtag_gpio4: jtag_gpio4 { -- brcm,pins = <4 5 6 12 13>; -- brcm,function = ; -- }; - jtag_gpio22: jtag_gpio22 { - brcm,pins = <22 23 24 25 26 27>; - brcm,function = ; -@@ -488,14 +460,6 @@ - - }; - -- thermal: thermal@7e212000 { -- compatible = "brcm,bcm2835-thermal"; -- reg = <0x7e212000 0x8>; -- clocks = <&clocks BCM2835_CLOCK_TSENS>; -- #thermal-sensor-cells = <0>; -- status = "disabled"; -- }; -- - aux: aux@7e215000 { - compatible = "brcm,bcm2835-aux"; - #clock-cells = <1>; -@@ -635,13 +599,6 @@ - phy-names = "usb2-phy"; - }; - -- v3d: v3d@7ec00000 { -- compatible = "brcm,bcm2835-v3d"; -- reg = <0x7ec00000 0x1000>; -- interrupts = <1 10>; -- power-domains = <&pm BCM2835_POWER_DOMAIN_GRAFX_V3D>; -- }; -- - vc4: gpu { - compatible = "brcm,bcm2835-vc4"; - }; --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0003-dts-Add-initial-support-for-bcm2838.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0003-dts-Add-initial-support-for-bcm2838.patch deleted file mode 100644 index 6a8339a8b..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0003-dts-Add-initial-support-for-bcm2838.patch +++ /dev/null @@ -1,337 +0,0 @@ -From d7532dbcde253d824d4fe3d1f1f40e92e62ad291 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Sun, 7 Jul 2019 00:12:36 +0100 -Subject: [PATCH 03/17] dts: Add initial support for bcm2838 - -Signed-off-by: Andrei Gherzan ---- - arch/arm/dts/Makefile | 4 +- - arch/arm/dts/bcm2838-rpi-4-b.dts | 56 ++++++++ - arch/arm/dts/bcm2838.dtsi | 237 +++++++++++++++++++++++++++++++ - 3 files changed, 296 insertions(+), 1 deletion(-) - create mode 100644 arch/arm/dts/bcm2838-rpi-4-b.dts - create mode 100644 arch/arm/dts/bcm2838.dtsi - -diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile -index 20dbc2ff84..16790af1e1 100644 ---- a/arch/arm/dts/Makefile -+++ b/arch/arm/dts/Makefile -@@ -749,7 +749,9 @@ dtb-$(CONFIG_ARCH_BCM283X) += \ - bcm2837-rpi-3-a-plus.dtb \ - bcm2837-rpi-3-b.dtb \ - bcm2837-rpi-3-b-plus.dtb \ -- bcm2837-rpi-cm3-io3.dtb -+ bcm2837-rpi-cm3-io3.dtb \ -+ bcm2837-rpi-3-b.dtb \ -+ bcm2838-rpi-4-b.dtb - - dtb-$(CONFIG_ARCH_BCM63158) += \ - bcm963158.dtb -diff --git a/arch/arm/dts/bcm2838-rpi-4-b.dts b/arch/arm/dts/bcm2838-rpi-4-b.dts -new file mode 100644 -index 0000000000..07e9a78e8d ---- /dev/null -+++ b/arch/arm/dts/bcm2838-rpi-4-b.dts -@@ -0,0 +1,56 @@ -+/dts-v1/; -+#include "bcm2838.dtsi" -+ -+/ { -+ compatible = "raspberrypi,4-model-b","brcm,bcm2838","brcm,bcm2837"; -+ model = "Raspberry Pi 4 Model B"; -+ -+ memory { -+ reg = <0 0 0x40000000>; -+ }; -+ -+ leds { -+ act { -+ gpios = <&gpio 47 0>; -+ }; -+ }; -+}; -+ -+/* uart0 communicates with the BT module */ -+&uart0 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart0_gpio32 &gpclk2_gpio43>; -+ status = "okay"; -+}; -+ -+/* uart1 is mapped to the pin header */ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&uart1_pins>; -+ status = "okay"; -+}; -+ -+/* SDHCI is used to control the SDIO for wireless */ -+&sdhci { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&emmc_gpio34>; -+ status = "okay"; -+ bus-width = <4>; -+ non-removable; -+}; -+ -+/* SDHOST is used to drive the SD card */ -+&sdhost { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&sdhost_gpio48>; -+ status = "okay"; -+ bus-width = <4>; -+}; -+ -+&gpio { -+ uart1_pins: uart1_pins { -+ brcm,pins; -+ brcm,function; -+ brcm,pull; -+ }; -+}; -diff --git a/arch/arm/dts/bcm2838.dtsi b/arch/arm/dts/bcm2838.dtsi -new file mode 100644 -index 0000000000..19b2d7b905 ---- /dev/null -+++ b/arch/arm/dts/bcm2838.dtsi -@@ -0,0 +1,237 @@ -+#include "bcm283x.dtsi" -+#include -+#include -+ -+/ { -+ compatible = "brcm,bcm2838"; -+ -+ #address-cells = <2>; -+ #size-cells = <1>; -+ -+ interrupt-parent = <&gic>; -+ -+ soc { -+ ranges = <0x7e000000 0x0 0xfe000000 0x01800000>, -+ <0x7c000000 0x0 0xfc000000 0x02000000>, -+ <0x40000000 0x0 0xff800000 0x00800000>; -+ dma-ranges = <0xc0000000 0x0 0x00000000 0x3c000000>; -+ -+ gic: gic400@40041000 { -+ interrupt-controller; -+ #interrupt-cells = <3>; -+ compatible = "arm,gic-400"; -+ reg = <0x40041000 0x1000>, -+ <0x40042000 0x2000>, -+ <0x40044000 0x2000>, -+ <0x40046000 0x2000>; -+ }; -+ -+ thermal: thermal@7d5d2200 { -+ compatible = "brcm,avs-tmon-bcm2838"; -+ reg = <0x7d5d2200 0x2c>; -+ interrupts = ; -+ interrupt-names = "tmon"; -+ clocks = <&clocks BCM2835_CLOCK_TSENS>; -+ #thermal-sensor-cells = <0>; -+ status = "okay"; -+ }; -+ -+ spi@7e204000 { -+ reg = <0x7e204000 0x0200>; -+ interrupts = ; -+ }; -+ -+ pixelvalve@7e206000 { -+ interrupts = ; -+ }; -+ -+ pixelvalve@7e207000 { -+ interrupts = ; -+ }; -+ -+ hvs@7e400000 { -+ interrupts = ; -+ }; -+ -+ emmc2: emmc2@7e340000 { -+ compatible = "brcm,bcm2711-emmc2"; -+ status = "okay"; -+ interrupts = ; -+ clocks = <&clocks BCM2838_CLOCK_EMMC2>; -+ reg = <0x7e340000 0x100>; -+ }; -+ -+ pixelvalve@7e807000 { -+ interrupts = ; -+ }; -+ -+ }; -+ -+ arm-pmu { -+ /* -+ * N.B. the A72 PMU support only exists in arch/arm64, hence -+ * the fallback to the A53 version. -+ */ -+ compatible = "arm,cortex-a72-pmu", "arm,cortex-a53-pmu"; -+ interrupts = , -+ , -+ , -+ ; -+ }; -+ -+ timer { -+ compatible = "arm,armv7-timer"; -+ interrupts = , -+ , -+ , -+ ; -+ arm,cpu-registers-not-fw-configured; -+ always-on; -+ }; -+ -+ cpus: cpus { -+ #address-cells = <1>; -+ #size-cells = <0>; -+ enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit -+ -+ cpu0: cpu@0 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a72"; -+ reg = <0>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000d8>; -+ }; -+ -+ cpu1: cpu@1 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a72"; -+ reg = <1>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000e0>; -+ }; -+ -+ cpu2: cpu@2 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a72"; -+ reg = <2>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000e8>; -+ }; -+ -+ cpu3: cpu@3 { -+ device_type = "cpu"; -+ compatible = "arm,cortex-a72"; -+ reg = <3>; -+ enable-method = "spin-table"; -+ cpu-release-addr = <0x0 0x000000f0>; -+ }; -+ }; -+}; -+ -+&clk_osc { -+ clock-frequency = <54000000>; -+}; -+ -+&clocks { -+ compatible = "brcm,bcm2838-cprman"; -+}; -+ -+&cpu_thermal { -+ coefficients = <(-487) 410040>; -+}; -+ -+&dsi0 { -+ interrupts = ; -+}; -+ -+&dsi1 { -+ interrupts = ; -+}; -+ -+&gpio { -+ compatible = "brcm,bcm2838-gpio", "brcm,bcm2835-gpio"; -+ interrupts = , -+ , -+ , -+ ; -+}; -+ -+&vec { -+ interrupts = ; -+}; -+ -+&usb { -+ interrupts = ; -+}; -+ -+&hdmi { -+ interrupts = , -+ ; -+}; -+ -+&uart1 { -+ interrupts = ; -+}; -+ -+&spi1 { -+ interrupts = ; -+}; -+ -+&spi2 { -+ interrupts = ; -+}; -+ -+&i2c0 { -+ interrupts = ; -+}; -+ -+&i2c1 { -+ interrupts = ; -+}; -+ -+&i2c2 { -+ interrupts = ; -+}; -+ -+&mailbox { -+ interrupts = ; -+}; -+ -+&sdhost { -+ interrupts = ; -+}; -+ -+&uart0 { -+ interrupts = ; -+}; -+ -+&dma { -+ reg = <0x7e007000 0xb00>; -+ interrupts = , -+ , -+ , -+ , -+ , -+ , -+ , -+ , /* dmalite 7 */ -+ , /* dmalite 8 */ -+ , /* dmalite 9 */ -+ ; /* dmalite 10 */ -+ interrupt-names = "dma0", -+ "dma1", -+ "dma2", -+ "dma3", -+ "dma4", -+ "dma5", -+ "dma6", -+ "dma7", -+ "dma8", -+ "dma9", -+ "dma10"; -+ brcm,dma-channel-mask = <0x07f5>; -+}; --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0004-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0004-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch deleted file mode 100644 index 9f28a9dd3..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0004-arm-mach-bcm283x-Define-configs-for-RaspberryPi-4.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 865218f2dc973492c872dac51a66cff1833c916a Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Sun, 7 Jul 2019 00:21:33 +0100 -Subject: [PATCH 04/17] arm: mach-bcm283x: Define configs for RaspberryPi 4 - -Signed-off-by: Andrei Gherzan ---- - arch/arm/mach-bcm283x/Kconfig | 35 +++++++++++++++++++++++++++++++++++ - 1 file changed, 35 insertions(+) - -diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig -index 3eb5a9a897..d5069fe688 100644 ---- a/arch/arm/mach-bcm283x/Kconfig -+++ b/arch/arm/mach-bcm283x/Kconfig -@@ -26,6 +26,23 @@ config BCM2837_64B - select BCM2837 - select ARM64 - -+config BCM2838 -+ bool "Broadcom BCM2838 SoC support" -+ depends on ARCH_BCM283X -+ -+config BCM2838_32B -+ bool "Broadcom BCM2838 SoC 32-bit support" -+ depends on ARCH_BCM283X -+ select BCM2838 -+ select ARMV7_LPAE -+ select CPU_V7A -+ -+config BCM2838_64B -+ bool "Broadcom BCM2838 SoC 64-bit support" -+ depends on ARCH_BCM283X -+ select BCM2838 -+ select ARM64 -+ - menu "Broadcom BCM283X family" - depends on ARCH_BCM283X - -@@ -127,6 +144,24 @@ config TARGET_RPI_3 - This option creates a build targeting the ARMv8/AArch64 ISA. - select BCM2837_64B - -+config TARGET_RPI_4 -+ bool "Raspberry Pi 4 64-bit build" -+ help -+ Support for all BCM2838-based Raspberry Pi variants, such as -+ the RPi 4 model B, in AArch64 (64-bit) mode. -+ -+ This option creates a build targeting the ARMv8/AArch64 ISA. -+ select BCM2838_64B -+ -+config TARGET_RPI_4_32B -+ bool "Raspberry Pi 4 32-bit build" -+ help -+ Support for all BCM2838-based Raspberry Pi variants, such as -+ the RPi 4 model B, in AArch32 (32-bit) mode. -+ -+ This option creates a build targeting the ARMv7/AArch32 ISA. -+ select BCM2838_32B -+ - endchoice - - config SYS_BOARD --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0005-arm-mach-bcm283x-Define-mbox-address-for-BCM2838.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0005-arm-mach-bcm283x-Define-mbox-address-for-BCM2838.patch deleted file mode 100644 index 9b221561c..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0005-arm-mach-bcm283x-Define-mbox-address-for-BCM2838.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 98ae56bf35b2102310d2e88f56639e9055aa10be Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Sun, 7 Jul 2019 00:23:15 +0100 -Subject: [PATCH 05/17] arm: mach-bcm283x: Define mbox address for BCM2838 - -Signed-off-by: Andrei Gherzan ---- - arch/arm/mach-bcm283x/include/mach/mbox.h | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h -index e3a893e49c..2d711daaa8 100644 ---- a/arch/arm/mach-bcm283x/include/mach/mbox.h -+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h -@@ -38,11 +38,16 @@ - /* Raw mailbox HW */ - - #ifndef CONFIG_BCM2835 -+#ifdef CONFIG_BCM2838 -+#define BCM2835_MBOX_PHYSADDR 0xfe00b880 -+#else - #define BCM2835_MBOX_PHYSADDR 0x3f00b880 -+#endif - #else - #define BCM2835_MBOX_PHYSADDR 0x2000b880 - #endif - -+ - struct bcm2835_mbox_regs { - u32 read; - u32 rsvd0[5]; --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0006-rpi-Add-rpi_model-entry-for-RaspberryPi-4.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0006-rpi-Add-rpi_model-entry-for-RaspberryPi-4.patch deleted file mode 100644 index 6fd0c06e7..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0006-rpi-Add-rpi_model-entry-for-RaspberryPi-4.patch +++ /dev/null @@ -1,29 +0,0 @@ -From eef9e7760c367dd848ac90780ecce8dcd82d9bb4 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Sun, 7 Jul 2019 00:25:58 +0100 -Subject: [PATCH 06/17] rpi: Add rpi_model entry for RaspberryPi 4 - -Signed-off-by: Andrei Gherzan ---- - board/raspberrypi/rpi/rpi.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c -index 617c892dde..6d6f1ef39a 100644 ---- a/board/raspberrypi/rpi/rpi.c -+++ b/board/raspberrypi/rpi/rpi.c -@@ -148,6 +148,11 @@ static const struct rpi_model rpi_models_new_scheme[] = { - DTB_DIR "bcm2837-rpi-cm3.dtb", - false, - }, -+ [0x11] = { -+ "4 Model B", -+ DTB_DIR "bcm2711-rpi-4-b.dtb", -+ true, -+ }, - }; - - static const struct rpi_model rpi_models_old_scheme[] = { --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0007-dt-bindings-Define-BCM2838_CLOCK_EMMC2-needed-for-Ra.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0007-dt-bindings-Define-BCM2838_CLOCK_EMMC2-needed-for-Ra.patch deleted file mode 100644 index 316da99bf..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0007-dt-bindings-Define-BCM2838_CLOCK_EMMC2-needed-for-Ra.patch +++ /dev/null @@ -1,27 +0,0 @@ -From fe0cff5d5f6e6fa56d83f04166d402ca13a0f23c Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Sun, 7 Jul 2019 00:31:27 +0100 -Subject: [PATCH 07/17] dt-bindings: Define BCM2838_CLOCK_EMMC2 needed for - RaspberryPi 4 - -On BCM2838 there is an additional clock. This clock was added in the -same bcm2835-cprman driver and is used by the emmc2 dt node. - -Signed-off-by: Andrei Gherzan ---- - include/dt-bindings/clock/bcm2835.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/dt-bindings/clock/bcm2835.h b/include/dt-bindings/clock/bcm2835.h -index 2cec01f968..457fd4e23c 100644 ---- a/include/dt-bindings/clock/bcm2835.h -+++ b/include/dt-bindings/clock/bcm2835.h -@@ -58,3 +58,5 @@ - #define BCM2835_CLOCK_DSI1E 48 - #define BCM2835_CLOCK_DSI0P 49 - #define BCM2835_CLOCK_DSI1P 50 -+ -+#define BCM2838_CLOCK_EMMC2 51 --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0008-arm-bcm283x-Include-definition-for-additional-emmc-c.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0008-arm-bcm283x-Include-definition-for-additional-emmc-c.patch deleted file mode 100644 index 3b0fc12a8..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0008-arm-bcm283x-Include-definition-for-additional-emmc-c.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 05c24bc9579b958f637ca1497387a6149581c644 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Fri, 12 Jul 2019 11:26:10 +0100 -Subject: [PATCH 08/17] arm: bcm283x: Include definition for additional emmc - clock - -This clock has a different mbox ID[1] so have this included in the -relevant header file. - -[1] https://github.com/raspberrypi/firmware/issues/1179 - -Signed-off-by: Andrei Gherzan ---- - arch/arm/mach-bcm283x/include/mach/mbox.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h -index 2d711daaa8..cad035e8cd 100644 ---- a/arch/arm/mach-bcm283x/include/mach/mbox.h -+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h -@@ -239,6 +239,7 @@ struct bcm2835_mbox_tag_set_power_state { - #define BCM2835_MBOX_CLOCK_ID_SDRAM 8 - #define BCM2835_MBOX_CLOCK_ID_PIXEL 9 - #define BCM2835_MBOX_CLOCK_ID_PWM 10 -+#define BCM2835_MBOX_CLOCK_ID_EMMC2 12 - - struct bcm2835_mbox_tag_get_clock_rate { - struct bcm2835_mbox_tag_hdr tag_hdr; --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch deleted file mode 100644 index bd515eb5a..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0009-mmc-bcm2835_sdhci-Add-support-for-bcm2711-device.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 6e0d51199f2d089c84f45202587a9f17abd1ab0a Mon Sep 17 00:00:00 2001 -From: Matthias Brugger -Date: Wed, 10 Jul 2019 13:24:36 +0200 -Subject: [PATCH 09/17] mmc: bcm2835_sdhci: Add support for bcm2711 device - -The bcm2711 has two emmc controller. The difference is the clocks -they use. Add support for the second emmc contoller. - -Signed-off-by: Matthias Brugger ---- - drivers/mmc/bcm2835_sdhci.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c -index 08bddd410e..e68dec3be7 100644 ---- a/drivers/mmc/bcm2835_sdhci.c -+++ b/drivers/mmc/bcm2835_sdhci.c -@@ -178,12 +178,13 @@ static int bcm2835_sdhci_probe(struct udevice *dev) - fdt_addr_t base; - int emmc_freq; - int ret; -+ int clock_id = (int)dev_get_driver_data(dev); - - base = devfdt_get_addr(dev); - if (base == FDT_ADDR_T_NONE) - return -EINVAL; - -- ret = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_EMMC); -+ ret = bcm2835_get_mmc_clock(clock_id); - if (ret < 0) { - debug("%s: Failed to set MMC clock (err=%d)\n", __func__, ret); - return ret; -@@ -228,7 +229,14 @@ static int bcm2835_sdhci_probe(struct udevice *dev) - } - - static const struct udevice_id bcm2835_sdhci_match[] = { -- { .compatible = "brcm,bcm2835-sdhci" }, -+ { -+ .compatible = "brcm,bcm2835-sdhci", -+ .data = BCM2835_MBOX_CLOCK_ID_EMMC -+ }, -+ { -+ .compatible = "brcm,bcm2711-emmc2", -+ .data = BCM2835_MBOX_CLOCK_ID_EMMC2 -+ }, - { /* sentinel */ } - }; - --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0010-arm-bcm283x-Define-device-base-addresses-for-bcm2835.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0010-arm-bcm283x-Define-device-base-addresses-for-bcm2835.patch deleted file mode 100644 index 974e69ee5..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0010-arm-bcm283x-Define-device-base-addresses-for-bcm2835.patch +++ /dev/null @@ -1,63 +0,0 @@ -From c00c6048006ebe1822355b6ba4f2da8ccebb4786 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Fri, 12 Jul 2019 11:38:11 +0100 -Subject: [PATCH 10/17] arm: bcm283x: Define device base addresses for bcm2835 - -Signed-off-by: Andrei Gherzan ---- - arch/arm/mach-bcm283x/include/mach/sdhci.h | 4 ++++ - arch/arm/mach-bcm283x/include/mach/timer.h | 4 ++++ - arch/arm/mach-bcm283x/include/mach/wdog.h | 4 ++++ - 3 files changed, 12 insertions(+) - -diff --git a/arch/arm/mach-bcm283x/include/mach/sdhci.h b/arch/arm/mach-bcm283x/include/mach/sdhci.h -index 5cb6ec3340..262b016a1b 100644 ---- a/arch/arm/mach-bcm283x/include/mach/sdhci.h -+++ b/arch/arm/mach-bcm283x/include/mach/sdhci.h -@@ -7,7 +7,11 @@ - #define _BCM2835_SDHCI_H_ - - #ifndef CONFIG_BCM2835 -+#ifdef CONFIG_BCM2838 -+#define BCM2835_SDHCI_BASE 0xfe300000 -+#else - #define BCM2835_SDHCI_BASE 0x3f300000 -+#endif - #else - #define BCM2835_SDHCI_BASE 0x20300000 - #endif -diff --git a/arch/arm/mach-bcm283x/include/mach/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h -index 56b0c356bb..dc3ed98879 100644 ---- a/arch/arm/mach-bcm283x/include/mach/timer.h -+++ b/arch/arm/mach-bcm283x/include/mach/timer.h -@@ -7,7 +7,11 @@ - #define _BCM2835_TIMER_H - - #ifndef CONFIG_BCM2835 -+#ifdef CONFIG_BCM2838 -+#define BCM2835_TIMER_PHYSADDR 0xfe003000 -+#else - #define BCM2835_TIMER_PHYSADDR 0x3f003000 -+#endif - #else - #define BCM2835_TIMER_PHYSADDR 0x20003000 - #endif -diff --git a/arch/arm/mach-bcm283x/include/mach/wdog.h b/arch/arm/mach-bcm283x/include/mach/wdog.h -index 99c88e5df7..ef040f385d 100644 ---- a/arch/arm/mach-bcm283x/include/mach/wdog.h -+++ b/arch/arm/mach-bcm283x/include/mach/wdog.h -@@ -7,7 +7,11 @@ - #define _BCM2835_WDOG_H - - #ifndef CONFIG_BCM2835 -+#ifdef CONFIG_BCM2838 -+#define BCM2835_WDOG_PHYSADDR 0xfe100000 -+#else - #define BCM2835_WDOG_PHYSADDR 0x3f100000 -+#endif - #else - #define BCM2835_WDOG_PHYSADDR 0x20100000 - #endif --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0011-bcm2835-video-Bail-out-early-if-querying-video-infor.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0011-bcm2835-video-Bail-out-early-if-querying-video-infor.patch deleted file mode 100644 index 9d084ce82..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0011-bcm2835-video-Bail-out-early-if-querying-video-infor.patch +++ /dev/null @@ -1,36 +0,0 @@ -From d0357e50e58894eeb9dcbb1497689b410b667f08 Mon Sep 17 00:00:00 2001 -From: Fabian Vogt -Date: Fri, 28 Jun 2019 14:14:01 +0200 -Subject: [PATCH 11/17] bcm2835 video: Bail out early if querying video - information fails - -Otherwise there is a crash with newer RPi firmware, see -https://github.com/raspberrypi/firmware/issues/1157 ---- - drivers/video/bcm2835.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/video/bcm2835.c b/drivers/video/bcm2835.c -index bc41090aed..4c7962cad8 100644 ---- a/drivers/video/bcm2835.c -+++ b/drivers/video/bcm2835.c -@@ -19,13 +19,15 @@ static int bcm2835_video_probe(struct udevice *dev) - - debug("bcm2835: Query resolution...\n"); - ret = bcm2835_get_video_size(&w, &h); -- if (ret) -+ if (ret || w == 0 || h == 0) - return -EIO; - - debug("bcm2835: Setting up display for %d x %d\n", w, h); - ret = bcm2835_set_video_params(&w, &h, 32, BCM2835_MBOX_PIXEL_ORDER_RGB, - BCM2835_MBOX_ALPHA_MODE_IGNORED, - &fb_base, &fb_size, &pitch); -+ if(ret) -+ return -EIO; - - debug("bcm2835: Final resolution is %d x %d\n", w, h); - --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0012-bcm283x-mbox-Correctly-wait-for-space-to-send.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0012-bcm283x-mbox-Correctly-wait-for-space-to-send.patch deleted file mode 100644 index abba33b03..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0012-bcm283x-mbox-Correctly-wait-for-space-to-send.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 2cbeae8a88c3f50e322a2434cbbf37bfe0b76d9a Mon Sep 17 00:00:00 2001 -From: Fabian Vogt -Date: Fri, 28 Jun 2019 14:25:53 +0200 -Subject: [PATCH 12/17] bcm283x mbox: Correctly wait for space to send - -For sending, the second mailbox is used, but previously the status register of -the first one was read. ---- - arch/arm/mach-bcm283x/include/mach/mbox.h | 7 +++++-- - arch/arm/mach-bcm283x/mbox.c | 6 +++--- - 2 files changed, 8 insertions(+), 5 deletions(-) - -diff --git a/arch/arm/mach-bcm283x/include/mach/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h -index cad035e8cd..cd78966150 100644 ---- a/arch/arm/mach-bcm283x/include/mach/mbox.h -+++ b/arch/arm/mach-bcm283x/include/mach/mbox.h -@@ -51,9 +51,12 @@ - struct bcm2835_mbox_regs { - u32 read; - u32 rsvd0[5]; -- u32 status; -- u32 config; -+ u32 status_r; -+ u32 config_r; - u32 write; -+ u32 rsvd1[5]; -+ u32 status_w; -+ u32 config_w; - }; - - #define BCM2835_MBOX_STATUS_WR_FULL 0x80000000 -diff --git a/arch/arm/mach-bcm283x/mbox.c b/arch/arm/mach-bcm283x/mbox.c -index 1642ebd103..f7483bf423 100644 ---- a/arch/arm/mach-bcm283x/mbox.c -+++ b/arch/arm/mach-bcm283x/mbox.c -@@ -27,7 +27,7 @@ int bcm2835_mbox_call_raw(u32 chan, u32 send, u32 *recv) - /* Drain any stale responses */ - - for (;;) { -- val = readl(®s->status); -+ val = readl(®s->status_r); - if (val & BCM2835_MBOX_STATUS_RD_EMPTY) - break; - if (get_timer(0) >= endtime) { -@@ -40,7 +40,7 @@ int bcm2835_mbox_call_raw(u32 chan, u32 send, u32 *recv) - /* Wait for space to send */ - - for (;;) { -- val = readl(®s->status); -+ val = readl(®s->status_w); - if (!(val & BCM2835_MBOX_STATUS_WR_FULL)) - break; - if (get_timer(0) >= endtime) { -@@ -58,7 +58,7 @@ int bcm2835_mbox_call_raw(u32 chan, u32 send, u32 *recv) - /* Wait for the response */ - - for (;;) { -- val = readl(®s->status); -+ val = readl(®s->status_r); - if (!(val & BCM2835_MBOX_STATUS_RD_EMPTY)) - break; - if (get_timer(0) >= endtime) { --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0013-config-rpi4-Add-defconfig-for-rpi4-32.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0013-config-rpi4-Add-defconfig-for-rpi4-32.patch deleted file mode 100644 index 1558712bb..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0013-config-rpi4-Add-defconfig-for-rpi4-32.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 21a3e9ed27f83d83851cbee57ee6d83a58ef2775 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Fri, 12 Jul 2019 11:55:52 +0100 -Subject: [PATCH 13/17] config: rpi4: Add defconfig for rpi4-32 - -Signed-off-by: Andrei Gherzan ---- - configs/rpi_4_32b_defconfig | 43 +++++++++++++++++++++++++++++++++++++ - 1 file changed, 43 insertions(+) - create mode 100644 configs/rpi_4_32b_defconfig - -diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig -new file mode 100644 -index 0000000000..9f2b805d0f ---- /dev/null -+++ b/configs/rpi_4_32b_defconfig -@@ -0,0 +1,43 @@ -+CONFIG_ARM=y -+CONFIG_ARCH_BCM283X=y -+CONFIG_SYS_TEXT_BASE=0x00008000 -+CONFIG_TARGET_RPI_4_32B=y -+CONFIG_SYS_MALLOC_F_LEN=0x2000 -+CONFIG_DISTRO_DEFAULTS=y -+CONFIG_NR_DRAM_BANKS=1 -+CONFIG_OF_BOARD_SETUP=y -+CONFIG_MISC_INIT_R=y -+# CONFIG_DISPLAY_CPUINFO is not set -+# CONFIG_DISPLAY_BOARDINFO is not set -+CONFIG_SYS_PROMPT="U-Boot> " -+# CONFIG_CMD_FLASH is not set -+CONFIG_CMD_GPIO=y -+CONFIG_CMD_MMC=y -+CONFIG_CMD_USB=y -+CONFIG_CMD_FS_UUID=y -+CONFIG_OF_EMBED=y -+CONFIG_DEFAULT_DEVICE_TREE="bcm2838-rpi-4-b" -+CONFIG_ENV_FAT_INTERFACE="mmc" -+CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" -+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -+CONFIG_DM_KEYBOARD=y -+CONFIG_DM_MMC=y -+CONFIG_MMC_SDHCI=y -+CONFIG_MMC_SDHCI_BCM2835=y -+CONFIG_PHYLIB=y -+CONFIG_DM_ETH=y -+CONFIG_PINCTRL=y -+# CONFIG_PINCTRL_GENERIC is not set -+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set -+CONFIG_USB=y -+CONFIG_DM_USB=y -+CONFIG_USB_DWC2=y -+CONFIG_USB_KEYBOARD=y -+CONFIG_USB_HOST_ETHER=y -+CONFIG_USB_ETHER_LAN78XX=y -+CONFIG_USB_ETHER_SMSC95XX=y -+CONFIG_DM_VIDEO=y -+CONFIG_SYS_WHITE_ON_BLACK=y -+CONFIG_CONSOLE_SCROLL_LINES=10 -+CONFIG_PHYS_TO_BUS=y -+CONFIG_OF_LIBFDT_OVERLAY=y --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0014-dts-bcm2838-rpi-4-b-Use-the-emmc2-interface-for-sdhc.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0014-dts-bcm2838-rpi-4-b-Use-the-emmc2-interface-for-sdhc.patch deleted file mode 100644 index 7a1d33f73..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0014-dts-bcm2838-rpi-4-b-Use-the-emmc2-interface-for-sdhc.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 07801a834dfe2d53827ad5a61fe3d59776e0c5b1 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Fri, 12 Jul 2019 11:58:42 +0100 -Subject: [PATCH 14/17] dts: bcm2838-rpi-4-b: Use the emmc2 interface for sdhci - -Signed-off-by: Andrei Gherzan ---- - arch/arm/dts/bcm2838-rpi-4-b.dts | 16 ++++++---------- - 1 file changed, 6 insertions(+), 10 deletions(-) - -diff --git a/arch/arm/dts/bcm2838-rpi-4-b.dts b/arch/arm/dts/bcm2838-rpi-4-b.dts -index 07e9a78e8d..168179c17c 100644 ---- a/arch/arm/dts/bcm2838-rpi-4-b.dts -+++ b/arch/arm/dts/bcm2838-rpi-4-b.dts -@@ -30,21 +30,17 @@ - status = "okay"; - }; - --/* SDHCI is used to control the SDIO for wireless */ - &sdhci { -- pinctrl-names = "default"; -- pinctrl-0 = <&emmc_gpio34>; -- status = "okay"; -- bus-width = <4>; -- non-removable; -+ status = "disabled"; - }; - --/* SDHOST is used to drive the SD card */ - &sdhost { -- pinctrl-names = "default"; -- pinctrl-0 = <&sdhost_gpio48>; -+ status = "disabled"; -+}; -+ -+&emmc2 { -+ compatible = "brcm,bcm2835-sdhci"; - status = "okay"; -- bus-width = <4>; - }; - - &gpio { --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0015-rpi-Add-memory-map-for-bcm2838.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0015-rpi-Add-memory-map-for-bcm2838.patch deleted file mode 100644 index 8510637cc..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0015-rpi-Add-memory-map-for-bcm2838.patch +++ /dev/null @@ -1,58 +0,0 @@ -From bfa71106beb565c2f3bc2f5f948477e0d3801285 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Fri, 12 Jul 2019 14:27:31 +0100 -Subject: [PATCH 15/17] rpi: Add memory map for bcm2838 - -Signed-off-by: Andrei Gherzan ---- - board/raspberrypi/rpi/rpi.c | 27 ++++++++++++++++++++++++--- - 1 file changed, 24 insertions(+), 3 deletions(-) - -diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c -index 6d6f1ef39a..4242ef35a4 100644 ---- a/board/raspberrypi/rpi/rpi.c -+++ b/board/raspberrypi/rpi/rpi.c -@@ -249,7 +249,8 @@ static uint32_t rev_type; - static const struct rpi_model *model; - - #ifdef CONFIG_ARM64 --static struct mm_region bcm2837_mem_map[] = { -+#ifndef CONFIG_BCM2838 -+static struct mm_region bcm283x_mem_map[] = { - { - .virt = 0x00000000UL, - .phys = 0x00000000UL, -@@ -268,8 +269,28 @@ static struct mm_region bcm2837_mem_map[] = { - 0, - } - }; -- --struct mm_region *mem_map = bcm2837_mem_map; -+#else -+static struct mm_region bcm283x_mem_map[] = { -+ { -+ .virt = 0x00000000UL, -+ .phys = 0x00000000UL, -+ .size = 0xf3000000UL, -+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | -+ PTE_BLOCK_INNER_SHARE -+ }, { -+ .virt = 0xfe000000UL, -+ .phys = 0xfe000000UL, -+ .size = 0x01800000UL, -+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | -+ PTE_BLOCK_NON_SHARE | -+ PTE_BLOCK_PXN | PTE_BLOCK_UXN -+ }, { -+ /* List terminator */ -+ 0, -+ } -+}; -+#endif -+struct mm_region *mem_map = bcm283x_mem_map; - #endif - - int dram_init(void) --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0016-configs-rpi4-Remove-DWC2-and-USB_ETHER-configs.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0016-configs-rpi4-Remove-DWC2-and-USB_ETHER-configs.patch deleted file mode 100644 index 0bc54c85e..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0016-configs-rpi4-Remove-DWC2-and-USB_ETHER-configs.patch +++ /dev/null @@ -1,52 +0,0 @@ -From c73747171c8a91e204405e144d0906c439d3bff3 Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Mon, 15 Jul 2019 14:05:25 +0100 -Subject: [PATCH 16/17] configs: rpi4: Remove DWC2 and USB_ETHER configs - -dwc2 is only connected to the usb-c port so we don't have any real -benefit in having it enabled in uboot. - -Also, the GENET interface is connected directly to the SoC so we can -drop the USB_ETHER configs. - -Signed-off-by: Andrei Gherzan ---- - configs/rpi_4_32b_defconfig | 3 --- - configs/rpi_4_defconfig | 3 --- - 2 files changed, 6 deletions(-) - -diff --git a/configs/rpi_4_32b_defconfig b/configs/rpi_4_32b_defconfig -index 9f2b805d0f..b71a14735a 100644 ---- a/configs/rpi_4_32b_defconfig -+++ b/configs/rpi_4_32b_defconfig -@@ -31,11 +31,8 @@ CONFIG_PINCTRL=y - # CONFIG_REQUIRE_SERIAL_CONSOLE is not set - CONFIG_USB=y - CONFIG_DM_USB=y --CONFIG_USB_DWC2=y - CONFIG_USB_KEYBOARD=y - CONFIG_USB_HOST_ETHER=y --CONFIG_USB_ETHER_LAN78XX=y --CONFIG_USB_ETHER_SMSC95XX=y - CONFIG_DM_VIDEO=y - CONFIG_SYS_WHITE_ON_BLACK=y - CONFIG_CONSOLE_SCROLL_LINES=10 -diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig -index 83d1bd0cdb..b27e3f823b 100644 ---- a/configs/rpi_4_defconfig -+++ b/configs/rpi_4_defconfig -@@ -31,11 +31,8 @@ CONFIG_PINCTRL=y - # CONFIG_REQUIRE_SERIAL_CONSOLE is not set - CONFIG_USB=y - CONFIG_DM_USB=y --CONFIG_USB_DWC2=y - CONFIG_USB_KEYBOARD=y - CONFIG_USB_HOST_ETHER=y --CONFIG_USB_ETHER_LAN78XX=y --CONFIG_USB_ETHER_SMSC95XX=y - CONFIG_DM_VIDEO=y - CONFIG_SYS_WHITE_ON_BLACK=y - CONFIG_CONSOLE_SCROLL_LINES=10 --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0017-dts-bcm2838-rpi-4-b-Use-the-emmc2-2811-compatible-st.patch b/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0017-dts-bcm2838-rpi-4-b-Use-the-emmc2-2811-compatible-st.patch deleted file mode 100644 index 4481f4157..000000000 --- a/buildroot-external/board/raspberrypi/rpi4/patches/uboot/0017-dts-bcm2838-rpi-4-b-Use-the-emmc2-2811-compatible-st.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 62b6e39a53c56a9085aeab1b47b5cc6020fcdb6f Mon Sep 17 00:00:00 2001 -From: Andrei Gherzan -Date: Mon, 15 Jul 2019 14:11:10 +0100 -Subject: [PATCH 17/17] dts: bcm2838-rpi-4-b: Use the emmc2/2811 compatible - string for SDHCI - -Signed-off-by: Andrei Gherzan ---- - arch/arm/dts/bcm2838-rpi-4-b.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/dts/bcm2838-rpi-4-b.dts b/arch/arm/dts/bcm2838-rpi-4-b.dts -index 168179c17c..b7241be3fd 100644 ---- a/arch/arm/dts/bcm2838-rpi-4-b.dts -+++ b/arch/arm/dts/bcm2838-rpi-4-b.dts -@@ -39,7 +39,7 @@ - }; - - &emmc2 { -- compatible = "brcm,bcm2835-sdhci"; -+ compatible = "brcm,bcm2711-emmc2"; - status = "okay"; - }; - --- -2.17.1 - diff --git a/buildroot-external/board/raspberrypi/uboot.config b/buildroot-external/board/raspberrypi/uboot.config index f358c84db..622f91b73 100644 --- a/buildroot-external/board/raspberrypi/uboot.config +++ b/buildroot-external/board/raspberrypi/uboot.config @@ -1,4 +1,3 @@ -# CONFIG_USB_STORAGE is not set # CONFIG_DOS_PARTITION is not set CONFIG_CMD_FILEENV=y CONFIG_ENV_IS_NOWHERE=Y @@ -7,4 +6,3 @@ CONFIG_USB_FUNCTION_MASS_STORAGE=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_EHCI_GENERIC=y CONFIG_USB_OHCI_HCD=y -# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set \ No newline at end of file diff --git a/buildroot-external/configs/rpi0_w_defconfig b/buildroot-external/configs/rpi0_w_defconfig index dcda5482f..9700f4c1d 100644 --- a/buildroot-external/configs/rpi0_w_defconfig +++ b/buildroot-external/configs/rpi0_w_defconfig @@ -4,7 +4,7 @@ BR2_ARM_EABIHF=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y BR2_CCACHE_DIR="/cache/cc" -BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches" +BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/patches" BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_GCC_VERSION_7_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y @@ -15,7 +15,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to HassOS" BR2_INIT_SYSTEMD=y BR2_TARGET_GENERIC_GETTY_PORT="tty1" # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rootfs-overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi0-w $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" @@ -24,7 +24,7 @@ BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="988cc7beacc150756c3fbe40646afcf8438b741b" BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-zero-w" @@ -80,7 +80,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_0_w" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config" BR2_TARGET_UBOOT_BOOT_SCRIPT=y diff --git a/buildroot-external/configs/rpi2_defconfig b/buildroot-external/configs/rpi2_defconfig index 3b1f66783..48e51d4e0 100644 --- a/buildroot-external/configs/rpi2_defconfig +++ b/buildroot-external/configs/rpi2_defconfig @@ -4,7 +4,7 @@ BR2_ARM_FPU_VFPV4=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y BR2_CCACHE_DIR="/cache/cc" -BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches" +BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/patches" BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_GCC_VERSION_7_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y @@ -15,7 +15,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to HassOS" BR2_INIT_SYSTEMD=y BR2_TARGET_GENERIC_GETTY_PORT="tty1" # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rootfs-overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi2 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" @@ -24,7 +24,7 @@ BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="988cc7beacc150756c3fbe40646afcf8438b741b" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2709-rpi-2-b" @@ -79,7 +79,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_2" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config" BR2_TARGET_UBOOT_BOOT_SCRIPT=y diff --git a/buildroot-external/configs/rpi3_64_defconfig b/buildroot-external/configs/rpi3_64_defconfig index 332f8b21a..41d031a2b 100644 --- a/buildroot-external/configs/rpi3_64_defconfig +++ b/buildroot-external/configs/rpi3_64_defconfig @@ -4,7 +4,7 @@ BR2_ARM_FPU_VFPV4=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y BR2_CCACHE_DIR="/cache/cc" -BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches" +BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/patches" BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_GCC_VERSION_7_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y @@ -15,7 +15,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to HassOS" BR2_INIT_SYSTEMD=y BR2_TARGET_GENERIC_GETTY_PORT="tty1" # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rootfs-overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" @@ -24,7 +24,7 @@ BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="988cc7beacc150756c3fbe40646afcf8438b741b" BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi3" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="broadcom/bcm2710-rpi-3-b broadcom/bcm2837-rpi-3-b broadcom/bcm2710-rpi-3-b-plus" @@ -80,7 +80,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_3" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config" BR2_TARGET_UBOOT_BOOT_SCRIPT=y diff --git a/buildroot-external/configs/rpi3_defconfig b/buildroot-external/configs/rpi3_defconfig index 6f19e3137..057ba39a5 100644 --- a/buildroot-external/configs/rpi3_defconfig +++ b/buildroot-external/configs/rpi3_defconfig @@ -4,7 +4,7 @@ BR2_ARM_FPU_VFPV4=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y BR2_CCACHE_DIR="/cache/cc" -BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches" +BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/patches" BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_GCC_VERSION_7_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y @@ -15,7 +15,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to HassOS" BR2_INIT_SYSTEMD=y BR2_TARGET_GENERIC_GETTY_PORT="tty1" # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rootfs-overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi3 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" @@ -24,7 +24,7 @@ BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="988cc7beacc150756c3fbe40646afcf8438b741b" BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b bcm2710-rpi-3-b-plus bcm2710-rpi-cm3" @@ -80,7 +80,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_3_32b" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config" BR2_TARGET_UBOOT_BOOT_SCRIPT=y diff --git a/buildroot-external/configs/rpi4_64_defconfig b/buildroot-external/configs/rpi4_64_defconfig index 4e2ca0ed8..b27e1dc3f 100644 --- a/buildroot-external/configs/rpi4_64_defconfig +++ b/buildroot-external/configs/rpi4_64_defconfig @@ -4,7 +4,7 @@ BR2_ARM_FPU_NEON_VFPV4=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y BR2_CCACHE_DIR="/cache/cc" -BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4/patches" +BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/patches" BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_GCC_VERSION_7_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y @@ -15,7 +15,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to HassOS" BR2_INIT_SYSTEMD=y BR2_TARGET_GENERIC_GETTY_PORT="tty1" # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rootfs-overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4-64 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" @@ -81,7 +81,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01-rc4" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_4" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config" BR2_TARGET_UBOOT_BOOT_SCRIPT=y diff --git a/buildroot-external/configs/rpi4_defconfig b/buildroot-external/configs/rpi4_defconfig index 38e79278e..ef596ca73 100644 --- a/buildroot-external/configs/rpi4_defconfig +++ b/buildroot-external/configs/rpi4_defconfig @@ -4,7 +4,7 @@ BR2_ARM_FPU_NEON_VFPV4=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y BR2_CCACHE_DIR="/cache/cc" -BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4/patches" +BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/patches" BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_GCC_VERSION_7_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y @@ -15,7 +15,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to HassOS" BR2_INIT_SYSTEMD=y BR2_TARGET_GENERIC_GETTY_PORT="tty1" # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rootfs-overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi4 $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" @@ -81,7 +81,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01-rc4" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi_4_32b" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config" BR2_TARGET_UBOOT_BOOT_SCRIPT=y diff --git a/buildroot-external/configs/rpi_defconfig b/buildroot-external/configs/rpi_defconfig index 498914f4e..8b7638cea 100644 --- a/buildroot-external/configs/rpi_defconfig +++ b/buildroot-external/configs/rpi_defconfig @@ -4,7 +4,7 @@ BR2_ARM_EABIHF=y BR2_DL_DIR="/cache/dl" BR2_CCACHE=y BR2_CCACHE_DIR="/cache/cc" -BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches" +BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HASSOS_PATH)/patches $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/patches" BR2_TOOLCHAIN_BUILDROOT_GLIBC=y BR2_GCC_VERSION_7_X=y BR2_TOOLCHAIN_BUILDROOT_CXX=y @@ -15,7 +15,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to HassOS" BR2_INIT_SYSTEMD=y BR2_TARGET_GENERIC_GETTY_PORT="tty1" # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW is not set -BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay" +BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HASSOS_PATH)/rootfs-overlay $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rootfs-overlay" BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_HASSOS_PATH)/scripts/post-image.sh" BR2_ROOTFS_POST_SCRIPT_ARGS="$(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/rpi $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/hassos-hook.sh" @@ -24,7 +24,7 @@ BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/raspberrypi/linux" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="988cc7beacc150756c3fbe40646afcf8438b741b" BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/kernel.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/kernel/hassos.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/docker.config $(BR2_EXTERNAL_HASSOS_PATH)/kernel/device-support.config" BR2_LINUX_KERNEL_LZ4=y BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm" @@ -79,7 +79,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_VERSION=y -BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.07" +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10" BR2_TARGET_UBOOT_BOARD_DEFCONFIG="rpi" BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="$(BR2_EXTERNAL_HASSOS_PATH)/bootloader/uboot.config $(BR2_EXTERNAL_HASSOS_PATH)/board/raspberrypi/uboot.config" BR2_TARGET_UBOOT_BOOT_SCRIPT=y diff --git a/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx b/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx deleted file mode 100755 index f21193ef9..000000000 --- a/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -HCIATTACH=/usr/bin/hciattach -SERIAL=`cat /proc/device-tree/serial-number | cut -c9-` -B1=`echo $SERIAL | cut -c3-4` -B2=`echo $SERIAL | cut -c5-6` -B3=`echo $SERIAL | cut -c7-8` -BDADDR=`printf b8:27:eb:%02x:%02x:%02x $((0x$B1 ^ 0xaa)) $((0x$B2 ^ 0xaa)) $((0x$B3 ^ 0xaa))` - -if [ "$(cat /proc/device-tree/aliases/uart0)" = "$(cat /proc/device-tree/aliases/serial1)" ] ; then - if [ "$(wc -c /proc/device-tree/soc/gpio@7e200000/uart0_pins/brcm\,pins | cut -f 1 -d ' ')" = "16" ] ; then - $HCIATTACH /dev/serial1 bcm43xx 3000000 flow - $BDADDR - else - $HCIATTACH /dev/serial1 bcm43xx 921600 noflow - $BDADDR - fi -else - $HCIATTACH /dev/serial1 bcm43xx 460800 noflow - $BDADDR -fi diff --git a/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.mk b/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.mk index 65641f661..8df6d77b4 100644 --- a/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.mk +++ b/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.mk @@ -11,21 +11,28 @@ BLUETOOTH_BCM43XX_SITE = $(BR2_EXTERNAL_HASSOS_PATH)/package/bluetooth-bcm43xx BLUETOOTH_BCM43XX_SITE_METHOD = local define BLUETOOTH_BCM43XX_BUILD_CMDS - curl -L -o $(@D)/BCM43430A1.hcd https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/96eefffcccc725425fd83be5e0704a5c32b79e54/broadcom/BCM43430A1.hcd - curl -L -o $(@D)/BCM4345C0.hcd https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/96eefffcccc725425fd83be5e0704a5c32b79e54/broadcom/BCM4345C0.hcd + curl -L -o $(@D)/BCM43430A1.hcd https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/fff76cb15527c435ce99a9787848eacd6288282c/broadcom/BCM43430A1.hcd + curl -L -o $(@D)/BCM4345C0.hcd https://raw.githubusercontent.com/RPi-Distro/bluez-firmware/fff76cb15527c435ce99a9787848eacd6288282c/broadcom/BCM4345C0.hcd + curl -L -o $(@D)/btuart https://raw.githubusercontent.com/RPi-Distro/pi-bluetooth/cbdbcb66bcc5b9af05f1a9fffe2254c872bb0ace/usr/bin/btuart + curl -L -o $(@D)/bthelper https://raw.githubusercontent.com/RPi-Distro/pi-bluetooth/cbdbcb66bcc5b9af05f1a9fffe2254c872bb0ace/usr/bin/bthelper + curl -L -o $(@D)/90-pi-bluetooth.rules https://raw.githubusercontent.com/RPi-Distro/pi-bluetooth/cbdbcb66bcc5b9af05f1a9fffe2254c872bb0ace/lib/udev/rules.d/90-pi-bluetooth.rules endef define BLUETOOTH_BCM43XX_INSTALL_TARGET_CMDS $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants - $(INSTALL) -m 0755 $(@D)/bluetooth-bcm43xx $(TARGET_DIR)/usr/sbin/ $(INSTALL) -m 0644 $(@D)/bluetooth-bcm43xx.service $(TARGET_DIR)/usr/lib/systemd/system/ + $(INSTALL) -m 0644 $(@D)/bthelper@.service $(TARGET_DIR)/usr/lib/systemd/system/ ln -fs /usr/lib/systemd/system/bluetooth-bcm43xx.service $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants/ + $(INSTALL) -d $(TARGET_DIR)/usr/bin + $(INSTALL) -m 0755 $(@D)/btuart $(TARGET_DIR)/usr/bin/ + $(INSTALL) -m 0755 $(@D)/bthelper $(TARGET_DIR)/usr/bin/ + $(INSTALL) -d $(TARGET_DIR)/lib/firmware/brcm $(INSTALL) -m 0644 $(@D)/*.hcd $(TARGET_DIR)/lib/firmware/brcm/ $(INSTALL) -d $(TARGET_DIR)/usr/lib/udev/rules.d - $(INSTALL) -m 0644 $(@D)/bluetooth-bcm43xx.rules $(TARGET_DIR)/usr/lib/udev/rules.d/ + $(INSTALL) -m 0644 $(@D)/90-pi-bluetooth.rules $(TARGET_DIR)/usr/lib/udev/rules.d/ endef $(eval $(generic-package)) diff --git a/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.rules b/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.rules deleted file mode 100644 index 461fc1c84..000000000 --- a/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.rules +++ /dev/null @@ -1,22 +0,0 @@ -KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\ - ALIASES=/proc/device-tree/aliases; \ - if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \ - echo 0;\ - elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \ - echo 1; \ - else \ - exit 1; \ - fi\ -'", SYMLINK+="serial%c" - -KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\ - ALIASES=/proc/device-tree/aliases; \ - if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \ - echo 0; \ - elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \ - echo 1; \ - else \ - exit 1; \ - fi \ -'", SYMLINK+="serial%c" - diff --git a/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.service b/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.service index 0fc39375f..ab006d73e 100644 --- a/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.service +++ b/buildroot-external/package/bluetooth-bcm43xx/bluetooth-bcm43xx.service @@ -1,12 +1,13 @@ [Unit] Description=Bluetooth for BCM43xx Before=bluetooth.service -After=dev-ttyAMA0.device +Requires=dev-serial1.device +After=dev-serial1.device ConditionFileNotEmpty=/proc/device-tree/soc/gpio@7e200000/bt_pins/brcm,pins [Service] Type=forking -ExecStart=/usr/sbin/bluetooth-bcm43xx +ExecStart=/usr/bin/btuart [Install] WantedBy=hassos-hardware.target diff --git a/buildroot-external/package/bluetooth-bcm43xx/bthelper@.service b/buildroot-external/package/bluetooth-bcm43xx/bthelper@.service new file mode 100644 index 000000000..c8a16c15f --- /dev/null +++ b/buildroot-external/package/bluetooth-bcm43xx/bthelper@.service @@ -0,0 +1,8 @@ +[Unit] +Description=Raspberry Pi bluetooth helper +Requires=bluetooth.service +After=bluetooth.service + +[Service] +Type=simple +ExecStart=/usr/bin/bthelper %I diff --git a/buildroot-external/rootfs-overlay/usr/lib/udev/rules.d/hmip-rfusb.rules b/buildroot-external/rootfs-overlay/usr/lib/udev/rules.d/99-hmip-rfusb.rules similarity index 100% rename from buildroot-external/rootfs-overlay/usr/lib/udev/rules.d/hmip-rfusb.rules rename to buildroot-external/rootfs-overlay/usr/lib/udev/rules.d/99-hmip-rfusb.rules