* [PATCH 0/4] defaultenv boot updates
@ 2011-04-08 13:37 Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 1/4] defaultenv/boot: switch to getopt Jean-Christophe PLAGNIOL-VILLARD
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-08 13:37 UTC (permalink / raw)
To: barebox
HI,
this following patch series make boot script more configurable
The following changes since commit 8dfebf96d79aa8e37c2299af8c02a84d30f5e9e7:
Merge branch 'nand-pu' into next (2011-04-06 09:21:56 +0200)
are available in the git repository at:
game ..BRANCH.NOT.VERIFIED..
Jean-Christophe PLAGNIOL-VILLARD (4):
defaultenv/boot: switch to getopt
defaultenv/boot: add -k and -t option to specify the kernel location and image type
defaultenv/boot: add -r and -T option to select rootfs location and type
defaultenv/boot: add -i option to select the ip mode
defaultenv/bin/boot | 52 ++++++++++++++++++++++++++++++++++++++++++---
defaultenv/bin/boot_help | 36 +++++++++++++++++++++++++++++++
2 files changed, 84 insertions(+), 4 deletions(-)
create mode 100644 defaultenv/bin/boot_help
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 1/4] defaultenv/boot: switch to getopt
2011-04-08 13:37 [PATCH 0/4] defaultenv boot updates Jean-Christophe PLAGNIOL-VILLARD
@ 2011-04-08 13:40 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 2/4] defaultenv/boot: add -k and -t option to specify the kernel location and image type Jean-Christophe PLAGNIOL-VILLARD
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-08 13:40 UTC (permalink / raw)
To: barebox
this will allow to add more option to overwrite the boot type
as today can only choose mode {nfs, tftp, nand, nor} and can not specify
where is each component the kernel, the rootfs and the rootfs type
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
defaultenv/bin/boot | 20 ++++++++++++++++----
defaultenv/bin/boot_help | 29 +++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 4 deletions(-)
create mode 100644 defaultenv/bin/boot_help
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index de4fa24..4289b29 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -2,16 +2,28 @@
. /env/config
-if [ x$1 = xnand ]; then
+opt_mode=""
+
+while getopt "hm:" Option
+do
+if [ ${Option} = m ]; then
+ opt_mode=${OPTARG}
+else
+ . /env/bin/boot_help
+ exit 0
+fi
+done
+
+if [ x${opt_mode} = xnand ]; then
rootfs_loc=nand
kernel_loc=nand
-elif [ x$1 = xnor ]; then
+elif [ x${opt_mode} = xnor ]; then
rootfs_loc=nor
kernel_loc=nor
-elif [ x$1 = xnfs ]; then
+elif [ x${opt_mode} = xnfs ]; then
rootfs_loc=net
kernel_loc=nfs
-elif [ x$1 = xtftp ]; then
+elif [ x${opt_mode} = xtftp ]; then
rootfs_loc=net
kernel_loc=tftp
fi
diff --git a/defaultenv/bin/boot_help b/defaultenv/bin/boot_help
new file mode 100644
index 0000000..425c718
--- /dev/null
+++ b/defaultenv/bin/boot_help
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+echo "usage: boot [-m <mode>]"
+echo "boot."
+echo ""
+echo "options"
+echo " -m boot mode will select kernel_loc and rootfs_loc"
+echo " mode kernel_loc rootfs_loc"
+echo " nfs nfs nfs"
+echo " tftp tftp nfs"
+echo " nor nor nor"
+echo " nand nand nand"
+echo ""
+echo "default is"
+echo -n "kernel_loc "
+echo ${kernel_loc}
+echo -n "kernelimage_type "
+echo ${kernelimage_type}
+echo -n "rootfs_loc "
+echo ${rootfs_loc}
+echo -n "rootfs_type "
+echo ${rootfs_type}
+echo -n "ip "
+if [ x${ip} = x ]
+then
+ echo "static"
+else
+ echo ${ip}
+fi
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/4] defaultenv/boot: add -k and -t option to specify the kernel location and image type
2011-04-08 13:37 [PATCH 0/4] defaultenv boot updates Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 1/4] defaultenv/boot: switch to getopt Jean-Christophe PLAGNIOL-VILLARD
@ 2011-04-08 13:40 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 3/4] defaultenv/boot: add -r and -T option to select rootfs location and type Jean-Christophe PLAGNIOL-VILLARD
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-08 13:40 UTC (permalink / raw)
To: barebox
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
defaultenv/bin/boot | 17 ++++++++++++++++-
defaultenv/bin/boot_help | 6 +++++-
2 files changed, 21 insertions(+), 2 deletions(-)
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 4289b29..597b080 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -3,11 +3,16 @@
. /env/config
opt_mode=""
+opt_kernel_loc=""
-while getopt "hm:" Option
+while getopt "hm:k:t:" Option
do
if [ ${Option} = m ]; then
opt_mode=${OPTARG}
+elif [ ${Option} = k ]; then
+ opt_kernel_loc=${OPTARG}
+elif [ ${Option} = t ]; then
+ kernelimage_type=${OPTARG}
else
. /env/bin/boot_help
exit 0
@@ -28,6 +33,16 @@ elif [ x${opt_mode} = xtftp ]; then
kernel_loc=tftp
fi
+if [ x${opt_kernel_loc} = xnand ]; then
+ kernel_loc=nand
+elif [ x${opt_kernel_loc} = xnor ]; then
+ kernel_loc=nor
+elif [ x${opt_kernel_loc} = xnfs ]; then
+ kernel_loc=nfs
+elif [ x${opt_kernel_loc} = xtftp ]; then
+ kernel_loc=tftp
+fi
+
if [ x$ip = xdhcp ]; then
bootargs="$bootargs ip=dhcp"
elif [ x$ip = xnone ]; then
diff --git a/defaultenv/bin/boot_help b/defaultenv/bin/boot_help
index 425c718..28436b8 100644
--- a/defaultenv/bin/boot_help
+++ b/defaultenv/bin/boot_help
@@ -1,6 +1,6 @@
#!/bin/sh
-echo "usage: boot [-m <mode>]"
+echo "usage: boot [-m <mode>] [-k <kernel location>] [-t <kernel image type]"
echo "boot."
echo ""
echo "options"
@@ -11,6 +11,10 @@ echo " tftp tftp nfs"
echo " nor nor nor"
echo " nand nand nand"
echo ""
+echo " -k kernel location tftp, nfs, nand, nor"
+echo " -t kernel image type uimage, zimage, raw or raw_lzo"
+echo ""
+echo ""
echo "default is"
echo -n "kernel_loc "
echo ${kernel_loc}
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 3/4] defaultenv/boot: add -r and -T option to select rootfs location and type
2011-04-08 13:37 [PATCH 0/4] defaultenv boot updates Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 1/4] defaultenv/boot: switch to getopt Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 2/4] defaultenv/boot: add -k and -t option to specify the kernel location and image type Jean-Christophe PLAGNIOL-VILLARD
@ 2011-04-08 13:40 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 4/4] defaultenv/boot: add -i option to select the ip mode Jean-Christophe PLAGNIOL-VILLARD
2011-04-11 10:16 ` [PATCH 0/4] defaultenv boot updates Sascha Hauer
4 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-08 13:40 UTC (permalink / raw)
To: barebox
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
defaultenv/bin/boot | 17 ++++++++++++++++-
defaultenv/bin/boot_help | 4 +++-
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 597b080..bae73d4 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -4,8 +4,9 @@
opt_mode=""
opt_kernel_loc=""
+opt_rootfs_loc=""
-while getopt "hm:k:t:" Option
+while getopt "hm:k:t:r:T:" Option
do
if [ ${Option} = m ]; then
opt_mode=${OPTARG}
@@ -13,6 +14,10 @@ elif [ ${Option} = k ]; then
opt_kernel_loc=${OPTARG}
elif [ ${Option} = t ]; then
kernelimage_type=${OPTARG}
+elif [ ${Option} = r ]; then
+ opt_rootfs_loc=${OPTARG}
+elif [ ${Option} = T ]; then
+ rootfs_type=${OPTARG}
else
. /env/bin/boot_help
exit 0
@@ -43,6 +48,16 @@ elif [ x${opt_kernel_loc} = xtftp ]; then
kernel_loc=tftp
fi
+if [ x${opt_rootfs_loc} = xnand ]; then
+ rootfs_loc=nand
+elif [ x${opt_rootfs_loc} = xnor ]; then
+ rootfs_loc=nor
+elif [ x${opt_rootfs_loc} = xnfs ]; then
+ rootfs_loc=nfs
+elif [ x${opt_rootfs_loc} = xinitrd ]; then
+ rootfs_loc=initrd
+fi
+
if [ x$ip = xdhcp ]; then
bootargs="$bootargs ip=dhcp"
elif [ x$ip = xnone ]; then
diff --git a/defaultenv/bin/boot_help b/defaultenv/bin/boot_help
index 28436b8..41b5353 100644
--- a/defaultenv/bin/boot_help
+++ b/defaultenv/bin/boot_help
@@ -1,6 +1,6 @@
#!/bin/sh
-echo "usage: boot [-m <mode>] [-k <kernel location>] [-t <kernel image type]"
+echo "usage: boot [-m <mode>] [-k <kernel location>] [-t <kernel image type] [-r <rootfs location>] [-T <rootfs type>]"
echo "boot."
echo ""
echo "options"
@@ -13,6 +13,8 @@ echo " nand nand nand"
echo ""
echo " -k kernel location tftp, nfs, nand, nor"
echo " -t kernel image type uimage, zimage, raw or raw_lzo"
+echo " -r rootfs location nfs, nand, nor, initrd"
+echo " -T rootfs type ubi, jffs2, ext2, etc..."
echo ""
echo ""
echo "default is"
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/4] defaultenv/boot: add -i option to select the ip mode
2011-04-08 13:37 [PATCH 0/4] defaultenv boot updates Jean-Christophe PLAGNIOL-VILLARD
` (2 preceding siblings ...)
2011-04-08 13:40 ` [PATCH 3/4] defaultenv/boot: add -r and -T option to select rootfs location and type Jean-Christophe PLAGNIOL-VILLARD
@ 2011-04-08 13:40 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-11 10:16 ` [PATCH 0/4] defaultenv boot updates Sascha Hauer
4 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-08 13:40 UTC (permalink / raw)
To: barebox
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
defaultenv/bin/boot | 4 +++-
defaultenv/bin/boot_help | 3 ++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index bae73d4..a020cd3 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -6,7 +6,7 @@ opt_mode=""
opt_kernel_loc=""
opt_rootfs_loc=""
-while getopt "hm:k:t:r:T:" Option
+while getopt "hm:k:t:r:T:i:" Option
do
if [ ${Option} = m ]; then
opt_mode=${OPTARG}
@@ -18,6 +18,8 @@ elif [ ${Option} = r ]; then
opt_rootfs_loc=${OPTARG}
elif [ ${Option} = T ]; then
rootfs_type=${OPTARG}
+elif [ ${Option} = i ]; then
+ ip=${OPTARG}
else
. /env/bin/boot_help
exit 0
diff --git a/defaultenv/bin/boot_help b/defaultenv/bin/boot_help
index 41b5353..8e00977 100644
--- a/defaultenv/bin/boot_help
+++ b/defaultenv/bin/boot_help
@@ -1,6 +1,6 @@
#!/bin/sh
-echo "usage: boot [-m <mode>] [-k <kernel location>] [-t <kernel image type] [-r <rootfs location>] [-T <rootfs type>]"
+echo "usage: boot [-m <mode>] [-k <kernel location>] [-t <kernel image type] [-r <rootfs location>] [-T <rootfs type>] [-i <ip mode>]"
echo "boot."
echo ""
echo "options"
@@ -15,6 +15,7 @@ echo " -k kernel location tftp, nfs, nand, nor"
echo " -t kernel image type uimage, zimage, raw or raw_lzo"
echo " -r rootfs location nfs, nand, nor, initrd"
echo " -T rootfs type ubi, jffs2, ext2, etc..."
+echo " -i ip mode dhcp, none, static"
echo ""
echo ""
echo "default is"
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] defaultenv boot updates
2011-04-08 13:37 [PATCH 0/4] defaultenv boot updates Jean-Christophe PLAGNIOL-VILLARD
` (3 preceding siblings ...)
2011-04-08 13:40 ` [PATCH 4/4] defaultenv/boot: add -i option to select the ip mode Jean-Christophe PLAGNIOL-VILLARD
@ 2011-04-11 10:16 ` Sascha Hauer
2011-04-11 10:17 ` Jean-Christophe PLAGNIOL-VILLARD
4 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2011-04-11 10:16 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
Hi,
On Fri, Apr 08, 2011 at 03:37:13PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> HI,
>
> this following patch series make boot script more configurable
>
>
I'm getting the impression that we stretch the capabilities of our shell
way beyond its limits. We started with booting from nand/nor/net and
added mmc cards later. Still this is not flexible enough to handle
images for example on a fat filesystem, not to mention different kernels
on one medium.
I was thinking about this topic a bit, and my idea currently is
to add a command with which we can build a list of images. An image can
be a kernel or a filesystem image. Each image can be associated with
a bootarg snippet and a command to execute to access this image.
Altogether this could look like this:
linux [OPTIONS]
-a <name> add a new image
-f <file> path to image
-b <bootarg> kernel bootargs to append for this image
-z This is a zImage
-u This is a uImage
-r <adr> This is a raw kernel image to be started at address <adr>
-l The image is lzo compressed
-i Show currently registered images
-d delete all registered images
example:
barebox@Phytec phyCORE pcm049:/ linux -a kernel.nand -f /dev/nand0.kernel.bb -z
barebox@Phytec phyCORE pcm049:/ linux -a kernel.mmc -f /dev/disk0.1 -c "mci0.probe=1" -r 0x80008000 -l
barebox@Phytec phyCORE pcm049:/ linux -a kernel.net -f /tftp/zImage-pcm038 -c /env/bin/netinit -z
barebox@Phytec phyCORE pcm049:/ linux -a root.nand -b "root=ubi0:root ubi.mtd=7 rootfstype=ubifs" -f /dev/nand0.root.bb
barebox@Phytec phyCORE pcm049:/ linux -a root.nfs -b "root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
barebox@Phytec phyCORE pcm049:/ linux -a root.net.ext2 -f /tftp/root-pcm038.ext2 -c /env/bin/netinit
barebox@Phytec phyCORE pcm049:/ linux -i
kernel.nand (zImage)
file: /dev/nand0.kernel.bb
kernel.mmc (raw@80008000, lzo)
file: /dev/disk0.1
command: mci0.probe=1
kernel.net (zImage)
file: /tftp/zImage-pcm038
command: /env/bin/netinit
root.nand
file: /dev/nand0.root.bb
bootarg: root=ubi0:root ubi.mtd=7 rootfstype=ubifs
root.nfs
bootarg: root=/dev/nfs nfsroot=192.168.23.2:/home/sha/nfsroot/pcm049,v3,tcp
root.net.ext2
file: /tftp/root-pcm038.ext2
command: /env/bin/netinit
barebox@Phytec phyCORE pcm049:/
Then we can play tricks like:
boot kernel from nand with nfsroot:
barebox@Phytec phyCORE pcm049:/ boot kernel.nand root.nfs
Update kernel from network to nand:
barebox@Phytec phyCORE pcm049:/ update kernel.net kernel.nand
Most probably there are problems I haven't thought about yet, but what
do think about it in general?
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] defaultenv boot updates
2011-04-11 10:16 ` [PATCH 0/4] defaultenv boot updates Sascha Hauer
@ 2011-04-11 10:17 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-11 10:55 ` Sascha Hauer
0 siblings, 1 reply; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-11 10:17 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
On 12:16 Mon 11 Apr , Sascha Hauer wrote:
> Hi,
>
> On Fri, Apr 08, 2011 at 03:37:13PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > HI,
> >
> > this following patch series make boot script more configurable
> >
> >
>
> I'm getting the impression that we stretch the capabilities of our shell
> way beyond its limits. We started with booting from nand/nor/net and
> added mmc cards later. Still this is not flexible enough to handle
> images for example on a fat filesystem, not to mention different kernels
> on one medium.
>
> I was thinking about this topic a bit, and my idea currently is
> to add a command with which we can build a list of images. An image can
> be a kernel or a filesystem image. Each image can be associated with
> a bootarg snippet and a command to execute to access this image.
>
I like the idea
as we can be multiple user of the same harware so it will simplify it
> Altogether this could look like this:
>
> linux [OPTIONS]
>
> -a <name> add a new image
> -f <file> path to image
> -b <bootarg> kernel bootargs to append for this image
> -z This is a zImage
> -u This is a uImage
> -r <adr> This is a raw kernel image to be started at address <adr>
> -l The image is lzo compressed
-C <compression>
> -i Show currently registered images
-l for list
> -d delete all registered images
-d too delete all :(
I think -d should delete only one
-D for all
>
>
> example:
>
> barebox@Phytec phyCORE pcm049:/ linux -a kernel.nand -f /dev/nand0.kernel.bb -z
> barebox@Phytec phyCORE pcm049:/ linux -a kernel.mmc -f /dev/disk0.1 -c "mci0.probe=1" -r 0x80008000 -l
what is this -c ?
> barebox@Phytec phyCORE pcm049:/ linux -a kernel.net -f /tftp/zImage-pcm038 -c /env/bin/netinit -z
> barebox@Phytec phyCORE pcm049:/ linux -a root.nand -b "root=ubi0:root ubi.mtd=7 rootfstype=ubifs" -f /dev/nand0.root.bb
> barebox@Phytec phyCORE pcm049:/ linux -a root.nfs -b "root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
> barebox@Phytec phyCORE pcm049:/ linux -a root.net.ext2 -f /tftp/root-pcm038.ext2 -c /env/bin/netinit
> barebox@Phytec phyCORE pcm049:/ linux -i
> kernel.nand (zImage)
> file: /dev/nand0.kernel.bb
> kernel.mmc (raw@80008000, lzo)
> file: /dev/disk0.1
> command: mci0.probe=1
> kernel.net (zImage)
> file: /tftp/zImage-pcm038
> command: /env/bin/netinit
> root.nand
> file: /dev/nand0.root.bb
> bootarg: root=ubi0:root ubi.mtd=7 rootfstype=ubifs
> root.nfs
> bootarg: root=/dev/nfs nfsroot=192.168.23.2:/home/sha/nfsroot/pcm049,v3,tcp
> root.net.ext2
> file: /tftp/root-pcm038.ext2
> command: /env/bin/netinit
> barebox@Phytec phyCORE pcm049:/
>
>
> Then we can play tricks like:
>
> boot kernel from nand with nfsroot:
>
> barebox@Phytec phyCORE pcm049:/ boot kernel.nand root.nfs
>
> Update kernel from network to nand:
>
> barebox@Phytec phyCORE pcm049:/ update kernel.net kernel.nand
>
> Most probably there are problems I haven't thought about yet, but what
> do think about it in general?
I like the idea
but we should use the menu to manage it?
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] defaultenv boot updates
2011-04-11 10:17 ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-04-11 10:55 ` Sascha Hauer
2011-04-23 2:16 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 1 reply; 9+ messages in thread
From: Sascha Hauer @ 2011-04-11 10:55 UTC (permalink / raw)
To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox
Hi J,
On Mon, Apr 11, 2011 at 12:17:52PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 12:16 Mon 11 Apr , Sascha Hauer wrote:
> > Hi,
> >
> > On Fri, Apr 08, 2011 at 03:37:13PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > HI,
> > >
> > > this following patch series make boot script more configurable
> > >
> > >
> >
> > I'm getting the impression that we stretch the capabilities of our shell
> > way beyond its limits. We started with booting from nand/nor/net and
> > added mmc cards later. Still this is not flexible enough to handle
> > images for example on a fat filesystem, not to mention different kernels
> > on one medium.
> >
> > I was thinking about this topic a bit, and my idea currently is
> > to add a command with which we can build a list of images. An image can
> > be a kernel or a filesystem image. Each image can be associated with
> > a bootarg snippet and a command to execute to access this image.
> >
> I like the idea
>
> as we can be multiple user of the same harware so it will simplify it
>
> > Altogether this could look like this:
> >
> > linux [OPTIONS]
> >
> > -a <name> add a new image
> > -f <file> path to image
> > -b <bootarg> kernel bootargs to append for this image
> > -z This is a zImage
> > -u This is a uImage
> > -r <adr> This is a raw kernel image to be started at address <adr>
> > -l The image is lzo compressed
> -C <compression>
> > -i Show currently registered images
> -l for list
> > -d delete all registered images
> -d too delete all :(
>
> I think -d should delete only one
> -D for all
Ok.
> >
> >
> > example:
> >
> > barebox@Phytec phyCORE pcm049:/ linux -a kernel.nand -f /dev/nand0.kernel.bb -z
> > barebox@Phytec phyCORE pcm049:/ linux -a kernel.mmc -f /dev/disk0.1 -c "mci0.probe=1" -r 0x80008000 -l
> what is this -c ?
-c specifies a command to be executed when this file is to be accessed.
If you have network on a USB ethernet dongle for example, you want to
delay the probing until it is really used. So you could provide a script
here which calls "usb; dhcp" or something like that.
For a fat filesystem on a mmc card it could be
"mci0.probe=1; mkdir /fat; mount /dev/disk0.1 fat /fat"
> I like the idea
>
> but we should use the menu to manage it?
I think it should always work without the menu, but of course it's nice
to integrate it into the menu also.
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] defaultenv boot updates
2011-04-11 10:55 ` Sascha Hauer
@ 2011-04-23 2:16 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 9+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-23 2:16 UTC (permalink / raw)
To: Sascha Hauer; +Cc: barebox
HI,
until this new way will be available can we have those patch
integrated?
Best Regards,
J.
On 12:55 Mon 11 Apr , Sascha Hauer wrote:
> Hi J,
>
> On Mon, Apr 11, 2011 at 12:17:52PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 12:16 Mon 11 Apr , Sascha Hauer wrote:
> > > Hi,
> > >
> > > On Fri, Apr 08, 2011 at 03:37:13PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > HI,
> > > >
> > > > this following patch series make boot script more configurable
> > > >
> > > >
> > >
> > > I'm getting the impression that we stretch the capabilities of our shell
> > > way beyond its limits. We started with booting from nand/nor/net and
> > > added mmc cards later. Still this is not flexible enough to handle
> > > images for example on a fat filesystem, not to mention different kernels
> > > on one medium.
> > >
> > > I was thinking about this topic a bit, and my idea currently is
> > > to add a command with which we can build a list of images. An image can
> > > be a kernel or a filesystem image. Each image can be associated with
> > > a bootarg snippet and a command to execute to access this image.
> > >
> > I like the idea
> >
> > as we can be multiple user of the same harware so it will simplify it
> >
> > > Altogether this could look like this:
> > >
> > > linux [OPTIONS]
> > >
> > > -a <name> add a new image
> > > -f <file> path to image
> > > -b <bootarg> kernel bootargs to append for this image
> > > -z This is a zImage
> > > -u This is a uImage
> > > -r <adr> This is a raw kernel image to be started at address <adr>
> > > -l The image is lzo compressed
> > -C <compression>
> > > -i Show currently registered images
> > -l for list
> > > -d delete all registered images
> > -d too delete all :(
> >
> > I think -d should delete only one
> > -D for all
>
> Ok.
>
> > >
> > >
> > > example:
> > >
> > > barebox@Phytec phyCORE pcm049:/ linux -a kernel.nand -f /dev/nand0.kernel.bb -z
> > > barebox@Phytec phyCORE pcm049:/ linux -a kernel.mmc -f /dev/disk0.1 -c "mci0.probe=1" -r 0x80008000 -l
> > what is this -c ?
>
> -c specifies a command to be executed when this file is to be accessed.
> If you have network on a USB ethernet dongle for example, you want to
> delay the probing until it is really used. So you could provide a script
> here which calls "usb; dhcp" or something like that.
> For a fat filesystem on a mmc card it could be
>
> "mci0.probe=1; mkdir /fat; mount /dev/disk0.1 fat /fat"
>
> > I like the idea
> >
> > but we should use the menu to manage it?
>
> I think it should always work without the menu, but of course it's nice
> to integrate it into the menu also.
>
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-04-23 2:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-08 13:37 [PATCH 0/4] defaultenv boot updates Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 1/4] defaultenv/boot: switch to getopt Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 2/4] defaultenv/boot: add -k and -t option to specify the kernel location and image type Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 3/4] defaultenv/boot: add -r and -T option to select rootfs location and type Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:40 ` [PATCH 4/4] defaultenv/boot: add -i option to select the ip mode Jean-Christophe PLAGNIOL-VILLARD
2011-04-11 10:16 ` [PATCH 0/4] defaultenv boot updates Sascha Hauer
2011-04-11 10:17 ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-11 10:55 ` Sascha Hauer
2011-04-23 2:16 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox