Skip to content

Commit 7b71722

Browse files
committed
Add support for Raspberry Pi 4.
Closes #17 and #45.
1 parent 4838394 commit 7b71722

File tree

15 files changed

+178
-34
lines changed

15 files changed

+178
-34
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Provides the following features:
4040

4141
* Raspberry Pi 1
4242
* Raspberry Pi 3
43+
* Raspberry Pi 4
4344

4445
#### Shields / kits
4546

docs/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ theme = "chirpstack-hugo-theme"
3636
[params]
3737
raspberrypi_raspberrypi_version = "3.3.0-test.5"
3838
raspberrypi_raspberrypi3_version = "3.3.0-test.5"
39+
raspberrypi_raspberrypi4_version = "3.3.0-test.5"
3940
wifx_lorix_one_sd_version = "3.2.0test1"
4041
wifx_lorix_one_512_sd_version = "3.2.0test1"
4142
component = "chirpstack-gateway-os"

docs/content/install/raspberrypi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ For an initial installation:
2626

2727
* [Raspberry Pi 1](http://artifacts.chirpstack.io/downloads/chirpstack-gateway-os/raspberrypi/raspberrypi/{{< raspberrypi_raspberrypi_version >}}/)
2828
* [Raspberry Pi 3](http://artifacts.chirpstack.io/downloads/chirpstack-gateway-os/raspberrypi/raspberrypi3/{{< raspberrypi_raspberrypi3_version >}}/)
29+
* [Raspberry Pi 4](http://artifacts.chirpstack.io/downloads/chirpstack-gateway-os/raspberrypi/raspberrypi4/{{< raspberrypi_raspberrypi4_version >}}/)
2930

3031
## Supported shields
3132

docs/content/overview/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ by the **chirpstack-gateway-os-base** image.
3535

3636
* Raspberry Pi 1
3737
* Raspberry Pi 3
38+
* Raspberry Pi 4
3839

3940
#### Shields / kits
4041

layers/chirpstack/meta-tools/recipes-monitoring/monit/monit_5.26.0.bb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ do_install_append() {
4646

4747
install -m 600 ${S}/monitrc ${D}${sysconfdir}/monitrc
4848
install -m 700 -d ${D}${sysconfdir}/monit.d/
49-
sed -i -e 's:# set daemon 120:set daemon 120:' \
50-
-e 's:include /etc/monit.d/:include /${sysconfdir}/monit.d/:' \
51-
${D}${sysconfdir}/monitrc
5249
}
5350

5451
CONFFILES_${PN} += "${sysconfdir}/monitrc"

layers/targets/meta-raspberrypi/recipes-bsp/bootfiles/rpi-config_%.bbappend

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ do_deploy_append_raspberrypi3() {
99
echo "core_freq=250" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
1010
echo "dtoverlay=pi3-disable-bt" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
1111
}
12+
13+
do_deploy_append_raspberrypi4() {
14+
echo "dtoverlay=disable-bt" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
15+
}
Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,3 @@ index ce71f578..8d88e782 100644
2929
/* SDHCI is used to control the SDIO for wireless */
3030
&sdhci {
3131
#address-cells = <1>;
32-
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
33-
index 617c892d..2c24b05c 100644
34-
--- a/board/raspberrypi/rpi/rpi.c
35-
+++ b/board/raspberrypi/rpi/rpi.c
36-
@@ -496,3 +496,9 @@ int ft_board_setup(void *blob, bd_t *bd)
37-
38-
return 0;
39-
}
40-
+
41-
+int board_early_init_f(void)
42-
+{
43-
+ gd->flags |= (GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE);
44-
+ return 0;
45-
+}
46-
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
47-
index f76c7d18..7d0d3562 100644
48-
--- a/include/configs/rpi.h
49-
+++ b/include/configs/rpi.h
50-
@@ -187,4 +187,9 @@
51-
BOOTENV
52-
53-
54-
+#define CONFIG_DISABLE_CONSOLE
55-
+#define CONFIG_SILENT_CONSOLE
56-
+#define CONFIG_SYS_DEVICE_NULLDEV
57-
+#define CONFIG_BOARD_EARLY_INIT_F 1
58-
+
59-
#endif
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
2+
index 617c892d..2c24b05c 100644
3+
--- a/board/raspberrypi/rpi/rpi.c
4+
+++ b/board/raspberrypi/rpi/rpi.c
5+
@@ -496,3 +496,9 @@ int ft_board_setup(void *blob, bd_t *bd)
6+
7+
return 0;
8+
}
9+
+
10+
+int board_early_init_f(void)
11+
+{
12+
+ gd->flags |= (GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE);
13+
+ return 0;
14+
+}
15+
diff --git a/include/configs/rpi.h b/include/configs/rpi.h
16+
index f76c7d18..7d0d3562 100644
17+
--- a/include/configs/rpi.h
18+
+++ b/include/configs/rpi.h
19+
@@ -187,4 +187,9 @@
20+
BOOTENV
21+
22+
23+
+#define CONFIG_DISABLE_CONSOLE
24+
+#define CONFIG_SILENT_CONSOLE
25+
+#define CONFIG_SYS_DEVICE_NULLDEV
26+
+#define CONFIG_BOARD_EARLY_INIT_F 1
27+
+
28+
#endif

layers/targets/meta-raspberrypi/recipes-bsp/u-boot/u-boot-raspberrypi.inc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ FILESEXTRAPATHS_prepend_rpi := "${THISDIR}/patches:"
22

33
SRC_URI_append_rpi = " \
44
file://bootcount.patch \
5-
file://disable-console-to-fix-gps.patch \
5+
file://rpi.patch \
6+
file://pi3-device-tree.patch \
67
"
7-
8-

layers/targets/meta-raspberrypi/recipes-core/base-files/base-files_%.bbappend

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,10 @@ do_install_append_raspberrypi3() {
1818
install -m 644 ${WORKDIR}/connman/main.conf ${D}/etc/connman/main.conf
1919
install -m 644 ${WORKDIR}/connman/settings ${D}/var/lib/connman/settings
2020
}
21+
22+
do_install_append_raspberrypi4() {
23+
install -d ${D}/etc/connman
24+
install -d ${D}/var/lib/connman
25+
install -m 644 ${WORKDIR}/connman/main.conf ${D}/etc/connman/main.conf
26+
install -m 644 ${WORKDIR}/connman/settings ${D}/var/lib/connman/settings
27+
}

0 commit comments

Comments
 (0)