All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 00/15] Introduce a genimage infra
@ 2016-04-13 20:03 Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 01/15] fs: add " Ezequiel Garcia
                   ` (14 more replies)
  0 siblings, 15 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

As suggested by Arnout here's a series introducing
a genimage infra to remove all the duplicated genimage
incantation (they are all identical!).

BTW, it seems this topic was brought on the 2014 Developer
day at FOSDEM:

http://elinux.org/Buildroot:DeveloperDaysFOSDEM2014#Genimages

In addition to the infra stuff, I took the liberty of fixing all
the boards currently using genimage, but I've tested just a couple:
Minnowboard Max and Olimex A20 Olinuxino Micro.

Comments? Feedback?

Ezequiel Garcia (15):
  fs: add genimage infra
  board/minnowboard-max: Leverage the new genimage infra
  board/olimex_a20_olinuxino: Leverage the new genimage infra
  board/wandboard: Leverage the new genimage infra
  board/firefly: Leverage the new genimage infra
  board/cubieboard2: Leverage the new genimage infra
  board/arietta-g25: Leverage the new genimage infra
  board/imx6ulevk: Leverage the new genimage infra
  board/galileo: Leverage the new genimage infra
  board/pandaboard: Leverage the new genimage infra
  board/boundarydevices: Leverage the new genimage infra
  board/imx233_olinuxino: Leverage the new genimage infra
  board/orangepipc: Leverage the new genimage infra
  board/raspberry*: Leverage the new genimage infra
  board/via_imx6_vab820: Leverage the new genimage infra

 board/acmesystems/arietta-g25/post-image.sh      | 16 ----------
 board/boundarydevices/common/post-image.sh       | 16 ----------
 board/cubietech/cubieboard2/post-image.sh        | 16 ----------
 board/firefly/firefly-rk3288/post-build.sh       |  4 +++
 board/firefly/firefly-rk3288/post-image.sh       | 20 ------------
 board/freescale/imx6ulevk/post-image.sh          | 15 ---------
 board/intel/galileo/post-image.sh                | 13 --------
 board/minnowboard-max/genimage.cfg               | 34 +++++++++++++++++++++
 board/minnowboard-max/readme.txt                 | 39 ++++++++----------------
 board/olimex/a20_olinuxino/post-image.sh         | 16 ----------
 board/olimex/imx233_olinuxino/post-image.sh      | 14 ---------
 board/orangepi/orangepipc/post-build.sh          |  5 +++
 board/orangepi/orangepipc/post-image.sh          | 22 -------------
 board/pandaboard/post-image.sh                   | 16 ----------
 board/raspberrypi/post-build.sh                  |  8 +++++
 board/raspberrypi/post-image.sh                  | 22 -------------
 board/wandboard/post-image.sh                    | 16 ----------
 configs/acmesystems_arietta_g25_128mb_defconfig  |  4 +--
 configs/acmesystems_arietta_g25_256mb_defconfig  |  4 +--
 configs/cubieboard2_defconfig                    |  5 +--
 configs/firefly_rk3288_defconfig                 |  4 +--
 configs/firefly_rk3288_demo_defconfig            |  4 +--
 configs/freescale_imx6ulevk_defconfig            |  4 +--
 configs/galileo_defconfig                        |  4 +--
 configs/minnowboard_max_defconfig                |  8 +++++
 configs/nitrogen6sx_defconfig                    |  4 +--
 configs/nitrogen6x_defconfig                     |  4 +--
 configs/nitrogen7_defconfig                      |  4 +--
 configs/olimex_a20_olinuxino_lime2_defconfig     |  2 --
 configs/olimex_a20_olinuxino_lime_defconfig      |  4 +--
 configs/olimex_a20_olinuxino_lime_mali_defconfig |  4 +--
 configs/olimex_a20_olinuxino_micro_defconfig     |  4 +--
 configs/olimex_imx233_olinuxino_defconfig        |  3 +-
 configs/orangepipc_defconfig                     |  4 +--
 configs/pandaboard_defconfig                     |  4 +--
 configs/raspberrypi2_defconfig                   |  5 +--
 configs/raspberrypi_defconfig                    |  5 +--
 configs/via_imx6_vab820_defconfig                |  4 +--
 configs/wandboard_defconfig                      |  5 +--
 fs/Config.in                                     |  1 +
 fs/genimage/Config.in                            | 20 ++++++++++++
 fs/genimage/genimage.mk                          | 21 +++++++++++++
 42 files changed, 157 insertions(+), 270 deletions(-)
 delete mode 100755 board/acmesystems/arietta-g25/post-image.sh
 delete mode 100755 board/boundarydevices/common/post-image.sh
 delete mode 100755 board/cubietech/cubieboard2/post-image.sh
 delete mode 100755 board/firefly/firefly-rk3288/post-image.sh
 delete mode 100755 board/freescale/imx6ulevk/post-image.sh
 delete mode 100755 board/intel/galileo/post-image.sh
 create mode 100644 board/minnowboard-max/genimage.cfg
 delete mode 100755 board/olimex/a20_olinuxino/post-image.sh
 delete mode 100755 board/orangepi/orangepipc/post-image.sh
 delete mode 100755 board/pandaboard/post-image.sh
 create mode 100755 board/raspberrypi/post-build.sh
 delete mode 100755 board/raspberrypi/post-image.sh
 delete mode 100755 board/wandboard/post-image.sh
 create mode 100644 fs/genimage/Config.in
 create mode 100644 fs/genimage/genimage.mk

-- 
2.7.0

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:24   ` Thomas Petazzoni
  2016-04-13 21:32   ` Arnout Vandecappelle
  2016-04-13 20:03 ` [Buildroot] [PATCH 02/15] board/minnowboard-max: Leverage the new " Ezequiel Garcia
                   ` (13 subsequent siblings)
  14 siblings, 2 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Currently, all the boards using genimage are using the same
command incantation. Therefore, let's introduce a new filesystem
infra to factorize them and allow easier genimage setup.

This commit adds a new genimage infra, by calling genimage
with a user-provided config file. The user is still responsible
of enabling the apropriate rootfs filesystem images.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 fs/Config.in            |  1 +
 fs/genimage/Config.in   | 20 ++++++++++++++++++++
 fs/genimage/genimage.mk | 21 +++++++++++++++++++++
 3 files changed, 42 insertions(+)
 create mode 100644 fs/genimage/Config.in
 create mode 100644 fs/genimage/genimage.mk

diff --git a/fs/Config.in b/fs/Config.in
index 51ccf28169ef..94fe1446047f 100644
--- a/fs/Config.in
+++ b/fs/Config.in
@@ -5,6 +5,7 @@ source "fs/cloop/Config.in"
 source "fs/cpio/Config.in"
 source "fs/cramfs/Config.in"
 source "fs/ext2/Config.in"
+source "fs/genimage/Config.in"
 source "fs/initramfs/Config.in"
 source "fs/iso9660/Config.in"
 source "fs/jffs2/Config.in"
diff --git a/fs/genimage/Config.in b/fs/genimage/Config.in
new file mode 100644
index 000000000000..749494652464
--- /dev/null
+++ b/fs/genimage/Config.in
@@ -0,0 +1,20 @@
+config BR2_TARGET_ROOTFS_GENIMAGE
+	bool "full system image using genimage"
+	help
+	  Generate a full system image using the genimage tool
+	  and a user-provided configuration file. The image generated
+	  will contain a partition table and will be ready to be copied
+	  onto storage media, such as MMC, NAND or NOR devices.
+
+	  Keep in mind that you probably require to enable a rootfs
+	  filesystem image, according to the genimage config file that you
+	  provide.
+
+if BR2_TARGET_ROOTFS_GENIMAGE
+
+config BR2_TARGET_ROOTFS_GENIMAGE_CFG
+	string "genimage config file"
+	help
+	  Genimage user configuration file.
+
+endif # BR2_TARGET_ROOTFS_GENIMAGE
diff --git a/fs/genimage/genimage.mk b/fs/genimage/genimage.mk
new file mode 100644
index 000000000000..17c146b6b519
--- /dev/null
+++ b/fs/genimage/genimage.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# Generate a system image using genimage
+#
+################################################################################
+
+ROOTFS_GENIMAGE_DEPENDENCIES = host-genimage
+
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+define ROOTFS_GENIMAGE_CMD
+	$(RM) -rf ${GENIMAGE_TMP} &&		\
+	$(HOST_DIR)/usr/bin/genimage		\
+		--rootpath ${TARGET_DIR}	\
+		--tmppath ${GENIMAGE_TMP}	\
+		--inputpath ${BINARIES_DIR}	\
+		--outputpath ${BINARIES_DIR}	\
+		--config ${BR2_TARGET_ROOTFS_GENIMAGE_CFG}
+endef
+
+$(eval $(call ROOTFS_TARGET,genimage))
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 02/15] board/minnowboard-max: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 01/15] fs: add " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 03/15] board/olimex_a20_olinuxino: " Ezequiel Garcia
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/minnowboard-max/genimage.cfg | 34 +++++++++++++++++++++++++++++++++
 board/minnowboard-max/readme.txt   | 39 ++++++++++++--------------------------
 configs/minnowboard_max_defconfig  |  8 ++++++++
 3 files changed, 54 insertions(+), 27 deletions(-)
 create mode 100644 board/minnowboard-max/genimage.cfg

diff --git a/board/minnowboard-max/genimage.cfg b/board/minnowboard-max/genimage.cfg
new file mode 100644
index 000000000000..6cf787430752
--- /dev/null
+++ b/board/minnowboard-max/genimage.cfg
@@ -0,0 +1,34 @@
+# Create an image of the efi partition
+image efi-part.vfat {
+	vfat {
+		file startup.nsh {
+			image = "efi-part/startup.nsh"
+		}
+		file EFI {
+			image = "efi-part/EFI"
+		}
+		file bzImage {
+			image = "bzImage"
+		}
+	}
+	size=10M
+}
+
+# Create the sdcard image, pulling in
+#  * the image created by buildroot
+#  * the efi-partition created above
+image sdcard.img {
+	hdimage {
+	}
+
+	partition boot {
+		partition-type = 0xEF
+		image = "efi-part.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		size = 512M
+	}
+}
diff --git a/board/minnowboard-max/readme.txt b/board/minnowboard-max/readme.txt
index 5f52369b97d6..dfad2aba2123 100644
--- a/board/minnowboard-max/readme.txt
+++ b/board/minnowboard-max/readme.txt
@@ -1,40 +1,25 @@
-Prepare the SD card for the Minnow Board MAX
+How to get started with the Minnow Board MAX
 ============================================
 
- 1. Partition the SD card with a GPT partition table
+1. Build
 
-    sudo cgdisk /dev/mmcblk0
+  Apply the defconfig:
 
-    Create two partitions:
+  $ make minnowboard_max_defconfig
 
-     a) First partition of a few dozens of megabytes, which will be
-        used to store the bootloader and the kernel image. Type must
-        be EF00 (EFI partition).
+  Add any additional packages required and build:
 
-     b) Second partition of any size, which will be used to store the
-        root filesystem. Type must be 8300 (Linux filesystem)
+  $ make
 
- 2. Prepare the boot partition
+2. Write the SD card
 
-    We will format it, mount it, copy the EFI data generated by
-    Buildroot, and the kernel image.
+  The build process will create a SD card image in output/images.
+  Write the image to an mSD card, insert into the Minnowboard MAX
+  and power the board on.
 
-    sudo mkfs.vfat -F 32 -n boot /dev/mmcblk0p1
-    sudo mount /dev/mmcblk0p1 /mnt
-    sudo cp -a output/images/efi-part/* /mnt/
-    sudo cp output/images/bzImage /mnt/
-    sudo umount /mnt
+  $ dd if=output/images/sdcard.img of=/dev/mmcblk0; sync
 
- 3. Prepare the root partition
-
-    We will format it, mount it, and extract the root filesystem.
-
-    sudo mkfs.ext4 -L root /dev/mmcblk0p2
-    sudo mount /dev/mmcblk0p2 /mnt
-    sudo tar -C /mnt -xf output/images/rootfs.tar
-    sudo umount /mnt
-
- 4. Enjoy
+3. Enjoy
 
 Additional information about this board can be found at
 http://www.minnowboard.org/ or http://wiki.minnowboard.org/MinnowBoard_MAX
diff --git a/configs/minnowboard_max_defconfig b/configs/minnowboard_max_defconfig
index 98996db958ff..3d2fc041938c 100644
--- a/configs/minnowboard_max_defconfig
+++ b/configs/minnowboard_max_defconfig
@@ -8,6 +8,7 @@ BR2_ROOTFS_POST_BUILD_SCRIPT="board/minnowboard-max/post-build.sh"
 
 # Linux headers same as kernel, a 4.4 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
 
 # Needed for ethernet
 BR2_PACKAGE_LINUX_FIRMWARE=y
@@ -23,3 +24,10 @@ BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/minnowboard-max/linux.config"
 # Bootloader
 BR2_TARGET_GRUB2=y
 BR2_TARGET_GRUB2_X86_64_EFI=y
+
+# Filesystem image
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/minnowboard-max/genimage.cfg"
+# BR2_TARGET_ROOTFS_TAR is not set
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 03/15] board/olimex_a20_olinuxino: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 01/15] fs: add " Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 02/15] board/minnowboard-max: Leverage the new " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 04/15] board/wandboard: " Ezequiel Garcia
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/olimex/a20_olinuxino/post-image.sh         | 16 ----------------
 configs/olimex_a20_olinuxino_lime2_defconfig     |  2 --
 configs/olimex_a20_olinuxino_lime_defconfig      |  4 ++--
 configs/olimex_a20_olinuxino_lime_mali_defconfig |  4 ++--
 configs/olimex_a20_olinuxino_micro_defconfig     |  4 ++--
 5 files changed, 6 insertions(+), 24 deletions(-)
 delete mode 100755 board/olimex/a20_olinuxino/post-image.sh

diff --git a/board/olimex/a20_olinuxino/post-image.sh b/board/olimex/a20_olinuxino/post-image.sh
deleted file mode 100755
index 9cca1b1789ec..000000000000
--- a/board/olimex/a20_olinuxino/post-image.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-BOARD_DIR="$(dirname $0)"
-GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage                           \
-	--rootpath "${TARGET_DIR}"     \
-	--tmppath "${GENIMAGE_TMP}"    \
-	--inputpath "${BINARIES_DIR}"  \
-	--outputpath "${BINARIES_DIR}" \
-	--config "${GENIMAGE_CFG}"
-
-exit $?
diff --git a/configs/olimex_a20_olinuxino_lime2_defconfig b/configs/olimex_a20_olinuxino_lime2_defconfig
index 57dda72f295f..dfb41c9aa60e 100644
--- a/configs/olimex_a20_olinuxino_lime2_defconfig
+++ b/configs/olimex_a20_olinuxino_lime2_defconfig
@@ -7,7 +7,6 @@ BR2_TARGET_GENERIC_HOSTNAME="a20-olinuxino"
 BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!"
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a20_olinuxino/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/olimex/a20_olinuxino/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="board/olimex/a20_olinuxino/boot.cmd $(TARGET_DIR)/boot"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
@@ -28,5 +27,4 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2015.01"
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
diff --git a/configs/olimex_a20_olinuxino_lime_defconfig b/configs/olimex_a20_olinuxino_lime_defconfig
index bfa95c4e605e..8bb8c2c04bf3 100644
--- a/configs/olimex_a20_olinuxino_lime_defconfig
+++ b/configs/olimex_a20_olinuxino_lime_defconfig
@@ -12,7 +12,6 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!"
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a20_olinuxino/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/olimex/a20_olinuxino/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="board/olimex/a20_olinuxino/boot.cmd $(TARGET_DIR)/boot"
 
 # Kernel
@@ -28,6 +27,8 @@ BR2_LINUX_KERNEL_INSTALL_TARGET=y
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/olimex/a20_olinuxino/genimage.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
 
 # Bootloaders
@@ -41,5 +42,4 @@ BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
 
 # Additional tools
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
diff --git a/configs/olimex_a20_olinuxino_lime_mali_defconfig b/configs/olimex_a20_olinuxino_lime_mali_defconfig
index 42c8a7c39daa..50d87ea583c2 100644
--- a/configs/olimex_a20_olinuxino_lime_mali_defconfig
+++ b/configs/olimex_a20_olinuxino_lime_mali_defconfig
@@ -12,7 +12,6 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!"
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a20_olinuxino/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/olimex/a20_olinuxino/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="board/olimex/a20_olinuxino/boot-mali.cmd $(TARGET_DIR)/boot"
 
 # Kernel
@@ -33,6 +32,8 @@ BR2_PACKAGE_SUNXI_MALI_DBG=y
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/olimex/a20_olinuxino/genimage.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
 
 # Bootloaders
@@ -45,5 +46,4 @@ BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
 
 # Additional tools
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
diff --git a/configs/olimex_a20_olinuxino_micro_defconfig b/configs/olimex_a20_olinuxino_micro_defconfig
index 17fe6cf38816..9074ecc03020 100644
--- a/configs/olimex_a20_olinuxino_micro_defconfig
+++ b/configs/olimex_a20_olinuxino_micro_defconfig
@@ -12,7 +12,6 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to OLinuXino!"
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_SYSTEM_DHCP="eth0"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/olimex/a20_olinuxino/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/olimex/a20_olinuxino/post-image.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="board/olimex/a20_olinuxino/boot.cmd $(TARGET_DIR)/boot"
 
 # Kernel
@@ -27,6 +26,8 @@ BR2_LINUX_KERNEL_INSTALL_TARGET=y
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/olimex/a20_olinuxino/genimage.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
 
 # Bootloaders
@@ -39,5 +40,4 @@ BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
 
 # Additional tools
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 04/15] board/wandboard: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (2 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 03/15] board/olimex_a20_olinuxino: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:25   ` Thomas Petazzoni
  2016-04-13 20:03 ` [Buildroot] [PATCH 05/15] board/firefly: " Ezequiel Garcia
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/wandboard/post-image.sh | 16 ----------------
 configs/wandboard_defconfig   |  5 +++--
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100755 board/wandboard/post-image.sh

diff --git a/board/wandboard/post-image.sh b/board/wandboard/post-image.sh
deleted file mode 100755
index 95cbfa489705..000000000000
--- a/board/wandboard/post-image.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-
-GENIMAGE_CFG="board/wandboard/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage \
-  --rootpath "${TARGET_DIR}" \
-  --tmppath "${GENIMAGE_TMP}" \
-  --inputpath "${BINARIES_DIR}" \
-  --outputpath "${BINARIES_DIR}" \
-  --config "${GENIMAGE_CFG}"
-
-RET=${?}
-exit ${RET}
diff --git a/configs/wandboard_defconfig b/configs/wandboard_defconfig
index cf71eb2d689b..c76bef0d41a4 100644
--- a/configs/wandboard_defconfig
+++ b/configs/wandboard_defconfig
@@ -3,10 +3,11 @@ BR2_cortex_a9=y
 # Linux headers same as kernel, a 3.14 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
-BR2_PACKAGE_HOST_GENIMAGE=y
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/wandboard/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT=
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/wandboard/genimage.cfg"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_USE_DEFCONFIG=y
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 05/15] board/firefly: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (3 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 04/15] board/wandboard: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 06/15] board/cubieboard2: " Ezequiel Garcia
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/firefly/firefly-rk3288/post-build.sh |  4 ++++
 board/firefly/firefly-rk3288/post-image.sh | 20 --------------------
 configs/firefly_rk3288_defconfig           |  4 ++--
 configs/firefly_rk3288_demo_defconfig      |  4 ++--
 4 files changed, 8 insertions(+), 24 deletions(-)
 delete mode 100755 board/firefly/firefly-rk3288/post-image.sh

diff --git a/board/firefly/firefly-rk3288/post-build.sh b/board/firefly/firefly-rk3288/post-build.sh
index 94e89ce6a4a2..57b2c4604392 100755
--- a/board/firefly/firefly-rk3288/post-build.sh
+++ b/board/firefly/firefly-rk3288/post-build.sh
@@ -1,3 +1,7 @@
 BOARD_DIR="$(dirname $0)"
 
 install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf
+
+$HOST_DIR/usr/bin/mkimage -n rk3288 -T rksd	\
+	-d $BINARIES_DIR/u-boot-spl-dtb.bin	\
+	$BINARIES_DIR/u-boot-spl-dtb.img
diff --git a/board/firefly/firefly-rk3288/post-image.sh b/board/firefly/firefly-rk3288/post-image.sh
deleted file mode 100755
index 1dd30a6e7e8e..000000000000
--- a/board/firefly/firefly-rk3288/post-image.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-MKIMAGE=$HOST_DIR/usr/bin/mkimage
-
-BOARD_DIR="$(dirname $0)"
-GENIMAGE_CFG="${BOARD_DIR}/sd-image.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-$MKIMAGE -n rk3288 -T rksd -d $BINARIES_DIR/u-boot-spl-dtb.bin $BINARIES_DIR/u-boot-spl-dtb.img
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage							\
-	--rootpath "${TARGET_DIR}"		\
-	--tmppath "${GENIMAGE_TMP}"		\
-	--inputpath "${BINARIES_DIR}"	\
-	--outputpath "${BINARIES_DIR}"	\
-	--config "${GENIMAGE_CFG}"
-
-exit $?
diff --git a/configs/firefly_rk3288_defconfig b/configs/firefly_rk3288_defconfig
index 017a7ee6d748..5f33cceb0255 100644
--- a/configs/firefly_rk3288_defconfig
+++ b/configs/firefly_rk3288_defconfig
@@ -5,7 +5,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y
 BR2_TARGET_GENERIC_HOSTNAME="firefly-rk3288"
 BR2_TARGET_GENERIC_ISSUE="Welcome to FIREFLY RK3288!"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/firefly/firefly-rk3288/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/firefly/firefly-rk3288/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/mmind/linux-rockchip.git"
@@ -18,6 +17,8 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="rk3288-firefly"
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/firefly/firefly-rk3288/sd-image.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
@@ -28,5 +29,4 @@ BR2_TARGET_UBOOT_NEEDS_DTC=y
 BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl-dtb.bin"
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
diff --git a/configs/firefly_rk3288_demo_defconfig b/configs/firefly_rk3288_demo_defconfig
index 7dadc6bc9aeb..692455d5378c 100644
--- a/configs/firefly_rk3288_demo_defconfig
+++ b/configs/firefly_rk3288_demo_defconfig
@@ -7,7 +7,6 @@ BR2_TOOLCHAIN_BUILDROOT_CXX=y
 BR2_TARGET_GENERIC_HOSTNAME="firefly-rk3288"
 BR2_TARGET_GENERIC_ISSUE="Welcome to FIREFLY RK3288!"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/firefly/firefly-rk3288/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/firefly/firefly-rk3288/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/mmind/linux-rockchip.git"
@@ -26,6 +25,8 @@ BR2_PACKAGE_QT5BASE_EGLFS=y
 BR2_PACKAGE_MALI_T76X=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/firefly/firefly-rk3288/sd-image.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
@@ -36,5 +37,4 @@ BR2_TARGET_UBOOT_NEEDS_DTC=y
 BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl-dtb.bin"
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 06/15] board/cubieboard2: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (4 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 05/15] board/firefly: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 07/15] board/arietta-g25: " Ezequiel Garcia
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

While here, let's remove the tar'ed rootfs, which
is not used.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/cubietech/cubieboard2/post-image.sh | 16 ----------------
 configs/cubieboard2_defconfig             |  5 +++--
 2 files changed, 3 insertions(+), 18 deletions(-)
 delete mode 100755 board/cubietech/cubieboard2/post-image.sh

diff --git a/board/cubietech/cubieboard2/post-image.sh b/board/cubietech/cubieboard2/post-image.sh
deleted file mode 100755
index 9cca1b1789ec..000000000000
--- a/board/cubietech/cubieboard2/post-image.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-BOARD_DIR="$(dirname $0)"
-GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage                           \
-	--rootpath "${TARGET_DIR}"     \
-	--tmppath "${GENIMAGE_TMP}"    \
-	--inputpath "${BINARIES_DIR}"  \
-	--outputpath "${BINARIES_DIR}" \
-	--config "${GENIMAGE_CFG}"
-
-exit $?
diff --git a/configs/cubieboard2_defconfig b/configs/cubieboard2_defconfig
index a3b1b857ee6a..f98e7f3001ae 100644
--- a/configs/cubieboard2_defconfig
+++ b/configs/cubieboard2_defconfig
@@ -7,7 +7,6 @@ BR2_TARGET_GENERIC_HOSTNAME="Cubieboard2"
 BR2_TARGET_GENERIC_ISSUE="Welcome to Cubieboard2!"
 BR2_TARGET_GENERIC_GETTY_PORT="ttyS0"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/cubietech/cubieboard2/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/cubietech/cubieboard2/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.3.3"
@@ -16,6 +15,9 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-cubieboard2"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/cubietech/cubieboard2/genimage.cfg"
+# BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
@@ -25,6 +27,5 @@ BR2_TARGET_UBOOT_NEEDS_DTC=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 07/15] board/arietta-g25: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (5 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 06/15] board/cubieboard2: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 08/15] board/imx6ulevk: " Ezequiel Garcia
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/acmesystems/arietta-g25/post-image.sh     | 16 ----------------
 configs/acmesystems_arietta_g25_128mb_defconfig |  4 ++--
 configs/acmesystems_arietta_g25_256mb_defconfig |  4 ++--
 3 files changed, 4 insertions(+), 20 deletions(-)
 delete mode 100755 board/acmesystems/arietta-g25/post-image.sh

diff --git a/board/acmesystems/arietta-g25/post-image.sh b/board/acmesystems/arietta-g25/post-image.sh
deleted file mode 100755
index c82b189f9c89..000000000000
--- a/board/acmesystems/arietta-g25/post-image.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-BOARD_DIR="$(dirname $0)"
-GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage                               \
-	--rootpath "${TARGET_DIR}"     \
-	--tmppath "${GENIMAGE_TMP}"    \
-	--inputpath "${BINARIES_DIR}"  \
-	--outputpath "${BINARIES_DIR}" \
-	--config "${GENIMAGE_CFG}"
-
-exit $?
diff --git a/configs/acmesystems_arietta_g25_128mb_defconfig b/configs/acmesystems_arietta_g25_128mb_defconfig
index 061cb8bd99d5..1b5618373484 100644
--- a/configs/acmesystems_arietta_g25_128mb_defconfig
+++ b/configs/acmesystems_arietta_g25_128mb_defconfig
@@ -21,10 +21,10 @@ BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="cedbde4b36695b715f469f4872f47e5cc
 BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="arietta-128m"
 
 # Image
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/acmesystems/arietta-g25/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/acmesystems/arietta-g25/genimage.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_MTOOLS=y
diff --git a/configs/acmesystems_arietta_g25_256mb_defconfig b/configs/acmesystems_arietta_g25_256mb_defconfig
index 2d62837c2c32..954376c14757 100644
--- a/configs/acmesystems_arietta_g25_256mb_defconfig
+++ b/configs/acmesystems_arietta_g25_256mb_defconfig
@@ -21,10 +21,10 @@ BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION="cedbde4b36695b715f469f4872f47e5cc
 BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="arietta-256m"
 
 # Image
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/acmesystems/arietta-g25/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/acmesystems/arietta-g25/genimage.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_MTOOLS=y
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 08/15] board/imx6ulevk: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (6 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 07/15] board/arietta-g25: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 09/15] board/galileo: " Ezequiel Garcia
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/freescale/imx6ulevk/post-image.sh | 15 ---------------
 configs/freescale_imx6ulevk_defconfig   |  4 ++--
 2 files changed, 2 insertions(+), 17 deletions(-)
 delete mode 100755 board/freescale/imx6ulevk/post-image.sh

diff --git a/board/freescale/imx6ulevk/post-image.sh b/board/freescale/imx6ulevk/post-image.sh
deleted file mode 100755
index cb75a47de64d..000000000000
--- a/board/freescale/imx6ulevk/post-image.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-
-GENIMAGE_CFG="board/freescale/imx6ulevk/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage \
-  --rootpath "${TARGET_DIR}" \
-  --tmppath "${GENIMAGE_TMP}" \
-  --inputpath "${BINARIES_DIR}" \
-  --outputpath "${BINARIES_DIR}" \
-  --config "${GENIMAGE_CFG}"
-
-exit $?
diff --git a/configs/freescale_imx6ulevk_defconfig b/configs/freescale_imx6ulevk_defconfig
index b8a1f867b48b..55b3fa5e085d 100644
--- a/configs/freescale_imx6ulevk_defconfig
+++ b/configs/freescale_imx6ulevk_defconfig
@@ -27,9 +27,9 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y
 
 # required tools to create the microSD image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 
 # filesystem / image
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/imx6ulevk/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/freescale/imx6ulevk/genimage.cfg"
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 09/15] board/galileo: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (7 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 08/15] board/imx6ulevk: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 10/15] board/pandaboard: " Ezequiel Garcia
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/intel/galileo/post-image.sh | 13 -------------
 configs/galileo_defconfig         |  4 ++--
 2 files changed, 2 insertions(+), 15 deletions(-)
 delete mode 100755 board/intel/galileo/post-image.sh

diff --git a/board/intel/galileo/post-image.sh b/board/intel/galileo/post-image.sh
deleted file mode 100755
index f9aef0b1ba6c..000000000000
--- a/board/intel/galileo/post-image.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh -e
-
-GENIMAGE_CFG="board/intel/galileo/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage \
-    --rootpath "${TARGET_DIR}" \
-    --tmppath "${GENIMAGE_TMP}" \
-    --inputpath "${BINARIES_DIR}" \
-    --outputpath "${BINARIES_DIR}" \
-    --config "${GENIMAGE_CFG}"
diff --git a/configs/galileo_defconfig b/configs/galileo_defconfig
index 9334266b1e96..dde324cccd80 100644
--- a/configs/galileo_defconfig
+++ b/configs/galileo_defconfig
@@ -8,7 +8,6 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttyS1"
 BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
 BR2_ROOTFS_OVERLAY="board/intel/galileo/rootfs_overlay"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/intel/galileo/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/intel/galileo/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y
 BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/mdr78/Linux-x1000.git"
@@ -18,8 +17,9 @@ BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/intel/galileo/linux-3.8.config"
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/intel/galileo/genimage.cfg"
 BR2_TARGET_GRUB2=y
 BR2_TARGET_GRUB2_I386_EFI=y
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 10/15] board/pandaboard: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (8 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 09/15] board/galileo: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 11/15] board/boundarydevices: " Ezequiel Garcia
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/pandaboard/post-image.sh | 16 ----------------
 configs/pandaboard_defconfig   |  4 ++--
 2 files changed, 2 insertions(+), 18 deletions(-)
 delete mode 100755 board/pandaboard/post-image.sh

diff --git a/board/pandaboard/post-image.sh b/board/pandaboard/post-image.sh
deleted file mode 100755
index 9cca1b1789ec..000000000000
--- a/board/pandaboard/post-image.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-BOARD_DIR="$(dirname $0)"
-GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage                           \
-	--rootpath "${TARGET_DIR}"     \
-	--tmppath "${GENIMAGE_TMP}"    \
-	--inputpath "${BINARIES_DIR}"  \
-	--outputpath "${BINARIES_DIR}" \
-	--config "${GENIMAGE_CFG}"
-
-exit $?
diff --git a/configs/pandaboard_defconfig b/configs/pandaboard_defconfig
index 49747e070f71..50496d7da320 100644
--- a/configs/pandaboard_defconfig
+++ b/configs/pandaboard_defconfig
@@ -6,7 +6,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5=y
 BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttyO2"
 BR2_SYSTEM_DHCP="eth0"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/pandaboard/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.5"
@@ -16,6 +15,8 @@ BR2_LINUX_KERNEL_INTREE_DTS_NAME="omap4-panda-es omap4-panda omap4-panda-a4"
 BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/pandaboard/genimage.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
@@ -26,5 +27,4 @@ BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="MLO"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 11/15] board/boundarydevices: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (9 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 10/15] board/pandaboard: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 12/15] board/imx233_olinuxino: " Ezequiel Garcia
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/boundarydevices/common/post-image.sh | 16 ----------------
 configs/nitrogen6sx_defconfig              |  4 ++--
 configs/nitrogen6x_defconfig               |  4 ++--
 configs/nitrogen7_defconfig                |  4 ++--
 4 files changed, 6 insertions(+), 22 deletions(-)
 delete mode 100755 board/boundarydevices/common/post-image.sh

diff --git a/board/boundarydevices/common/post-image.sh b/board/boundarydevices/common/post-image.sh
deleted file mode 100755
index 9cca1b1789ec..000000000000
--- a/board/boundarydevices/common/post-image.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-BOARD_DIR="$(dirname $0)"
-GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage                           \
-	--rootpath "${TARGET_DIR}"     \
-	--tmppath "${GENIMAGE_TMP}"    \
-	--inputpath "${BINARIES_DIR}"  \
-	--outputpath "${BINARIES_DIR}" \
-	--config "${GENIMAGE_CFG}"
-
-exit $?
diff --git a/configs/nitrogen6sx_defconfig b/configs/nitrogen6sx_defconfig
index 9d2531769050..29a4ffdc27c6 100644
--- a/configs/nitrogen6sx_defconfig
+++ b/configs/nitrogen6sx_defconfig
@@ -6,13 +6,13 @@ BR2_cortex_a9=y
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/common/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
 
 # filesystem
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/boundarydevices/common/genimage.cfg"
 
 # Linux headers same as kernel, a 3.14 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14=y
diff --git a/configs/nitrogen6x_defconfig b/configs/nitrogen6x_defconfig
index 866b1f8ffc3a..1307d713bb68 100644
--- a/configs/nitrogen6x_defconfig
+++ b/configs/nitrogen6x_defconfig
@@ -6,13 +6,13 @@ BR2_cortex_a9=y
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/common/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
 
 # filesystem
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/boundarydevices/common/genimage.cfg"
 
 # Linux headers same as kernel, a 3.14 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14=y
diff --git a/configs/nitrogen7_defconfig b/configs/nitrogen7_defconfig
index 9d54d789fa11..0b1cd558ba48 100644
--- a/configs/nitrogen7_defconfig
+++ b/configs/nitrogen7_defconfig
@@ -6,14 +6,14 @@ BR2_cortex_a7=y
 BR2_TARGET_GENERIC_GETTY=y
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/common/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
 
 # filesystem
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/boundarydevices/common/genimage.cfg"
 
 # Linux headers same as kernel, a 3.14 series
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_14=y
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 12/15] board/imx233_olinuxino: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (10 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 11/15] board/boundarydevices: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 13/15] board/orangepipc: " Ezequiel Garcia
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/olimex/imx233_olinuxino/post-image.sh | 14 --------------
 configs/olimex_imx233_olinuxino_defconfig   |  3 ++-
 2 files changed, 2 insertions(+), 15 deletions(-)

diff --git a/board/olimex/imx233_olinuxino/post-image.sh b/board/olimex/imx233_olinuxino/post-image.sh
index 703cbe7ee2f7..d12854938f65 100755
--- a/board/olimex/imx233_olinuxino/post-image.sh
+++ b/board/olimex/imx233_olinuxino/post-image.sh
@@ -1,20 +1,6 @@
 #!/bin/sh
 
-BOARD_DIR="$(dirname $0)"
-BOARD_NAME="$(basename ${BOARD_DIR})"
-GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
 # Create symlink to "rename" kernel image
 ln -sf uImage.imx23-olinuxino ${BINARIES_DIR}/uImage
 
-rm -rf "${GENIMAGE_TMP}"
-
-genimage                           \
-	--rootpath "${TARGET_DIR}"     \
-	--tmppath "${GENIMAGE_TMP}"    \
-	--inputpath "${BINARIES_DIR}"  \
-	--outputpath "${BINARIES_DIR}" \
-	--config "${GENIMAGE_CFG}"
-
 exit $?
diff --git a/configs/olimex_imx233_olinuxino_defconfig b/configs/olimex_imx233_olinuxino_defconfig
index f74f42222ac5..aa81fa995f55 100644
--- a/configs/olimex_imx233_olinuxino_defconfig
+++ b/configs/olimex_imx233_olinuxino_defconfig
@@ -30,6 +30,8 @@ BR2_PACKAGE_ZD1211_FIRMWARE=y
 
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/olimex/imx233_olinuxino/post-image.sh"
 # BR2_TARGET_ROOTFS_TAR is not set
 
 # U-Boot
@@ -42,7 +44,6 @@ BR2_TARGET_UBOOT_FORMAT_SD=y
  
 # To generate SD Image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/olimex/imx233_olinuxino/post-image.sh"
 
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 13/15] board/orangepipc: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (11 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 12/15] board/imx233_olinuxino: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 14/15] board/raspberry*: " Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 15/15] board/via_imx6_vab820: " Ezequiel Garcia
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/orangepi/orangepipc/post-build.sh |  5 +++++
 board/orangepi/orangepipc/post-image.sh | 22 ----------------------
 configs/orangepipc_defconfig            |  4 ++--
 3 files changed, 7 insertions(+), 24 deletions(-)
 delete mode 100755 board/orangepi/orangepipc/post-image.sh

diff --git a/board/orangepi/orangepipc/post-build.sh b/board/orangepi/orangepipc/post-build.sh
index ca7a99f220cc..3482d5796e5a 100755
--- a/board/orangepi/orangepipc/post-build.sh
+++ b/board/orangepi/orangepipc/post-build.sh
@@ -9,3 +9,8 @@ BOOT_CMD_H=$BINARIES_DIR/boot.scr
 
 # U-Boot script
 $MKIMAGE -C none -A arm -T script -d $BOOT_CMD $BOOT_CMD_H
+
+# As we now use the Linux v4.5-RC1 kernel no orangepi-pc dtb exists yet.
+# However the orangepi-plus dtb has not much content, only mmc0 and uart
+# which are equal to the pc version of the board, so we use it here.
+mv ${BINARIES_DIR}/sun8i-h3-orangepi-plus.dtb ${BINARIES_DIR}/sun8i-h3-orangepi-pc.dtb
diff --git a/board/orangepi/orangepipc/post-image.sh b/board/orangepi/orangepipc/post-image.sh
deleted file mode 100755
index dbe1516696bd..000000000000
--- a/board/orangepi/orangepipc/post-image.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-BOARD_DIR="$(dirname $0)"
-GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-rm -rf "${GENIMAGE_TMP}"
-
-# As we now use the Linux v4.5-RC1 kernel no orangepi-pc dtb exists yet.
-# However the orangepi-plus dtb has not much content, only mmc0 and uart
-# which are equal to the pc version of the board, so we use it here.
-mv ${BINARIES_DIR}/sun8i-h3-orangepi-plus.dtb ${BINARIES_DIR}/sun8i-h3-orangepi-pc.dtb
-
-
-genimage                               \
-	--rootpath "${TARGET_DIR}"     \
-	--tmppath "${GENIMAGE_TMP}"    \
-	--inputpath "${BINARIES_DIR}"  \
-	--outputpath "${BINARIES_DIR}" \
-	--config "${GENIMAGE_CFG}"
-
-exit $?
diff --git a/configs/orangepipc_defconfig b/configs/orangepipc_defconfig
index cb04d744892c..42485c6431ec 100644
--- a/configs/orangepipc_defconfig
+++ b/configs/orangepipc_defconfig
@@ -5,7 +5,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5=y
 BR2_TARGET_GENERIC_HOSTNAME="OrangePi_PC"
 BR2_TARGET_GENERIC_ISSUE="Welcome to Buildroot for the Orange Pi PC"
 BR2_ROOTFS_POST_BUILD_SCRIPT="board/orangepi/orangepipc/post-build.sh"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/orangepi/orangepipc/post-image.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.5"
@@ -14,6 +13,8 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun8i-h3-orangepi-plus"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/orangepi/orangepipc/genimage.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
@@ -24,6 +25,5 @@ BR2_TARGET_UBOOT_NEEDS_DTC=y
 BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
 BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot-sunxi-with-spl.bin"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 BR2_PACKAGE_HOST_UBOOT_TOOLS=y
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 14/15] board/raspberry*: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (12 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 13/15] board/orangepipc: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  2016-04-13 20:03 ` [Buildroot] [PATCH 15/15] board/via_imx6_vab820: " Ezequiel Garcia
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 board/raspberrypi/post-build.sh |  8 ++++++++
 board/raspberrypi/post-image.sh | 22 ----------------------
 configs/raspberrypi2_defconfig  |  5 +++--
 configs/raspberrypi_defconfig   |  5 +++--
 4 files changed, 14 insertions(+), 26 deletions(-)
 create mode 100755 board/raspberrypi/post-build.sh
 delete mode 100755 board/raspberrypi/post-image.sh

diff --git a/board/raspberrypi/post-build.sh b/board/raspberrypi/post-build.sh
new file mode 100755
index 000000000000..8b66536d84c6
--- /dev/null
+++ b/board/raspberrypi/post-build.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Mark the kernel as DT-enabled
+mkdir -p "${BINARIES_DIR}/kernel-marked"
+${HOST_DIR}/usr/bin/mkknlimg "${BINARIES_DIR}/zImage" \
+	"${BINARIES_DIR}/kernel-marked/zImage"
+
+exit $?
diff --git a/board/raspberrypi/post-image.sh b/board/raspberrypi/post-image.sh
deleted file mode 100755
index 73ffd658e7ca..000000000000
--- a/board/raspberrypi/post-image.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-BOARD_DIR="$(dirname $0)"
-BOARD_NAME="$(basename ${BOARD_DIR})"
-GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg"
-GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
-
-# Mark the kernel as DT-enabled
-mkdir -p "${BINARIES_DIR}/kernel-marked"
-${HOST_DIR}/usr/bin/mkknlimg "${BINARIES_DIR}/zImage" \
-	"${BINARIES_DIR}/kernel-marked/zImage"
-
-rm -rf "${GENIMAGE_TMP}"
-
-genimage                           \
-	--rootpath "${TARGET_DIR}"     \
-	--tmppath "${GENIMAGE_TMP}"    \
-	--inputpath "${BINARIES_DIR}"  \
-	--outputpath "${BINARIES_DIR}" \
-	--config "${GENIMAGE_CFG}"
-
-exit $?
diff --git a/configs/raspberrypi2_defconfig b/configs/raspberrypi2_defconfig
index 1d82f6041742..fed926869cc9 100644
--- a/configs/raspberrypi2_defconfig
+++ b/configs/raspberrypi2_defconfig
@@ -25,11 +25,12 @@ BR2_PACKAGE_RPI_FIRMWARE=y
 
 # Required tools to create the SD image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 
 # Filesystem / image
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/raspberrypi2/genimage-raspberrypi2.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi2/post-image.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi2/post-build.sh"
diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig
index 615c052bdd26..10cb812a3371 100644
--- a/configs/raspberrypi_defconfig
+++ b/configs/raspberrypi_defconfig
@@ -24,11 +24,12 @@ BR2_PACKAGE_RPI_FIRMWARE=y
 
 # Required tools to create the SD image
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
 
 # Filesystem / image
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/raspberrypi/genimage-raspberrypi.cfg"
 # BR2_TARGET_ROOTFS_TAR is not set
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/raspberrypi/post-image.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/raspberrypi/post-build.sh"
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 15/15] board/via_imx6_vab820: Leverage the new genimage infra
  2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
                   ` (13 preceding siblings ...)
  2016-04-13 20:03 ` [Buildroot] [PATCH 14/15] board/raspberry*: " Ezequiel Garcia
@ 2016-04-13 20:03 ` Ezequiel Garcia
  14 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 20:03 UTC (permalink / raw)
  To: buildroot

Let's rework the board and config files to use the
recently added genimage infra, which generates the
SD card image directly.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
 configs/via_imx6_vab820_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/configs/via_imx6_vab820_defconfig b/configs/via_imx6_vab820_defconfig
index a86c5139db04..d66ef6e8600f 100644
--- a/configs/via_imx6_vab820_defconfig
+++ b/configs/via_imx6_vab820_defconfig
@@ -28,7 +28,7 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y
 # Filesystem
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_GENIMAGE=y
+BR2_TARGET_ROOTFS_GENIMAGE_CFG="board/via/imx6_vab820/genimage.cfg"
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
-BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/via/imx6_vab820/post-image.sh"
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-13 20:03 ` [Buildroot] [PATCH 01/15] fs: add " Ezequiel Garcia
@ 2016-04-13 20:24   ` Thomas Petazzoni
  2016-04-13 21:32   ` Arnout Vandecappelle
  1 sibling, 0 replies; 30+ messages in thread
From: Thomas Petazzoni @ 2016-04-13 20:24 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 13 Apr 2016 17:03:26 -0300, Ezequiel Garcia wrote:

> diff --git a/fs/genimage/genimage.mk b/fs/genimage/genimage.mk
> new file mode 100644
> index 000000000000..17c146b6b519
> --- /dev/null
> +++ b/fs/genimage/genimage.mk
> @@ -0,0 +1,21 @@
> +################################################################################
> +#
> +# Generate a system image using genimage
> +#
> +################################################################################
> +
> +ROOTFS_GENIMAGE_DEPENDENCIES = host-genimage
> +
> +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
> +
> +define ROOTFS_GENIMAGE_CMD
> +	$(RM) -rf ${GENIMAGE_TMP} &&		\
> +	$(HOST_DIR)/usr/bin/genimage		\
> +		--rootpath ${TARGET_DIR}	\
> +		--tmppath ${GENIMAGE_TMP}	\
> +		--inputpath ${BINARIES_DIR}	\
> +		--outputpath ${BINARIES_DIR}	\
> +		--config ${BR2_TARGET_ROOTFS_GENIMAGE_CFG}
> +endef
> +
> +$(eval $(call ROOTFS_TARGET,genimage))

A genimage.cfg file typically references some filesystem images like
ext2/3/4 images. But I don't see anything in your implementation that
ensures that the filesystem images that are used by the genimage.cfg
file are produced *before* the genimage image is created. Am I missing
something ?

Also, I think the infra should probably handle the dosfstools/mtools
dependency that we need for many platforms to build a small FAT
filesystem. So maybe a sub-option like
BR2_TARGET_ROOTFS_GENIMAGE_BUILDS_FATFS or something like that, that
would just select the appropriate packages.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 04/15] board/wandboard: Leverage the new genimage infra
  2016-04-13 20:03 ` [Buildroot] [PATCH 04/15] board/wandboard: " Ezequiel Garcia
@ 2016-04-13 20:25   ` Thomas Petazzoni
  2016-04-13 22:02     ` Ezequiel Garcia
  0 siblings, 1 reply; 30+ messages in thread
From: Thomas Petazzoni @ 2016-04-13 20:25 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 13 Apr 2016 17:03:29 -0300, Ezequiel Garcia wrote:

> -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/wandboard/post-image.sh"
> +BR2_ROOTFS_POST_IMAGE_SCRIPT=

Not good :)

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-13 20:03 ` [Buildroot] [PATCH 01/15] fs: add " Ezequiel Garcia
  2016-04-13 20:24   ` Thomas Petazzoni
@ 2016-04-13 21:32   ` Arnout Vandecappelle
  2016-04-13 21:41     ` Thomas Petazzoni
  2016-04-13 21:45     ` Thomas Petazzoni
  1 sibling, 2 replies; 30+ messages in thread
From: Arnout Vandecappelle @ 2016-04-13 21:32 UTC (permalink / raw)
  To: buildroot

On 04/13/16 22:03, Ezequiel Garcia wrote:
> Currently, all the boards using genimage are using the same
> command incantation. Therefore, let's introduce a new filesystem
> infra to factorize them and allow easier genimage setup.
>
> This commit adds a new genimage infra, by calling genimage
> with a user-provided config file. The user is still responsible
> of enabling the apropriate rootfs filesystem images.

  And for enabling dosfstools/mtools (as observed by Thomas).

>
> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
> ---
>   fs/Config.in            |  1 +
>   fs/genimage/Config.in   | 20 ++++++++++++++++++++
>   fs/genimage/genimage.mk | 21 +++++++++++++++++++++
>   3 files changed, 42 insertions(+)
>   create mode 100644 fs/genimage/Config.in
>   create mode 100644 fs/genimage/genimage.mk
>
> diff --git a/fs/Config.in b/fs/Config.in
> index 51ccf28169ef..94fe1446047f 100644
> --- a/fs/Config.in
> +++ b/fs/Config.in
> @@ -5,6 +5,7 @@ source "fs/cloop/Config.in"
>   source "fs/cpio/Config.in"
>   source "fs/cramfs/Config.in"
>   source "fs/ext2/Config.in"
> +source "fs/genimage/Config.in"

  I think this shouldn't be done alphabetically, but really at the end.

>   source "fs/initramfs/Config.in"
>   source "fs/iso9660/Config.in"
>   source "fs/jffs2/Config.in"
> diff --git a/fs/genimage/Config.in b/fs/genimage/Config.in
> new file mode 100644
> index 000000000000..749494652464
> --- /dev/null
> +++ b/fs/genimage/Config.in
> @@ -0,0 +1,20 @@
> +config BR2_TARGET_ROOTFS_GENIMAGE
> +	bool "full system image using genimage"
> +	help
> +	  Generate a full system image using the genimage tool
> +	  and a user-provided configuration file. The image generated
> +	  will contain a partition table and will be ready to be copied
> +	  onto storage media, such as MMC, NAND or NOR devices.
> +
> +	  Keep in mind that you probably require to enable a rootfs
> +	  filesystem image, according to the genimage config file that you
> +	  provide.

  And to select mtools/dosfstools. Thomas proposed to add an option for that. 
For me, either an explicit genimage option or just adding the help text for it 
is OK.

> +
> +if BR2_TARGET_ROOTFS_GENIMAGE
> +
> +config BR2_TARGET_ROOTFS_GENIMAGE_CFG
> +	string "genimage config file"
> +	help
> +	  Genimage user configuration file.
> +
> +endif # BR2_TARGET_ROOTFS_GENIMAGE
> diff --git a/fs/genimage/genimage.mk b/fs/genimage/genimage.mk
> new file mode 100644
> index 000000000000..17c146b6b519
> --- /dev/null
> +++ b/fs/genimage/genimage.mk
> @@ -0,0 +1,21 @@
> +################################################################################
> +#
> +# Generate a system image using genimage
> +#
> +################################################################################
> +
> +ROOTFS_GENIMAGE_DEPENDENCIES = host-genimage
> +
> +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"

  Variable name should be ROOTFS_GENIMAGE_TMP

> +
> +define ROOTFS_GENIMAGE_CMD
> +	$(RM) -rf ${GENIMAGE_TMP} &&		\

  && is not needed, treat it as two separate commands.
  -f is not needed, it is already in $(RM).
  All variables should use $(), not ${} (below as well).

> +	$(HOST_DIR)/usr/bin/genimage		\

  We don't generally align \ (annoying whitespace changes when you add a line).

> +		--rootpath ${TARGET_DIR}	\
> +		--tmppath ${GENIMAGE_TMP}	\
> +		--inputpath ${BINARIES_DIR}	\
> +		--outputpath ${BINARIES_DIR}	\
> +		--config ${BR2_TARGET_ROOTFS_GENIMAGE_CFG}
> +endef
> +
> +$(eval $(call ROOTFS_TARGET,genimage))

  I think that, like for initramfs, the infra has little to offer here. And it 
is in fact in the way, because (as observed by Thomas) you'll want to add

rootfs-genimage: $(TARGETS_ROOTFS)

which leads to a circular dependency.

  So to make sure that it happens in the right order, I think you need something 
like:

rootfs-genimage: $(TARGETS_ROOTFS) $(ROOTFS_GENIMAGE_DEPENDENCIES)
	$(RM) -r $(ROOTFS_GENIMAGE_TMP)
	$(HOST_DIR)/usr/bin/genimage \
		...

ifeq ($(BR2_TARGET_ROOTFS_GENIMAGE),y)

target-post-image: rootfs-genimage

# Make sure the genimage dependencies appear in graph-depends
show-targets:
	@echo $(ROOTFS_GENIMAGE_DEPENDENCIES)

ifeq ($(wildcard $(BR2_TARGET_ROOTFS_GENIMAGE_CFG),))
$(error $(BR2_TARGET_ROOTFS_GENIMAGE_CFG) does not exist)

endif




  However, I'm afraid that we're moving a bit too fast after all. There are 
several open issues still:

- Do post-image scripts come before or after genimage?
- What with the dosfstools/mtools dependency?
- Should we support genimage.cfg files that are generated from a post-image script?
- Should we support several genimage.cfg files, producing several images (e.g. a 
NAND and a SD image)?

  So, the current approach works well for the bundled defconfigs, but for real 
use cases I think it's a bit too limited to be practical after all.

  Therefore, at least as a first step, I guess it's better to just move the 
script to a common place, e.g. to package/genimage/post-image.sh. Let it take a 
single argument for the genimage.cfg file, and add some documentation to the manual.


  Regards,
  Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-13 21:32   ` Arnout Vandecappelle
@ 2016-04-13 21:41     ` Thomas Petazzoni
  2016-04-14  8:33       ` Peter Korsgaard
  2016-04-13 21:45     ` Thomas Petazzoni
  1 sibling, 1 reply; 30+ messages in thread
From: Thomas Petazzoni @ 2016-04-13 21:41 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 13 Apr 2016 23:32:22 +0200, Arnout Vandecappelle wrote:

>   I think that, like for initramfs, the infra has little to offer here. And it 
> is in fact in the way, because (as observed by Thomas) you'll want to add
> 
> rootfs-genimage: $(TARGETS_ROOTFS)
> 
> which leads to a circular dependency.
> 
>   So to make sure that it happens in the right order, I think you need something 
> like:
> 
> rootfs-genimage: $(TARGETS_ROOTFS) $(ROOTFS_GENIMAGE_DEPENDENCIES)
> 	$(RM) -r $(ROOTFS_GENIMAGE_TMP)
> 	$(HOST_DIR)/usr/bin/genimage \
> 		...
> 
> ifeq ($(BR2_TARGET_ROOTFS_GENIMAGE),y)
> 
> target-post-image: rootfs-genimage
> 
> # Make sure the genimage dependencies appear in graph-depends
> show-targets:
> 	@echo $(ROOTFS_GENIMAGE_DEPENDENCIES)

But then is it really something that belongs to fs/ ? It really isn't a
filesystem.

>   However, I'm afraid that we're moving a bit too fast after all. There are 
> several open issues still:
> 
> - Do post-image scripts come before or after genimage?
> - What with the dosfstools/mtools dependency?
> - Should we support genimage.cfg files that are generated from a post-image script?
> - Should we support several genimage.cfg files, producing several images (e.g. a 
> NAND and a SD image)?
> 
>   So, the current approach works well for the bundled defconfigs, but for real 
> use cases I think it's a bit too limited to be practical after all.

Do we need to support all real use cases? I think we should support the
common use cases, and the more complicated use cases can be handled via
a special post-image script. That's really the general philosophy of
Buildroot IMO: handle the most common cases nicely, and leave enough
extension scripts/hooks to allow people to plug their scripts to handle
the more complicated/specific cases.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-13 21:32   ` Arnout Vandecappelle
  2016-04-13 21:41     ` Thomas Petazzoni
@ 2016-04-13 21:45     ` Thomas Petazzoni
  2016-04-13 22:01       ` Ezequiel Garcia
  2016-04-14 21:16       ` Peter Korsgaard
  1 sibling, 2 replies; 30+ messages in thread
From: Thomas Petazzoni @ 2016-04-13 21:45 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 13 Apr 2016 23:32:22 +0200, Arnout Vandecappelle wrote:

>   Therefore, at least as a first step, I guess it's better to just move the 
> script to a common place, e.g. to package/genimage/post-image.sh. Let it take a 
> single argument for the genimage.cfg file, and add some documentation to the manual.

As an after-thought, this seems like a good idea. This is really a very
simple and minimal change, and is easy to do.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-13 21:45     ` Thomas Petazzoni
@ 2016-04-13 22:01       ` Ezequiel Garcia
  2016-04-14 21:16       ` Peter Korsgaard
  1 sibling, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 22:01 UTC (permalink / raw)
  To: buildroot

On 13 April 2016 at 18:45, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Wed, 13 Apr 2016 23:32:22 +0200, Arnout Vandecappelle wrote:
>
>>   Therefore, at least as a first step, I guess it's better to just move the
>> script to a common place, e.g. to package/genimage/post-image.sh. Let it take a
>> single argument for the genimage.cfg file, and add some documentation to the manual.
>
> As an after-thought, this seems like a good idea. This is really a very
> simple and minimal change, and is easy to do.
>

I realize this is a simple step forward, but I'm wondering if we can
sort out the open
questions around a proper genimage infra, and just go for the big
solution instead.
-- 
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 04/15] board/wandboard: Leverage the new genimage infra
  2016-04-13 20:25   ` Thomas Petazzoni
@ 2016-04-13 22:02     ` Ezequiel Garcia
  0 siblings, 0 replies; 30+ messages in thread
From: Ezequiel Garcia @ 2016-04-13 22:02 UTC (permalink / raw)
  To: buildroot

On 13 April 2016 at 17:25, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Wed, 13 Apr 2016 17:03:29 -0300, Ezequiel Garcia wrote:
>
>> -BR2_ROOTFS_POST_IMAGE_SCRIPT="board/wandboard/post-image.sh"
>> +BR2_ROOTFS_POST_IMAGE_SCRIPT=
>
> Not good :)
>

Ouch, bad commit fixup.
-- 
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-13 21:41     ` Thomas Petazzoni
@ 2016-04-14  8:33       ` Peter Korsgaard
  2016-04-14 21:31         ` Arnout Vandecappelle
  0 siblings, 1 reply; 30+ messages in thread
From: Peter Korsgaard @ 2016-04-14  8:33 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

>> # Make sure the genimage dependencies appear in graph-depends
 >> show-targets:
 >> @echo $(ROOTFS_GENIMAGE_DEPENDENCIES)

 > But then is it really something that belongs to fs/ ? It really isn't a
 > filesystem.

No, it is closer to the post-image script. Where do you suggest to move
it? system/?


 >> However, I'm afraid that we're moving a bit too fast after all. There are 
 >> several open issues still:
 >> 
 >> - Do post-image scripts come before or after genimage?
 >> - What with the dosfstools/mtools dependency?
 >> - Should we support genimage.cfg files that are generated from a post-image script?
 >> - Should we support several genimage.cfg files, producing several images (e.g. a 
 >> NAND and a SD image)?
 >> 
 >> So, the current approach works well for the bundled defconfigs, but for real 
 >> use cases I think it's a bit too limited to be practical after all.

 > Do we need to support all real use cases? I think we should support the
 > common use cases, and the more complicated use cases can be handled via
 > a special post-image script. That's really the general philosophy of
 > Buildroot IMO: handle the most common cases nicely, and leave enough
 > extension scripts/hooks to allow people to plug their scripts to handle
 > the more complicated/specific cases.

Agreed, but it is good to think about the questions Arnout listed to
think about what is really the common use case.

The definition of the post-image script was to run something at the very
end, so I think we should do genimage before post-image (even though I
could imagine use cases for the opposite as well).

For the dosfstools/mtools dependencies I think a simple sub option
pulling them in is most sensible.

Supporting multiple genimage.cfg files (like we do for device_tables /
post-build / post-image, ..) IMHO makes sense and looks simple to do.

-- 
Venlig hilsen,
Peter Korsgaard 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-13 21:45     ` Thomas Petazzoni
  2016-04-13 22:01       ` Ezequiel Garcia
@ 2016-04-14 21:16       ` Peter Korsgaard
  2016-04-14 21:28         ` Arnout Vandecappelle
  1 sibling, 1 reply; 30+ messages in thread
From: Peter Korsgaard @ 2016-04-14 21:16 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > On Wed, 13 Apr 2016 23:32:22 +0200, Arnout Vandecappelle wrote:

 >> Therefore, at least as a first step, I guess it's better to just move the 
 >> script to a common place, e.g. to package/genimage/post-image.sh. Let it take a 
 >> single argument for the genimage.cfg file, and add some documentation to the manual.

 > As an after-thought, this seems like a good idea. This is really a very
 > simple and minimal change, and is easy to do.

The only complication is that you cannot directly pass arguments to
post-image scripts, you have to use BR2_ROOTFS_POST_SCRIPT_ARGS (and it
gets used for all scripts).

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-14 21:16       ` Peter Korsgaard
@ 2016-04-14 21:28         ` Arnout Vandecappelle
  0 siblings, 0 replies; 30+ messages in thread
From: Arnout Vandecappelle @ 2016-04-14 21:28 UTC (permalink / raw)
  To: buildroot

On 04/14/16 23:16, Peter Korsgaard wrote:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
>
>   > Hello,
>   > On Wed, 13 Apr 2016 23:32:22 +0200, Arnout Vandecappelle wrote:
>
>   >> Therefore, at least as a first step, I guess it's better to just move the
>   >> script to a common place, e.g. to package/genimage/post-image.sh. Let it take a
>   >> single argument for the genimage.cfg file, and add some documentation to the manual.
>
>   > As an after-thought, this seems like a good idea. This is really a very
>   > simple and minimal change, and is easy to do.
>
> The only complication is that you cannot directly pass arguments to
> post-image scripts, you have to use BR2_ROOTFS_POST_SCRIPT_ARGS (and it
> gets used for all scripts).

  I really don't think that this is a limitation. Especially if you don't pass 
the file, but the directory as the argument; that would be potentially useful 
for other post-image scripts as well.

  So I tend to prefer the simple common-script-in-package/genimage solution.


  That said, if Ezequiel posts a patch that takes into account all my concerns, 
I'll be happy to Ack it.

  Regards,
  Arnout
-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-14  8:33       ` Peter Korsgaard
@ 2016-04-14 21:31         ` Arnout Vandecappelle
  2016-04-14 21:37           ` Peter Korsgaard
  0 siblings, 1 reply; 30+ messages in thread
From: Arnout Vandecappelle @ 2016-04-14 21:31 UTC (permalink / raw)
  To: buildroot

On 04/14/16 10:33, Peter Korsgaard wrote:
>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
>
> Hi,
>
>>> # Make sure the genimage dependencies appear in graph-depends
>   >> show-targets:
>   >> @echo $(ROOTFS_GENIMAGE_DEPENDENCIES)
>
>   > But then is it really something that belongs to fs/ ? It really isn't a
>   > filesystem.
>
> No, it is closer to the post-image script. Where do you suggest to move
> it? system/?
>
>
>   >> However, I'm afraid that we're moving a bit too fast after all. There are
>   >> several open issues still:
>   >>
>   >> - Do post-image scripts come before or after genimage?
>   >> - What with the dosfstools/mtools dependency?
>   >> - Should we support genimage.cfg files that are generated from a post-image script?
>   >> - Should we support several genimage.cfg files, producing several images (e.g. a
>   >> NAND and a SD image)?
>   >>
>   >> So, the current approach works well for the bundled defconfigs, but for real
>   >> use cases I think it's a bit too limited to be practical after all.
>
>   > Do we need to support all real use cases? I think we should support the
>   > common use cases, and the more complicated use cases can be handled via
>   > a special post-image script. That's really the general philosophy of
>   > Buildroot IMO: handle the most common cases nicely, and leave enough
>   > extension scripts/hooks to allow people to plug their scripts to handle
>   > the more complicated/specific cases.
>
> Agreed, but it is good to think about the questions Arnout listed to
> think about what is really the common use case.
>
> The definition of the post-image script was to run something at the very
> end, so I think we should do genimage before post-image (even though I
> could imagine use cases for the opposite as well).

  Yes, so eventually we'll have a post-rootfs script...

>
> For the dosfstools/mtools dependencies I think a simple sub option
> pulling them in is most sensible.
>
> Supporting multiple genimage.cfg files (like we do for device_tables /
> post-build / post-image, ..) IMHO makes sense and looks simple to do.

  Well, compared to the really simple solution that Ezequiel has now, I think 
the code will look quite a bit more complicated when there are multiple 
genimage.cfg files.


  Oh, and one more question: should we somehow make sure that the images 
generated by the different scripts don't have the same name?

  Regards,
  Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-14 21:31         ` Arnout Vandecappelle
@ 2016-04-14 21:37           ` Peter Korsgaard
  2016-04-14 21:42             ` Yann E. MORIN
  0 siblings, 1 reply; 30+ messages in thread
From: Peter Korsgaard @ 2016-04-14 21:37 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

Hi,

 > On 04/14/16 10:33, Peter Korsgaard wrote:

 >> The definition of the post-image script was to run something at the very
 >> end, so I think we should do genimage before post-image (even though I
 >> could imagine use cases for the opposite as well).

 >  Yes, so eventually we'll have a post-rootfs script...

Possibly, yes ;)

 >> For the dosfstools/mtools dependencies I think a simple sub option
 >> pulling them in is most sensible.
 >> 
 >> Supporting multiple genimage.cfg files (like we do for device_tables /
 >> post-build / post-image, ..) IMHO makes sense and looks simple to do.

 >  Well, compared to the really simple solution that Ezequiel has now, I
 > think the code will look quite a bit more complicated when there are
 > multiple genimage.cfg files.

Wouldn't it basically just sticking the logic in a loop over the words
in BR2_TARGET_ROOTFS_GENIMAGE_CFG?

 >  Oh, and one more question: should we somehow make sure that the
 > images generated by the different scripts don't have the same name?

No, I don't think we should do any parsing/verification of the .cfg
files. If the user specifies files that aren't built or overwrites
already existing files then they are themselves to blame.

-- 
Venlig hilsen,
Peter Korsgaard 

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-14 21:37           ` Peter Korsgaard
@ 2016-04-14 21:42             ` Yann E. MORIN
  2016-04-15  6:45               ` Peter Korsgaard
  0 siblings, 1 reply; 30+ messages in thread
From: Yann E. MORIN @ 2016-04-14 21:42 UTC (permalink / raw)
  To: buildroot

All,

On 2016-04-14 23:37 +0200, Peter Korsgaard spake thusly:
> >>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:
>  > On 04/14/16 10:33, Peter Korsgaard wrote:
>  >> Supporting multiple genimage.cfg files (like we do for device_tables /
>  >> post-build / post-image, ..) IMHO makes sense and looks simple to do.
> 
>  >  Well, compared to the really simple solution that Ezequiel has now, I
>  > think the code will look quite a bit more complicated when there are
>  > multiple genimage.cfg files.
> 
> Wouldn't it basically just sticking the logic in a loop over the words
> in BR2_TARGET_ROOTFS_GENIMAGE_CFG?

It is already possible and perfectly legit to declare more than one
image in a genimage config file, as far as I can see.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Buildroot] [PATCH 01/15] fs: add genimage infra
  2016-04-14 21:42             ` Yann E. MORIN
@ 2016-04-15  6:45               ` Peter Korsgaard
  0 siblings, 0 replies; 30+ messages in thread
From: Peter Korsgaard @ 2016-04-15  6:45 UTC (permalink / raw)
  To: buildroot

>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 >> Wouldn't it basically just sticking the logic in a loop over the words
 >> in BR2_TARGET_ROOTFS_GENIMAGE_CFG?

 > It is already possible and perfectly legit to declare more than one
 > image in a genimage config file, as far as I can see.

Ahh, so we can then just concatenate all files specified and pass to
genimage - Nice!

-- 
Venlig hilsen,
Peter Korsgaard 

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2016-04-15  6:45 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 20:03 [Buildroot] [PATCH 00/15] Introduce a genimage infra Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 01/15] fs: add " Ezequiel Garcia
2016-04-13 20:24   ` Thomas Petazzoni
2016-04-13 21:32   ` Arnout Vandecappelle
2016-04-13 21:41     ` Thomas Petazzoni
2016-04-14  8:33       ` Peter Korsgaard
2016-04-14 21:31         ` Arnout Vandecappelle
2016-04-14 21:37           ` Peter Korsgaard
2016-04-14 21:42             ` Yann E. MORIN
2016-04-15  6:45               ` Peter Korsgaard
2016-04-13 21:45     ` Thomas Petazzoni
2016-04-13 22:01       ` Ezequiel Garcia
2016-04-14 21:16       ` Peter Korsgaard
2016-04-14 21:28         ` Arnout Vandecappelle
2016-04-13 20:03 ` [Buildroot] [PATCH 02/15] board/minnowboard-max: Leverage the new " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 03/15] board/olimex_a20_olinuxino: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 04/15] board/wandboard: " Ezequiel Garcia
2016-04-13 20:25   ` Thomas Petazzoni
2016-04-13 22:02     ` Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 05/15] board/firefly: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 06/15] board/cubieboard2: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 07/15] board/arietta-g25: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 08/15] board/imx6ulevk: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 09/15] board/galileo: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 10/15] board/pandaboard: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 11/15] board/boundarydevices: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 12/15] board/imx233_olinuxino: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 13/15] board/orangepipc: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 14/15] board/raspberry*: " Ezequiel Garcia
2016-04-13 20:03 ` [Buildroot] [PATCH 15/15] board/via_imx6_vab820: " Ezequiel Garcia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.