From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SHVv3-0005Qt-8H for barebox@lists.infradead.org; Tue, 10 Apr 2012 07:55:19 +0000 Date: Tue, 10 Apr 2012 09:55:10 +0200 From: Sascha Hauer Message-ID: <20120410075510.GP3852@pengutronix.de> References: <1333877242-582-1-git-send-email-plagnioj@jcrosoft.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1333877242-582-1-git-send-email-plagnioj@jcrosoft.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 1/3] defaultenv/boot: add support for oftree boot option support To: Jean-Christophe PLAGNIOL-VILLARD Cc: barebox@lists.infradead.org On Sun, Apr 08, 2012 at 11:27:20AM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > you can now specify in the same way as it's done for the kernel where is > stored the oftree. Applied, thanks Sascha > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > --- > defaultenv/bin/_boot_help | 3 ++- > defaultenv/bin/boot | 17 ++++++++++++++++- > defaultenv/config | 2 ++ > 3 files changed, 20 insertions(+), 2 deletions(-) > > diff --git a/defaultenv/bin/_boot_help b/defaultenv/bin/_boot_help > index 7c96444..a07e4e0 100644 > --- a/defaultenv/bin/_boot_help > +++ b/defaultenv/bin/_boot_help > @@ -1,9 +1,10 @@ > #!/bin/sh > > -echo "boot: boot [-m ] [-k ] [-r ] [-i ]" > +echo "boot: boot [-m ] [-k ] [-r ] [-i ] [-o echo "" > echo "options" > echo " - kernel nand, nor, nfs, tftp, disk" > +echo " - oftree nand, nor, nfs, tftp, disk or empty" > echo " - rootfs nand, nor, net, disk" > echo " - ip dhcp, dhcp-barebox none, empty" > echo "" > diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot > index ba04373..5186aee 100644 > --- a/defaultenv/bin/boot > +++ b/defaultenv/bin/boot > @@ -6,12 +6,14 @@ if [ x$kernel_loc = xnet ]; then > kernel_loc=tftp > fi > > -while getopt "hk:r:i:m:" Option > +while getopt "hk:r:i:m:o:" Option > do > if [ ${Option} = k ]; then > kernel_loc=${OPTARG} > elif [ ${Option} = r ]; then > rootfs_loc=${OPTARG} > +elif [ ${Option} = o ]; then > + oftree_loc=${OPTARG} > elif [ ${Option} = i ]; then > ip=${OPTARG} > elif [ ${Option} = m ]; then > @@ -114,6 +116,19 @@ else > exit 1 > fi > > +if [ x$oftree_loc = xnfs -o x$oftree_loc = xtftp ]; then > + odev=/oftree > + $oftree_loc $oftreeimage $odev || exit 1 > +elif [ x$oftree_loc = xnor ]; then > + odev="/dev/nor0.oftree" > +elif [ x$oftree_loc = xnand ]; then > + odev="/dev/nand0.oftree.bb" > +elif [ x$oftree_loc = xdisk ]; then > + odev="/dev/$oftree_part" > +fi > + > +[ x$odev = x ] || bootm_opt="$bootm_opt -o $odev" > + > echo "booting kernel from $kdev" > > bootm $bootm_opt $kdev > diff --git a/defaultenv/config b/defaultenv/config > index 63fc059..39a9c99 100644 > --- a/defaultenv/config > +++ b/defaultenv/config > @@ -21,6 +21,8 @@ dhcp_vendor_id=barebox > kernel_loc=tftp > # can be either 'net', 'nand', 'nor', 'disk' or 'initrd' > rootfs_loc=net > +# can be either 'tftp', 'nfs', 'nand', 'nor', 'disk' or none > +oftree_loc=tftp > > # for flash based rootfs: 'jffs2' or 'ubifs' > # in case of disk any regular filesystem like 'ext2', 'ext3', 'reiserfs' > -- > 1.7.9.1 > > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- 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