[1/1] board/stm32f769-disco: move kernel and DTB to rootfs partition

Message ID 20241005191528.2142818-1-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • [1/1] board/stm32f769-disco: move kernel and DTB to rootfs partition
Related show

Commit Message

Dario Binacchi Oct. 5, 2024, 7:15 p.m. UTC
The patch, following the suggestion expressed in the review [1] for the
stm32f746-disco board support, moves the Linux kernel and the related
device tree to the ext4 rootfs partition. By doing so, the vfat partition,
improperly called u-boot, no longer makes sense and can therefore be
removed. From now on, U-Boot will load the kernel and the device tree
from the ext4 rootfs partition.

[1] https://patchwork.ozlabs.org/project/buildroot/patch/20240822183742.3550055-3-dario.binacchi@amarulasolutions.com/
Suggested-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 .../stm32f769-disco/extlinux.conf               |  6 +++---
 .../stm32f769-disco/genimage.cfg                | 17 -----------------
 .../stm32f769-disco/post-build.sh               |  2 +-
 configs/stm32f769_disco_sd_defconfig            |  3 +--
 4 files changed, 5 insertions(+), 23 deletions(-)

Patch

diff --git a/board/stmicroelectronics/stm32f769-disco/extlinux.conf b/board/stmicroelectronics/stm32f769-disco/extlinux.conf
index 48483a01fc4e..edc1582615da 100644
--- a/board/stmicroelectronics/stm32f769-disco/extlinux.conf
+++ b/board/stmicroelectronics/stm32f769-disco/extlinux.conf
@@ -1,4 +1,4 @@ 
 label stm32f769-disco-buildroot
-  kernel /zImage
-  devicetree /stm32f769-disco.dtb
-  append console=ttySTM0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext2 rootwait earlyprintk consoleblank=0 ignore_loglevel
+  kernel /boot/zImage
+  devicetree /boot/stm32f769-disco.dtb
+  append console=ttySTM0,115200 root=/dev/mmcblk0p1 rw rootfstype=ext2 rootwait earlyprintk consoleblank=0 ignore_loglevel
diff --git a/board/stmicroelectronics/stm32f769-disco/genimage.cfg b/board/stmicroelectronics/stm32f769-disco/genimage.cfg
index 41f9da512489..e911a94e46b5 100644
--- a/board/stmicroelectronics/stm32f769-disco/genimage.cfg
+++ b/board/stmicroelectronics/stm32f769-disco/genimage.cfg
@@ -1,24 +1,7 @@ 
-image boot.vfat {
-	vfat {
-		files = {
-			"zImage",
-			"stm32f769-disco.dtb",
-			"extlinux"
-		}
-	}
-
-	size = 16M
-}
-
 image sdcard.img {
 	hdimage {
 	}
 
-	partition u-boot {
-		partition-type = 0xC
-		image = "boot.vfat"
-	}
-
 	partition rootfs {
 		partition-type = 0x83
 		image = "rootfs.ext2"
diff --git a/board/stmicroelectronics/stm32f769-disco/post-build.sh b/board/stmicroelectronics/stm32f769-disco/post-build.sh
index c8cca3de8c9b..45100509411b 100755
--- a/board/stmicroelectronics/stm32f769-disco/post-build.sh
+++ b/board/stmicroelectronics/stm32f769-disco/post-build.sh
@@ -4,4 +4,4 @@  BOARD_DIR="$(dirname "$0")"
 # Kernel is built without devpts support
 sed -i '/^devpts/d' "${TARGET_DIR}"/etc/fstab
 
-install -m 0644 -D "${BOARD_DIR}"/extlinux.conf "${BINARIES_DIR}"/extlinux/extlinux.conf
+install -m 0644 -D "${BOARD_DIR}"/extlinux.conf "${TARGET_DIR}"/boot/extlinux/extlinux.conf
diff --git a/configs/stm32f769_disco_sd_defconfig b/configs/stm32f769_disco_sd_defconfig
index 2ec2687334c1..386a5d68e82a 100644
--- a/configs/stm32f769_disco_sd_defconfig
+++ b/configs/stm32f769_disco_sd_defconfig
@@ -15,6 +15,7 @@  BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
 BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f769-disco"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
 # BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
@@ -25,7 +26,5 @@  BR2_TARGET_UBOOT_CUSTOM_VERSION=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2024.07"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f769-disco"
 BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
-BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
-BR2_PACKAGE_HOST_MTOOLS=y
 BR2_PACKAGE_HOST_OPENOCD=y