Skip to contentSkip to conversation

Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script

PATCH Superseded Jonathan Ben-Avraham 2 participants 5 messages May 30, 2015 – May 31, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script

Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script

---
 board/solid-run/hummingboard-i2eX/readme.txt |  11 ++
 board/solid-run/make_sd_card.sh              | 278 +++++++++++++++++++++++++++
 configs/hummingboard_i2eX_defconfig          |  25 +++
 3 files changed, 314 insertions(+)
 create mode 100644 board/solid-run/hummingboard-i2eX/readme.txt
 create mode 100755 board/solid-run/make_sd_card.sh
 create mode 100644 configs/hummingboard_i2eX_defconfig
board/solid-run/hummingboard-i2eX/readme.txt new file +11 -0
new file mode 100644
index 0000000..4e25179
@@ -0,0 +1,11 @@
+Solid-Run HummingBoard-i2eX minimal defconfig, without WiFi or OpenGL firmware
+is provided in configs/hummingboard_i2eX_defconfig
+
+Bash script for creating bootable microSD cards is in
+board/solid-run/make_sd_card.sh
+
+Example usage:
+
+sudo make_sd_card.sh sde output HummingBoard-i2eX 256
+
+Maintainer: yba at tkos.co.il
board/solid-run/make_sd_card.sh new file +278 -0

278 lines not on this page · raw message

configs/hummingboard_i2eX_defconfig new file +25 -0
new file mode 100644
index 0000000..cd359fc
@@ -0,0 +1,25 @@
+BR2_arm=y
+BR2_cortex_a9=y
+BR2_ARM_EABIHF=y
+BR2_ARM_FPU_VFPV3=y
+BR2_TOOLCHAIN_EXTERNAL=y
+BR2_TARGET_GENERIC_HOSTNAME="HummingBoard"
+BR2_TARGET_GENERIC_ISSUE="Welcome to HummingBoard i2eX"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_GIT=y
+BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/SolidRun/linux-imx6-3.14.git"
+BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="ea83bda1b403d745c67fbf6ea307d05ca138577f"
+BR2_LINUX_KERNEL_DEFCONFIG="imx_v7_cbi_hb"
+BR2_LINUX_KERNEL_ZIMAGE=y
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-hummingboard"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARDNAME="mx6_cubox-i"
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/SolidRun/u-boot-imx6.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="e817fa3165a607b581433a6abfe37e095a5d1dc9"
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="SPL"
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
Signature · 1 line
2.1.4
#1 lore raw

PATCH v2 1/1 Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script

Hi Yonatan,

Quoted 18 lines · Jonathan Ben-Avraham

Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script

---
 board/solid-run/hummingboard-i2eX/readme.txt |  11 ++
 board/solid-run/make_sd_card.sh              | 278 +++++++++++++++++++++++++++
 configs/hummingboard_i2eX_defconfig          |  25 +++
 3 files changed, 314 insertions(+)
 create mode 100644 board/solid-run/hummingboard-i2eX/readme.txt
 create mode 100755 board/solid-run/make_sd_card.sh
 create mode 100644 configs/hummingboard_i2eX_defconfig
board/solid-run/hummingboard-i2eX/readme.txt new file +0 -0
new file mode 100644
index 0000000..4e25179

board/solid-run/hummingboard-i2eX/readme.txt line 9

Quoted 9 lines
board/solid-run/hummingboard-i2eX/readme.txt new file +9 -0
@@ -0,0 +1,11 @@
+Solid-Run HummingBoard-i2eX minimal defconfig, without WiFi or OpenGL firmware
+is provided in configs/hummingboard_i2eX_defconfig
+
+Bash script for creating bootable microSD cards is in
+board/solid-run/make_sd_card.sh
+
+Example usage:
+
+sudo make_sd_card.sh sde output HummingBoard-i2eX 256

A short description of script parameters would be nice.

Quoted 9 lines
board/solid-run/hummingboard-i2eX/readme.txt new file +2 -0
+
+Maintainer: yba at tkos.co.il
board/solid-run/make_sd_card.sh new file +1 -0
new file mode 100755
index 0000000..8586ff6
@@ -0,0 +1,278 @@
+#!/bin/bash -eu

[...]

Quoted 4 lines
board/solid-run/make_sd_card.sh new file +4 -0
+# rootfs partition starting at 1MB with size of ROOTFS_PARTITION_SIZE
+ROOTFS_PARTITION="n\np\n1\n2048\n+16M\nn\np\n2\n\n+${ROOTFS_PARTITION_SIZE}M\na\n\nw\n"
+
+# Not so cool - I will have to maintain this script every time Rabeeh pushes

board/solid-run/make_sd_card.sh line 91

Quoted 10 lines
board/solid-run/make_sd_card.sh new file +10 -0
+# new code
+if [ -z "${KERNEL_DIR+x}" ]
+then
+	KERNEL_DIR=${BUILDROOT_OUTPUT_DIR}/build/linux-ea83bda1b403d745c67fbf6ea307d05ca138577f
+fi
+
+if [ -z "${UBOOT_DIR+x}" ]
+then
+	UBOOT_DIR=${BUILDROOT_OUTPUT_DIR}/build/uboot-e817fa3165a607b581433a6abfe37e095a5d1dc9
+fi

These variables are set here but are only used below for kernel and U-Boot directory existence check.

board/solid-run/make_sd_card.sh line 99

Quoted 8 lines
board/solid-run/make_sd_card.sh new file +8 -0
+
+# Handle Ubuntu fdisk silliness
+if echo $(uname -a) | grep -q Ubuntu
+then
+	FDISK="fdisk -c -u"
+else
+	FDISK="fdisk -u=sectors"
+fi

AFAIK fdisk behaviour changed between versions. This is no Ubuntu specific. Anyway, sfdisk is better suited for scripted use.

[...]

board/solid-run/make_sd_card.sh line 194

Quoted 9 lines
board/solid-run/make_sd_card.sh new file +9 -0
+BINS="fdisk mkfs.ext4 mount umount dd mktemp partprobe"
+for BIN in ${BINS}
+do
+	if ! which ${BIN} >/dev/null
+	then
+		echo "${ME} ERROR: Required executable ${BIN} is not in PATH"
+		ERROR=$((${ERROR}+1))
+	fi
+done

Buildroot can build host versions of util-linux (fdisk, mount, umount), e2fsprogs (mkfs.ext4), and parted (partprobe). In that case you should find these utilities under ${BUILDROOT_OUTPUT_DIR}/host/usr/sbin/.

[...]

Quoted 4 lines
board/solid-run/make_sd_card.sh new file +4 -0
+if ! mount ${PART2} ${MOUNT_POINT}
+then
+	echo "${ME} ERROR: Cannot mount ${PART2} on ${MOUNT_POINT}"
+	exit 1

board/solid-run/make_sd_card.sh line 249

Quoted 10 lines
board/solid-run/make_sd_card.sh new file +10 -0
+fi
+
+tar xvf ${BUILDROOT_OUTPUT_DIR}/images/rootfs.tar -C ${MOUNT_POINT}
+umount ${MOUNT_POINT}
+
+if ! mkfs.ext4 -F -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 ${PART1}
+then
+	echo "${ME} ERROR: Failed to create ext4 filesystem on ${PART1}"
+	exit 1
+fi

Buildroot can create ready made ext{2,3,4} images itself. See 'Filesystem images -> ext2/3/4 root filesystem' in menuconfig.

board/solid-run/make_sd_card.sh line 257

Quoted 8 lines
board/solid-run/make_sd_card.sh new file +8 -0
+
+if ! mount ${PART1} ${MOUNT_POINT}
+then
+	echo "${ME} ERROR: Cannot mount ${PART1} on ${MOUNT_POINT}"
+	exit 1
+fi
+
+cp ${BUILDROOT_OUTPUT_DIR}/images/zImage ${MOUNT_POINT}

Buildroot can do that for you as well. See 'Kernel -> Install kernel image to /boot in target' in menuconfig.

board/solid-run/make_sd_card.sh line 261

Quoted 4 lines
board/solid-run/make_sd_card.sh new file +4 -0
+
+case ${BOARD_MODEL} in
+	HummingBoard-i2eX)
+		cp ${BUILDROOT_OUTPUT_DIR}/images/imx6q-hummingboard.dtb ${MOUNT_POINT}

Ditto.

board/solid-run/make_sd_card.sh line 273

Quoted 12 lines
board/solid-run/make_sd_card.sh new file +12 -0
+		;;
+	*)
+		if [ -f  ${BUILDROOT_OUTPUT_DIR}/images/${BOARD_MODEL} ]
+		then
+			cp ${BUILDROOT_OUTPUT_DIR}/images/${BOARD_MODEL} ${MOUNT_POINT}
+		else
+			echo "${ME} WARNING: No dtb file found"
+		fi
+		;;
+esac
+
+umount ${MOUNT_POINT}

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH v2 1/1 Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script

Hi Baruch,
See inline comments. I think that there is a misunderstanding regarding the cp of the images to the mounted microSD partitions, see below.

Quoted 31 lines · Baruch Siach

Date: Sun, 31 May 2015 10:08:42 +0300
From: Baruch Siach <[email protected]>
To: Jonathan Ben-Avraham <[email protected]>
Cc: buildroot at buildroot.org
Subject: Re: [Buildroot] [PATCH v2 1/1] Solid-Run HummingBoard i2eX defconfig
and bootable microSD Bash script

Hi Yonatan,

Quoted 21 lines · Jonathan Ben-Avraham

Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script

---
 board/solid-run/hummingboard-i2eX/readme.txt |  11 ++
 board/solid-run/make_sd_card.sh              | 278 +++++++++++++++++++++++++++
 configs/hummingboard_i2eX_defconfig          |  25 +++
 3 files changed, 314 insertions(+)
 create mode 100644 board/solid-run/hummingboard-i2eX/readme.txt
 create mode 100755 board/solid-run/make_sd_card.sh
 create mode 100644 configs/hummingboard_i2eX_defconfig
board/solid-run/hummingboard-i2eX/readme.txt new file +3 -0
new file mode 100644
index 0000000..4e25179
@@ -0,0 +1,11 @@
+Solid-Run HummingBoard-i2eX minimal defconfig, without WiFi or OpenGL firmware
+is provided in configs/hummingboard_i2eX_defconfig
+
Quoted 8 lines

board/solid-run/hummingboard-i2eX/readme.txt line 9

Quoted 6 lines
board/solid-run/hummingboard-i2eX/readme.txt new file +6 -0
+Bash script for creating bootable microSD cards is in
+board/solid-run/make_sd_card.sh
+
+Example usage:
+
+sudo make_sd_card.sh sde output HummingBoard-i2eX 256

A short description of script parameters would be nice.

I'll copy it from the USAGE in the make_sd_card.sh.

Quoted 21 lines
Quoted 9 lines
board/solid-run/hummingboard-i2eX/readme.txt new file +2 -0
+
+Maintainer: yba at tkos.co.il
board/solid-run/make_sd_card.sh new file +1 -0
new file mode 100755
index 0000000..8586ff6
@@ -0,0 +1,278 @@
+#!/bin/bash -eu

[...]

Quoted 9 lines
board/solid-run/make_sd_card.sh new file +9 -0
+# rootfs partition starting at 1MB with size of ROOTFS_PARTITION_SIZE
+ROOTFS_PARTITION="n\np\n1\n2048\n+16M\nn\np\n2\n\n+${ROOTFS_PARTITION_SIZE}M\na\n\nw\n"
+
+# Not so cool - I will have to maintain this script every time Rabeeh pushes
+# new code
+if [ -z "${KERNEL_DIR+x}" ]
+then
+	KERNEL_DIR=${BUILDROOT_OUTPUT_DIR}/build/linux-ea83bda1b403d745c67fbf6ea307d05ca138577f
+fi
Quoted 8 lines

board/solid-run/make_sd_card.sh line 91

Quoted 5 lines
board/solid-run/make_sd_card.sh new file +5 -0
+
+if [ -z "${UBOOT_DIR+x}" ]
+then
+	UBOOT_DIR=${BUILDROOT_OUTPUT_DIR}/build/uboot-e817fa3165a607b581433a6abfe37e095a5d1dc9
+fi

These variables are set here but are only used below for kernel and U-Boot directory existence check.

Yes, v1 of this script used them. In this version they could be removed.

Quoted 14 lines

board/solid-run/make_sd_card.sh line 99

Quoted 8 lines
board/solid-run/make_sd_card.sh new file +8 -0
+
+# Handle Ubuntu fdisk silliness
+if echo $(uname -a) | grep -q Ubuntu
+then
+	FDISK="fdisk -c -u"
+else
+	FDISK="fdisk -u=sectors"
+fi

AFAIK fdisk behaviour changed between versions. This is no Ubuntu specific. Anyway, sfdisk is better suited for scripted use.

[...]

Quoted 13 lines

board/solid-run/make_sd_card.sh line 194

Quoted 9 lines
board/solid-run/make_sd_card.sh new file +9 -0
+BINS="fdisk mkfs.ext4 mount umount dd mktemp partprobe"
+for BIN in ${BINS}
+do
+	if ! which ${BIN} >/dev/null
+	then
+		echo "${ME} ERROR: Required executable ${BIN} is not in PATH"
+		ERROR=$((${ERROR}+1))
+	fi
+done

Buildroot can build host versions of util-linux (fdisk, mount, umount), e2fsprogs (mkfs.ext4), and parted (partprobe). In that case you should find these utilities under ${BUILDROOT_OUTPUT_DIR}/host/usr/sbin/.

For fdisk it might be better to use the Buildroot host utility rather than deal with the differences in fdisk between the common Linux distros.

But for the other utilities that are almost always present, is it work adding them to the defconfig and increasing the build time and volume?

Quoted 11 lines

[...]

Quoted 9 lines
board/solid-run/make_sd_card.sh new file +9 -0
+if ! mount ${PART2} ${MOUNT_POINT}
+then
+	echo "${ME} ERROR: Cannot mount ${PART2} on ${MOUNT_POINT}"
+	exit 1
+fi
+
+tar xvf ${BUILDROOT_OUTPUT_DIR}/images/rootfs.tar -C ${MOUNT_POINT}
+umount ${MOUNT_POINT}
+
Quoted 8 lines

board/solid-run/make_sd_card.sh line 249

Quoted 5 lines
board/solid-run/make_sd_card.sh new file +5 -0
+if ! mkfs.ext4 -F -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 ${PART1}
+then
+	echo "${ME} ERROR: Failed to create ext4 filesystem on ${PART1}"
+	exit 1
+fi

Buildroot can create ready made ext{2,3,4} images itself. See 'Filesystem images -> ext2/3/4 root filesystem' in menuconfig.

This script allows you to defer the decision on the filesystem type to a later stage by just using rootfs.tar. In terms of project management, I think that this is the best strategy. That is, to make a clean separation between build issues and installation issues, not to confound them.

Quoted 11 lines

board/solid-run/make_sd_card.sh line 257

Quoted 8 lines
board/solid-run/make_sd_card.sh new file +8 -0
+
+if ! mount ${PART1} ${MOUNT_POINT}
+then
+	echo "${ME} ERROR: Cannot mount ${PART1} on ${MOUNT_POINT}"
+	exit 1
+fi
+
+cp ${BUILDROOT_OUTPUT_DIR}/images/zImage ${MOUNT_POINT}

Buildroot can do that for you as well. See 'Kernel -> Install kernel image to /boot in target' in menuconfig.

Buildroot can format and identify the correct microSD device and mount the correct partition and then copy the image from output/images to the partition? I don't think so. That is what this script and board/freescale/create-boot-sd.sh are about.

In any event, the question is not what Buildroot can do, it is what Buildroot *should* do. You want a clean separaration of the build operation and the media install operation.

Quoted 6 lines

board/solid-run/make_sd_card.sh line 261

Quoted 4 lines
board/solid-run/make_sd_card.sh new file +4 -0
+
+case ${BOARD_MODEL} in
+	HummingBoard-i2eX)
+		cp ${BUILDROOT_OUTPUT_DIR}/images/imx6q-hummingboard.dtb ${MOUNT_POINT}

Ditto.

Please re-check the last three comments that you made. I think they might be mistaken.

- yba

Quoted 17 lines

board/solid-run/make_sd_card.sh line 273

Quoted 13 lines
board/solid-run/make_sd_card.sh new file +12 -0
+		;;
+	*)
+		if [ -f  ${BUILDROOT_OUTPUT_DIR}/images/${BOARD_MODEL} ]
+		then
+			cp ${BUILDROOT_OUTPUT_DIR}/images/${BOARD_MODEL} ${MOUNT_POINT}
+		else
+			echo "${ME} WARNING: No dtb file found"
+		fi
+		;;
+esac
+
+umount ${MOUNT_POINT}

baruch

Signature · 3 lines
  9590 8E58 D30D 1660 C349  673D B205 4FC4 B8F5 B7F9  ~. .~  Tk Open Systems
=}-------- Jonathan Ben-Avraham ("yba") ----------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhm
#3 lore raw

PATCH v2 1/1 Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script

Hi Yonatan,

Quoted 16 lines · Jonathan Ben Avraham
Quoted 14 lines · Baruch Siach

board/solid-run/make_sd_card.sh line 194

Quoted 9 lines · Jonathan Ben-Avraham
board/solid-run/make_sd_card.sh new file +9 -0
+BINS="fdisk mkfs.ext4 mount umount dd mktemp partprobe"
+for BIN in ${BINS}
+do
+	if ! which ${BIN} >/dev/null
+	then
+		echo "${ME} ERROR: Required executable ${BIN} is not in PATH"
+		ERROR=$((${ERROR}+1))
+	fi
+done

Buildroot can build host versions of util-linux (fdisk, mount, umount), e2fsprogs (mkfs.ext4), and parted (partprobe). In that case you should find these utilities under ${BUILDROOT_OUTPUT_DIR}/host/usr/sbin/.

Quoted 2 lines

For fdisk it might be better to use the Buildroot host utility rather than deal with the differences in fdisk between the common Linux distros.

Or even better, use sfdisk. sfdisk script should be more resistant to breakage on future util-linux versions.

Quoted 2 lines

But for the other utilities that are almost always present, is it work adding them to the defconfig and increasing the build time and volume?

I don't think they should be added to defconfig. But if the user selected these host packages this script should use them.

Quoted 7 lines
Quoted 2 lines

Buildroot can create ready made ext{2,3,4} images itself. See 'Filesystem images -> ext2/3/4 root filesystem' in menuconfig.

This script allows you to defer the decision on the filesystem type to a later stage by just using rootfs.tar. In terms of project management, I think that this is the best strategy. That is, to make a clean separation between build issues and installation issues, not to confound them.

Filesystem generation makes this script unnecessarily complex, IMO. Going for a single partition solution (see below) would make this script (and board/freescale/create-boot-sd.sh) simpler, and easier to maintain.

Quoted 11 lines
Quoted 10 lines

board/solid-run/make_sd_card.sh line 257

Quoted 7 lines
board/solid-run/make_sd_card.sh new file +7 -0
+if ! mount ${PART1} ${MOUNT_POINT}
+then
+	echo "${ME} ERROR: Cannot mount ${PART1} on ${MOUNT_POINT}"
+	exit 1
+fi
+
+cp ${BUILDROOT_OUTPUT_DIR}/images/zImage ${MOUNT_POINT}

Buildroot can do that for you as well. See 'Kernel -> Install kernel image to /boot in target' in menuconfig.

Quoted 4 lines

Buildroot can format and identify the correct microSD device and mount the correct partition and then copy the image from output/images to the partition? I don't think so. That is what this script and board/freescale/create-boot-sd.sh are about.

Right. However, using the boot.scr boot script support of U-Boot (enabled in both SolidRun and Freescale U-Boot) would allow Buildroot to generate a single boot/root partition. This script, that is running as root, should only to the bare minimum, i.e. SD card partitioning.

Quoted 3 lines

In any event, the question is not what Buildroot can do, it is what Buildroot *should* do. You want a clean separaration of the build operation and the media install operation.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#4 lore raw

PATCH v2 1/1 Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script

Hi Baruch,
See inlines.

Quoted 29 lines · Baruch Siach

Date: Sun, 31 May 2015 12:02:26 +0300
From: Baruch Siach <[email protected]>
To: Jonathan Ben Avraham <[email protected]>
Cc: buildroot at buildroot.org, Rabeeh Khoury <[email protected]>
Subject: Re: [Buildroot] [PATCH v2 1/1] Solid-Run HummingBoard i2eX defconfig
and bootable microSD Bash script

Hi Yonatan,

Quoted 16 lines · Jonathan Ben Avraham
Quoted 14 lines · Baruch Siach

board/solid-run/make_sd_card.sh line 194

Quoted 9 lines · Jonathan Ben-Avraham
board/solid-run/make_sd_card.sh new file +9 -0
+BINS="fdisk mkfs.ext4 mount umount dd mktemp partprobe"
+for BIN in ${BINS}
+do
+	if ! which ${BIN} >/dev/null
+	then
+		echo "${ME} ERROR: Required executable ${BIN} is not in PATH"
+		ERROR=$((${ERROR}+1))
+	fi
+done

Buildroot can build host versions of util-linux (fdisk, mount, umount), e2fsprogs (mkfs.ext4), and parted (partprobe). In that case you should find these utilities under ${BUILDROOT_OUTPUT_DIR}/host/usr/sbin/.

Quoted 2 lines

For fdisk it might be better to use the Buildroot host utility rather than deal with the differences in fdisk between the common Linux distros.

Quoted 8 lines

Or even better, use sfdisk. sfdisk script should be more resistant to breakage on future util-linux versions.

Quoted 2 lines

But for the other utilities that are almost always present, is it work adding them to the defconfig and increasing the build time and volume?

I don't think they should be added to defconfig. But if the user selected these host packages this script should use them.

ok, will add check for utils in output/host/sbin

Quoted 11 lines
Quoted 7 lines
Quoted 2 lines

Buildroot can create ready made ext{2,3,4} images itself. See 'Filesystem images -> ext2/3/4 root filesystem' in menuconfig.

This script allows you to defer the decision on the filesystem type to a later stage by just using rootfs.tar. In terms of project management, I think that this is the best strategy. That is, to make a clean separation between build issues and installation issues, not to confound them.

Filesystem generation makes this script unnecessarily complex, IMO. Going for a single partition solution (see below) would make this script (and board/freescale/create-boot-sd.sh) simpler, and easier to maintain.

I beg to differ. That would require changes to the U-Boot environment or writing a U-Boot script that creates it's own risks and adds back the complexity. I think it is better to stay with the kernel command line parameters in the particular U-Boot repo that Solid-Run is using and not add a U-Boot env script.

I think that fiddling with board/freescale/create-boot-sd.sh at this time is a recipe for trouble. Better to add a new script and if it works out deprecate the board/freescale/create-boot-sd.sh.

Quoted 16 lines
Quoted 11 lines
Quoted 10 lines

board/solid-run/make_sd_card.sh line 257

Quoted 7 lines
board/solid-run/make_sd_card.sh new file +7 -0
+if ! mount ${PART1} ${MOUNT_POINT}
+then
+	echo "${ME} ERROR: Cannot mount ${PART1} on ${MOUNT_POINT}"
+	exit 1
+fi
+
+cp ${BUILDROOT_OUTPUT_DIR}/images/zImage ${MOUNT_POINT}

Buildroot can do that for you as well. See 'Kernel -> Install kernel image to /boot in target' in menuconfig.

Quoted 4 lines

Buildroot can format and identify the correct microSD device and mount the correct partition and then copy the image from output/images to the partition? I don't think so. That is what this script and board/freescale/create-boot-sd.sh are about.

Quoted 4 lines

Right. However, using the boot.scr boot script support of U-Boot (enabled in both SolidRun and Freescale U-Boot) would allow Buildroot to generate a single boot/root partition. This script, that is running as root, should only to the bare minimum, i.e. SD card partitioning.

See above comment regarding the advisability of adding a Buildroot script or special env.

I would be happy to write a *separate*, *additional* script that adds this functionality but I think that the current version is a more conservative, advisable approach. I think that a lot of things could break if we suddenly changed the microSD partitioning on people without allowing them to keep the old scheme. This would for example break the mfg scripts at the microwave appliance developer with whom we worked last year.

- yba

Quoted 7 lines
Quoted 3 lines

In any event, the question is not what Buildroot can do, it is what Buildroot *should* do. You want a clean separaration of the build operation and the media install operation.

baruch

Signature · 3 lines
  9590 8E58 D30D 1660 C349  673D B205 4FC4 B8F5 B7F9  ~. .~  Tk Open Systems
=}-------- Jonathan Ben-Avraham ("yba") ----------ooO--U--Ooo------------{=
mailto:yba at tkos.co.il tel:+972.52.486.3386 http://tkos.co.il skype:benavrhm