make UbinizeImage work nicely without a kernel volume
Signed-off-by: Imre Kaloz <kaloz@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41359 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
5b32f12d22
commit
5f417387b8
|
@ -142,15 +142,14 @@ ifneq ($(CONFIG_NAND_SUPPORT),)
|
||||||
"$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-sysupgrade.tar" sysupgrade-$(1))
|
"$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-sysupgrade.tar" sysupgrade-$(1))
|
||||||
endef
|
endef
|
||||||
# $(1) board name
|
# $(1) board name
|
||||||
# $(2) ubinize-image options (e.g. --no-kernel and/or --uboot-env)
|
# $(2) ubinize-image options (e.g. --uboot-env and/or --kernel kernelimage)
|
||||||
# $(3) rootfstype (e.g. squashfs or ubifs)
|
# $(3) rootfstype (e.g. squashfs or ubifs)
|
||||||
# $(4) kernel image file
|
# $(4) options to pass-through to ubinize (i.e. $($(PROFILE)_UBI_OPTS)))
|
||||||
# $(5) options to pass-through to ubinize (i.e. $($(PROFILE)_UBI_OPTS)))
|
|
||||||
define Image/Build/UbinizeImage
|
define Image/Build/UbinizeImage
|
||||||
sh $(TOPDIR)/scripts/ubinize-image.sh $(2) \
|
sh $(TOPDIR)/scripts/ubinize-image.sh $(2) \
|
||||||
"$(KDIR)/root.$(3)" "$(4)" \
|
"$(KDIR)/root.$(3)" \
|
||||||
"$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(3)-ubinized.bin" \
|
"$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(3)-ubinized.bin" \
|
||||||
$(5)
|
$(4)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
ubootenv=""
|
ubootenv=""
|
||||||
nokernel=""
|
|
||||||
ubinize_param=""
|
ubinize_param=""
|
||||||
kernel=""
|
kernel=""
|
||||||
rootfs=""
|
rootfs=""
|
||||||
|
@ -63,8 +62,8 @@ while [ "$1" ]; do
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
"--no-kernel")
|
"--kernel")
|
||||||
nokernel="nokernel"
|
kernel="$2"
|
||||||
shift
|
shift
|
||||||
continue
|
continue
|
||||||
;;
|
;;
|
||||||
|
@ -73,11 +72,6 @@ while [ "$1" ]; do
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if [ ! "$kernel" -a ! "$nokernel" ]; then
|
|
||||||
kernel=$1
|
|
||||||
shift
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if [ ! "$rootfs" ]; then
|
if [ ! "$rootfs" ]; then
|
||||||
rootfs=$1
|
rootfs=$1
|
||||||
shift
|
shift
|
||||||
|
@ -92,8 +86,8 @@ while [ "$1" ]; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -r "$rootfs" -o ! -r "$kernel" -a ! "$nokernel" -o ! "$outfile" ]; then
|
if [ ! -r "$rootfs" -o ! -r "$kernel" -a ! "$outfile" ]; then
|
||||||
echo "syntax: $0 [--no-kernel] [--uboot-env] rootfs [kernel] out [ubinize opts]"
|
echo "syntax: $0 [--uboot-env] [--kernel kernelimage] rootfs out [ubinize opts]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue