All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] imx6sabresd: boot to /init in mfgtools mode
@ 2014-08-12  8:49 Vincent Stehlé
  2014-08-26  4:13 ` Gary Bisson
  2014-09-19 13:48 ` Luca Ceresoli
  0 siblings, 2 replies; 4+ messages in thread
From: Vincent Stehlé @ 2014-08-12  8:49 UTC (permalink / raw)
  To: buildroot

Buildroot supplies a nice /init wrapper script to use when booting from a
ramdisk.

We add a patch to u-boot to tell the kernel to boot into /init (instead of
/linuxrc) on i.MX6, when booting in mfgtools mode. This way we can boot a
buildroot system entirely through USB.

Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
Cc: Gary Bisson <bisson.gary@gmail.com>
Cc: Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
Cc: Gilles Talis <gilles.talis@gmail.com>
---

Hi,

Putting a few persons in Cc:, which might be interested in i.MX6 related
changes.

Best regards,

V.

 ...ommon-boot-Linux-to-init-in-mfgtools-mode.patch | 36 ++++++++++++++++++++++
 configs/freescale_imx6sabresd_defconfig            |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 board/freescale/imx6sabresd/uboot-0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch

diff --git a/board/freescale/imx6sabresd/uboot-0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch b/board/freescale/imx6sabresd/uboot-0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch
new file mode 100644
index 0000000..c01df4e
--- /dev/null
+++ b/board/freescale/imx6sabresd/uboot-0001-mx6qsabre_common-boot-Linux-to-init-in-mfgtools-mode.patch
@@ -0,0 +1,36 @@
+From 4a7cd7c5b165317dccf45cfc235da3e14bc339e8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@freescale.com>
+Date: Tue, 12 Aug 2014 10:17:31 +0200
+Subject: [PATCH] mx6qsabre_common: boot Linux to /init in mfgtools mode
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Buildroot supplies a nice /init wrapper script to use when booting from a
+ramdisk.
+
+This patch tells u-boot to tell the kernel to boot into /init (instead of
+/linuxrc) on i.MX6, when booting in mfgtools mode. This way we can boot a
+buildroot system entirely through USB.
+
+Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
+---
+ include/configs/mx6qsabre_common.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/configs/mx6qsabre_common.h b/include/configs/mx6qsabre_common.h
+index 69ff0df..ec7b665 100644
+--- a/include/configs/mx6qsabre_common.h
++++ b/include/configs/mx6qsabre_common.h
+@@ -129,7 +129,7 @@
+ 
+ #define CONFIG_MFG_ENV_SETTINGS \
+ 	"mfgtool_args=setenv bootargs console=" CONFIG_CONSOLE_DEV ",115200 " \
+-		"rdinit=/linuxrc " \
++		"rdinit=/init " \
+ 		"g_mass_storage.stall=0 g_mass_storage.removable=1 " \
+ 		"g_mass_storage.idVendor=0x066F g_mass_storage.idProduct=0x37FF "\
+ 		"g_mass_storage.iSerialNumber=\"\" "\
+-- 
+2.0.1
+
diff --git a/configs/freescale_imx6sabresd_defconfig b/configs/freescale_imx6sabresd_defconfig
index 16e4d0b..bc0aa46 100644
--- a/configs/freescale_imx6sabresd_defconfig
+++ b/configs/freescale_imx6sabresd_defconfig
@@ -25,3 +25,4 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y
 BR2_TARGET_UBOOT_CUSTOM_GIT=y
 BR2_TARGET_UBOOT_CUSTOM_REPO_URL="git://git.freescale.com/imx/uboot-imx.git"
 BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_3.10.17_1.0.0_ga"
+BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR="board/freescale/imx6sabresd"
-- 
2.0.1

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

* [Buildroot] [PATCH] imx6sabresd: boot to /init in mfgtools mode
  2014-08-12  8:49 [Buildroot] [PATCH] imx6sabresd: boot to /init in mfgtools mode Vincent Stehlé
@ 2014-08-26  4:13 ` Gary Bisson
  2014-09-03 17:14   ` Vincent Stehlé
  2014-09-19 13:48 ` Luca Ceresoli
  1 sibling, 1 reply; 4+ messages in thread
From: Gary Bisson @ 2014-08-26  4:13 UTC (permalink / raw)
  To: buildroot

Hi Vincent,

Sorry for the delay in my feedback.

On Tue, Aug 12, 2014 at 1:49 AM, Vincent Stehl? <
vincent.stehle@freescale.com> wrote:

> Buildroot supplies a nice /init wrapper script to use when booting from a
> ramdisk.
>
> We add a patch to u-boot to tell the kernel to boot into /init (instead of
> /linuxrc) on i.MX6, when booting in mfgtools mode. This way we can boot a
> buildroot system entirely through USB.
>

The patch looks fine however shouldn't it be pushed to u-boot directly?
Also, as it can be changed through u-boot commands I'm not sure it is
necessary.

Let me know your thoughts.

Thanks,
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140825/3e32b741/attachment.html>

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

* [Buildroot] [PATCH] imx6sabresd: boot to /init in mfgtools mode
  2014-08-26  4:13 ` Gary Bisson
@ 2014-09-03 17:14   ` Vincent Stehlé
  0 siblings, 0 replies; 4+ messages in thread
From: Vincent Stehlé @ 2014-09-03 17:14 UTC (permalink / raw)
  To: buildroot

On 08/26/2014 06:13 AM, Gary Bisson wrote:
(..)
> The patch looks fine however shouldn't it be pushed to u-boot directly?
> Also, as it can be changed through u-boot commands I'm not sure it is
> necessary.

Hi Gary,

How are you?

Now it's my turn to apologize for the very late answer; I am sorry.

About pushing to upstream u-boot; I am a bit reluctant to push this
patch to upstream u-boot because I think that booting to the /init
wrapper when using a ramdisk is a buildroot specificity (from fs/cpio/init).
  I certainly would not like to break the default behavior in upstream
u-boot, even in mfgtools mode, which is to call /linuxrc right now.

You are also right that the same functionality can be obtained from the
u-boot command line, but that means a user interaction. The goal of
adding this u-boot patch at buildroot level is to allow a
fully-automated boot of a buildroot filesystem through USB without user
interaction.
  (See [1] for more details on the whole procedure.)

What is your opinion on that, please?

Also, now that I have been very slow to answer to your e-mail, a nice
patches series from Luca has been around [2], which renames the config file.
  After a quick try, rebasing with git seems to be free, but do you
prefer that I send a v2 rebased on those, just in case?

Best regards,

V.

[1] https://community.freescale.com/docs/DOC-101842
[2] http://thread.gmane.org/gmane.comp.lib.uclibc.buildroot/92418

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

* [Buildroot] [PATCH] imx6sabresd: boot to /init in mfgtools mode
  2014-08-12  8:49 [Buildroot] [PATCH] imx6sabresd: boot to /init in mfgtools mode Vincent Stehlé
  2014-08-26  4:13 ` Gary Bisson
@ 2014-09-19 13:48 ` Luca Ceresoli
  1 sibling, 0 replies; 4+ messages in thread
From: Luca Ceresoli @ 2014-09-19 13:48 UTC (permalink / raw)
  To: buildroot

Dear Vincent Stehl?,

Vincent Stehl? wrote:
> Buildroot supplies a nice /init wrapper script to use when booting from a
> ramdisk.
>
> We add a patch to u-boot to tell the kernel to boot into /init (instead of
> /linuxrc) on i.MX6, when booting in mfgtools mode. This way we can boot a
> buildroot system entirely through USB.
>
> Signed-off-by: Vincent Stehl? <vincent.stehle@freescale.com>
> Cc: Gary Bisson <bisson.gary@gmail.com>
> Cc: Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
> Cc: Gilles Talis <gilles.talis@gmail.com>

Acked-by: Luca Ceresoli <luca@lucaceresoli.net>

However, as you pointed out, this conflicts with my patches to support
i.MX6DL. So I've rebased my patches on current master and added yours
on top, adapted and completed with i.MX6DL support.

I'll send this patchset in a while, with the addition of my Tested-by
tag.

-- 
Luca

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

end of thread, other threads:[~2014-09-19 13:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-12  8:49 [Buildroot] [PATCH] imx6sabresd: boot to /init in mfgtools mode Vincent Stehlé
2014-08-26  4:13 ` Gary Bisson
2014-09-03 17:14   ` Vincent Stehlé
2014-09-19 13:48 ` Luca Ceresoli

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.