From 029dc6e9b5d6c8c898292b381d99d1d73c473755 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 14 Jan 2017 20:08:56 -0800 Subject: [PATCH] ubox: Conditionally build getrandom Signed-off-by: Florian Fainelli --- package/system/ubox/Makefile | 2 +- package/system/ubox/patches/001-no-getrandom.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 package/system/ubox/patches/001-no-getrandom.patch diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index 8ccd9dda84..a11a4a17d1 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ubox/Makefile @@ -38,7 +38,7 @@ define Package/ubox/install $(INSTALL_DIR) $(1)/sbin $(1)/usr/sbin $(1)/lib $(1)/usr/bin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{kmodloader,validate_data} $(1)/sbin/ - $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/ + -$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getrandom $(1)/usr/bin/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib $(LN) kmodloader $(1)/sbin/rmmod diff --git a/package/system/ubox/patches/001-no-getrandom.patch b/package/system/ubox/patches/001-no-getrandom.patch new file mode 100644 index 0000000000..ee036cb639 --- /dev/null +++ b/package/system/ubox/patches/001-no-getrandom.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 62de1d4b9648..3474af320ba3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -24,8 +24,6 @@ IF(getrandom) + INSTALL(TARGETS getrandom + RUNTIME DESTINATION bin + ) +-ELSE() +- message( FATAL_ERROR "Kernel too old, missing SYS_getrandom system call") + ENDIF() + + ADD_EXECUTABLE(kmodloader kmodloader.c) -- 2.30.2