Author: kaloz Date: 2014-06-27 14:58:08 +0200 (Fri, 27 Jun 2014) New Revision: 41359
Modified: trunk/include/image.mk trunk/scripts/ubinize-image.sh Log: make UbinizeImage work nicely without a kernel volume Signed-off-by: Imre Kaloz <[email protected]> Modified: trunk/include/image.mk =================================================================== --- trunk/include/image.mk 2014-06-27 10:40:44 UTC (rev 41358) +++ trunk/include/image.mk 2014-06-27 12:58:08 UTC (rev 41359) @@ -142,15 +142,14 @@ "$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(2)-sysupgrade.tar" sysupgrade-$(1)) endef # $(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) -# $(4) kernel image file -# $(5) options to pass-through to ubinize (i.e. $($(PROFILE)_UBI_OPTS))) +# $(4) options to pass-through to ubinize (i.e. $($(PROFILE)_UBI_OPTS))) define Image/Build/UbinizeImage sh $(TOPDIR)/scripts/ubinize-image.sh $(2) \ - "$(KDIR)/root.$(3)" "$(4)" \ + "$(KDIR)/root.$(3)" \ "$(BIN_DIR)/$(IMG_PREFIX)-$(1)-$(3)-ubinized.bin" \ - $(5) + $(4) endef endif Modified: trunk/scripts/ubinize-image.sh =================================================================== --- trunk/scripts/ubinize-image.sh 2014-06-27 10:40:44 UTC (rev 41358) +++ trunk/scripts/ubinize-image.sh 2014-06-27 12:58:08 UTC (rev 41359) @@ -1,7 +1,6 @@ #!/bin/sh ubootenv="" -nokernel="" ubinize_param="" kernel="" rootfs="" @@ -63,8 +62,8 @@ shift continue ;; - "--no-kernel") - nokernel="nokernel" + "--kernel") + kernel="$2" shift continue ;; @@ -73,11 +72,6 @@ break ;; *) - if [ ! "$kernel" -a ! "$nokernel" ]; then - kernel=$1 - shift - continue - fi if [ ! "$rootfs" ]; then rootfs=$1 shift @@ -92,8 +86,8 @@ 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 _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
