Skip to content

Commit e6ea299

Browse files
committed
board: Make ix-board reusable from upper externals
Signed-off-by: Tobias Waldekranz <[email protected]>
1 parent fa7c3d0 commit e6ea299

File tree

2 files changed

+52
-52
lines changed

2 files changed

+52
-52
lines changed

package/board/board.mk

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,2 @@
1-
define inner-ix-board
2-
3-
$(2)_VERSION = ix-board
4-
$(2)_LICENSE = BSD-3-Clause
5-
$(2)_LICENSE_FILES = LICENSE
6-
$(2)_SITE_METHOD = local
7-
$(2)_SITE = $$(BR2_EXTERNAL_INFIX_PATH)/src/board/$(1)
8-
$(2)_REDISTRIBUTE = NO
9-
10-
# The kernel must be built first.
11-
$(2)_DEPENDENCIES += \
12-
linux \
13-
$$(BR2_MAKE_HOST_DEPENDENCY)
14-
15-
# This is only defined in some infrastructures (e.g. autotools, cmake),
16-
# but not in others (e.g. generic). So define it here as well.
17-
$(2)_MAKE ?= $$(BR2_MAKE)
18-
19-
define $(2)_DTBS_BUILD
20-
@$$(call MESSAGE,"Building device tree blob(s)")
21-
$$(LINUX_MAKE_ENV) $$($$(PKG)_MAKE) \
22-
-C $$(LINUX_DIR) \
23-
$$(LINUX_MAKE_FLAGS) \
24-
$$($(2)_DTB_MAKE_OPTS) \
25-
PWD=$$(@D)/dts \
26-
M=$$(@D)/dts \
27-
modules
28-
endef
29-
$(2)_POST_BUILD_HOOKS += $(2)_DTBS_BUILD
30-
31-
define $(2)_DTBS_INSTALL_TARGET
32-
@$$(call MESSAGE,"Installing device tree blob(s)")
33-
$$(TARGET_MAKE_ENV) $$(TARGET_CONFIGURE_OPTS) $$($$(PKG)_MAKE) \
34-
-f $$(BR2_EXTERNAL_INFIX_PATH)/package/board/dtb-inst.makefile \
35-
-C $$(@D)/dts \
36-
DESTDIR="$$(TARGET_DIR)" \
37-
install
38-
endef
39-
$(2)_POST_INSTALL_TARGET_HOOKS += $(2)_DTBS_INSTALL_TARGET
40-
41-
define $(2)_OVERLAY_INSTALL_TARGET
42-
@test -d $$(@D)/rootfs && \
43-
$$(call MESSAGE,"Copying overlay") && \
44-
$$(call SYSTEM_RSYNC,$$(@D)/rootfs,$(TARGET_DIR)) || \
45-
true
46-
endef
47-
$(2)_POST_INSTALL_TARGET_HOOKS += $(2)_OVERLAY_INSTALL_TARGET
48-
49-
endef
50-
51-
ix-board = $(call inner-ix-board,$(pkgname),$(call UPPERCASE,$(pkgname)))
52-
1+
include $(BR2_EXTERNAL_INFIX_PATH)/package/board/ix-board.mk
532
include $(sort $(wildcard $(BR2_EXTERNAL_INFIX_PATH)/package/board/*/*.mk))

package/board/ix-board.mk

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
define inner-ix-board
2+
3+
$(2)_VERSION = ix-board
4+
$(2)_LICENSE = BSD-3-Clause
5+
$(2)_LICENSE_FILES = LICENSE
6+
$(2)_SITE_METHOD = local
7+
$(2)_SITE = $$(BR2_EXTERNAL_INFIX_PATH)/src/board/$(1)
8+
$(2)_REDISTRIBUTE = NO
9+
10+
# The kernel must be built first.
11+
$(2)_DEPENDENCIES += \
12+
linux \
13+
$$(BR2_MAKE_HOST_DEPENDENCY)
14+
15+
# This is only defined in some infrastructures (e.g. autotools, cmake),
16+
# but not in others (e.g. generic). So define it here as well.
17+
$(2)_MAKE ?= $$(BR2_MAKE)
18+
19+
define $(2)_DTBS_BUILD
20+
@$$(call MESSAGE,"Building device tree blob(s)")
21+
$$(LINUX_MAKE_ENV) $$($$(PKG)_MAKE) \
22+
-C $$(LINUX_DIR) \
23+
$$(LINUX_MAKE_FLAGS) \
24+
$$($(2)_DTB_MAKE_OPTS) \
25+
PWD=$$(@D)/dts \
26+
M=$$(@D)/dts \
27+
modules
28+
endef
29+
$(2)_POST_BUILD_HOOKS += $(2)_DTBS_BUILD
30+
31+
define $(2)_DTBS_INSTALL_TARGET
32+
@$$(call MESSAGE,"Installing device tree blob(s)")
33+
$$(TARGET_MAKE_ENV) $$(TARGET_CONFIGURE_OPTS) $$($$(PKG)_MAKE) \
34+
-f $$(BR2_EXTERNAL_INFIX_PATH)/package/board/dtb-inst.makefile \
35+
-C $$(@D)/dts \
36+
DESTDIR="$$(TARGET_DIR)" \
37+
install
38+
endef
39+
$(2)_POST_INSTALL_TARGET_HOOKS += $(2)_DTBS_INSTALL_TARGET
40+
41+
define $(2)_OVERLAY_INSTALL_TARGET
42+
@test -d $$(@D)/rootfs && \
43+
$$(call MESSAGE,"Copying overlay") && \
44+
$$(call SYSTEM_RSYNC,$$(@D)/rootfs,$(TARGET_DIR)) || \
45+
true
46+
endef
47+
$(2)_POST_INSTALL_TARGET_HOOKS += $(2)_OVERLAY_INSTALL_TARGET
48+
49+
endef
50+
51+
ix-board = $(call inner-ix-board,$(pkgname),$(call UPPERCASE,$(pkgname)))

0 commit comments

Comments
 (0)