diff options
Diffstat (limited to 'defaultenv')
-rw-r--r-- | defaultenv/bin/_update_help | 3 | ||||
-rw-r--r-- | defaultenv/bin/boot | 5 | ||||
-rw-r--r-- | defaultenv/bin/update | 9 |
3 files changed, 13 insertions, 4 deletions
diff --git a/defaultenv/bin/_update_help b/defaultenv/bin/_update_help index 22d940e142..5e3ca45c79 100644 --- a/defaultenv/bin/_update_help +++ b/defaultenv/bin/_update_help @@ -1,6 +1,6 @@ #!/bin/sh -echo "usage: $0 -t <kernel|rootfs|barebox> -d <nor|nand> [-m tftp|xmodem] [-f imagename] -c" +echo "usage: update -t <kernel|rootfs|barebox|bareboxenv> -d <nor|nand> [-m tftp|xmodem] [-f imagename] -c" echo "update tools." echo "" echo "options" @@ -10,3 +10,4 @@ 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 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/boot b/defaultenv/bin/boot index 4c2975d319..fa6874827b 100644 --- a/defaultenv/bin/boot +++ b/defaultenv/bin/boot @@ -34,7 +34,10 @@ else fi if [ x$rootfs_type = xubifs ]; then - bootargs="$bootargs root=ubi0:root ubi.mtd=$rootfs_mtdblock" + if [ x$ubiroot = x ]; then + ubiroot = "root" + fi + bootargs="$bootargs root=ubi0:$ubiroot ubi.mtd=$rootfs_mtdblock" else bootargs="$bootargs root=/dev/mtdblock$rootfs_mtdblock" fi diff --git a/defaultenv/bin/update b/defaultenv/bin/update index 29c240b784..43d30977d8 100644 --- a/defaultenv/bin/update +++ b/defaultenv/bin/update @@ -1,12 +1,12 @@ #!/bin/sh -. /env/config - type="" device_type="" check=n mode=tftp +. /env/config + while getopt "ht:d:f:m:c" Option do if [ ${Option} = t ]; then @@ -35,6 +35,11 @@ elif [ x${type} = xbarebox ]; then if [ x${image} = x ]; then image=barebox.bin fi +elif [ x${type} = xbareboxenv ]; then + image=$bareboxenvimage + if [ x${image} = x ]; then + image=bareboxenv.bin + fi else . /env/bin/_update_help exit 1 |