mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/7] defaultenv updates
@ 2011-04-08 10:19 Marc Kleine-Budde
  2011-04-08 10:19 ` [PATCH 1/7] defaultenv: simplify scripting Marc Kleine-Budde
                   ` (8 more replies)
  0 siblings, 9 replies; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 10:19 UTC (permalink / raw)
  To: sha; +Cc: barebox

Hello,

this patch series updates the default env. It takes care about some problems
that arise if linux has two network interfaces (e.g. the mx28) and adds
support for kernel and/or rootfs location disk. Which can be a mmc
(in case of the mx28) or in the x86 case a bios disk.

please review and consider to apply.

cheers, Marc


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

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

* [PATCH 1/7] defaultenv: simplify scripting
  2011-04-08 10:19 [PATCH 0/7] defaultenv updates Marc Kleine-Budde
@ 2011-04-08 10:19 ` Marc Kleine-Budde
  2011-04-08 10:42   ` Sascha Hauer
  2011-04-08 10:19 ` [PATCH 2/7] defaultenv: boot: add backwards compatibility for kernel_loc=net Marc Kleine-Budde
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 10:19 UTC (permalink / raw)
  To: sha; +Cc: barebox

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 defaultenv/bin/boot   |    2 +-
 defaultenv/bin/update |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index de4fa24..c97a396 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -74,7 +74,7 @@ if [ ! -e /dev/ram0.kernel ]; then
 	addpart /dev/ram0 8M@8M(kernel)
 fi
 
-if [ x$kernel_loc = xnfs ] || [ x$kernel_loc = xtftp ]; then
+if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then
 	if [ x$ip = xdhcp ]; then
 		dhcp
 	fi
diff --git a/defaultenv/bin/update b/defaultenv/bin/update
index 7c37c36..c78159d 100644
--- a/defaultenv/bin/update
+++ b/defaultenv/bin/update
@@ -32,12 +32,12 @@ elif [ x${type} = xrootfs ]; then
 	type=root
 elif [ x${type} = xbarebox ]; then
 	image=$bareboximage
-	if [ x${image} = x ]; then
+	if [ -z x${image} ]; then
 		image=barebox.bin
 	fi
 elif [ x${type} = xbareboxenv ]; then
 	image=$bareboxenvimage
-	if [ x${image} = x ]; then
+	if [ -z ${image} ]; then
 		image=bareboxenv.bin
 	fi
 else
@@ -45,7 +45,7 @@ else
 	exit 1
 fi
 
-if [ x${imagename} != x ]; then
+if [ -n ${imagename} ]; then
 	image=${imagename}
 fi
 
@@ -58,7 +58,7 @@ else
 	exit 1
 fi
 
-if [ x${mode} != xtftp ] && [ x${mode} != xxmodem ] ; then
+if [ x${mode} != xtftp -a x${mode} != xxmodem ] ; then
 	echo "unsupported mode ${mode}."
 	. /env/bin/_update_help
 	exit 1
-- 
1.7.4.1


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

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

* [PATCH 2/7] defaultenv: boot: add backwards compatibility for kernel_loc=net
  2011-04-08 10:19 [PATCH 0/7] defaultenv updates Marc Kleine-Budde
  2011-04-08 10:19 ` [PATCH 1/7] defaultenv: simplify scripting Marc Kleine-Budde
@ 2011-04-08 10:19 ` Marc Kleine-Budde
  2011-04-08 13:32   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-04-08 10:19 ` [PATCH 3/7] defaultenv: boot: add eth0 to ip configuration Marc Kleine-Budde
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 10:19 UTC (permalink / raw)
  To: sha; +Cc: barebox

Since commit 9eac282024c55fc13970189d6ace61f884917538, the boot script
doesn't understand kernel_loc=net anymore. This patch adds backwards
compatibility so that the kernel is loaded from tftp as before.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 defaultenv/bin/boot |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index c97a396..6649c57 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -2,6 +2,10 @@
 
 . /env/config
 
+if [ x$kernel_loc = xnet ]; then
+	kernel_loc=tftp
+fi
+
 if [ x$1 = xnand ]; then
 	rootfs_loc=nand
 	kernel_loc=nand
-- 
1.7.4.1


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

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

* [PATCH 3/7] defaultenv: boot: add eth0 to ip configuration
  2011-04-08 10:19 [PATCH 0/7] defaultenv updates Marc Kleine-Budde
  2011-04-08 10:19 ` [PATCH 1/7] defaultenv: simplify scripting Marc Kleine-Budde
  2011-04-08 10:19 ` [PATCH 2/7] defaultenv: boot: add backwards compatibility for kernel_loc=net Marc Kleine-Budde
@ 2011-04-08 10:19 ` Marc Kleine-Budde
  2011-04-08 10:19 ` [PATCH 4/7] defaultenv: boot: add serverip to static " Marc Kleine-Budde
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 10:19 UTC (permalink / raw)
  To: sha; +Cc: barebox

When passing a fixed IP to the kernel set it explicit to eth0. Otherwise
on systems with more than one interface dhcp might be used.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 defaultenv/bin/boot |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 6649c57..3514961 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -25,7 +25,7 @@ if [ x$ip = xdhcp ]; then
 elif [ x$ip = xnone ]; then
 	bootargs="$bootargs ip=none"
 else
-	bootargs="$bootargs ip=$eth0.ipaddr::$eth0.gateway:$eth0.netmask:::"
+	bootargs="$bootargs ip=$eth0.ipaddr::$eth0.gateway:$eth0.netmask::eth0:"
 fi
 
 
-- 
1.7.4.1


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

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

* [PATCH 4/7] defaultenv: boot: add serverip to static ip configuration
  2011-04-08 10:19 [PATCH 0/7] defaultenv updates Marc Kleine-Budde
                   ` (2 preceding siblings ...)
  2011-04-08 10:19 ` [PATCH 3/7] defaultenv: boot: add eth0 to ip configuration Marc Kleine-Budde
@ 2011-04-08 10:19 ` Marc Kleine-Budde
  2011-04-08 10:19 ` [PATCH 5/7] defaultenv: boot: add support to boot from disk Marc Kleine-Budde
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 10:19 UTC (permalink / raw)
  To: sha; +Cc: barebox

If a (different) server is supplied to the "nfsroot" parameter, the kernel
will choose that one.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 defaultenv/bin/boot |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 3514961..4284308 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -25,7 +25,7 @@ if [ x$ip = xdhcp ]; then
 elif [ x$ip = xnone ]; then
 	bootargs="$bootargs ip=none"
 else
-	bootargs="$bootargs ip=$eth0.ipaddr::$eth0.gateway:$eth0.netmask::eth0:"
+	bootargs="$bootargs ip=$eth0.ipaddr:$eth0.serverip:$eth0.gateway:$eth0.netmask::eth0:"
 fi
 
 
-- 
1.7.4.1


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

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

* [PATCH 5/7] defaultenv: boot: add support to boot from disk
  2011-04-08 10:19 [PATCH 0/7] defaultenv updates Marc Kleine-Budde
                   ` (3 preceding siblings ...)
  2011-04-08 10:19 ` [PATCH 4/7] defaultenv: boot: add serverip to static " Marc Kleine-Budde
@ 2011-04-08 10:19 ` Marc Kleine-Budde
  2011-04-08 13:38   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-04-08 10:19 ` [PATCH 6/7] defaultenv: update: add support to update kernel on disk Marc Kleine-Budde
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 10:19 UTC (permalink / raw)
  To: sha; +Cc: barebox

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 defaultenv/bin/boot |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index 4284308..652ae0c 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -18,6 +18,9 @@ elif [ x$1 = xnfs ]; then
 elif [ x$1 = xtftp ]; then
 	rootfs_loc=net
 	kernel_loc=tftp
+elif [ x$1 = xdisk ]; then
+	rootfs_loc=disk
+	kernel_loc=disk
 fi
 
 if [ x$ip = xdhcp ]; then
@@ -31,6 +34,8 @@ fi
 
 if [ x$rootfs_loc = xnet ]; then
 	bootargs="$bootargs root=/dev/nfs nfsroot=$nfsroot,v3,tcp noinitrd"
+elif [ x$rootfs_loc = xdisk ]; then
+	bootargs="$bootargs root=/dev/$rootfs_part_linux_dev rootfstype=$rootfs_type noinitrd rootwait"
 elif [ x$rootfs_loc = xinitrd ]; then
 	bootargs="$bootargs root=/dev/ram0 rdinit=/sbin/init"
 else
@@ -100,8 +105,10 @@ elif [ x$kernel_loc = xnor ]; then
 	kdev="/dev/nor0.kernel"
 elif [ x$kernel_loc = xnand ]; then
 	kdev="/dev/nand0.kernel.bb"
+elif [ x$kernel_loc = xdisk ]; then
+	kdev="/dev/$kernel_part"
 else
-	echo "error: set kernel_loc to one of 'nfs', 'tftp', 'nand' or 'nor'"
+	echo "error: set kernel_loc to one of 'tftp', 'nfs', 'nand', 'nor' or 'disk'"
 	exit 1
 fi
 
-- 
1.7.4.1


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

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

* [PATCH 6/7] defaultenv: update: add support to update kernel on disk
  2011-04-08 10:19 [PATCH 0/7] defaultenv updates Marc Kleine-Budde
                   ` (4 preceding siblings ...)
  2011-04-08 10:19 ` [PATCH 5/7] defaultenv: boot: add support to boot from disk Marc Kleine-Budde
@ 2011-04-08 10:19 ` Marc Kleine-Budde
  2011-04-08 10:19 ` [PATCH 7/7] defaultenv: add config template Marc Kleine-Budde
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 10:19 UTC (permalink / raw)
  To: sha; +Cc: barebox

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 defaultenv/bin/_update_help |    2 +-
 defaultenv/bin/update       |    3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/defaultenv/bin/_update_help b/defaultenv/bin/_update_help
index 5e3ca45..19e8b39 100644
--- a/defaultenv/bin/_update_help
+++ b/defaultenv/bin/_update_help
@@ -7,7 +7,7 @@ echo "options"
 echo " -c     to check the crc32 for the image and flashed one"
 echo ""
 echo "default mode is tftp"
-echo "type update -t kernel -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update kernel into flash"
+echo "type update -t kernel -d <nor|nand|disk> [-m tftp|xmodem] [-f imagename] to update kernel into flash"
 echo "type update -t rootfs -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update rootfs into flash"
 echo "type update -t barebox -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update barebox into flash"
 echo "type update -t bareboxenv -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update bareboxenv into flash"
diff --git a/defaultenv/bin/update b/defaultenv/bin/update
index c78159d..ca1605a 100644
--- a/defaultenv/bin/update
+++ b/defaultenv/bin/update
@@ -27,6 +27,7 @@ done
 
 if [ x${type} = xkernel ]; then
 	image=$kernelimage
+	disk_part=$kernel_part
 elif [ x${type} = xrootfs ]; then
 	image=$rootfsimage
 	type=root
@@ -53,6 +54,8 @@ if [ x${device_type} = xnand ]; then
 	part=/dev/nand0.${type}.bb
 elif [ x${device_type} = xnor ]; then
 	part=/dev/nor0.${type}
+elif [ x${device_type} = xdisk ]; then
+	part=/dev/${disk_part}
 else
 	. /env/bin/_update_help
 	exit 1
-- 
1.7.4.1


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

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

* [PATCH 7/7] defaultenv: add config template
  2011-04-08 10:19 [PATCH 0/7] defaultenv updates Marc Kleine-Budde
                   ` (5 preceding siblings ...)
  2011-04-08 10:19 ` [PATCH 6/7] defaultenv: update: add support to update kernel on disk Marc Kleine-Budde
@ 2011-04-08 10:19 ` Marc Kleine-Budde
  2011-04-08 13:41   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-04-08 10:26 ` [PATCH 0/7] defaultenv updates Marc Kleine-Budde
  2011-04-08 11:08 ` [PATCH 1/7 v2] defaultenv: simplify scripting Marc Kleine-Budde
  8 siblings, 1 reply; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 10:19 UTC (permalink / raw)
  To: sha; +Cc: barebox

This patch add a config template to the defaultenv.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 defaultenv/config |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)
 create mode 100644 defaultenv/config

diff --git a/defaultenv/config b/defaultenv/config
new file mode 100644
index 0000000..c2fe6ce
--- /dev/null
+++ b/defaultenv/config
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+machine=FIXME
+#user=
+
+# use 'dhcp' to do dhcp in barebox and in kernel
+# use 'none' if you want to skip kernel ip autoconfiguration
+ip=dhcp
+
+# or set your networking parameters here
+#eth0.ipaddr=a.b.c.d
+#eth0.netmask=a.b.c.d
+#eth0.serverip=a.b.c.d
+#eth0.gateway=a.b.c.d
+#eth0.ethaddr=de:ad:be:ef:00:00
+
+# can be either 'tftp', 'nfs', 'nand', 'nor' or 'disk'
+kernel_loc=tftp
+# can be either 'net', 'nand', 'nor', 'disk' or 'initrd'
+rootfs_loc=net
+
+# for flash based rootfs: 'jffs2' or 'ubifs'
+# in case of disk any regular filesystem like 'ext2', 'ext3', 'reiserfs'
+rootfs_type=ubifs
+# where is the rootfs in case of 'rootfs_loc=disk' (linux name)
+rootfs_part_linux_dev=mmcblk0p4
+rootfsimage=rootfs-${machine}.$rootfs_type
+
+# where is the kernel image in case of 'kernel_loc=disk'
+kernel_part=disk0.2
+
+# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo
+kernelimage_type=zimage
+kernelimage=zImage-$machine
+#kernelimage_type=uimage
+#kernelimage=uImage-$machine
+#kernelimage_type=raw
+#kernelimage=Image-$machine
+#kernelimage_type=raw_lzo
+#kernelimage=Image-$machine.lzo
+
+bareboximage=barebox-${machine}.bin
+bareboxenvimage=barebox-${machine}.bin
+
+if [ -n $user ]; then
+	bareboximage="$user"-"$bareboximage"
+	bareboxenvimage="$user"-"$bareboxenvimage"
+	kernelimage="$user"-"$kernelimage"
+	rootfsimage="$user"-"$rootfsimage"
+	nfsroot="/home/$user/nfsroot/$machine"
+else
+	nfsroot="/path/to/nfs/root"
+fi
+
+autoboot_timeout=3
+
+bootargs="console=ttyFIXME,115200"
+
+nor_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)"
+rootfs_mtdblock_nor=3
+
+nand_parts="256k(barebox)ro,128k(bareboxenv),3M(kernel),-(root)"
+nand_device="FIXME"
+rootfs_mtdblock_nand=7
+
+# set a fancy prompt (if support is compiled in)
+PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m "
-- 
1.7.4.1


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

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

* Re: [PATCH 0/7] defaultenv updates
  2011-04-08 10:19 [PATCH 0/7] defaultenv updates Marc Kleine-Budde
                   ` (6 preceding siblings ...)
  2011-04-08 10:19 ` [PATCH 7/7] defaultenv: add config template Marc Kleine-Budde
@ 2011-04-08 10:26 ` Marc Kleine-Budde
  2011-04-08 11:08 ` [PATCH 1/7 v2] defaultenv: simplify scripting Marc Kleine-Budde
  8 siblings, 0 replies; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 10:26 UTC (permalink / raw)
  To: sha; +Cc: barebox


[-- Attachment #1.1: Type: text/plain, Size: 1652 bytes --]

On 04/08/2011 12:19 PM, Marc Kleine-Budde wrote:
> Hello,
> 
> this patch series updates the default env. It takes care about some problems
> that arise if linux has two network interfaces (e.g. the mx28) and adds
> support for kernel and/or rootfs location disk. Which can be a mmc
> (in case of the mx28) or in the x86 case a bios disk.
> 
> please review and consider to apply.

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:

  git://git.pengutronix.de/git/mkl/barebox.git for-next/defaultenv

Marc Kleine-Budde (7):
      defaultenv: simplify scripting
      defaultenv: boot: add backwards compatibility for kernel_loc=net
      defaultenv: boot: add eth0 to ip configuration
      defaultenv: boot: add serverip to static ip configuration
      defaultenv: boot: add support to boot from disk
      defaultenv: update: add support to update kernel on disk
      defaultenv: add config template

 defaultenv/bin/_update_help |    2 +-
 defaultenv/bin/boot         |   17 +++++++++--
 defaultenv/bin/update       |   11 ++++--
 defaultenv/config           |   67 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 89 insertions(+), 8 deletions(-)
 create mode 100644 defaultenv/config

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

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

* Re: [PATCH 1/7] defaultenv: simplify scripting
  2011-04-08 10:19 ` [PATCH 1/7] defaultenv: simplify scripting Marc Kleine-Budde
@ 2011-04-08 10:42   ` Sascha Hauer
  2011-04-08 10:49     ` Marc Kleine-Budde
  0 siblings, 1 reply; 17+ messages in thread
From: Sascha Hauer @ 2011-04-08 10:42 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox

On Fri, Apr 08, 2011 at 12:19:02PM +0200, Marc Kleine-Budde wrote:
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  defaultenv/bin/boot   |    2 +-
>  defaultenv/bin/update |    8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
> index de4fa24..c97a396 100644
> --- a/defaultenv/bin/boot
> +++ b/defaultenv/bin/boot
> @@ -74,7 +74,7 @@ if [ ! -e /dev/ram0.kernel ]; then
>  	addpart /dev/ram0 8M@8M(kernel)
>  fi
>  
> -if [ x$kernel_loc = xnfs ] || [ x$kernel_loc = xtftp ]; then
> +if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then
>  	if [ x$ip = xdhcp ]; then
>  		dhcp
>  	fi
> diff --git a/defaultenv/bin/update b/defaultenv/bin/update
> index 7c37c36..c78159d 100644
> --- a/defaultenv/bin/update
> +++ b/defaultenv/bin/update
> @@ -32,12 +32,12 @@ elif [ x${type} = xrootfs ]; then
>  	type=root
>  elif [ x${type} = xbarebox ]; then
>  	image=$bareboximage
> -	if [ x${image} = x ]; then
> +	if [ -z x${image} ]; then

s/x${image}/${image}/

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] 17+ messages in thread

* Re: [PATCH 1/7] defaultenv: simplify scripting
  2011-04-08 10:42   ` Sascha Hauer
@ 2011-04-08 10:49     ` Marc Kleine-Budde
  0 siblings, 0 replies; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 10:49 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox


[-- Attachment #1.1: Type: text/plain, Size: 1447 bytes --]

On 04/08/2011 12:42 PM, Sascha Hauer wrote:
> On Fri, Apr 08, 2011 at 12:19:02PM +0200, Marc Kleine-Budde wrote:
>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>> ---
>>  defaultenv/bin/boot   |    2 +-
>>  defaultenv/bin/update |    8 ++++----
>>  2 files changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
>> index de4fa24..c97a396 100644
>> --- a/defaultenv/bin/boot
>> +++ b/defaultenv/bin/boot
>> @@ -74,7 +74,7 @@ if [ ! -e /dev/ram0.kernel ]; then
>>  	addpart /dev/ram0 8M@8M(kernel)
>>  fi
>>  
>> -if [ x$kernel_loc = xnfs ] || [ x$kernel_loc = xtftp ]; then
>> +if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then
>>  	if [ x$ip = xdhcp ]; then
>>  		dhcp
>>  	fi
>> diff --git a/defaultenv/bin/update b/defaultenv/bin/update
>> index 7c37c36..c78159d 100644
>> --- a/defaultenv/bin/update
>> +++ b/defaultenv/bin/update
>> @@ -32,12 +32,12 @@ elif [ x${type} = xrootfs ]; then
>>  	type=root
>>  elif [ x${type} = xbarebox ]; then
>>  	image=$bareboximage
>> -	if [ x${image} = x ]; then
>> +	if [ -z x${image} ]; then
> 
> s/x${image}/${image}/

ACK

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

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

* [PATCH 1/7 v2] defaultenv: simplify scripting
  2011-04-08 10:19 [PATCH 0/7] defaultenv updates Marc Kleine-Budde
                   ` (7 preceding siblings ...)
  2011-04-08 10:26 ` [PATCH 0/7] defaultenv updates Marc Kleine-Budde
@ 2011-04-08 11:08 ` Marc Kleine-Budde
  8 siblings, 0 replies; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 11:08 UTC (permalink / raw)
  To: sha; +Cc: barebox

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---

Changes since v1:

- fix "if [ -z x${image} ]", tnx sha

 defaultenv/bin/boot   |    2 +-
 defaultenv/bin/update |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
index de4fa24..c97a396 100644
--- a/defaultenv/bin/boot
+++ b/defaultenv/bin/boot
@@ -74,7 +74,7 @@ if [ ! -e /dev/ram0.kernel ]; then
 	addpart /dev/ram0 8M@8M(kernel)
 fi
 
-if [ x$kernel_loc = xnfs ] || [ x$kernel_loc = xtftp ]; then
+if [ x$kernel_loc = xnfs -o x$kernel_loc = xtftp ]; then
 	if [ x$ip = xdhcp ]; then
 		dhcp
 	fi
diff --git a/defaultenv/bin/update b/defaultenv/bin/update
index 7c37c36..d75d678 100644
--- a/defaultenv/bin/update
+++ b/defaultenv/bin/update
@@ -32,12 +32,12 @@ elif [ x${type} = xrootfs ]; then
 	type=root
 elif [ x${type} = xbarebox ]; then
 	image=$bareboximage
-	if [ x${image} = x ]; then
+	if [ -z ${image} ]; then
 		image=barebox.bin
 	fi
 elif [ x${type} = xbareboxenv ]; then
 	image=$bareboxenvimage
-	if [ x${image} = x ]; then
+	if [ -z ${image} ]; then
 		image=bareboxenv.bin
 	fi
 else
@@ -45,7 +45,7 @@ else
 	exit 1
 fi
 
-if [ x${imagename} != x ]; then
+if [ -n ${imagename} ]; then
 	image=${imagename}
 fi
 
@@ -58,7 +58,7 @@ else
 	exit 1
 fi
 
-if [ x${mode} != xtftp ] && [ x${mode} != xxmodem ] ; then
+if [ x${mode} != xtftp -a x${mode} != xxmodem ] ; then
 	echo "unsupported mode ${mode}."
 	. /env/bin/_update_help
 	exit 1
-- 
1.7.4.1


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

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

* Re: [PATCH 2/7] defaultenv: boot: add backwards compatibility for kernel_loc=net
  2011-04-08 10:19 ` [PATCH 2/7] defaultenv: boot: add backwards compatibility for kernel_loc=net Marc Kleine-Budde
@ 2011-04-08 13:32   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-04-08 13:59     ` Marc Kleine-Budde
  0 siblings, 1 reply; 17+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-08 13:32 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox, sha

On 12:19 Fri 08 Apr     , Marc Kleine-Budde wrote:
> Since commit 9eac282024c55fc13970189d6ace61f884917538, the boot script
> doesn't understand kernel_loc=net anymore. This patch adds backwards
> compatibility so that the kernel is loaded from tftp as before.
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
please wait I'm switching boot to getopt and make more frendly

Best Regards,
J.

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

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

* Re: [PATCH 5/7] defaultenv: boot: add support to boot from disk
  2011-04-08 10:19 ` [PATCH 5/7] defaultenv: boot: add support to boot from disk Marc Kleine-Budde
@ 2011-04-08 13:38   ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 17+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-08 13:38 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox, sha

On 12:19 Fri 08 Apr     , Marc Kleine-Budde wrote:
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  defaultenv/bin/boot |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
> index 4284308..652ae0c 100644
> --- a/defaultenv/bin/boot
> +++ b/defaultenv/bin/boot
> @@ -18,6 +18,9 @@ elif [ x$1 = xnfs ]; then
>  elif [ x$1 = xtftp ]; then
>  	rootfs_loc=net
>  	kernel_loc=tftp
> +elif [ x$1 = xdisk ]; then
> +	rootfs_loc=disk
> +	kernel_loc=disk
>  fi

please waiit I'm send patch to improve boot with swithing to getopt


Best Regards,
J.

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

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

* Re: [PATCH 7/7] defaultenv: add config template
  2011-04-08 10:19 ` [PATCH 7/7] defaultenv: add config template Marc Kleine-Budde
@ 2011-04-08 13:41   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-04-08 13:59     ` Marc Kleine-Budde
  0 siblings, 1 reply; 17+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-04-08 13:41 UTC (permalink / raw)
  To: Marc Kleine-Budde; +Cc: barebox, sha

On 12:19 Fri 08 Apr     , Marc Kleine-Budde wrote:
> This patch add a config template to the defaultenv.
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  defaultenv/config |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
this should go to doc?

Best Regards,
J.

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

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

* Re: [PATCH 7/7] defaultenv: add config template
  2011-04-08 13:41   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-04-08 13:59     ` Marc Kleine-Budde
  0 siblings, 0 replies; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 13:59 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox, sha


[-- Attachment #1.1: Type: text/plain, Size: 706 bytes --]

On 04/08/2011 03:41 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 12:19 Fri 08 Apr     , Marc Kleine-Budde wrote:
>> This patch add a config template to the defaultenv.
>>
>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>> ---
>>  defaultenv/config |   67 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> this should go to doc?

maybe....on the upside here it's next to bin/boot and bin/update

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

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

* Re: [PATCH 2/7] defaultenv: boot: add backwards compatibility for kernel_loc=net
  2011-04-08 13:32   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-04-08 13:59     ` Marc Kleine-Budde
  0 siblings, 0 replies; 17+ messages in thread
From: Marc Kleine-Budde @ 2011-04-08 13:59 UTC (permalink / raw)
  To: Jean-Christophe PLAGNIOL-VILLARD; +Cc: barebox, sha


[-- Attachment #1.1: Type: text/plain, Size: 778 bytes --]

On 04/08/2011 03:32 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 12:19 Fri 08 Apr     , Marc Kleine-Budde wrote:
>> Since commit 9eac282024c55fc13970189d6ace61f884917538, the boot script
>> doesn't understand kernel_loc=net anymore. This patch adds backwards
>> compatibility so that the kernel is loaded from tftp as before.
>>
>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>> ---
> please wait I'm switching boot to getopt and make more frendly

sounds interesting

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

[-- Attachment #2: Type: text/plain, Size: 149 bytes --]

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

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

end of thread, other threads:[~2011-04-08 13:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-08 10:19 [PATCH 0/7] defaultenv updates Marc Kleine-Budde
2011-04-08 10:19 ` [PATCH 1/7] defaultenv: simplify scripting Marc Kleine-Budde
2011-04-08 10:42   ` Sascha Hauer
2011-04-08 10:49     ` Marc Kleine-Budde
2011-04-08 10:19 ` [PATCH 2/7] defaultenv: boot: add backwards compatibility for kernel_loc=net Marc Kleine-Budde
2011-04-08 13:32   ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:59     ` Marc Kleine-Budde
2011-04-08 10:19 ` [PATCH 3/7] defaultenv: boot: add eth0 to ip configuration Marc Kleine-Budde
2011-04-08 10:19 ` [PATCH 4/7] defaultenv: boot: add serverip to static " Marc Kleine-Budde
2011-04-08 10:19 ` [PATCH 5/7] defaultenv: boot: add support to boot from disk Marc Kleine-Budde
2011-04-08 13:38   ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 10:19 ` [PATCH 6/7] defaultenv: update: add support to update kernel on disk Marc Kleine-Budde
2011-04-08 10:19 ` [PATCH 7/7] defaultenv: add config template Marc Kleine-Budde
2011-04-08 13:41   ` Jean-Christophe PLAGNIOL-VILLARD
2011-04-08 13:59     ` Marc Kleine-Budde
2011-04-08 10:26 ` [PATCH 0/7] defaultenv updates Marc Kleine-Budde
2011-04-08 11:08 ` [PATCH 1/7 v2] defaultenv: simplify scripting Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox