summaryrefslogtreecommitdiffstats
path: root/defaultenv
diff options
context:
space:
mode:
Diffstat (limited to 'defaultenv')
-rw-r--r--defaultenv/bin/_update_help3
-rw-r--r--defaultenv/bin/boot9
-rw-r--r--defaultenv/bin/update9
3 files changed, 15 insertions, 6 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 42c7ec2965..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
@@ -56,13 +59,13 @@ fi
if [ ! -e /dev/ram0.kernelraw ]; then
# arm raw kernel images are usually located at sdram start + 0x8000
- addpart dev/ram0 8M@0x8000(kernelraw)
+ addpart /dev/ram0 8M@0x8000(kernelraw)
fi
if [ ! -e /dev/ram0.kernel ]; then
# Here we can safely put the kernel without risking of overwriting it
# while extracting
- addpart dev/ram0 8M@8M(kernel)
+ addpart /dev/ram0 8M@8M(kernel)
fi
if [ x$kernel_loc = xnet ]; then
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