diff mbox series

configs/orangepi_pc_defconfig: switch to extlinux

Message ID 20220217184209.16736-1-kuzminov.sergey81@gmail.com
State Superseded
Headers show
Series configs/orangepi_pc_defconfig: switch to extlinux | expand

Commit Message

Sergey Kuzminov Feb. 17, 2022, 6:42 p.m. UTC
Changes:
* Switch to common scenarios for multiple boards to create an SD image: board/orangepi/common.
* Exclude FAT partition, it is no longer needed for U-Boot.
* Switch SD image from MBR to GPT for partition-uuid to work.
* Switch to extlinux, this is convenient for debugging.

Signed-off-by: Sergey Kuzminov <kuzminov.sergey81@gmail.com>
---
 board/orangepi/orangepi-pc/boot.cmd     |  8 ------
 board/orangepi/orangepi-pc/genimage.cfg | 37 -------------------------
 configs/orangepi_pc_defconfig           |  9 ++----
 3 files changed, 3 insertions(+), 51 deletions(-)
 delete mode 100644 board/orangepi/orangepi-pc/boot.cmd
 delete mode 100644 board/orangepi/orangepi-pc/genimage.cfg

Comments

Giulio Benetti Feb. 17, 2022, 7:41 p.m. UTC | #1
Hi Sergey,

On 17/02/22 19:42, Sergey Kuzminov wrote:
> Changes:
> * Switch to common scenarios for multiple boards to create an SD image: board/orangepi/common.

^^^ * Switch to common orangepi scenario for multiple 
boards(board/orangepi/common) to create an SD image.

> * Exclude FAT partition, it is no longer needed for U-Boot.
> * Switch SD image from MBR to GPT for partition-uuid to work.
> * Switch to extlinux, this is convenient for debugging.
> 
> Signed-off-by: Sergey Kuzminov <kuzminov.sergey81@gmail.com>

Except that reword:
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Tested-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[Giulio: built only]

Best regards
diff mbox series

Patch

diff --git a/board/orangepi/orangepi-pc/boot.cmd b/board/orangepi/orangepi-pc/boot.cmd
deleted file mode 100644
index 9da625c803..0000000000
--- a/board/orangepi/orangepi-pc/boot.cmd
+++ /dev/null
@@ -1,8 +0,0 @@ 
-setenv fdt_high ffffffff
-
-setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
-
-fatload mmc 0 $kernel_addr_r zImage
-fatload mmc 0 $fdt_addr_r sun8i-h3-orangepi-pc.dtb
-
-bootz $kernel_addr_r - $fdt_addr_r
diff --git a/board/orangepi/orangepi-pc/genimage.cfg b/board/orangepi/orangepi-pc/genimage.cfg
deleted file mode 100644
index 14e326cc56..0000000000
--- a/board/orangepi/orangepi-pc/genimage.cfg
+++ /dev/null
@@ -1,37 +0,0 @@ 
-# Minimal SD card image for the OrangePi PC
-#
-image boot.vfat {
-	vfat {
-		files = {
-			"zImage",
-			"sun8i-h3-orangepi-pc.dtb",
-			"boot.scr"
-		}
-	}
-
-	size = 10M
-}
-
-image sdcard.img {
-	hdimage {
-	}
-
-	partition u-boot {
-		in-partition-table = "no"
-		image = "u-boot-sunxi-with-spl.bin"
-		offset = 8K
-		size = 1016K # 1MB - 8KB
-	}
-
-	partition boot {
-		partition-type = 0xC
-		bootable = "true"
-		image = "boot.vfat"
-	}
-
-	partition rootfs {
-		partition-type = 0x83
-		image = "rootfs.ext4"
-		size = 512M
-	}
-}
diff --git a/configs/orangepi_pc_defconfig b/configs/orangepi_pc_defconfig
index 44ea9b95c4..fd0f64e0e6 100644
--- a/configs/orangepi_pc_defconfig
+++ b/configs/orangepi_pc_defconfig
@@ -5,8 +5,9 @@  BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
 BR2_TARGET_GENERIC_HOSTNAME="OrangePi_PC"
 BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi PC"
 BR2_SYSTEM_DHCP="eth0"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/common/post-build.sh"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/orangepi/orangepi-pc/genimage.cfg"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c $(BINARIES_DIR)/genimage.cfg"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.10.9"
@@ -14,6 +15,7 @@  BR2_LINUX_KERNEL_DEFCONFIG="sunxi"
 BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/orangepi/orangepi-pc/linux.fragment"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-orangepi-pc"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
@@ -27,9 +29,4 @@  BR2_TARGET_UBOOT_NEEDS_PYTHON3=y
 BR2_TARGET_UBOOT_NEEDS_PYLIBFDT=y
 BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
 BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
-BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT_SOURCE="board/orangepi/orangepi-pc/boot.cmd"
-BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
-BR2_PACKAGE_HOST_MTOOLS=y
-BR2_PACKAGE_HOST_UBOOT_TOOLS=y