oxnas: use global UBIFS_OPTS, all profiles use the same settings
[lede-git/.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 PAGESIZE BLOCKSIZE SUBPAGESIZE
14 DEVICE_VARS += KERNEL_IN_UBI UBOOTENV_IN_UBI UBIFS_OPTS
15
16 KERNEL_LOADADDR := 0x60008000
17
18 define Build/ubootable
19         (dd if="$(KDIR)/u-boot.bin" bs=128k conv=sync; \
20          dd if="$@" bs=128k conv=sync ) >> $@.new
21         @mv "$@.new" "$@"
22 endef
23
24 define Device/Default
25   KERNEL_DEPENDS = $$(wildcard $$(DTS_DIR)/ox820-$$(DTS).dts)
26   KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/ox820-$$(DTS).dtb
27   KERNEL_NAME := zImage
28   KERNEL_INITRAMFS = kernel-bin | lzma | fit lzma $$(DTS_DIR)/ox820-$$(DTS).dtb | ubootable
29   KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-u-boot-initramfs
30   BLOCKSIZE := 128KiB
31   PAGESIZE := 2048
32   SUBPAGESIZE := 512
33   FILESYSTEMS := squashfs ubifs
34   PROFILES = Default $$(DTS)
35   IMAGES := ubinized.bin sysupgrade.tar
36   IMAGE/ubinized.bin := append-ubi
37   IMAGE/sysupgrade.tar := sysupgrade-nand
38   KERNEL_IN_UBI := 1
39   UBOOTENV_IN_UBI := 1
40 endef
41
42 define Device/akitio
43   DTS := akitio
44   DEVICE_TITLE := Akitio MyCloud mini / Silverstone DC01
45   DEVICE_PACKAGES := kmod-i2c-gpio kmod-rtc-ds1307
46 endef
47 TARGET_DEVICES += akitio
48
49 define Device/kd20
50   DTS := kd20
51   DEVICE_TITLE := Shuttle KD20
52   DEVICE_PACKAGES := kmod-usb3 kmod-i2c-gpio kmod-rtc-pcf8563 kmod-gpio-beeper \
53                      kmod-hwmon-core kmod-hwmon-gpiofan
54 endef
55 TARGET_DEVICES += kd20
56
57 define Device/pogoplug-pro
58   DTS := pogoplug-pro
59   DEVICE_TITLE := Cloud Engines Pogoplug Pro (with mPCIe)
60 endef
61 TARGET_DEVICES += pogoplug-pro
62
63 define Device/pogoplug-v3
64   DTS := pogoplug-v3
65   DEVICE_TITLE := Cloud Engines Pogoplug V3 (no mPCIe)
66 endef
67 TARGET_DEVICES += pogoplug-v3
68
69 define Device/stg212
70   DTS := stg212
71   DEVICE_TITLE := MitraStar STG-212
72 endef
73 TARGET_DEVICES += stg212
74
75 VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
76 UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
77
78 $(eval $(call BuildImage))