modules/powerpc-utils: add

This provides nvram tool that allows manipulating configuration of
skiboot.

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
This commit is contained in:
Sergii Dmytruk 2023-06-06 00:53:18 +03:00
parent 3df4a45477
commit 62e1899367
No known key found for this signature in database
GPG Key ID: 48579AA47429663E
3 changed files with 45 additions and 0 deletions

View File

@ -473,6 +473,7 @@ bin_modules-$(CONFIG_UTIL_LINUX) += util-linux
bin_modules-$(CONFIG_OPENSSL) += openssl
bin_modules-$(CONFIG_TPM2_TOOLS) += tpm2-tools
bin_modules-$(CONFIG_BASH) += bash
bin_modules-$(CONFIG_POWERPC_UTILS) += powerpc-utils
$(foreach m, $(bin_modules-y), \
$(call map,initrd_bin_add,$(call bins,$m)) \

27
modules/powerpc-utils Normal file
View File

@ -0,0 +1,27 @@
modules-$(CONFIG_POWERPC_UTILS) += powerpc-utils
powerpc-utils_version := 1.3.5
powerpc-utils_dir := powerpc-utils-$(powerpc-utils_version)
powerpc-utils_tar := powerpc-utils-$(powerpc-utils_version).tar.gz
powerpc-utils_url := https://github.com/ibm-power-utilities/powerpc-utils/archive/v$(powerpc-utils_version)/$(powerpc-utils_tar)
powerpc-utils_hash := 77efe3978ac9c251c4728a35b9aebd6076583939a8e26cc7f07ffa86432a8bf0
powerpc-utils_configure := \
./autogen.sh && \
$(CROSS_TOOLS) \
CFLAGS="-Os" \
./configure \
--host $(MUSL_ARCH)-elf-linux \
--prefix "/" \
--without-systemd \
--without-librtas
powerpc-utils_target := \
$(MAKE_JOBS) \
$(CROSS_TOOLS) \
DESTDIR="$(INSTALL)" \
install
powerpc-utils_output := src/nvram
powerpc-utils_depends := $(musl_dep)

View File

@ -0,0 +1,17 @@
AC_FUNC_MALLOC somehow fails to find malloc(), so drop the check
Weirdly, it doesn't fail configuration, but instead adds -Dmalloc=rpl_malloc
and fails linking.
diff --git a/configure.ac.orig b/configure.ac
index a7be3ee95c..74aade323b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -33,7 +33,6 @@ AC_TYPE_UINT8_T
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
-AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_CHECK_FUNCS([memset strchr strcspn strdup strerror strrchr strstr strtol strtoul strtoull gettimeofday])