build: rename sysupgrade-nand to sysupgrade-tar
[openwrt/openwrt.git] / target / linux / oxnas / image / Makefile
1 #
2 # Copyright (C) 2013-2016 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/image.mk
10
11 UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
12
13 DEVICE_VARS += DTS KERNEL_SIZE UBIFS_OPTS
14
15 KERNEL_LOADADDR := 0x60008000
16
17 define Build/ubootable
18 (dd if="$(KDIR)/u-boot.bin" bs=128k conv=sync; \
19 dd if="$@" bs=128k conv=sync ) >> $@.new
20 @mv "$@.new" "$@"
21 endef
22
23 define Device/Default
24 KERNEL_DEPENDS = $$(wildcard $$(DTS_DIR)/ox820-$$(DTS).dts)
25 KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/ox820-$$(DTS).dtb
26 KERNEL_NAME := zImage
27 KERNEL_SUFFIX := -uImage
28 KERNEL_INSTALL := 1
29 KERNEL_INITRAMFS = kernel-bin | lzma | fit lzma $$(DTS_DIR)/ox820-$$(DTS).dtb | ubootable
30 KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-u-boot-initramfs
31 KERNEL_INITRAMFS_SUFFIX := .bin
32 BLOCKSIZE := 128KiB
33 PAGESIZE := 2048
34 SUBPAGESIZE := 512
35 FILESYSTEMS := squashfs ubifs
36 PROFILES = Default $$(DTS)
37 IMAGES := ubinized.bin sysupgrade.tar
38 IMAGE/ubinized.bin := append-ubi
39 IMAGE/sysupgrade.tar := sysupgrade-tar
40 KERNEL_IN_UBI := 1
41 UBOOTENV_IN_UBI := 1
42 endef
43
44 define Device/akitio
45 DTS := akitio
46 DEVICE_TITLE := Akitio MyCloud mini / Silverstone DC01
47 DEVICE_PACKAGES := kmod-i2c-gpio kmod-rtc-ds1307
48 endef
49 TARGET_DEVICES += akitio
50
51 define Device/kd20
52 DTS := kd20
53 DEVICE_TITLE := Shuttle KD20
54 DEVICE_PACKAGES := kmod-usb3 kmod-i2c-gpio kmod-rtc-pcf8563 kmod-gpio-beeper \
55 kmod-hwmon-core kmod-hwmon-gpiofan
56 endef
57 TARGET_DEVICES += kd20
58
59 define Device/pogoplug-pro
60 DTS := pogoplug-pro
61 DEVICE_TITLE := Cloud Engines Pogoplug Pro (with mPCIe)
62 endef
63 TARGET_DEVICES += pogoplug-pro
64
65 define Device/pogoplug-v3
66 DTS := pogoplug-v3
67 DEVICE_TITLE := Cloud Engines Pogoplug V3 (no mPCIe)
68 endef
69 TARGET_DEVICES += pogoplug-v3
70
71 define Device/stg212
72 DTS := stg212
73 DEVICE_TITLE := MitraStar STG-212
74 endef
75 TARGET_DEVICES += stg212
76
77 VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
78 UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
79
80 $(eval $(call BuildImage))