From: Florian Fainelli Date: Sun, 15 Jan 2017 04:08:56 +0000 (-0800) Subject: ubox: Conditionally build getrandom X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=029dc6e9b5d6c8c898292b381d99d1d73c473755;p=openwrt%2Fstaging%2Fflorian.git ubox: Conditionally build getrandom Signed-off-by: Florian Fainelli --- 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)