7ac4fe9e62e3e4c63535f73d235b8a491c1861e2
[openwrt/openwrt.git] / package / boot / uboot-stm32 / Makefile
1 #
2 # Copyright (C) 2024 Bootlin
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_VERSION:=2025.10
11 PKG_RELEASE:=1
12
13 PKG_HASH:=b4f032848e56cc8f213ad59f9132c084dbbb632bc29176d024e58220e0efdf4a
14 PKG_MAINTAINER:=Thomas Richard <thomas.richard@bootlin.com>
15
16 UBOOT_USE_INTREE_DTC:=1
17
18 include $(INCLUDE_DIR)/u-boot.mk
19 include $(INCLUDE_DIR)/package.mk
20
21 define U-Boot/Default
22 BUILD_TARGET:=stm32
23 UBOOT_IMAGE:=u-boot.bin u-boot.dtb
24 endef
25
26 define U-Boot/stm32mp13
27 BUILD_SUBTARGET:=stm32mp1
28 UBOOT_CONFIG:=stm32mp13
29 endef
30
31 define U-Boot/stm32mp15
32 BUILD_SUBTARGET:=stm32mp1
33 UBOOT_CONFIG:=stm32mp15
34 endef
35
36 define U-Boot/stm32mp135f-dk
37 $(call U-Boot/stm32mp13)
38 NAME:=STM32MP135F-DK
39 DEVICE_TREE:=stm32mp135f-dk
40 endef
41
42 define U-Boot/stm32mp157c-dk2
43 $(call U-Boot/stm32mp15)
44 NAME:=STM32MP157C-DK2
45 DEVICE_TREE:=stm32mp157c-dk2
46 endef
47
48 define U-Boot/stm32mp157c-dk2-scmi
49 $(call U-Boot/stm32mp15)
50 NAME:=STM32MP157C-DK2 (SCMI)
51 DEVICE_TREE:=stm32mp157c-dk2-scmi
52 endef
53
54 UBOOT_TARGETS := \
55 stm32mp135f-dk \
56 stm32mp157c-dk2 \
57 stm32mp157c-dk2-scmi
58
59 UBOOT_MAKE_FLAGS += DEVICE_TREE=st/$(DEVICE_TREE)
60
61 UBOOT_CUSTOMIZE_CONFIG := \
62 --disable TOOLS_MKEFICAPSULE
63
64 define Build/InstallDev
65 $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
66 $(foreach img,$(UBOOT_IMAGE), \
67 $(CP) $(PKG_BUILD_DIR)/$(img) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(img); \
68 )
69 endef
70
71 define Package/u-boot/install/default
72 endef
73
74 $(eval $(call BuildPackage/U-Boot))