gemini: Support sysupgrade on DIR-685
This makes sysupgrade work on the D-Link DIR-685 after initial factory install. We create the platform.sh script to support sysupgrade on more targets as we move on with sysupgrade support. Cc: Petr Štetiar <ynezz@true.cz> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Petr Štetiar <ynezz@true.cz> [cleanup in platform.sh, removed superfluous SUPPORTED_DEVICES]
This commit is contained in:
parent
4bb9af48ca
commit
8a83f17b24
25
target/linux/gemini/base-files/lib/upgrade/platform.sh
Normal file
25
target/linux/gemini/base-files/lib/upgrade/platform.sh
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
REQUIRE_IMAGE_METADATA=1
|
||||||
|
|
||||||
|
platform_check_image() {
|
||||||
|
local board=$(board_name)
|
||||||
|
|
||||||
|
case "$board" in
|
||||||
|
dlink,dir-685)
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "Sysupgrade is not yet supported on $board."
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
platform_do_upgrade() {
|
||||||
|
local board=$(board_name)
|
||||||
|
|
||||||
|
case "$board" in
|
||||||
|
dlink,dir-685)
|
||||||
|
PART_NAME=firmware
|
||||||
|
default_do_upgrade "$ARGV"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
@ -115,6 +115,7 @@ define Device/Default
|
|||||||
KERNEL_NAME := zImage
|
KERNEL_NAME := zImage
|
||||||
KERNEL := kernel-bin | append-dtb
|
KERNEL := kernel-bin | append-dtb
|
||||||
BLOCKSIZE := 128k
|
BLOCKSIZE := 128k
|
||||||
|
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# A reasonable set of default packages handling the NAS type
|
# A reasonable set of default packages handling the NAS type
|
||||||
@ -143,9 +144,10 @@ define Device/dlink_dir-685
|
|||||||
DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES) \
|
DEVICE_PACKAGES := $(GEMINI_NAS_PACKAGES) \
|
||||||
kmod-switch-rtl8366rb swconfig \
|
kmod-switch-rtl8366rb swconfig \
|
||||||
kmod-rt2800-pci
|
kmod-rt2800-pci
|
||||||
IMAGES := factory.bin
|
IMAGES := factory.bin sysupgrade.bin
|
||||||
# Pad to 128k erase blocks with 160 bytes WRGG header
|
# Pad to 128k erase blocks with 160 bytes WRGG header
|
||||||
IMAGE/factory.bin := append-kernel | pad-offset 128k 160 | append-rootfs | dir685-pad-rootfs | dir685-image
|
IMAGE/factory.bin := append-kernel | pad-offset 128k 160 | append-rootfs | dir685-pad-rootfs | dir685-image
|
||||||
|
IMAGE/sysupgrade.bin := append-kernel | pad-offset 128k 160 | dir685-image | append-rootfs | dir685-pad-rootfs | append-metadata
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += dlink_dir-685
|
TARGET_DEVICES += dlink_dir-685
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user