[LEDE-DEV] [PATCH] archs38: Merge sd and ramfs subtargets in generic again
Alexey Brodkin
Alexey.Brodkin at synopsys.com
Fri Aug 19 03:58:36 PDT 2016
As it turned out we may actually build both initramfs and
SD-based images in one run with just a small tweak in
existing image/Makefile and so we do here.
We're back with one "generic" target for all ARC HS38-based bords.
Kudos to John for his patience and very helpful tips!
Signed-off-by: John Crispin <john at phrozen.org>
Signed-off-by: Alexey Brodkin <abrodkin at synopsys.com>
Cc: Jo-Philipp Wich <jo at mein.io>
---
target/linux/archs38/Makefile | 2 +-
.../linux/archs38/{sd => generic}/profiles/00-default.mk | 0
target/linux/archs38/generic/target.mk | 8 ++++++++
target/linux/archs38/image/Makefile | 8 ++++----
target/linux/archs38/ramdisk/profiles/00-default.mk | 15 ---------------
target/linux/archs38/ramdisk/target.mk | 8 --------
target/linux/archs38/sd/target.mk | 8 --------
7 files changed, 13 insertions(+), 36 deletions(-)
rename target/linux/archs38/{sd => generic}/profiles/00-default.mk (100%)
create mode 100644 target/linux/archs38/generic/target.mk
delete mode 100644 target/linux/archs38/ramdisk/profiles/00-default.mk
delete mode 100644 target/linux/archs38/ramdisk/target.mk
delete mode 100644 target/linux/archs38/sd/target.mk
diff --git a/target/linux/archs38/Makefile b/target/linux/archs38/Makefile
index cbdbfba..166d3d5 100644
--- a/target/linux/archs38/Makefile
+++ b/target/linux/archs38/Makefile
@@ -11,7 +11,7 @@ CPU_TYPE:=archs
BOARD:=archs38
BOARDNAME:=Synopsys DesignWare ARC HS38
MAINTAINER:=Alexey Brodkin <abrodkin at synopsys.com>
-SUBTARGETS:=sd ramdisk
+SUBTARGETS:=generic
KERNEL_PATCHVER:=4.4
diff --git a/target/linux/archs38/sd/profiles/00-default.mk b/target/linux/archs38/generic/profiles/00-default.mk
similarity index 100%
rename from target/linux/archs38/sd/profiles/00-default.mk
rename to target/linux/archs38/generic/profiles/00-default.mk
diff --git a/target/linux/archs38/generic/target.mk b/target/linux/archs38/generic/target.mk
new file mode 100644
index 0000000..7642c6b
--- /dev/null
+++ b/target/linux/archs38/generic/target.mk
@@ -0,0 +1,8 @@
+BOARDNAME:=Generic
+FEATURES += ext4 usb ramdisk
+
+define Target/Description
+ Build firmware images for ARC HS38 based boards.
+endef
+
+
diff --git a/target/linux/archs38/image/Makefile b/target/linux/archs38/image/Makefile
index 505ed02..14f6bc3 100644
--- a/target/linux/archs38/image/Makefile
+++ b/target/linux/archs38/image/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/image.mk
# in memory from build to built. Thus we need to extract EP from vmlinux
# every time before generation of uImage.
define Build/calculate-ep
- $(eval KERNEL_ENTRY=$(shell $(KERNEL_CROSS)readelf -h $(LINUX_DIR)/vmlinux | grep "Entry point address" | grep -o 0x.*))
+ $(eval KERNEL_ENTRY=$(shell $(KERNEL_CROSS)readelf -h $(1) | grep "Entry point address" | grep -o 0x.*))
endef
define Build/build-dtb
@@ -36,7 +36,8 @@ define Device/nsim_hs
DEVICE_DTS := nsim_hs_idu
endef
TARGET_DEVICES += nsim_hs
-else
+endif
+
# Root FS on SD-card
KERNEL_LOADADDR := 0x80000000
DEVICE_DTS_LIST:= axs103_idu
@@ -65,7 +66,7 @@ endef
define Image/BuildKernel
# Build unified uImage
- $(call Build/calculate-ep)
+ $(call Build/calculate-ep, $(KDIR)/vmlinux.elf)
$(call Image/BuildKernel/MkuImage, \
none, $(KERNEL_LOADADDR), $(KERNEL_ENTRY), \
$(KDIR)/vmlinux, \
@@ -81,6 +82,5 @@ define Image/Build
$(call Image/Build/SDCard,$(1))
dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-root.$(1) bs=128k conv=sync
endef
-endif
$(eval $(call BuildImage))
diff --git a/target/linux/archs38/ramdisk/profiles/00-default.mk b/target/linux/archs38/ramdisk/profiles/00-default.mk
deleted file mode 100644
index 4d86da3..0000000
--- a/target/linux/archs38/ramdisk/profiles/00-default.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/Default
- NAME:=Default Profile (all drivers)
-endef
-
-define Profile/Default/Description
- Default package set compatible with most boards.
-endef
-$(eval $(call Profile,Default))
diff --git a/target/linux/archs38/ramdisk/target.mk b/target/linux/archs38/ramdisk/target.mk
deleted file mode 100644
index 8612d32..0000000
--- a/target/linux/archs38/ramdisk/target.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-BOARDNAME:=Ramdisk
-FEATURES += ramdisk
-
-define Target/Description
- Build firmware images for generic ARC HS38 based boards that use built-in initramfs
-endef
-
-
diff --git a/target/linux/archs38/sd/target.mk b/target/linux/archs38/sd/target.mk
deleted file mode 100644
index ca4f191..0000000
--- a/target/linux/archs38/sd/target.mk
+++ /dev/null
@@ -1,8 +0,0 @@
-BOARDNAME:=SD
-FEATURES += ext4 usb
-
-define Target/Description
- Build firmware images for ARC HS38 based boards that use SD-card for booting.
-endef
-
-
--
2.7.4
More information about the Lede-dev
mailing list