mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org, Rob Herring <rob.herring@calxeda.com>
Subject: Re: [PATCH 1/1] highbank: switch to defaultenv-2
Date: Tue, 5 Mar 2013 12:00:25 +0100	[thread overview]
Message-ID: <20130305110025.GV1906@pengutronix.de> (raw)
In-Reply-To: <1362431430-24286-1-git-send-email-plagnioj@jcrosoft.com>

On Mon, Mar 04, 2013 at 10:10:30PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> Cc: Rob Herring <rob.herring@calxeda.com>
> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> ---
> 
> diff --git a/arch/arm/boards/highbank/env/boot/ahci b/arch/arm/boards/highbank/env/boot/ahci
> new file mode 100644
> index 0000000..9a41366
> --- /dev/null
> +++ b/arch/arm/boards/highbank/env/boot/ahci
> @@ -0,0 +1,21 @@
> +#!/bin/sh
> +
> +if [ "$1" = menu ]; then
> +	boot-menu-add-entry "$0" "AHCI (part 0 or boot if UEFI)"
> +	exit
> +fi
> +
> +path="/mnt/ahci"
> +
> +global.bootm.image="${path}/vmlinuz"
> +
> +. /env/data/oftree
> +
> +oftree=${path}/oftree
> +if [ -f $oftree ]; then
> +	global.bootm.oftree="$oftree"
> +fi
> +
> +# The rootdevice may actually be mmcblk1p2 if a card
> +# is inserted to the back MMC slot

This seems to copy copy pasted from the Efika Smartbook and I doubt this
is correct for highbank.

> +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2"

The entry is named ahci and it sets the root device to mmcblk?

> diff --git a/arch/arm/boards/highbank/env/boot/mmc b/arch/arm/boards/highbank/env/boot/mmc
> new file mode 100644
> index 0000000..43a04b5
> --- /dev/null
> +++ b/arch/arm/boards/highbank/env/boot/mmc
> @@ -0,0 +1,21 @@
> +#!/bin/sh
> +
> +if [ "$1" = menu ]; then
> +	boot-menu-add-entry "$0" "MMC slot"
> +	exit
> +fi
> +
> +path="/mnt/mmc"
> +
> +global.bootm.image="${path}/zimage"
> +
> +. /env/data/oftree
> +
> +oftree=${path}/oftree
> +if [ -f $oftree ]; then
> +	global.bootm.oftree="$oftree"
> +fi
> +
> +# The rootdevice may actually be mmcblk1p2 if a card
> +# is inserted to the back MMC slot

ditto wrong

> +global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2"
> diff --git a/arch/arm/boards/highbank/env/boot/net b/arch/arm/boards/highbank/env/boot/net
> new file mode 100644
> index 0000000..80862cd
> --- /dev/null
> +++ b/arch/arm/boards/highbank/env/boot/net
> @@ -0,0 +1,18 @@
> +#!/bin/sh
> +
> +if [ "$1" = menu ]; then
> +	boot-menu-add-entry "$0" "network (tftp, nfs) (eth0)"
> +	exit
> +fi
> +
> +ethact eth0
> +
> +path="/mnt/tftp"
> +
> +. /env/data/oftree
> +
> +global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
> +#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
> +nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
> +bootargs-ip
> +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
> diff --git a/arch/arm/boards/highbank/env/boot/net-eth1 b/arch/arm/boards/highbank/env/boot/net-eth1
> new file mode 100644
> index 0000000..d9e9804
> --- /dev/null
> +++ b/arch/arm/boards/highbank/env/boot/net-eth1
> @@ -0,0 +1,18 @@
> +#!/bin/sh
> +
> +if [ "$1" = menu ]; then
> +	boot-menu-add-entry "$0" "network (tftp, nfs) (eth1)"
> +	exit
> +fi
> +
> +ethact eth1
> +
> +path="/mnt/tftp"
> +
> +. /env/data/oftree
> +
> +global.bootm.image="${path}/${global.user}-linux-${global.hostname}"
> +#global.bootm.oftree="${path}/${global.user}-oftree-${global.hostname}"
> +nfsroot="/home/${global.user}/nfsroot/${global.hostname}"
> +bootargs-ip
> +global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
> diff --git a/arch/arm/boards/highbank/env/config-board b/arch/arm/boards/highbank/env/config-board
> new file mode 100644
> index 0000000..a64d9e3
> --- /dev/null
> +++ b/arch/arm/boards/highbank/env/config-board
> @@ -0,0 +1,11 @@
> +#!/bin/sh
> +
> +# board defaults, do not change in running system. Change /env/config
> +# instead
> +
> +global.hostname=highbank
> +global.allow_color=true
> +global.autoboot_timeout=3
> +global.bootm.oftree="/dev/dtb"
> +global.linux.bootargs.base="console=ttyAMA0,115200n8 CONSOLE=/dev/ttyAMA0"
> +global.boot.default=/env/boot.d
> diff --git a/arch/arm/boards/highbank/env/data/oftree b/arch/arm/boards/highbank/env/data/oftree
> new file mode 100644
> index 0000000..9a94b31
> --- /dev/null
> +++ b/arch/arm/boards/highbank/env/data/oftree
> @@ -0,0 +1,4 @@
> +#!/bin/sh
> +
> +#device tree provided by the firmware
> +global.bootm.oftree="/dev/dtb"
> diff --git a/arch/arm/boards/highbank/env/bin/init_board b/arch/arm/boards/highbank/env/init/001-dtb-probe
> similarity index 100%
> rename from arch/arm/boards/highbank/env/bin/init_board
> rename to arch/arm/boards/highbank/env/init/001-dtb-probe
> diff --git a/arch/arm/boards/highbank/env/init/bootseq b/arch/arm/boards/highbank/env/init/bootseq
> new file mode 100644
> index 0000000..7a76759
> --- /dev/null
> +++ b/arch/arm/boards/highbank/env/init/bootseq
> @@ -0,0 +1,6 @@
> +#!/bin/sh
> +
> +mkdir /env/boot.d
> +ln /env/boot/ahci /env/boot.d/010
> +ln /env/boot/mmc /env/boot.d/011
> +ln /env/boot/net /env/boot.d/012

Doesn't this give ugly errors when the files exist already on a persistent environment?

Also, isn't a bootsequence supposed to be changeable?

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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-03-05 11:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04 21:10 Jean-Christophe PLAGNIOL-VILLARD
2013-03-05 11:00 ` Sascha Hauer [this message]
2013-03-05 12:31   ` Jean-Christophe PLAGNIOL-VILLARD
2013-04-06 16:31 Jean-Christophe PLAGNIOL-VILLARD
2013-04-09  7:06 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130305110025.GV1906@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=rob.herring@calxeda.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox