Skip to content

Commit

Permalink
labs/buildroot: update to Buildroot 2024.02
Browse files Browse the repository at this point in the history
And also update to newer Linux (6.6) and newer U-Boot (2024.02)

Signed-off-by: Thomas Petazzoni <[email protected]>
  • Loading branch information
tpetazzoni committed May 28, 2024
1 parent 9b677cc commit 8a63dd3
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 191 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 71c7e58915a31ac44ffbef033911c27b7437cb76 Mon Sep 17 00:00:00 2001
From a0208d1b92ad6c044de972db3f6eb5e217395e5f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antoine=20T=C3=A9nart?= <[email protected]>
Date: Mon, 7 Apr 2014 11:55:31 +0200
Subject: [PATCH 1/2] Add nunchuk driver
Expand All @@ -11,15 +11,15 @@ Signed-off-by: Thomas Petazzoni <[email protected]>
---
drivers/input/joystick/Kconfig | 13 +
drivers/input/joystick/Makefile | 1 +
drivers/input/joystick/wiichuck.c | 404 ++++++++++++++++++++++++++++++
3 files changed, 418 insertions(+)
drivers/input/joystick/wiichuck.c | 403 ++++++++++++++++++++++++++++++
3 files changed, 417 insertions(+)
create mode 100644 drivers/input/joystick/wiichuck.c

diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
index 3b23078bc7b5..5b6a2d219a12 100644
index ac6925ce8366..e155f724b789 100644
--- a/drivers/input/joystick/Kconfig
+++ b/drivers/input/joystick/Kconfig
@@ -206,6 +206,19 @@ config JOYSTICK_TWIDJOY
@@ -207,6 +207,19 @@ config JOYSTICK_TWIDJOY
To compile this driver as a module, choose M here: the
module will be called twidjoy.

Expand All @@ -40,10 +40,10 @@ index 3b23078bc7b5..5b6a2d219a12 100644
tristate "5-byte Zhenhua RC transmitter"
select SERIO
diff --git a/drivers/input/joystick/Makefile b/drivers/input/joystick/Makefile
index 5174b8aba2dd..2ab4167afbd7 100644
index 3937535f0098..7dee2e46303d 100644
--- a/drivers/input/joystick/Makefile
+++ b/drivers/input/joystick/Makefile
@@ -37,5 +37,6 @@ obj-$(CONFIG_JOYSTICK_TURBOGRAFX) += turbografx.o
@@ -38,5 +38,6 @@ obj-$(CONFIG_JOYSTICK_TURBOGRAFX) += turbografx.o
obj-$(CONFIG_JOYSTICK_TWIDJOY) += twidjoy.o
obj-$(CONFIG_JOYSTICK_WARRIOR) += warrior.o
obj-$(CONFIG_JOYSTICK_WALKERA0701) += walkera0701.o
Expand All @@ -52,10 +52,10 @@ index 5174b8aba2dd..2ab4167afbd7 100644
obj-$(CONFIG_JOYSTICK_ZHENHUA) += zhenhua.o
diff --git a/drivers/input/joystick/wiichuck.c b/drivers/input/joystick/wiichuck.c
new file mode 100644
index 000000000000..ba3797396c8a
index 000000000000..1037e7a29b69
--- /dev/null
+++ b/drivers/input/joystick/wiichuck.c
@@ -0,0 +1,404 @@
@@ -0,0 +1,403 @@
+/*
+ * i2c Wiichuck driver (Nintendo Wiimote accessory connector)
+ *
Expand Down Expand Up @@ -339,8 +339,7 @@ index 000000000000..ba3797396c8a
+ return 0;
+}
+
+static int wiichuck_probe(struct i2c_client *client,
+ const struct i2c_device_id *id)
+static int wiichuck_probe(struct i2c_client *client)
+{
+ struct wiichuck_device *wiichuck;
+ struct input_dev *input_dev;
Expand Down Expand Up @@ -461,5 +460,5 @@ index 000000000000..ba3797396c8a
+};
+module_i2c_driver(wiichuck_driver);
--
2.35.1
2.45.1

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
From 56056c350200053dd21a66638a9b41856f5c3195 Mon Sep 17 00:00:00 2001
From 02a0ef4fdfce1bcb301c386edf6968ad13b802c4 Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <[email protected]>
Date: Fri, 3 Dec 2021 10:45:26 +0100
Subject: [PATCH 2/2] ARM: dts: stm32mp157a-dk1: add description of Nunchuk on
I2C5

Signed-off-by: Thomas Petazzoni <[email protected]>
---
arch/arm/boot/dts/stm32mp157a-dk1.dts | 13 +++++++++++++
arch/arm/boot/dts/st/stm32mp157a-dk1.dts | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/arch/arm/boot/dts/stm32mp157a-dk1.dts b/arch/arm/boot/dts/stm32mp157a-dk1.dts
index 4c8be9c8eb20..996e3bee89c9 100644
--- a/arch/arm/boot/dts/stm32mp157a-dk1.dts
+++ b/arch/arm/boot/dts/stm32mp157a-dk1.dts
@@ -26,3 +26,16 @@ chosen {
diff --git a/arch/arm/boot/dts/st/stm32mp157a-dk1.dts b/arch/arm/boot/dts/st/stm32mp157a-dk1.dts
index 0da3667ab1e0..1f1d07f5a4e2 100644
--- a/arch/arm/boot/dts/st/stm32mp157a-dk1.dts
+++ b/arch/arm/boot/dts/st/stm32mp157a-dk1.dts
@@ -23,3 +23,16 @@ chosen {
stdout-path = "serial0:115200n8";
};
};
Expand All @@ -31,5 +31,5 @@ index 4c8be9c8eb20..996e3bee89c9 100644
+ };
+};
--
2.35.1
2.45.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 71c7e58915a31ac44ffbef033911c27b7437cb76 Mon Sep 17 00:00:00 2001
From 7c37fae9e0075955966e1b10132d8482477cc097 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antoine=20T=C3=A9nart?= <[email protected]>
Date: Mon, 7 Apr 2014 11:55:31 +0200
Subject: [PATCH 1/2] Add nunchuk driver
Expand All @@ -11,15 +11,15 @@ Signed-off-by: Thomas Petazzoni <[email protected]>
---
drivers/input/joystick/Kconfig | 13 +
drivers/input/joystick/Makefile | 1 +
drivers/input/joystick/wiichuck.c | 404 ++++++++++++++++++++++++++++++
3 files changed, 418 insertions(+)
drivers/input/joystick/wiichuck.c | 403 ++++++++++++++++++++++++++++++
3 files changed, 417 insertions(+)
create mode 100644 drivers/input/joystick/wiichuck.c

diff --git a/drivers/input/joystick/Kconfig b/drivers/input/joystick/Kconfig
index 3b23078bc7b5..5b6a2d219a12 100644
index ac6925ce8366..e155f724b789 100644
--- a/drivers/input/joystick/Kconfig
+++ b/drivers/input/joystick/Kconfig
@@ -206,6 +206,19 @@ config JOYSTICK_TWIDJOY
@@ -207,6 +207,19 @@ config JOYSTICK_TWIDJOY
To compile this driver as a module, choose M here: the
module will be called twidjoy.

Expand All @@ -40,10 +40,10 @@ index 3b23078bc7b5..5b6a2d219a12 100644
tristate "5-byte Zhenhua RC transmitter"
select SERIO
diff --git a/drivers/input/joystick/Makefile b/drivers/input/joystick/Makefile
index 5174b8aba2dd..2ab4167afbd7 100644
index 3937535f0098..7dee2e46303d 100644
--- a/drivers/input/joystick/Makefile
+++ b/drivers/input/joystick/Makefile
@@ -37,5 +37,6 @@ obj-$(CONFIG_JOYSTICK_TURBOGRAFX) += turbografx.o
@@ -38,5 +38,6 @@ obj-$(CONFIG_JOYSTICK_TURBOGRAFX) += turbografx.o
obj-$(CONFIG_JOYSTICK_TWIDJOY) += twidjoy.o
obj-$(CONFIG_JOYSTICK_WARRIOR) += warrior.o
obj-$(CONFIG_JOYSTICK_WALKERA0701) += walkera0701.o
Expand All @@ -52,10 +52,10 @@ index 5174b8aba2dd..2ab4167afbd7 100644
obj-$(CONFIG_JOYSTICK_ZHENHUA) += zhenhua.o
diff --git a/drivers/input/joystick/wiichuck.c b/drivers/input/joystick/wiichuck.c
new file mode 100644
index 000000000000..ba3797396c8a
index 000000000000..1037e7a29b69
--- /dev/null
+++ b/drivers/input/joystick/wiichuck.c
@@ -0,0 +1,404 @@
@@ -0,0 +1,403 @@
+/*
+ * i2c Wiichuck driver (Nintendo Wiimote accessory connector)
+ *
Expand Down Expand Up @@ -339,8 +339,7 @@ index 000000000000..ba3797396c8a
+ return 0;
+}
+
+static int wiichuck_probe(struct i2c_client *client,
+ const struct i2c_device_id *id)
+static int wiichuck_probe(struct i2c_client *client)
+{
+ struct wiichuck_device *wiichuck;
+ struct input_dev *input_dev;
Expand Down Expand Up @@ -461,5 +460,5 @@ index 000000000000..ba3797396c8a
+};
+module_i2c_driver(wiichuck_driver);
--
2.35.1
2.45.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 55278c2906191461e34b6851c41ac5ac023d3024 Mon Sep 17 00:00:00 2001
From 557566140c3118c758fac7297b4bf209e9018bf6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antoine=20T=C3=A9nart?= <[email protected]>
Date: Mon, 7 Apr 2014 11:55:56 +0200
Subject: [PATCH 2/2] Add i2c1 and nunchuk nodes in dts
Expand All @@ -9,15 +9,15 @@ Content-Transfer-Encoding: 8bit
Signed-off-by: Antoine Ténart <[email protected]>
Signed-off-by: Thomas Petazzoni <[email protected]>
---
arch/arm/boot/dts/am335x-bone-common.dtsi | 7 +++++++
arch/arm/boot/dts/am335x-boneblack-common.dtsi | 13 +++++++++++++
arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi | 7 +++++++
.../boot/dts/ti/omap/am335x-boneblack-common.dtsi | 13 +++++++++++++
2 files changed, 20 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
index 0ccdc7cd463b..c5ce2c6748ba 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -89,6 +89,13 @@ AM33XX_PADCONF(AM335X_PIN_UART1_RTSN, PIN_INPUT_PULLUP, MUX_MODE3) /* uart1_rtsn
diff --git a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi
index 96451c8a815c..5b855be8c481 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi
@@ -82,6 +82,13 @@ AM33XX_PADCONF(AM335X_PIN_I2C0_SCL, PIN_INPUT_PULLUP, MUX_MODE0) /* i2c0_scl.i2c
>;
};

Expand All @@ -28,14 +28,14 @@ index 0ccdc7cd463b..c5ce2c6748ba 100644
+ >;
+ };
+
uart0_pins: pinmux_uart0_pins {
i2c2_pins: i2c2-pins {
pinctrl-single,pins = <
AM33XX_PADCONF(AM335X_PIN_UART0_RXD, PIN_INPUT_PULLUP, MUX_MODE0)
diff --git a/arch/arm/boot/dts/am335x-boneblack-common.dtsi b/arch/arm/boot/dts/am335x-boneblack-common.dtsi
index 10494c4431b9..5d26fc404490 100644
--- a/arch/arm/boot/dts/am335x-boneblack-common.dtsi
+++ b/arch/arm/boot/dts/am335x-boneblack-common.dtsi
@@ -32,3 +32,16 @@ memory@80000000 {
AM33XX_PADCONF(AM335X_PIN_UART1_CTSN, PIN_INPUT_PULLUP, MUX_MODE3) /* uart1_ctsn.i2c2_sda */
diff --git a/arch/arm/boot/dts/ti/omap/am335x-boneblack-common.dtsi b/arch/arm/boot/dts/ti/omap/am335x-boneblack-common.dtsi
index a7a8c61ef9b2..02ca3f7ee87d 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-boneblack-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/am335x-boneblack-common.dtsi
@@ -28,3 +28,16 @@ memory@80000000 {
reg = <0x80000000 0x20000000>; /* 512 MB */
};
};
Expand All @@ -53,5 +53,5 @@ index 10494c4431b9..5d26fc404490 100644
+ };
+};
--
2.35.1
2.45.1

Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ \section{{\tt bar} packaging: {\em libconfig} dependency}
\code{libconfig.so} by doing:

\begin{bashinput}
./output/host/usr/bin/arm-none-linux-gnueabihf-readelf -d output/target/usr/bin/bar
./output/host/usr/bin/arm-linux-readelf -d output/target/usr/bin/bar
\end{bashinput}

On the target, test \code{bar}. Then, create a file called
Expand Down
2 changes: 1 addition & 1 deletion labs/buildroot-advanced/buildroot-advanced.tex
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ \section{Dependency graphing}
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_XORG7=y
Expand Down
22 changes: 12 additions & 10 deletions labs/buildroot-appdev/buildroot-appdev.tex
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ \section{Build and run your own application}
Now you can build your application easily:
\begin{bashinput}
arm-none-linux-gnueabihf-gcc -o myapp myapp.c
arm-linux-gcc -o myapp myapp.c
\end{bashinput}
Copy the myapp binary to your target using scp:
Copy the myapp binary to your target using scp (we use the legacy {\em
SCP} protocol, as we haven't installed a {\em SFTP} server, hence
the \code{-O} option):
\begin{bashinput}
scp myapp root@192.168.0.2:
scp -O myapp root@192.168.42.2:
\end{bashinput}
And run the \code{myapp} application on your target.
Expand All @@ -54,14 +56,14 @@ \section{Build and run your own application}
If you try to build this application with just:
\begin{bashinput}
arm-none-linux-gnueabihf-gcc -o myapp myapp.c
arm-linux-gcc -o myapp myapp.c
\end{bashinput}
It fails to build because it does not link with \code{libconfig}. So
you can manually do:
\begin{bashinput}
arm-none-linux-gnueabihf-gcc -o myapp myapp.c -lconfig
arm-linux-gcc -o myapp myapp.c -lconfig
\end{bashinput}
Since \code{libconfig.so} is in \code{output/staging/usr/lib} and the
Expand All @@ -87,7 +89,7 @@ \section{Build and run your own application}
And use that to build your application:
\begin{bashinput}
arm-none-linux-gnueabihf-gcc -o myapp myapp.c $(pkg-config --cflags --libs libconfig)
arm-linux-gcc -o myapp myapp.c $(pkg-config --cflags --libs libconfig)
\end{bashinput}

In the case of \code{libconfig}, it doesn't simplify a lot because the
Expand All @@ -109,7 +111,7 @@ \section{Remote debug your application}
re-installation of the toolchain using:

\begin{bashinput}
make toolchain-external-arm-arm-reinstall
make toolchain-external-bootlin-reinstall
\end{bashinput}

Reflash your system, or alternatively, just copy
Expand Down Expand Up @@ -146,7 +148,7 @@ \section{Remote debug your application}
as argument:

\begin{bashinput}
arm-none-linux-gnueabihf-gdb myapp
arm-linux-gdb myapp
\end{bashinput}

We need to tell \code{gdb} where the libraries can be found:
Expand All @@ -158,7 +160,7 @@ \section{Remote debug your application}
And then connect to the target:

\begin{bashinput}
(gdb) target extended-remote 192.168.0.2:2345
(gdb) target extended-remote 192.168.42.2:2345
\end{bashinput}

Define which program we want to run on the target:
Expand Down Expand Up @@ -223,7 +225,7 @@ \section{Create a package for your application}
Restart the build of \code{myapp} using \code{make myapp-rebuild}, you
will see that Buildroot automatically {\em rsyncs} again the source
code. Then scp the file \code{output/target/usr/bin/myapp} to
\code{192.168.0.2:/usr/bin} and run \code{myapp} again on the target.
\code{192.168.42.2:/usr/bin} and run \code{myapp} again on the target.
As you can see you can now develop your applications and libraries,
using your normal version control system and relying on Buildroot to
Expand Down
Loading

0 comments on commit 8a63dd3

Please sign in to comment.