Re: [PATCH for next 08/15] ARM: phytec-som-imx6: add boot device emmc and automount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 27, 2016 at 12:04:42PM +0200, Stefan Christ wrote:
> Add boot file 'emmc' and automount configuration for phyCORE-i.MX6.
> 
> Signed-off-by: Stefan Christ <s.christ@xxxxxxxxx>
> ---
>  .../arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc | 5 +++++
>  .../phytec-som-imx6/defaultenv-physom-imx6-mira/init/automount       | 3 +++
>  2 files changed, 8 insertions(+)
>  create mode 100644 arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> 
> diff --git a/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> new file mode 100644
> index 0000000..e3cc9e3
> --- /dev/null
> +++ b/arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-mira/boot/emmc
> @@ -0,0 +1,5 @@
> +#!/bin/sh
> +
> +global.bootm.image="/mnt/emmc/linuximage"
> +global.bootm.oftree="/mnt/emmc/oftree"
> +global.linux.bootargs.dyn.root="root=/dev/mmcblk3p2 rootwait rw"

Does this work reliably? Is there finally a patch upstream that creates
fixed numbers for MMC/SD block devices?

When I see patches like this it's probably time to remind how barebox can
handle bootloader spec ;)

Put a file like this to /loader/entries/loader.conf:

title                   Phytec-Monster-Linux
version                 4.6
options                 rootwait
linux-appendroot        true
linux                   /boot/zImage
devicetree              /boot/imx6q-phytec-pflaxy.dtb

Then you can boot the system with "boot mmc3.0", no further barebox
configuration is needed. Set nv.boot to mmc3.0 if you always want to
boot from there. The same can be done with nfsroot: Put the rootfs
somewhere reachable via NFS and do:

boot nfs://nfshost//path/to/rootfs

(You'll need a "ip=dhcp" in the options in your loader.conf)

You can also create multiple loader.conf files with different device
trees, barebox will then pick the one which is compatible to the current
board.

The above also works with NAND/UBI. "boot nand0.root.ubi.root" will boot
from the root volume on the ubi found on the root partition from the
nand0 device. Again, no further barebox configuration and no manual
ubiattach required. the root= and ubi.mtd= arguments to the kernel will
be automatically generated.

Configuration files in the environment have become pretty much
unnecessary for the common case.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux