projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ramips: rename status led to wifi on WHR-300HP2, WHR-1166D, WHR-600D
[openwrt.git]
/
scripts
/
ubinize-image.sh
diff --git
a/scripts/ubinize-image.sh
b/scripts/ubinize-image.sh
index
6ffedc5
..
b87cbb4
100755
(executable)
--- a/
scripts/ubinize-image.sh
+++ b/
scripts/ubinize-image.sh
@@
-1,7
+1,6
@@
#!/bin/sh
ubootenv=""
#!/bin/sh
ubootenv=""
-nokernel=""
ubinize_param=""
kernel=""
rootfs=""
ubinize_param=""
kernel=""
rootfs=""
@@
-63,8
+62,9
@@
while [ "$1" ]; do
shift
continue
;;
shift
continue
;;
- "--no-kernel")
- nokernel="nokernel"
+ "--kernel")
+ kernel="$2"
+ shift
shift
continue
;;
shift
continue
;;
@@
-73,11
+73,6
@@
while [ "$1" ]; do
break
;;
*)
break
;;
*)
- if [ ! "$kernel" -a ! "$nokernel" ]; then
- kernel=$1
- shift
- continue
- fi
if [ ! "$rootfs" ]; then
rootfs=$1
shift
if [ ! "$rootfs" ]; then
rootfs=$1
shift
@@
-92,8
+87,8
@@
while [ "$1" ]; do
esac
done
esac
done
-if [ ! -r "$rootfs" -o ! -r "$kernel" -a ! "$
nokernel" -o ! "$
outfile" ]; then
- echo "syntax: $0 [--
no-kernel] [--uboot-env] rootfs [kernel]
out [ubinize opts]"
+if [ ! -r "$rootfs" -o ! -r "$kernel" -a ! "$outfile" ]; then
+ echo "syntax: $0 [--
uboot-env] [--kernel kernelimage] rootfs
out [ubinize opts]"
exit 1
fi
exit 1
fi
@@
-103,7
+98,11
@@
if [ ! -x "$ubinize" ]; then
exit 1
fi
exit 1
fi
-ubinizecfg="$( mktemp )"
+ubinizecfg="$( mktemp 2> /dev/null )"
+if [ -z "$ubinizecfg" ]; then
+ # try OSX signature
+ ubinizecfg="$( mktemp -t 'ubitmp' )"
+fi
ubilayout "$ubootenv" "$rootfs" "$kernel" > "$ubinizecfg"
cat "$ubinizecfg"
ubilayout "$ubootenv" "$rootfs" "$kernel" > "$ubinizecfg"
cat "$ubinizecfg"
@@
-113,4
+112,3
@@
err="$?"
rm "$ubinizecfg"
exit $err
rm "$ubinizecfg"
exit $err
-