Skip to content

Commit

Permalink
archs38: Merge sd and ramfs subtargets in generic again
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Alexey Brodkin <[email protected]>
Cc: Jo-Philipp Wich <[email protected]>
  • Loading branch information
abrodkin authored and blogic committed Aug 20, 2016
1 parent 070edfd commit 334fdea
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 36 deletions.
2 changes: 1 addition & 1 deletion target/linux/archs38/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CPU_TYPE:=archs
BOARD:=archs38
BOARDNAME:=Synopsys DesignWare ARC HS38
MAINTAINER:=Alexey Brodkin <[email protected]>
SUBTARGETS:=sd ramdisk
SUBTARGETS:=generic

KERNEL_PATCHVER:=4.4

Expand Down
8 changes: 8 additions & 0 deletions target/linux/archs38/generic/target.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
BOARDNAME:=Generic
FEATURES += ext4 usb ramdisk

define Target/Description
Build firmware images for ARC HS38 based boards.
endef


8 changes: 4 additions & 4 deletions target/linux/archs38/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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, \
Expand All @@ -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))
15 changes: 0 additions & 15 deletions target/linux/archs38/ramdisk/profiles/00-default.mk

This file was deleted.

8 changes: 0 additions & 8 deletions target/linux/archs38/ramdisk/target.mk

This file was deleted.

8 changes: 0 additions & 8 deletions target/linux/archs38/sd/target.mk

This file was deleted.

0 comments on commit 334fdea

Please sign in to comment.