Skip to content

Commit 1de96bf

Browse files
author
root
committed
switch to u-boot.mk
1 parent 360a961 commit 1de96bf

1 file changed

Lines changed: 31 additions & 72 deletions

File tree

package/boot/uboot-meson/Makefile

Lines changed: 31 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -8,54 +8,58 @@
88
include $(TOPDIR)/rules.mk
99
include $(INCLUDE_DIR)/kernel.mk
1010

11-
PKG_NAME:=uboot-meson
1211
PKG_RELEASE:=1
1312
PKG_SOURCE_VERSION:=f1ee03e3f7547d03e1478cc1fc967a9e5a121d92
14-
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
1513
PKG_SOURCE_PROTO:=git
1614
PKG_SOURCE_URL:=https://github.com/endlessm/u-boot-meson.git
17-
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
18-
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
19-
PKG_MD5SUM:=
20-
PKG_TARGETS:=bin
21-
QUILT:=1
15+
16+
include $(INCLUDE_DIR)/u-boot.mk
2217
include $(INCLUDE_DIR)/package.mk
2318

24-
define uboot/m3_f16_no_video_v1
25-
TITLE:=U-boot for meson3 f16 without video
19+
define U-Boot/Default
20+
BUILD_TARGET:=mesongx
21+
UBOOT_IMAGE:=build/u-boot.bin
22+
HIDDEN:=1
2623
endef
2724

28-
define uboot/m8b_m200_1G
29-
TITLE:=U-boot for meson8b m200
25+
define U-Boot/m3_f16_no_video_v1
26+
NAME:=U-boot for meson3 f16 without video
27+
BUILD_DEVICES:=m3_f16_no_video_v1
3028
endef
3129

32-
define uboot/m8b_m201_1G
33-
TITLE:=U-boot for meson8b m201
30+
define U-Boot/m8b_m200_1G
31+
NAME:=U-boot for meson8b m200
32+
BUILD_DEVICES:=m8b_m200_1G
3433
endef
3534

36-
define uboot/m8_k200_v1
37-
TITLE:=U-boot for meson8 k200
35+
define U-Boot/m8b_m201_1G
36+
NAME:=U-boot for meson8b m201
37+
BUILD_DEVICES:=m8b_m201_1G
3838
endef
3939

40-
define uboot/m8m2_n200_v1
41-
TITLE:=U-boot for meson8 k200
40+
define U-Boot/m8_k200_v1
41+
NAME:=U-boot for meson8 k200
42+
BUILD_DEVICES:=m8_k200_v1
4243
endef
4344

44-
define uboot/m6_mbx_v2
45-
TITLE:=U-boot for meson8 k200
45+
define U-Boot/m8m2_n200_v1
46+
NAME:=U-boot for meson8 k200
47+
BUILD_DEVICES:=m8m2_n200_v1
4648
endef
4749

48-
define uboot/m6_dongle_g35_v1
49-
TITLE:=U-boot for meson8 k200
50+
define U-Boot/m6_mbx_v2
51+
NAME:=U-boot for meson8 k200
52+
BUILD_DEVICES:=m6_mbx_v2
5053
endef
5154

52-
define uboot/Default
53-
TITLE:=
54-
CONFIG:=
55-
IMAGE:=
55+
define U-Boot/m6_dongle_g35_v1
56+
NAME:=U-boot for meson8 k200
57+
BUILD_DEVICES:=m6_dongle_g35_v1
5658
endef
5759

58-
UBOOTS:= \
60+
UBOOT_MAKE_FLAGS :=
61+
62+
UBOOT_TARGETS := \
5963
m3_f16_no_video_v1 \
6064
m8b_m200_1G \
6165
m8b_m201_1G \
@@ -64,55 +68,10 @@ UBOOTS:= \
6468
m6_mbx_v2 \
6569
m6_dongle_g35_v1
6670

67-
define Package/uboot/template
68-
define Package/uboot-meson-$(1)
69-
SECTION:=boot
70-
CATEGORY:=Boot Loaders
71-
TITLE:=$(2)
72-
DEPENDS:=@TARGET_mesongx
73-
URL:=http://www.denx.de/wiki/U-Boot
74-
VARIANT:=$(1)
75-
endef
76-
endef
77-
78-
define BuildUbootPackage
79-
$(eval $(uboot/Default))
80-
$(eval $(uboot/$(1)))
81-
$(call Package/uboot/template,$(1),$(TITLE))
82-
endef
83-
84-
ifdef BUILD_VARIANT
85-
$(eval $(call uboot/$(BUILD_VARIANT)))
86-
UBOOT_CONFIG:=$(if $(CONFIG),$(CONFIG),$(BUILD_VARIANT))
87-
UBOOT_IMAGE:=$(if $(IMAGE),$(IMAGE),openwrt-$(BOARD)-$(BUILD_VARIANT)-u-boot.bin)
88-
endif
8971

9072
define Build/Prepare
9173
$(call Build/Prepare/Default)
9274
find $(PKG_BUILD_DIR) -name .svn | $(XARGS) rm -rf
9375
endef
9476

95-
define Build/Configure
96-
$(MAKE) -C $(PKG_BUILD_DIR) \
97-
$(UBOOT_CONFIG)_config
98-
endef
99-
100-
define Build/Compile
101-
$(MAKE) -C $(PKG_BUILD_DIR) CROSS_COMPILE=$(TARGET_CROSS)
102-
endef
103-
104-
define Package/uboot/install/template
105-
define Package/uboot-meson-$(1)/install
106-
$(INSTALL_DIR) $$(1)
107-
$(CP) $(PKG_BUILD_DIR)/build/u-boot.bin $(BIN_DIR)/$(2)
108-
endef
109-
endef
110-
111-
$(foreach u,$(UBOOTS), \
112-
$(eval $(call Package/uboot/install/template,$(u),openwrt-$(BOARD)-$(SUBTARGET)-$(u)-u-boot.bin)) \
113-
)
114-
115-
$(foreach u,$(UBOOTS), \
116-
$(eval $(call BuildUbootPackage,$(u))) \
117-
$(eval $(call BuildPackage,uboot-meson-$(u))) \
118-
)
77+
$(eval $(call BuildPackage/U-Boot))

0 commit comments

Comments
 (0)