aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2016-05-15 04:31:25 +0200
committerDaniel Golle <daniel@makrotopia.org>2016-05-16 18:00:34 +0200
commit70eb03469f0406784b9be3204ef74e6d53e50a23 (patch)
tree5989f4cb9e73f50e11f9920e552255c032042b01 /target/linux
parent449aba4fe849ce51c54c32689546e8d99da7f756 (diff)
downloadupstream-70eb03469f0406784b9be3204ef74e6d53e50a23.tar.gz
upstream-70eb03469f0406784b9be3204ef74e6d53e50a23.tar.bz2
upstream-70eb03469f0406784b9be3204ef74e6d53e50a23.zip
oxnas: reorganize image build code and nuke profiles
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/oxnas/Makefile5
-rw-r--r--target/linux/oxnas/image/Makefile66
-rw-r--r--target/linux/oxnas/profiles/00-default.mk8
-rw-r--r--target/linux/oxnas/profiles/akitio.mk17
-rw-r--r--target/linux/oxnas/profiles/cloudengines.mk26
-rw-r--r--target/linux/oxnas/profiles/mitrastar.mk15
-rw-r--r--target/linux/oxnas/profiles/shuttle.mk18
7 files changed, 36 insertions, 119 deletions
diff --git a/target/linux/oxnas/Makefile b/target/linux/oxnas/Makefile
index f4a01f189f..0ee349836f 100644
--- a/target/linux/oxnas/Makefile
+++ b/target/linux/oxnas/Makefile
@@ -21,8 +21,9 @@ include $(INCLUDE_DIR)/target.mk
DEFAULT_PACKAGES += \
kmod-ata-core kmod-ata-oxnas-sata kmod-button-hotplug \
- kmod-input-gpio-keys-polled kmod-leds-gpio kmod-usb2-oxnas \
- uboot-envtools uboot-oxnas-ox820
+ kmod-input-gpio-keys-polled kmod-ledtrig-usbdev kmod-leds-gpio \
+ kmod-usb2-oxnas kmod-usb-storage uboot-envtools \
+ uboot-oxnas-ox820
KERNELNAME:=zImage dtbs
diff --git a/target/linux/oxnas/image/Makefile b/target/linux/oxnas/image/Makefile
index 27da2da27c..a8cef46572 100644
--- a/target/linux/oxnas/image/Makefile
+++ b/target/linux/oxnas/image/Makefile
@@ -14,23 +14,28 @@ KD20_UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
POGOPLUG_PRO_UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
POGOPLUG_V3_UBIFS_OPTS = -m 2048 -e 126KiB -c 4096
-DEVICE_VARS += DEVICE_DTS KERNEL_SIZE PAGESIZE BLOCKSIZE SUBPAGESIZE
+DEVICE_VARS += DTS KERNEL_SIZE PAGESIZE BLOCKSIZE SUBPAGESIZE
DEVICE_VARS += KERNEL_IN_UBI UBOOTENV_IN_UBI UBIFS_OPTS
KERNEL_LOADADDR := 0x60008000
-TARGET_DEVICES = akitio kd20 pogoplug-pro pogoplug-v3 stg212
+
+define Build/ubootable
+ (dd if="$(KDIR)/u-boot.bin" bs=128k conv=sync; \
+ dd if="$@" bs=128k conv=sync ) >> $@.new
+ @mv "$@.new" "$@"
+endef
define Device/Default
- KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
- KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb
+ KERNEL_DEPENDS = $$(wildcard $$(DTS_DIR)/ox820-$$(DTS).dts)
+ KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/ox820-$$(DTS).dtb
KERNEL_NAME := zImage
- KERNEL_INITRAMFS = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(DEVICE_DTS).dtb | ubootable
+ KERNEL_INITRAMFS = kernel-bin | lzma | fit lzma $$(DTS_DIR)/ox820-$$(DTS).dtb | ubootable
KERNEL_INITRAMFS_PREFIX = $$(IMAGE_PREFIX)-u-boot-initramfs
BLOCKSIZE := 128KiB
PAGESIZE := 2048
SUBPAGESIZE := 512
FILESYSTEMS := squashfs ubifs
- PROFILES := Default
+ PROFILES = Default $$(DTS)
IMAGES := ubinized.bin sysupgrade.tar
IMAGE/ubinized.bin := append-ubi
IMAGE/sysupgrade.tar := sysupgrade-nand
@@ -39,52 +44,39 @@ define Device/Default
endef
define Device/akitio
- PROFILES := Default AKITIO
- DEVICE_DTS := ox820-akitio
+ DTS := akitio
+ DEVICE_TITLE := Akitio MyCloud mini / Silverstone DC01
+ DEVICE_PACKAGES := kmod-i2c-gpio kmod-rtc-ds1307
endef
+TARGET_DEVICES += akitio
define Device/kd20
- PROFILES := Default KD20
- DEVICE_DTS := ox820-kd20
+ DTS := kd20
+ DEVICE_TITLE := Shuttle KD20
+ DEVICE_PACKAGES := kmod-usb3 kmod-i2c-gpio kmod-rtc-pcf8563 kmod-gpio-beeper \
+ kmod-hwmon-core kmod-hwmon-gpiofan
endef
+TARGET_DEVICES += kd20
define Device/pogoplug-pro
- PROFILES := Default POGOPLUG_PRO
- DEVICE_DTS := ox820-pogoplug-pro
+ DTS := pogoplug-pro
+ DEVICE_TITLE := Cloud Engines Pogoplug Pro (with mPCIe)
endef
+TARGET_DEVICES += pogoplug-pro
define Device/pogoplug-v3
- PROFILES := Default POGOPLUG_V3
- DEVICE_DTS := ox820-pogoplug-v3
+ DTS := pogoplug-v3
+ DEVICE_TITLE := Cloud Engines Pogoplug V3 (no mPCIe)
endef
+TARGET_DEVICES += pogoplug-v3
define Device/stg212
- PROFILES := Default STG212
- DEVICE_DTS := ox820-stg212
+ DTS := stg212
+ DEVICE_TITLE := MitraStar STG-212
endef
+TARGET_DEVICES += stg212
VMLINUX:=$(BIN_DIR)/$(IMG_PREFIX)-vmlinux
UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
-define Build/ubootable
- (dd if="$(KDIR)/u-boot.bin" bs=128k conv=sync; \
- dd if="$@" bs=128k conv=sync ) >> $@.new
- @mv "$@.new" "$@"
-endef
-
-define Image/BuildKernel
- $(call Image/BuildKernel/Template/$(PROFILE))
-endef
-
-define Image/InstallKernel
- $(call Image/InstallKernel/Template/$(PROFILE))
-endef
-
-define Image/Build
- $(if $(Image/Build/$(1)), \
- $(call Image/Build/$(1),$(1)), \
- $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-$(PROFILE_SANITIZED)-$(1).img \
- )
-endef
-
$(eval $(call BuildImage))
diff --git a/target/linux/oxnas/profiles/00-default.mk b/target/linux/oxnas/profiles/00-default.mk
index 67f866ee80..fedf730088 100644
--- a/target/linux/oxnas/profiles/00-default.mk
+++ b/target/linux/oxnas/profiles/00-default.mk
@@ -7,11 +7,11 @@
define Profile/Default
NAME:=Default Profile
+ PRIORITY:=1
PACKAGES:=\
- kmod-usb-core kmod-usb3 kmod-ledtrig-usbdev \
- kmod-usb-storage \
- kmod-i2c-gpio kmod-rtc-pcf8563 kmod-rtc-ds1307 \
- kmod-gpio-beeper kmod-hwmon-core kmod-hwmon-gpiofan
+ kmod-i2c-gpio kmod-gpio-beeper kmod-hwmon-core \
+ kmod-hwmon-gpiofan kmod-rtc-pcf8563 kmod-rtc-ds1307 \
+ kmod-usb3
endef
define Profile/Default/Description
diff --git a/target/linux/oxnas/profiles/akitio.mk b/target/linux/oxnas/profiles/akitio.mk
deleted file mode 100644
index a10860101a..0000000000
--- a/target/linux/oxnas/profiles/akitio.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/AKITIO
- NAME:=Akitio MyCloud mini / Silverstone DC01
- PACKAGES:= \
- kmod-usb-storage kmod-i2c-gpio kmod-rtc-ds1307
-endef
-
-define Profile/AKITIO/Description
- Profile for the Akitio MyCloud mini aka. Silverstone DC01
-endef
-
-$(eval $(call Profile,AKITIO))
diff --git a/target/linux/oxnas/profiles/cloudengines.mk b/target/linux/oxnas/profiles/cloudengines.mk
deleted file mode 100644
index ed0a235254..0000000000
--- a/target/linux/oxnas/profiles/cloudengines.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/POGOPLUG_PRO
- NAME:=Cloud Engines Pogoplug Pro
-endef
-
-define Profile/POGOPLUG_PRO/Description
- Profile with built-in ox820 Pogoplug Pro device-tree
- (board with miniPCIe slot)
-endef
-
-define Profile/POGOPLUG_V3
- NAME:=Cloud Engines Pogoplug V3
-endef
-
-define Profile/POGOPLUG_V3/Description
- Profile with built-in ox820 Pogoplug V3 device-tree
- (board without miniPCIe slot)
-endef
-
-$(eval $(call Profile,POGOPLUG_PRO))
-$(eval $(call Profile,POGOPLUG_V3))
diff --git a/target/linux/oxnas/profiles/mitrastar.mk b/target/linux/oxnas/profiles/mitrastar.mk
deleted file mode 100644
index 1991c9b688..0000000000
--- a/target/linux/oxnas/profiles/mitrastar.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/STG212
- NAME:=MitraStar STG-212
-endef
-
-define Profile/STG212/Description
- Profile with built-in ox820 STG-212 device-tree
-endef
-
-$(eval $(call Profile,STG212))
diff --git a/target/linux/oxnas/profiles/shuttle.mk b/target/linux/oxnas/profiles/shuttle.mk
deleted file mode 100644
index a83935f9c5..0000000000
--- a/target/linux/oxnas/profiles/shuttle.mk
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (C) 2016 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-define Profile/KD20
- NAME:=Shuttle KD20
- PACKAGES:= \
- kmod-usb3 kmod-usb-storage kmod-i2c-gpio kmod-rtc-pcf8563 \
- kmod-gpio-beeper kmod-hwmon-core kmod-hwmon-gpiofan
-endef
-
-define Profile/KD20/Description
- Profile with built-in ox820 KD20 device-tree
-endef
-
-$(eval $(call Profile,KD20))