@mv $@.new $@
endef
-define Build/sysupgrade-nand
- sh $(TOPDIR)/scripts/sysupgrade-nand.sh \
+define Build/sysupgrade-tar
+ sh $(TOPDIR)/scripts/sysupgrade-tar.sh \
--board $(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)) \
--kernel $(word 1,$^) \
--rootfs $(word 2,$^) \
+++ /dev/null
-#!/bin/sh
-
-board=""
-kernel=""
-rootfs=""
-outfile=""
-err=""
-
-while [ "$1" ]; do
- case "$1" in
- "--board")
- board="$2"
- shift
- shift
- continue
- ;;
- "--kernel")
- kernel="$2"
- shift
- shift
- continue
- ;;
- "--rootfs")
- rootfs="$2"
- shift
- shift
- continue
- ;;
- *)
- if [ ! "$outfile" ]; then
- outfile=$1
- shift
- continue
- fi
- ;;
- esac
-done
-
-if [ ! -n "$board" -o ! -r "$kernel" -a ! -r "$rootfs" -o ! "$outfile" ]; then
- echo "syntax: $0 [--board boardname] [--kernel kernelimage] [--rootfs rootfs] out"
- exit 1
-fi
-
-tmpdir="$( mktemp -d 2> /dev/null )"
-if [ -z "$tmpdir" ]; then
- # try OSX signature
- tmpdir="$( mktemp -t 'ubitmp' -d )"
-fi
-
-if [ -z "$tmpdir" ]; then
- exit 1
-fi
-
-mkdir -p "${tmpdir}/sysupgrade-${board}"
-echo "BOARD=${board}" > "${tmpdir}/sysupgrade-${board}/CONTROL"
-[ -z "${rootfs}" ] || cp "${rootfs}" "${tmpdir}/sysupgrade-${board}/root"
-[ -z "${kernel}" ] || cp "${kernel}" "${tmpdir}/sysupgrade-${board}/kernel"
-
-mtime=""
-if [ -n "$SOURCE_DATE_EPOCH" ]; then
- mtime="--mtime=@${SOURCE_DATE_EPOCH}"
-fi
-
-(cd "$tmpdir"; tar cvf sysupgrade.tar sysupgrade-${board} ${mtime})
-err="$?"
-if [ -e "$tmpdir/sysupgrade.tar" ]; then
- cp "$tmpdir/sysupgrade.tar" "$outfile"
-else
- err=2
-fi
-rm -rf "$tmpdir"
-
-exit $err
--- /dev/null
+#!/bin/sh
+
+board=""
+kernel=""
+rootfs=""
+outfile=""
+err=""
+
+while [ "$1" ]; do
+ case "$1" in
+ "--board")
+ board="$2"
+ shift
+ shift
+ continue
+ ;;
+ "--kernel")
+ kernel="$2"
+ shift
+ shift
+ continue
+ ;;
+ "--rootfs")
+ rootfs="$2"
+ shift
+ shift
+ continue
+ ;;
+ *)
+ if [ ! "$outfile" ]; then
+ outfile=$1
+ shift
+ continue
+ fi
+ ;;
+ esac
+done
+
+if [ ! -n "$board" -o ! -r "$kernel" -a ! -r "$rootfs" -o ! "$outfile" ]; then
+ echo "syntax: $0 [--board boardname] [--kernel kernelimage] [--rootfs rootfs] out"
+ exit 1
+fi
+
+tmpdir="$( mktemp -d 2> /dev/null )"
+if [ -z "$tmpdir" ]; then
+ # try OSX signature
+ tmpdir="$( mktemp -t 'ubitmp' -d )"
+fi
+
+if [ -z "$tmpdir" ]; then
+ exit 1
+fi
+
+mkdir -p "${tmpdir}/sysupgrade-${board}"
+echo "BOARD=${board}" > "${tmpdir}/sysupgrade-${board}/CONTROL"
+[ -z "${rootfs}" ] || cp "${rootfs}" "${tmpdir}/sysupgrade-${board}/root"
+[ -z "${kernel}" ] || cp "${kernel}" "${tmpdir}/sysupgrade-${board}/kernel"
+
+mtime=""
+if [ -n "$SOURCE_DATE_EPOCH" ]; then
+ mtime="--mtime=@${SOURCE_DATE_EPOCH}"
+fi
+
+(cd "$tmpdir"; tar cvf sysupgrade.tar sysupgrade-${board} ${mtime})
+err="$?"
+if [ -e "$tmpdir/sysupgrade.tar" ]; then
+ cp "$tmpdir/sysupgrade.tar" "$outfile"
+else
+ err=2
+fi
+rm -rf "$tmpdir"
+
+exit $err
IMAGE_SIZE := 8191k
KERNEL := kernel-bin | lzma | uImage lzma | MerakiAdd-dtb | MerakiNAND
KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux | gzip | uImage gzip | MerakiAdd-dtb | pad-to 2047k | MerakiAdd-initramfs | MerakiNAND
- IMAGE/sysupgrade.tar := sysupgrade-nand
+ IMAGE/sysupgrade.tar := sysupgrade-tar
endef
TARGET_DEVICES += mr24
KERNEL_INITRAMFS := kernel-bin | gzip | dtb | wndr4700-specialImage gzip
IMAGE/factory.img := dtb | create-uImage-dtb | append-kernel | pad-to 2M | append-ubi | \
netgear-dni | check-size $$$$(IMAGE_SIZE)
- IMAGE/sysupgrade.tar := sysupgrade-nand
+ IMAGE/sysupgrade.tar := sysupgrade-tar
NETGEAR_BOARD_ID := WNDR4700
NETGEAR_HW_ID := 29763875+128+256
endef
IMAGES := sysupgrade.tar
KERNEL := kernel-bin | patch-cmdline | MerakiNAND
KERNEL_INITRAMFS := kernel-bin | patch-cmdline | MerakiNAND
- IMAGE/sysupgrade.tar := sysupgrade-nand
+ IMAGE/sysupgrade.tar := sysupgrade-tar
endef
TARGET_DEVICES += mr18
KERNEL_IN_UBI := 1
IMAGES := nand-factory.ubi nand-sysupgrade.tar
IMAGE/nand-factory.ubi := append-ubi
- IMAGE/nand-sysupgrade.tar := sysupgrade-nand
+ IMAGE/nand-sysupgrade.tar := sysupgrade-tar
endef
define Device/DniImage
BOARD_NAME := ea8500
IMAGES := factory.bin sysupgrade.tar
IMAGE/factory.bin := append-kernel 3145728 | append-ubi
- IMAGE/sysupgrade.tar := sysupgrade-nand
+ IMAGE/sysupgrade.tar := sysupgrade-tar
DEVICE_TITLE := Linksys EA8500
DEVICE_PACKAGES := ath10k-firmware-qca99x0
endef
SUBPAGESIZE := 512
BLOCKSIZE := 128KiB
IMAGES := sysupgrade.tar
- IMAGE/sysupgrade.tar := sysupgrade-nand
+ IMAGE/sysupgrade.tar := sysupgrade-tar
endef
define Device/dockstar
define Device/NAND
$(Device/NAND/$(SUBTARGET))
- IMAGE/sysupgrade.bin := sysupgrade-nand
+ IMAGE/sysupgrade.bin := sysupgrade-tar
endef
define Device/lantiqBrnImage
define Device/UBI
IMAGES := sysupgrade.bin
- IMAGE/sysupgrade.bin := sysupgrade-nand
+ IMAGE/sysupgrade.bin := sysupgrade-tar
endef
define Device/UBI-factory
KERNEL_INITRAMFS_NAME := vmlinux-initramfs.elf
KERNEL := kernel-bin | strip-kernel | patch-cmdline
IMAGES := sysupgrade.tar
- IMAGE/sysupgrade.tar := sysupgrade-nand
+ IMAGE/sysupgrade.tar := sysupgrade-tar
endef
define Build/strip-kernel
PROFILES = Default $$(DTS)
IMAGES := ubinized.bin sysupgrade.tar
IMAGE/ubinized.bin := append-ubi
- IMAGE/sysupgrade.tar := sysupgrade-nand
+ IMAGE/sysupgrade.tar := sysupgrade-tar
KERNEL_IN_UBI := 1
UBOOTENV_IN_UBI := 1
endef
KERNEL := $(KERNEL_DTB) | uImage lzma
IMAGES := sysupgrade.tar
KERNEL_INITRAMFS := $$(KERNEL) | ubnt-erx-factory-image $(KDIR)/tmp/$$(KERNEL_INITRAMFS_PREFIX)-factory.tar
- IMAGE/sysupgrade.tar := sysupgrade-nand
+ IMAGE/sysupgrade.tar := sysupgrade-tar
DEVICE_TITLE := Ubiquiti EdgeRouter X
DEVICE_PACKAGES := -kmod-mt76 -kmod-rt2800-pci -kmod-cfg80211 -wpad-mini -iwinfo
endef