All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
@ 2015-05-28 13:36 Jonathan Ben-Avraham
  2015-05-29  4:40 ` Baruch Siach
  0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Ben-Avraham @ 2015-05-28 13:36 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Jonathan Ben-Avraham <yba@tkos.co.il>
---
 board/solid-run/hummingboard-i2eX/make_sd_card.sh | 207 ++++++++++++++++++++++
 configs/hummingboard_i2eX_defconfig               |  24 +++
 2 files changed, 231 insertions(+)
 create mode 100755 board/solid-run/hummingboard-i2eX/make_sd_card.sh
 create mode 100644 configs/hummingboard_i2eX_defconfig

diff --git a/board/solid-run/hummingboard-i2eX/make_sd_card.sh b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
new file mode 100755
index 0000000..55c0f17
--- /dev/null
+++ b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
@@ -0,0 +1,207 @@
+#!/bin/bash -eu
+# @(#) Create a bootable SD card from Buildroot tree for the HummingBoard i2eX
+#
+# Copyright (c) 2015 Tk Open Systems Ltd. all rights reserved
+# License granted for public use under the terms of the "Attribution-ShareAlike
+# 4.0 International" license, See full text at
+# https://creativecommons.org/licenses/by-sa/4.0/legalcode
+# Maintainer: yba at tkos.co.il
+
+USAGE="${0} <SD card device (e.g. 'sdb')> <Buildroot output dir (e.g '/home/yba/buildroot/output')>"
+ERROR=0
+
+if [ -z "${1+x}" ]
+then
+	if [ -z "${DEVICE+x}" ]
+	then
+		echo "${0} ERROR: No DEVICE env var or device specification in first parameter"
+		ERROR=$((${ERROR}+1))
+	fi
+	if [ -z "${BUILDROOT_OUTPUT_DIR+x}" ]
+	then
+		echo "${0} ERROR: No BUILDROOT_OUTPUT_DIR env var or device specification in second parameter"
+		ERROR=$((${ERROR}+1))
+	fi
+else
+	DEVICE=${1}
+	if [ -z "${2+x}" ]
+	then
+		if [ -z "${BUILDROOT_OUTPUT_DIR+x}" ]
+		then
+			echo "${0} ERROR: No BUILDROOT_OUTPUT_DIR env var or device specification in second parameter"
+			ERROR=$((${ERROR}+1))
+		fi
+	else
+		BUILDROOT_OUTPUT_DIR=${2}
+	fi
+fi
+[ 0 -lt ${ERROR} ] && { echo ${USAGE}; exit 1; }
+ERROR=0
+
+if [ -z "${4+x}" ]
+then
+	if [ -z "${ROOTFS_PARTITION_SIZE+x}" ]
+	then
+		ROOTFS_PARTITION_SIZE=128
+	fi
+else
+	ROOTFS_PARTITION_SIZE=${4}
+fi
+
+
+# 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"
+#ROOTFS_PARTITION="n\np\n1\n2048\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
+KERNEL_DIR=${BUILDROOT_OUTPUT_DIR}/build/linux-ea83bda1b403d745c67fbf6ea307d05ca138577f
+UBOOT_DIR=${BUILDROOT_OUTPUT_DIR}/build/uboot-e817fa3165a607b581433a6abfe37e095a5d1dc9
+
+# Handle Ubuntu fdisk silliness
+if echo $(uname -a) | grep -q Ubuntu
+then
+	FDISK="fdisk -c -u"
+else
+	FDISK="fdisk -u=sectors"
+fi
+
+
+if [ 0 -ne ${EUID} ]
+then
+	echo "${0} ERROR: You need to run this script as root or using 'sudo'."
+	exit 1
+fi
+
+if [ -z "${DEVICE}" ]
+then
+	echo "${0} ERROR: You need to specify the SD device as the first"
+	echo "command line parameter to this script. Example 'sdb'. Be "
+	echo "careful not to do something stupid like specifying your system"
+	echo "hard drive device."
+	ERROR=$((${ERROR}+1))
+else
+	if [ ! -b /dev/${DEVICE} ]
+	then
+		echo "${0} ERROR: /dev/${DEVICE} is not a block device file"
+		ERROR=$((${ERROR}+1))
+	fi
+fi
+
+if [ -f /etc/multipath.conf ]
+then
+	if grep -q blacklist //etc/multipath.conf && ! grep -q ${DEVICE} /etc/multipath.conf 
+	then
+		echo
+		echo "==> WARNING: You probably want to blacklist ${DEVICE} in /etc/multipath.conf"
+		echo "==> Otherwise the kernel will not be notified of partition changes"
+		echo
+		sleep 5
+	fi
+fi
+
+if [ -z "${BUILDROOT_OUTPUT_DIR}" ]
+then
+	echo "${0} ERROR: You need to specify the Buildroot output directory as"
+	echo "the third command line parameter to this script"
+	ERROR=$((${ERROR}+1))
+else
+	if [ ! -d "${BUILDROOT_OUTPUT_DIR}" ]
+	then
+		echo "${0} ERROR: The [${BUILDROOT_OUTPUT_DIR}] directory does not"
+		echo "exist."
+		ERROR=$((${ERROR}+1))
+	fi
+fi
+
+if [ ! -d ${KERNEL_DIR} ]
+then
+	echo "${0} INTERNAL ERROR: The kernel dir ${KERNEL_DIR} does not exist."
+	echo "The kernel version has probably been changed."
+	ERROR=$((${ERROR}+1))
+fi
+
+if [ ! -d ${UBOOT_DIR} ]
+then
+	echo "${0} INTERNAL ERROR: The U-Boot dir ${UBOOT_DIR} does not exist."
+	echo "The kernel version has probably been changed."
+	ERROR=$((${ERROR}+1))
+fi
+
+if [ ! -f ${BUILDROOT_OUTPUT_DIR}/images/rootfs.tar ]
+then
+	echo "${0} ERROR: The rootfs image file "
+	echo "[${BUILDROOT_OUTPUT_DIR}/images/rootfs.tar]"
+	echo "was not found."
+	echo "Check that the third parameter is the fully qualified directory."
+	ERROR=$((${ERROR}+1))
+fi
+
+
+BINS="fdisk mkfs.ext4 mount umount dd mktemp partprobe"
+for BIN in ${BINS}
+do
+	if ! which ${BIN} >/dev/null
+	then
+		echo "${0} ERROR: Required executable ${BIN} is not in PATH"
+		ERROR=$((${ERROR}+1))
+	fi
+done
+
+MOUNT_POINT=$(mktemp -d /tmp/hummingboard.XXXX)
+if [ ! -d "${MOUNT_POINT}" ]
+then
+	echo "${0} ERROR: Can't create mount point"
+	exit 1
+fi
+
+[ 0 -lt ${ERROR} ] && exit 1
+
+# Zap any partition table on the SD
+dd if=/dev/zero of=/dev/${DEVICE} bs=1024 count=8
+
+printf ${ROOTFS_PARTITION} | ${FDISK} /dev/${DEVICE} || partprobe /dev/${DEVICE}
+sleep 2
+
+if [ ! -b /dev/${DEVICE}2 ]
+then
+	echo "${0} ERROR: /dev/${DEVICE}2 partition not recognized"
+	exit 1
+fi
+
+# Hat tip to hste and jas for this recipe
+if ! mkfs.ext4 -F -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 /dev/${DEVICE}2
+then
+	echo "${0} ERROR: Failed to create ext4 filesystem on /dev/${DEVICE}2"
+	exit 1
+fi
+
+if ! mount /dev/${DEVICE}2 ${MOUNT_POINT}
+then
+	echo "${0} ERROR: Cannot mount /dev/${DEVICE}2 on ${MOUNT_POINT}"
+	exit 1
+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 /dev/${DEVICE}1
+then
+	echo "${0} ERROR: Failed to create ext4 filesystem on /dev/${DEVICE}1"
+	exit 1
+fi
+
+if ! mount /dev/${DEVICE}1 ${MOUNT_POINT}
+then
+	echo "${0} ERROR: Cannot mount /dev/${DEVICE}1 on ${MOUNT_POINT}"
+	exit 1
+fi
+
+cp ${BUILDROOT_OUTPUT_DIR}/images/zImage ${MOUNT_POINT}
+cp ${BUILDROOT_OUTPUT_DIR}/images/imx6q-hummingboard.dtb ${MOUNT_POINT}
+umount ${MOUNT_POINT}
+
+dd if=${BUILDROOT_OUTPUT_DIR}/images/SPL of=/dev/${DEVICE} bs=1K seek=1
+dd if=${UBOOT_DIR}/u-boot.img of=/dev/${DEVICE} bs=1K seek=42
+sync
+rmdir ${MOUNT_POINT}
diff --git a/configs/hummingboard_i2eX_defconfig b/configs/hummingboard_i2eX_defconfig
new file mode 100644
index 0000000..0463bae
--- /dev/null
+++ b/configs/hummingboard_i2eX_defconfig
@@ -0,0 +1,24 @@
+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_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="SPL"
+BR2_PACKAGE_HOST_UBOOT_TOOLS=y
-- 
2.1.4

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-28 13:36 [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script Jonathan Ben-Avraham
@ 2015-05-29  4:40 ` Baruch Siach
  2015-05-29  5:19   ` Jonathan Ben Avraham
                     ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Baruch Siach @ 2015-05-29  4:40 UTC (permalink / raw)
  To: buildroot

Hi Yonatan,

On Thu, May 28, 2015 at 04:36:10PM +0300, Jonathan Ben-Avraham wrote:
> Signed-off-by: Jonathan Ben-Avraham <yba@tkos.co.il>
> ---
>  board/solid-run/hummingboard-i2eX/make_sd_card.sh | 207 ++++++++++++++++++++++

The board directory should also have a readme.txt file with prose description 
board specific Buildroot installation instructions.

>  configs/hummingboard_i2eX_defconfig               |  24 +++
>  2 files changed, 231 insertions(+)
>  create mode 100755 board/solid-run/hummingboard-i2eX/make_sd_card.sh
>  create mode 100644 configs/hummingboard_i2eX_defconfig
> 
> diff --git a/board/solid-run/hummingboard-i2eX/make_sd_card.sh b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
> new file mode 100755
> index 0000000..55c0f17
> --- /dev/null
> +++ b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
> @@ -0,0 +1,207 @@
> +#!/bin/bash -eu

Are you sure bash is mandatory? All other scripts we have under board/ or 
support/ use /bin/sh.

> +# @(#) Create a bootable SD card from Buildroot tree for the HummingBoard i2eX
> +#
> +# Copyright (c) 2015 Tk Open Systems Ltd. all rights reserved
> +# License granted for public use under the terms of the "Attribution-ShareAlike
> +# 4.0 International" license, See full text at
> +# https://creativecommons.org/licenses/by-sa/4.0/legalcode

Buildroot code itself is under GPLv2. See 
http://nightly.buildroot.org/manual.html#_complying_with_the_buildroot_license. 
Is this license GPLv2 compatible?

Is this script better/different than board/freescale/create-boot-sd.sh? I 
think we should have one script for this job. A "SoM vendor neutral" location 
for this script is likely to be board/freescale/ in this case. The readme.txt 
file, once added, should mention this script.

[...]

> diff --git a/configs/hummingboard_i2eX_defconfig 
> b/configs/hummingboard_i2eX_defconfig
> new file mode 100644
> index 0000000..0463bae
> --- /dev/null
> +++ b/configs/hummingboard_i2eX_defconfig
> @@ -0,0 +1,24 @@

Most other defconfigs have section titles. See 
configs/freescale_imx6qsabreauto_defconfig for example.

> +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_SPL=y
> +BR2_TARGET_UBOOT_SPL_NAME="SPL"
> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y

baruch

-- 
     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 -

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-29  4:40 ` Baruch Siach
@ 2015-05-29  5:19   ` Jonathan Ben Avraham
  2015-05-29  5:26   ` Jonathan Ben Avraham
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Jonathan Ben Avraham @ 2015-05-29  5:19 UTC (permalink / raw)
  To: buildroot

Hi Baruch,
I will reply separately to each point. First, regarding the 
boards/<vendor>/<board>/readme.txt file. Most of these readme.txt files 
are in fact English language pseudo-code for scripts to create boot 
media. They don't have any other important information. Rather than 
provide that type of lazy answer, I provided a complete working 
script. The difference between that type of lazy readme.txt and the script 
that I provided is about six hours of work * the number of people who use 
the script. That's a lot of time saved for humanity to work on more 
important things. The only thing missing from the script to be a readme 
is to tell the user to do "make .._defconfig" and "make", as written in 
the other readme.txts. But those are pretty lame instructions, since 
anyone who knows what "boards" directory is will already know this. AFAIK 
there is no formal requirement for a readme.txt in the sense that not 
having one would break some script. If that were the case I would add a 
readme.txt that just says "Read the make_sd_card.sh script". If you think 
that there is really some specific engineering information missing then I 
would reconsider.

  - yba


On Fri, 29 May 2015, Baruch Siach wrote:

> Date: Fri, 29 May 2015 07:40:05 +0300
> From: Baruch Siach <baruch@tkos.co.il>
> To: Jonathan Ben-Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and
>      bootable microSD Bash script
> 
> Hi Yonatan,
>
> On Thu, May 28, 2015 at 04:36:10PM +0300, Jonathan Ben-Avraham wrote:
>> Signed-off-by: Jonathan Ben-Avraham <yba@tkos.co.il>
>> ---
>>  board/solid-run/hummingboard-i2eX/make_sd_card.sh | 207 ++++++++++++++++++++++
>
> The board directory should also have a readme.txt file with prose description
> board specific Buildroot installation instructions.
>
>>  configs/hummingboard_i2eX_defconfig               |  24 +++
>>  2 files changed, 231 insertions(+)
>>  create mode 100755 board/solid-run/hummingboard-i2eX/make_sd_card.sh
>>  create mode 100644 configs/hummingboard_i2eX_defconfig
>>
>> diff --git a/board/solid-run/hummingboard-i2eX/make_sd_card.sh b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
>> new file mode 100755
>> index 0000000..55c0f17
>> --- /dev/null
>> +++ b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
>> @@ -0,0 +1,207 @@
>> +#!/bin/bash -eu
>
> Are you sure bash is mandatory? All other scripts we have under board/ or
> support/ use /bin/sh.
>
>> +# @(#) Create a bootable SD card from Buildroot tree for the HummingBoard i2eX
>> +#
>> +# Copyright (c) 2015 Tk Open Systems Ltd. all rights reserved
>> +# License granted for public use under the terms of the "Attribution-ShareAlike
>> +# 4.0 International" license, See full text at
>> +# https://creativecommons.org/licenses/by-sa/4.0/legalcode
>
> Buildroot code itself is under GPLv2. See
> http://nightly.buildroot.org/manual.html#_complying_with_the_buildroot_license.
> Is this license GPLv2 compatible?
>
> Is this script better/different than board/freescale/create-boot-sd.sh? I
> think we should have one script for this job. A "SoM vendor neutral" location
> for this script is likely to be board/freescale/ in this case. The readme.txt
> file, once added, should mention this script.
>
> [...]
>
>> diff --git a/configs/hummingboard_i2eX_defconfig
>> b/configs/hummingboard_i2eX_defconfig
>> new file mode 100644
>> index 0000000..0463bae
>> --- /dev/null
>> +++ b/configs/hummingboard_i2eX_defconfig
>> @@ -0,0 +1,24 @@
>
> Most other defconfigs have section titles. See
> configs/freescale_imx6qsabreauto_defconfig for example.
>
>> +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_SPL=y
>> +BR2_TARGET_UBOOT_SPL_NAME="SPL"
>> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
>
> baruch
>
>

-- 
  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

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-29  4:40 ` Baruch Siach
  2015-05-29  5:19   ` Jonathan Ben Avraham
@ 2015-05-29  5:26   ` Jonathan Ben Avraham
  2015-05-29  6:56   ` Jonathan Ben Avraham
  2015-05-29  7:56   ` Jonathan Ben Avraham
  3 siblings, 0 replies; 13+ messages in thread
From: Jonathan Ben Avraham @ 2015-05-29  5:26 UTC (permalink / raw)
  To: buildroot

Hi Baruch,
Regarding the scripting language for scripts under board/ and support/, I 
don't know that anyone has formally specified what scripting languages 
are supported, or specified that /bin/sh  hashbangs must be tested with 
Bourne shell.

I suspect that some of those scripts might in fact not work if Bourne 
shell were invoked by /bin/sh.

The make_sd_card.sh script that I contributed has Bash-specific usages 
that might work in some versions of ash but would not work in Bourne, so 
I was carefull to specify the hashbang as /bin/bash.

  - yba


On Fri, 29 May 2015, Baruch Siach wrote:

> Date: Fri, 29 May 2015 07:40:05 +0300
> From: Baruch Siach <baruch@tkos.co.il>
> To: Jonathan Ben-Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and
>      bootable microSD Bash script
> 
> Hi Yonatan,
>
> On Thu, May 28, 2015 at 04:36:10PM +0300, Jonathan Ben-Avraham wrote:
>> Signed-off-by: Jonathan Ben-Avraham <yba@tkos.co.il>
>> ---
>>  board/solid-run/hummingboard-i2eX/make_sd_card.sh | 207 ++++++++++++++++++++++
>
> The board directory should also have a readme.txt file with prose description
> board specific Buildroot installation instructions.
>
>>  configs/hummingboard_i2eX_defconfig               |  24 +++
>>  2 files changed, 231 insertions(+)
>>  create mode 100755 board/solid-run/hummingboard-i2eX/make_sd_card.sh
>>  create mode 100644 configs/hummingboard_i2eX_defconfig
>>
>> diff --git a/board/solid-run/hummingboard-i2eX/make_sd_card.sh b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
>> new file mode 100755
>> index 0000000..55c0f17
>> --- /dev/null
>> +++ b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
>> @@ -0,0 +1,207 @@
>> +#!/bin/bash -eu
>
> Are you sure bash is mandatory? All other scripts we have under board/ or
> support/ use /bin/sh.
>
>> +# @(#) Create a bootable SD card from Buildroot tree for the HummingBoard i2eX
>> +#
>> +# Copyright (c) 2015 Tk Open Systems Ltd. all rights reserved
>> +# License granted for public use under the terms of the "Attribution-ShareAlike
>> +# 4.0 International" license, See full text at
>> +# https://creativecommons.org/licenses/by-sa/4.0/legalcode
>
> Buildroot code itself is under GPLv2. See
> http://nightly.buildroot.org/manual.html#_complying_with_the_buildroot_license.
> Is this license GPLv2 compatible?
>
> Is this script better/different than board/freescale/create-boot-sd.sh? I
> think we should have one script for this job. A "SoM vendor neutral" location
> for this script is likely to be board/freescale/ in this case. The readme.txt
> file, once added, should mention this script.
>
> [...]
>
>> diff --git a/configs/hummingboard_i2eX_defconfig
>> b/configs/hummingboard_i2eX_defconfig
>> new file mode 100644
>> index 0000000..0463bae
>> --- /dev/null
>> +++ b/configs/hummingboard_i2eX_defconfig
>> @@ -0,0 +1,24 @@
>
> Most other defconfigs have section titles. See
> configs/freescale_imx6qsabreauto_defconfig for example.
>
>> +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_SPL=y
>> +BR2_TARGET_UBOOT_SPL_NAME="SPL"
>> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
>
> baruch
>
>

-- 
  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

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-29  4:40 ` Baruch Siach
  2015-05-29  5:19   ` Jonathan Ben Avraham
  2015-05-29  5:26   ` Jonathan Ben Avraham
@ 2015-05-29  6:56   ` Jonathan Ben Avraham
  2015-05-31  4:14     ` Baruch Siach
  2015-05-29  7:56   ` Jonathan Ben Avraham
  3 siblings, 1 reply; 13+ messages in thread
From: Jonathan Ben Avraham @ 2015-05-29  6:56 UTC (permalink / raw)
  To: buildroot

Hi Baruch,
Regarding the use of the CC SA license, it seems to me that if there are 
packages using the MIT and BSD licenses in Buildroot then the CC 
AS license should be Ok also.

If you want to claim that there is a difference between packages that are 
downloaded and contributions that are part of Buildroot itself, then I 
would say that the difference between GPLv2 and CC SA for a Bash script - 
which is not compiled and cannot be linked against, is not significant.

I prefer to use the CC licenses, because they  are simpler, clearer, and 
more appropriate to configuration files and scripts which are not compiled 
or linked against, and they avoid both the heavy RMS idealogical baggage 
and the legal confusions associated with the GPL licenses without any loss 
of rights to the public.

  - yba


On Fri, 29 May 2015, Baruch Siach wrote:

> Date: Fri, 29 May 2015 07:40:05 +0300
> From: Baruch Siach <baruch@tkos.co.il>
> To: Jonathan Ben-Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and
>      bootable microSD Bash script
> 
> Hi Yonatan,
>
> On Thu, May 28, 2015 at 04:36:10PM +0300, Jonathan Ben-Avraham wrote:
>> Signed-off-by: Jonathan Ben-Avraham <yba@tkos.co.il>
>> ---
>>  board/solid-run/hummingboard-i2eX/make_sd_card.sh | 207 ++++++++++++++++++++++
>
> The board directory should also have a readme.txt file with prose description
> board specific Buildroot installation instructions.
>
>>  configs/hummingboard_i2eX_defconfig               |  24 +++
>>  2 files changed, 231 insertions(+)
>>  create mode 100755 board/solid-run/hummingboard-i2eX/make_sd_card.sh
>>  create mode 100644 configs/hummingboard_i2eX_defconfig
>>
>> diff --git a/board/solid-run/hummingboard-i2eX/make_sd_card.sh b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
>> new file mode 100755
>> index 0000000..55c0f17
>> --- /dev/null
>> +++ b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
>> @@ -0,0 +1,207 @@
>> +#!/bin/bash -eu
>
> Are you sure bash is mandatory? All other scripts we have under board/ or
> support/ use /bin/sh.
>
>> +# @(#) Create a bootable SD card from Buildroot tree for the HummingBoard i2eX
>> +#
>> +# Copyright (c) 2015 Tk Open Systems Ltd. all rights reserved
>> +# License granted for public use under the terms of the "Attribution-ShareAlike
>> +# 4.0 International" license, See full text at
>> +# https://creativecommons.org/licenses/by-sa/4.0/legalcode
>
> Buildroot code itself is under GPLv2. See
> http://nightly.buildroot.org/manual.html#_complying_with_the_buildroot_license.
> Is this license GPLv2 compatible?
>
> Is this script better/different than board/freescale/create-boot-sd.sh? I
> think we should have one script for this job. A "SoM vendor neutral" location
> for this script is likely to be board/freescale/ in this case. The readme.txt
> file, once added, should mention this script.
>
> [...]
>
>> diff --git a/configs/hummingboard_i2eX_defconfig
>> b/configs/hummingboard_i2eX_defconfig
>> new file mode 100644
>> index 0000000..0463bae
>> --- /dev/null
>> +++ b/configs/hummingboard_i2eX_defconfig
>> @@ -0,0 +1,24 @@
>
> Most other defconfigs have section titles. See
> configs/freescale_imx6qsabreauto_defconfig for example.
>
>> +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_SPL=y
>> +BR2_TARGET_UBOOT_SPL_NAME="SPL"
>> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
>
> baruch
>
>

-- 
  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

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-29  4:40 ` Baruch Siach
                     ` (2 preceding siblings ...)
  2015-05-29  6:56   ` Jonathan Ben Avraham
@ 2015-05-29  7:56   ` Jonathan Ben Avraham
  2015-05-31  6:25     ` Baruch Siach
  3 siblings, 1 reply; 13+ messages in thread
From: Jonathan Ben Avraham @ 2015-05-29  7:56 UTC (permalink / raw)
  To: buildroot

Hi Baruch,
I provided the board/solid-run/hummingboard-i2eX/make_sd_card.sh script 
rather than use the board/freescale/create-boot-sd.sh script for the 
following reasons.

1. make_sd_card.sh supports OOT builds. Also support parameters in 
environment variables or command line.

2. make_sd_card.sh handles the likely multipath problem that happen in 
newer distros when you change partitions on media.

3. Moved the error control to the begining of the script so that there is 
less chance of leaving a mounted filesystem or temporary mount point if 
some requried file is missing and the -e kicks in.

4. Provides cumulative error control and check for many more types of 
error. That is, doesn't stop at the first error but continues noting all 
errors possible to detect before actually making any changes.

5. Copy only the specific images required rather than using wildcards that 
can result in the wrong images being copied and can leave the newbie 
wondering why the SD doesn't boot.

6. Having a separate script takes into account the fact that we are using 
forked U-Boot repo whose bootcmd might change from the bootcmd in the 
upstream repo.

  - yba


The script that I provided in 
board/solid-run/hummingboard-i2eX/make_sd_card.sh
board/freescale/create-boot-sd.sh

On Fri, 29 May 2015, Baruch Siach wrote:

> Date: Fri, 29 May 2015 07:40:05 +0300
> From: Baruch Siach <baruch@tkos.co.il>
> To: Jonathan Ben-Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and
>      bootable microSD Bash script
> 
> Hi Yonatan,
>
> On Thu, May 28, 2015 at 04:36:10PM +0300, Jonathan Ben-Avraham wrote:
>> Signed-off-by: Jonathan Ben-Avraham <yba@tkos.co.il>
>> ---
>>  board/solid-run/hummingboard-i2eX/make_sd_card.sh | 207 ++++++++++++++++++++++
>
> The board directory should also have a readme.txt file with prose description
> board specific Buildroot installation instructions.
>
>>  configs/hummingboard_i2eX_defconfig               |  24 +++
>>  2 files changed, 231 insertions(+)
>>  create mode 100755 board/solid-run/hummingboard-i2eX/make_sd_card.sh
>>  create mode 100644 configs/hummingboard_i2eX_defconfig
>>
>> diff --git a/board/solid-run/hummingboard-i2eX/make_sd_card.sh b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
>> new file mode 100755
>> index 0000000..55c0f17
>> --- /dev/null
>> +++ b/board/solid-run/hummingboard-i2eX/make_sd_card.sh
>> @@ -0,0 +1,207 @@
>> +#!/bin/bash -eu
>
> Are you sure bash is mandatory? All other scripts we have under board/ or
> support/ use /bin/sh.
>
>> +# @(#) Create a bootable SD card from Buildroot tree for the HummingBoard i2eX
>> +#
>> +# Copyright (c) 2015 Tk Open Systems Ltd. all rights reserved
>> +# License granted for public use under the terms of the "Attribution-ShareAlike
>> +# 4.0 International" license, See full text at
>> +# https://creativecommons.org/licenses/by-sa/4.0/legalcode
>
> Buildroot code itself is under GPLv2. See
> http://nightly.buildroot.org/manual.html#_complying_with_the_buildroot_license.
> Is this license GPLv2 compatible?
>
> Is this script better/different than board/freescale/create-boot-sd.sh? I
> think we should have one script for this job. A "SoM vendor neutral" location
> for this script is likely to be board/freescale/ in this case. The readme.txt
> file, once added, should mention this script.
>
> [...]
>
>> diff --git a/configs/hummingboard_i2eX_defconfig
>> b/configs/hummingboard_i2eX_defconfig
>> new file mode 100644
>> index 0000000..0463bae
>> --- /dev/null
>> +++ b/configs/hummingboard_i2eX_defconfig
>> @@ -0,0 +1,24 @@
>
> Most other defconfigs have section titles. See
> configs/freescale_imx6qsabreauto_defconfig for example.
>
>> +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_SPL=y
>> +BR2_TARGET_UBOOT_SPL_NAME="SPL"
>> +BR2_PACKAGE_HOST_UBOOT_TOOLS=y
>
> baruch
>
>

-- 
  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

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-29  6:56   ` Jonathan Ben Avraham
@ 2015-05-31  4:14     ` Baruch Siach
  2015-05-31  7:06       ` Thomas Petazzoni
  0 siblings, 1 reply; 13+ messages in thread
From: Baruch Siach @ 2015-05-31  4:14 UTC (permalink / raw)
  To: buildroot

Hi Yonatan,

On Fri, May 29, 2015 at 09:56:25AM +0300, Jonathan Ben Avraham wrote:
> On Fri, 29 May 2015, Baruch Siach wrote:
> >On Thu, May 28, 2015 at 04:36:10PM +0300, Jonathan Ben-Avraham wrote:
> >>+# @(#) Create a bootable SD card from Buildroot tree for the HummingBoard 
> >>i2eX
> >>+#
> >>+# Copyright (c) 2015 Tk Open Systems Ltd. all rights reserved
> >>+# License granted for public use under the terms of the "Attribution-ShareAlike
> >>+# 4.0 International" license, See full text at
> >>+# https://creativecommons.org/licenses/by-sa/4.0/legalcode
> >
> >Buildroot code itself is under GPLv2. See
> >http://nightly.buildroot.org/manual.html#_complying_with_the_buildroot_license.
> >Is this license GPLv2 compatible?
>
> Regarding the use of the CC SA license, it seems to me that if there are
> packages using the MIT and BSD licenses in Buildroot then the CC AS license
> should be Ok also.
> 
> If you want to claim that there is a difference between packages that are
> downloaded and contributions that are part of Buildroot itself, then I would
> say that the difference between GPLv2 and CC SA for a Bash script - which is
> not compiled and cannot be linked against, is not significant.
> 
> I prefer to use the CC licenses, because they  are simpler, clearer, and
> more appropriate to configuration files and scripts which are not compiled
> or linked against, and they avoid both the heavy RMS idealogical baggage and
> the legal confusions associated with the GPL licenses without any loss of
> rights to the public.

The fact that all of Buildroot code itself is released under GPLv2 should make 
life easier for downstream Buildroot distributors (and their legal 
departments).

Anyway, in case Buildroot maintainers agree to accept scripts under a 
different license, please add a patch to section 12.3 of the manual to clarify
Buildroot license.

baruch

-- 
     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 -

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-29  7:56   ` Jonathan Ben Avraham
@ 2015-05-31  6:25     ` Baruch Siach
  2015-05-31  7:57       ` Jonathan Ben Avraham
  0 siblings, 1 reply; 13+ messages in thread
From: Baruch Siach @ 2015-05-31  6:25 UTC (permalink / raw)
  To: buildroot

Hi Yonatan,

On Fri, May 29, 2015 at 10:56:14AM +0300, Jonathan Ben Avraham wrote:
> On Fri, 29 May 2015, Baruch Siach wrote:
> >On Thu, May 28, 2015 at 04:36:10PM +0300, Jonathan Ben-Avraham wrote:
> >>Signed-off-by: Jonathan Ben-Avraham <yba@tkos.co.il>
> >>---
> >> board/solid-run/hummingboard-i2eX/make_sd_card.sh | 207 ++++++++++++++++++++++
> >
> >Is this script better/different than board/freescale/create-boot-sd.sh? I
> >think we should have one script for this job. A "SoM vendor neutral" location
> >for this script is likely to be board/freescale/ in this case. The readme.txt
> >file, once added, should mention this script.
>
> I provided the board/solid-run/hummingboard-i2eX/make_sd_card.sh script
> rather than use the board/freescale/create-boot-sd.sh script for the
> following reasons.
> 
> 1. make_sd_card.sh supports OOT builds. Also support parameters in
> environment variables or command line.
> 
> 2. make_sd_card.sh handles the likely multipath problem that happen in newer
> distros when you change partitions on media.
> 
> 3. Moved the error control to the begining of the script so that there is
> less chance of leaving a mounted filesystem or temporary mount point if some
> requried file is missing and the -e kicks in.
> 
> 4. Provides cumulative error control and check for many more types of error.
> That is, doesn't stop at the first error but continues noting all errors
> possible to detect before actually making any changes.
> 
> 5. Copy only the specific images required rather than using wildcards that
> can result in the wrong images being copied and can leave the newbie
> wondering why the SD doesn't boot.

All these are welcome improvements to board/freescale/create-boot-sd.sh.

> 6. Having a separate script takes into account the fact that we are using
> forked U-Boot repo whose bootcmd might change from the bootcmd in the
> upstream repo.

Which bootcmd you refer to? Is it the U-Boot autoboot environment variable? Or 
the i.MX specific DCD (Device Configuration Data)? If the latter, please note 
that SolidRun provided U-Boot doesn't use DCD at all. The U-Boot SPL 
configures RAM at run time.

baruch

-- 
     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 -

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-31  4:14     ` Baruch Siach
@ 2015-05-31  7:06       ` Thomas Petazzoni
  2015-05-31  7:51         ` Jonathan Ben Avraham
  0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2015-05-31  7:06 UTC (permalink / raw)
  To: buildroot

Baruch, Jonathan,

On Sun, 31 May 2015 07:14:12 +0300, Baruch Siach wrote:

> > I prefer to use the CC licenses, because they  are simpler, clearer, and
> > more appropriate to configuration files and scripts which are not compiled
> > or linked against, and they avoid both the heavy RMS idealogical baggage and
> > the legal confusions associated with the GPL licenses without any loss of
> > rights to the public.
> 
> The fact that all of Buildroot code itself is released under GPLv2 should make 
> life easier for downstream Buildroot distributors (and their legal 
> departments).
> 
> Anyway, in case Buildroot maintainers agree to accept scripts under a 
> different license, please add a patch to section 12.3 of the manual to clarify
> Buildroot license.

Since so far all of the Buildroot code (to the exception of the
patches, which are licensed under the respective license of the
software package they apply to) is under the GPLv2, I think we also
would like like such scripts to be licensed under the GPLv2. There is
no reason to have a different license for such scripts.

Best regards,

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

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-31  7:06       ` Thomas Petazzoni
@ 2015-05-31  7:51         ` Jonathan Ben Avraham
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Ben Avraham @ 2015-05-31  7:51 UTC (permalink / raw)
  To: buildroot

On Sun, 31 May 2015, Thomas Petazzoni wrote:

> Date: Sun, 31 May 2015 09:06:54 +0200
> From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> To: Baruch Siach <baruch@tkos.co.il>
> Cc: Jonathan Ben Avraham <yba@tkos.co.il>, buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and
>      bootable microSD Bash script
> 
> Baruch, Jonathan,
>
> On Sun, 31 May 2015 07:14:12 +0300, Baruch Siach wrote:
>
>>> I prefer to use the CC licenses, because they  are simpler, clearer, and
>>> more appropriate to configuration files and scripts which are not compiled
>>> or linked against, and they avoid both the heavy RMS idealogical baggage and
>>> the legal confusions associated with the GPL licenses without any loss of
>>> rights to the public.
>>
>> The fact that all of Buildroot code itself is released under GPLv2 should make
>> life easier for downstream Buildroot distributors (and their legal
>> departments).
>>
>> Anyway, in case Buildroot maintainers agree to accept scripts under a
>> different license, please add a patch to section 12.3 of the manual to clarify
>> Buildroot license.
>
> Since so far all of the Buildroot code (to the exception of the
> patches, which are licensed under the respective license of the
> software package they apply to) is under the GPLv2, I think we also
> would like like such scripts to be licensed under the GPLv2. There is
> no reason to have a different license for such scripts.
>
> Best regards,
>
> Thomas

Hi Thomas,
Would a dual GPLv2, CC SA license be acceptable? If not, then I would at 
least like to have a notice of availability of the script under the CC SA 
license from a different source.

  - yba


-- 
  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

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-31  6:25     ` Baruch Siach
@ 2015-05-31  7:57       ` Jonathan Ben Avraham
  2015-05-31  9:18         ` Baruch Siach
  0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Ben Avraham @ 2015-05-31  7:57 UTC (permalink / raw)
  To: buildroot

Hi Baruch,
See one inline comment below.

On Sun, 31 May 2015, Baruch Siach wrote:

> Date: Sun, 31 May 2015 09:25:03 +0300
> From: Baruch Siach <baruch@tkos.co.il>
> To: Jonathan Ben Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net
> Subject: Re: [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and
>      bootable microSD Bash script
> 
> Hi Yonatan,
>
> On Fri, May 29, 2015 at 10:56:14AM +0300, Jonathan Ben Avraham wrote:
>> On Fri, 29 May 2015, Baruch Siach wrote:
>>> On Thu, May 28, 2015 at 04:36:10PM +0300, Jonathan Ben-Avraham wrote:
>>>> Signed-off-by: Jonathan Ben-Avraham <yba@tkos.co.il>
>>>> ---
>>>> board/solid-run/hummingboard-i2eX/make_sd_card.sh | 207 ++++++++++++++++++++++
>>>
>>> Is this script better/different than board/freescale/create-boot-sd.sh? I
>>> think we should have one script for this job. A "SoM vendor neutral" location
>>> for this script is likely to be board/freescale/ in this case. The readme.txt
>>> file, once added, should mention this script.
>>
>> I provided the board/solid-run/hummingboard-i2eX/make_sd_card.sh script
>> rather than use the board/freescale/create-boot-sd.sh script for the
>> following reasons.
>>
>> 1. make_sd_card.sh supports OOT builds. Also support parameters in
>> environment variables or command line.
>>
>> 2. make_sd_card.sh handles the likely multipath problem that happen in newer
>> distros when you change partitions on media.
>>
>> 3. Moved the error control to the begining of the script so that there is
>> less chance of leaving a mounted filesystem or temporary mount point if some
>> requried file is missing and the -e kicks in.
>>
>> 4. Provides cumulative error control and check for many more types of error.
>> That is, doesn't stop at the first error but continues noting all errors
>> possible to detect before actually making any changes.
>>
>> 5. Copy only the specific images required rather than using wildcards that
>> can result in the wrong images being copied and can leave the newbie
>> wondering why the SD doesn't boot.
>
> All these are welcome improvements to board/freescale/create-boot-sd.sh.
>
>> 6. Having a separate script takes into account the fact that we are using
>> forked U-Boot repo whose bootcmd might change from the bootcmd in the
>> upstream repo.
>
> Which bootcmd you refer to? Is it the U-Boot autoboot environment variable?

Yes. This script takes into account that Solid-Run could change the kernel 
command line to use a rootfs in the first or third partition for example. 
to do that with board/freescale/create-boot-sd.sh we would need to add 
extra parameters or env vars.

  - yba


> Or
> the i.MX specific DCD (Device Configuration Data)? If the latter, please note
> that SolidRun provided U-Boot doesn't use DCD at all. The U-Boot SPL
> configures RAM at run time.
>
> baruch
>
>

-- 
  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

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-31  7:57       ` Jonathan Ben Avraham
@ 2015-05-31  9:18         ` Baruch Siach
  2015-05-31  9:37           ` Jonathan Ben Avraham
  0 siblings, 1 reply; 13+ messages in thread
From: Baruch Siach @ 2015-05-31  9:18 UTC (permalink / raw)
  To: buildroot

Hi Yonatan,

On Sun, May 31, 2015 at 10:57:25AM +0300, Jonathan Ben Avraham wrote:
> On Sun, 31 May 2015, Baruch Siach wrote:
> >On Fri, May 29, 2015 at 10:56:14AM +0300, Jonathan Ben Avraham wrote:
> >>6. Having a separate script takes into account the fact that we are using
> >>forked U-Boot repo whose bootcmd might change from the bootcmd in the
> >>upstream repo.
> >
> >Which bootcmd you refer to? Is it the U-Boot autoboot environment variable?
> 
> Yes. This script takes into account that Solid-Run could change the kernel
> command line to use a rootfs in the first or third partition for example. to
> do that with board/freescale/create-boot-sd.sh we would need to add extra
> parameters or env vars.

That's 'bootargs' I believe, isn't it? See my email on v2 for an alternative 
solution (boot.src).

baruch

-- 
     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 -

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

* [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script
  2015-05-31  9:18         ` Baruch Siach
@ 2015-05-31  9:37           ` Jonathan Ben Avraham
  0 siblings, 0 replies; 13+ messages in thread
From: Jonathan Ben Avraham @ 2015-05-31  9:37 UTC (permalink / raw)
  To: buildroot

On Sun, 31 May 2015, Baruch Siach wrote:

> Date: Sun, 31 May 2015 12:18:21 +0300
> From: Baruch Siach <baruch@tkos.co.il>
> To: Jonathan Ben Avraham <yba@tkos.co.il>
> Cc: buildroot at busybox.net, Rabeeh Khoury <rabeeh@solid-run.com>
> Subject: Re: [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and
>      bootable microSD Bash script
> 
> Hi Yonatan,
>
> On Sun, May 31, 2015 at 10:57:25AM +0300, Jonathan Ben Avraham wrote:
>> On Sun, 31 May 2015, Baruch Siach wrote:
>>> On Fri, May 29, 2015 at 10:56:14AM +0300, Jonathan Ben Avraham wrote:
>>>> 6. Having a separate script takes into account the fact that we are using
>>>> forked U-Boot repo whose bootcmd might change from the bootcmd in the
>>>> upstream repo.
>>>
>>> Which bootcmd you refer to? Is it the U-Boot autoboot environment variable?
>>
>> Yes. This script takes into account that Solid-Run could change the kernel
>> command line to use a rootfs in the first or third partition for example. to
>> do that with board/freescale/create-boot-sd.sh we would need to add extra
>> parameters or env vars.
>
> That's 'bootargs' I believe, isn't it? See my email on v2 for an alternative
> solution (boot.src).

Hi Baruch,
Let's do the boot.scr solution for general i.MX6 separately. At this point 
I want to get out something conservative and timely for Solid-Run boards. 
I hope to have the CuBox-i defconfig ready on Wednesday.

I think that the unified boot/root partition solution should at least at 
first be committed in parallel with and not in place of the current 
create-boot-sd.sh so as not to upset anyone.

  - yba


> baruch
>
>

-- 
  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

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

end of thread, other threads:[~2015-05-31  9:37 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-28 13:36 [Buildroot] [PATCH 1/1] Solid-Run HummingBoard i2eX defconfig and bootable microSD Bash script Jonathan Ben-Avraham
2015-05-29  4:40 ` Baruch Siach
2015-05-29  5:19   ` Jonathan Ben Avraham
2015-05-29  5:26   ` Jonathan Ben Avraham
2015-05-29  6:56   ` Jonathan Ben Avraham
2015-05-31  4:14     ` Baruch Siach
2015-05-31  7:06       ` Thomas Petazzoni
2015-05-31  7:51         ` Jonathan Ben Avraham
2015-05-29  7:56   ` Jonathan Ben Avraham
2015-05-31  6:25     ` Baruch Siach
2015-05-31  7:57       ` Jonathan Ben Avraham
2015-05-31  9:18         ` Baruch Siach
2015-05-31  9:37           ` Jonathan Ben Avraham

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.