diff options
author | Robert Marko <robimarko@gmail.com> | 2023-11-08 23:09:44 +0100 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-11-10 20:27:55 +0100 |
commit | 8376eaaa2805c6ea41ca88a4cc2304731c91798e (patch) | |
tree | 941f41c84ddd92c76042ffa8c8c3c7c9903493a9 /package/utils | |
parent | 947b44d9ae17b4d56578c10a5dd675e79e4c621b (diff) |
dtc: add option for a static build
I find myself manually compiling dtc as a staticly linked binary rather
often while porting a new device to OpenWrt as dtc is rarely included in
various vendor modifications of OpenWrt.
So, since dtc offers a convenient meson option to build it as staticaly
linked binary, lets make it a compile time option.
Signed-off-by: Robert Marko <robimarko@gmail.com>
Diffstat (limited to 'package/utils')
-rw-r--r-- | package/utils/dtc/Makefile | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/package/utils/dtc/Makefile b/package/utils/dtc/Makefile index dc10e9c519..afec6fbae5 100644 --- a/package/utils/dtc/Makefile +++ b/package/utils/dtc/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dtc PKG_VERSION:=1.7.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_HASH:=29edce3d302a15563d8663198bbc398c5a0554765c83830d0d4c0409d21a16c4 @@ -35,6 +35,17 @@ define Package/dtc/description format for booting kernels on embedded systems. endef +define Package/dtc/config + config DTC_STATIC_BUILD + depends on PACKAGE_dtc + bool "Build dtc as static binary" + default n + help + Builds dtc as a static binary. + This is usefull in order to export live DTS from a device running + various vendor modified OpenWrt versions. +endef + define Package/dtc/install $(INSTALL_DIR) $(1)/usr/bin $(CP) $(PKG_INSTALL_DIR)/usr/bin/dtc $(1)/usr/bin @@ -80,7 +91,8 @@ MESON_ARGS += \ -Dtools=true \ -Dyaml=disabled \ -Dvalgrind=disabled \ - -Dpython=disabled + -Dpython=disabled \ + -Dstatic-build=$(if $(CONFIG_DTC_STATIC_BUILD),true,false) define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib |