sync
This commit is contained in:
parent
23da68cb7c
commit
b9b33e0a4e
@ -19,7 +19,6 @@
|
||||
#
|
||||
# Host packages are built in the same fashion, just use these vars instead:
|
||||
#
|
||||
# HOST_BUILD_DEPENDS:=meson/host
|
||||
# MESON_HOST_ARGS+=-Dfoo -Dbar=baz
|
||||
# MESON_HOST_VARS+=FOO=bar
|
||||
|
||||
@ -57,7 +56,7 @@ MESON_CPU:="$(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))"
|
||||
endif
|
||||
|
||||
define Meson
|
||||
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(MESON_DIR)/meson.py $(1)
|
||||
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(STAGING_DIR_HOST)/bin/meson.py $(1)
|
||||
endef
|
||||
|
||||
define Meson/CreateNativeFile
|
||||
@ -65,6 +64,8 @@ define Meson/CreateNativeFile
|
||||
-e "s|@CC@|$(foreach BIN,$(HOSTCC),'$(BIN)',)|" \
|
||||
-e "s|@CXX@|$(foreach BIN,$(HOSTCXX),'$(BIN)',)|" \
|
||||
-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
|
||||
-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
|
||||
-e "s|@PYTHON@|$(STAGING_DIR_HOST)/bin/python3|" \
|
||||
-e "s|@CFLAGS@|$(foreach FLAG,$(HOST_CFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
|
||||
-e "s|@CXXFLAGS@|$(foreach FLAG,$(HOST_CXXFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
|
||||
-e "s|@LDFLAGS@|$(foreach FLAG,$(HOST_LDFLAGS),'$(FLAG)',)|" \
|
||||
@ -81,6 +82,8 @@ define Meson/CreateCrossFile
|
||||
-e "s|@STRIP@|$(TARGET_CROSS)strip|" \
|
||||
-e "s|@NM@|$(TARGET_NM)|" \
|
||||
-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
|
||||
-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
|
||||
-e "s|@PYTHON@|$(STAGING_DIR_HOST)/bin/python3|" \
|
||||
-e "s|@CFLAGS@|$(foreach FLAG,$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
|
||||
-e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
|
||||
-e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \
|
||||
@ -97,7 +100,7 @@ define Host/Configure/Meson
|
||||
--native-file $(HOST_BUILD_DIR)/openwrt-native.txt \
|
||||
$(MESON_HOST_ARGS) \
|
||||
$(MESON_HOST_BUILD_DIR) \
|
||||
$(HOST_BUILD_DIR), \
|
||||
$(MESON_HOST_BUILD_DIR)/.., \
|
||||
$(MESON_HOST_VARS))
|
||||
endef
|
||||
|
||||
|
36
tools/7z/Makefile
Normal file
36
tools/7z/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=7z
|
||||
PKG_VERSION:=22.01
|
||||
PKG_SOURCE_VERSION:=2201
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)$(PKG_SOURCE_VERSION)-src.tar.xz
|
||||
PKG_SOURCE_URL:=https://7-zip.org/a/
|
||||
PKG_HASH:=393098730c70042392af808917e765945dc2437dee7aae3cfcc4966eb920fbc5
|
||||
|
||||
# This builds the 7zr variant which supports only 7z, so no non-LGPL code should be included
|
||||
PKG_LICENSE:=LGPL-2.1-or-later
|
||||
PKG_LICENSE_FILES:=DOC/License.txt DOC/copying.txt
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
|
||||
|
||||
ALONE_DIR=$(HOST_BUILD_DIR)/CPP/7zip/Bundles/Alone7z
|
||||
|
||||
define Host/Compile
|
||||
$(MAKE) -C $(ALONE_DIR) -f makefile.gcc
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
|
||||
$(INSTALL_BIN) $(ALONE_DIR)/_o/7zr $(STAGING_DIR_HOST)/bin/7zr
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -f $(STAGING_DIR_HOST)/bin/7zr
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
@ -22,68 +22,79 @@ ifneq ($(CONFIG_SDK)$(CONFIG_PACKAGE_kmod-b43)$(CONFIG_PACKAGE_b43legacy-firmwar
|
||||
endif
|
||||
|
||||
tools-y += autoconf autoconf-archive automake bc bison cmake cpio dosfstools
|
||||
tools-y += e2fsprogs fakeroot findutils firmware-utils flex gengetopt
|
||||
tools-y += e2fsprogs expat fakeroot findutils firmware-utils flex gengetopt
|
||||
tools-y += libressl libtool lzma m4 make-ext4fs meson missing-macros mkimage
|
||||
tools-y += mklibs mm-macros mtd-utils mtools ninja padjffs2 patch-image
|
||||
tools-y += patchelf pkgconf quilt squashfskit4 sstrip ucl upx xxd zip zlib zstd
|
||||
tools-$(BUILD_B43_TOOLS) += b43-tools
|
||||
tools-$(BUILD_ISL) += isl
|
||||
tools-$(BUILD_TOOLCHAIN) += expat gmp mpc mpfr
|
||||
tools-$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini) += genext2fs
|
||||
tools-$(CONFIG_TARGET_ath79) += lzma-old squashfs
|
||||
tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
|
||||
tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
|
||||
tools-$(CONFIG_USES_MINOR) += kernel2minor
|
||||
tools-$(CONFIG_USE_SPARSE) += sparse
|
||||
tools-y += mklibs mtd-utils mtools ninja padjffs2 patch-image
|
||||
tools-y += patchelf pkgconf quilt squashfskit4 sstrip ucl upx zip zlib zstd
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_B43_TOOLS),y) += b43-tools
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_ISL),y) += isl
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_TOOLCHAIN),y) += gmp mpc mpfr
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini),y) += genext2fs
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_ath79),y) += lzma-old squashfs
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_mxs),y) += elftosb sdimage
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_realtek),y) += 7z
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_TARGET_tegra),y) += cbootimage cbootimage-configs
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USES_MINOR),y) += kernel2minor
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USE_SPARSE),y) += sparse
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_USE_LLVM_BUILD),y) += llvm-bpf
|
||||
|
||||
# builddir dependencies
|
||||
$(curdir)/autoconf/compile := $(curdir)/m4/compile
|
||||
$(curdir)/automake/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/pkgconf/compile $(curdir)/xz/compile
|
||||
$(curdir)/automake/compile := $(curdir)/autoconf/compile $(curdir)/pkgconf/compile $(curdir)/xz/compile
|
||||
$(curdir)/b43-tools/compile := $(curdir)/bison/compile
|
||||
$(curdir)/bc/compile := $(curdir)/bison/compile $(curdir)/libtool/compile
|
||||
$(curdir)/upx/compile := $(curdir)/ucl/compile
|
||||
$(curdir)/bison/compile := $(curdir)/flex/compile
|
||||
$(curdir)/cbootimage/compile += $(curdir)/automake/compile
|
||||
$(curdir)/cmake/compile += $(curdir)/libressl/compile $(curdir)/ninja/compile
|
||||
$(curdir)/dosfstools/compile := $(curdir)/autoconf/compile $(curdir)/automake/compile
|
||||
$(curdir)/cmake/compile += $(curdir)/libressl/compile $(curdir)/ninja/compile $(curdir)/expat/compile $(curdir)/xz/compile $(curdir)/zlib/compile $(curdir)/zstd/compile
|
||||
$(curdir)/dosfstools/compile := $(curdir)/automake/compile
|
||||
$(curdir)/e2fsprogs/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/fakeroot/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/findutils/compile := $(curdir)/bison/compile
|
||||
$(curdir)/firmware-utils/compile += $(curdir)/libressl/compile $(curdir)/zlib/compile
|
||||
$(curdir)/firmware-utils/compile += $(curdir)/cmake/compile
|
||||
$(curdir)/flex/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/genext2fs/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/gengetopt/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/gmp/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/isl/compile := $(curdir)/gmp/compile
|
||||
$(curdir)/libressl/compile := $(curdir)/pkgconf/compile
|
||||
$(curdir)/libtool/compile := $(curdir)/m4/compile $(curdir)/autoconf/compile $(curdir)/automake/compile $(curdir)/missing-macros/compile
|
||||
$(curdir)/libtool/compile := $(curdir)/automake/compile $(curdir)/missing-macros/compile
|
||||
$(curdir)/lzma-old/compile := $(curdir)/zlib/compile
|
||||
$(curdir)/meson/compile := $(curdir)/ninja/compile
|
||||
$(curdir)/llvm-bpf/compile := $(curdir)/cmake/compile
|
||||
$(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile
|
||||
$(curdir)/meson/compile := $(curdir)/ninja/compile
|
||||
$(curdir)/missing-macros/compile := $(curdir)/autoconf/compile
|
||||
$(curdir)/mkimage/compile += $(curdir)/libressl/compile
|
||||
$(curdir)/mkimage/compile += $(curdir)/bison/compile $(curdir)/libressl/compile
|
||||
$(curdir)/mklibs/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/mm-macros/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/mpc/compile := $(curdir)/mpfr/compile $(curdir)/gmp/compile
|
||||
$(curdir)/mpfr/compile := $(curdir)/gmp/compile
|
||||
$(curdir)/mtd-utils/compile := $(curdir)/libtool/compile $(curdir)/e2fsprogs/compile $(curdir)/zlib/compile
|
||||
$(curdir)/padjffs2/compile := $(curdir)/findutils/compile
|
||||
$(curdir)/patchelf/compile := $(curdir)/libtool/compile
|
||||
$(curdir)/pkgconf/compile := $(curdir)/meson/compile
|
||||
$(curdir)/quilt/compile := $(curdir)/autoconf/compile $(curdir)/findutils/compile
|
||||
$(curdir)/sdcc/compile := $(curdir)/bison/compile
|
||||
$(curdir)/squashfs/compile := $(curdir)/lzma-old/compile
|
||||
$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile
|
||||
$(curdir)/zlib/compile := $(curdir)/cmake/compile
|
||||
$(curdir)/zstd/compile := $(curdir)/cmake/compile
|
||||
$(curdir)/zstd/compile := $(curdir)/meson/compile
|
||||
|
||||
ifneq ($(HOST_OS),Linux)
|
||||
$(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile
|
||||
tools-y += coreutils
|
||||
endif
|
||||
ifeq ($(HOST_OS),Darwin)
|
||||
tools-y += bash
|
||||
else
|
||||
$(curdir)/dwarves/compile += $(curdir)/elfutils/compile
|
||||
$(curdir)/elfutils/compile := $(curdir)/m4/compile $(curdir)/zlib/compile
|
||||
tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(CONFIG_DWARVES),y) += dwarves
|
||||
tools-y += elfutils
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),)
|
||||
$(foreach tool, $(filter-out xz zstd patch pkgconf libressl ninja cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile))
|
||||
$(foreach tool, $(filter-out zstd zlib xz pkgconf patch ninja meson libressl expat cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile))
|
||||
tools-y += ccache
|
||||
$(curdir)/ccache/compile := $(curdir)/zstd/compile
|
||||
$(curdir)/ccache/compile := $(curdir)/cmake/compile
|
||||
endif
|
||||
|
||||
# in case there is no patch tool on the host we need to make patch tool a
|
||||
@ -124,6 +135,9 @@ define PrepareStaging
|
||||
); done
|
||||
endef
|
||||
|
||||
$(BIN_DIR):
|
||||
mkdir -p $@
|
||||
|
||||
# preparatory work
|
||||
$(STAGING_DIR)/.prepared: $(TMP_DIR)/.build
|
||||
$(call PrepareStaging,$(STAGING_DIR))
|
||||
@ -144,8 +158,8 @@ endif
|
||||
|
||||
endif
|
||||
|
||||
$(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared
|
||||
$(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared
|
||||
$(curdir)//prepare = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared $(BIN_DIR)
|
||||
$(curdir)//compile = $(STAGING_DIR)/.prepared $(STAGING_DIR_HOST)/.prepared $(BIN_DIR)
|
||||
|
||||
# prerequisites for the individual targets
|
||||
$(curdir)/ := .config prereq
|
||||
|
@ -43,9 +43,8 @@ define Host/Install
|
||||
ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.15
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
|
||||
$(call Host/Clean/Default)
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env sh
|
||||
aclocal.real $ACLOCAL_INCLUDE $@
|
||||
${STAGING_DIR_HOST}/bin/aclocal.real $ACLOCAL_INCLUDE $@
|
||||
|
25
tools/bash/Makefile
Normal file
25
tools/bash/Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
#
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bash
|
||||
PKG_CPE_ID:=cpe:/a:gnu:bash
|
||||
PKG_VERSION:=5.2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/bash
|
||||
PKG_HASH:=a139c166df7ff4471c5e0733051642ee5556c1cc8a4a78f145583c5c81ab32fb
|
||||
|
||||
HOST_BUILD_PARALLEL := 1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
@ -7,17 +7,19 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bc
|
||||
PKG_VERSION:=1.06.95
|
||||
PKG_VERSION:=1.07.1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://alpha.gnu.org/gnu/bc \
|
||||
https://gnualpha.uib.no/bc/ \
|
||||
https://mirrors.fe.up.pt/pub/gnu-alpha/bc/ \
|
||||
https://www.nic.funet.fi/pub/gnu/alpha/gnu/bc/
|
||||
PKG_HASH:=7ee4abbcfac03d8a6e1a8a3440558a3d239d6b858585063e745c760957725ecc
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/bc
|
||||
PKG_HASH:=62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a
|
||||
|
||||
PKG_FIXUP := autoreconf
|
||||
PKG_CPE_ID:=cpe:/a:gnu:bc
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -1,6 +1,5 @@
|
||||
diff -urN bc-1.06.95/Makefile.am bc-1.06.95.new/Makefile.am
|
||||
--- bc-1.06.95/Makefile.am 2005-05-27 01:05:41.000000000 +0100
|
||||
+++ bc-1.06.95.new/Makefile.am 2013-07-09 09:33:31.521490710 +0100
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
@ -8,16 +7,15 @@ diff -urN bc-1.06.95/Makefile.am bc-1.06.95.new/Makefile.am
|
||||
+SUBDIRS = lib bc dc
|
||||
|
||||
MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \
|
||||
stamp-h $(distdir).tar.gz h/number.h depcomp missing
|
||||
diff -urN bc-1.06.95/Makefile.in bc-1.06.95.new/Makefile.in
|
||||
--- bc-1.06.95/Makefile.in 2006-09-05 03:39:30.000000000 +0100
|
||||
+++ bc-1.06.95.new/Makefile.in 2013-07-09 09:33:28.565490767 +0100
|
||||
@@ -149,7 +149,7 @@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
stamp-h $(distdir).tar.gz h/number.h depcomp missing \
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -288,7 +288,7 @@ target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
-SUBDIRS = lib bc dc doc
|
||||
+SUBDIRS = lib bc dc
|
||||
MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in \
|
||||
stamp-h $(distdir).tar.gz h/number.h depcomp missing
|
||||
|
||||
stamp-h $(distdir).tar.gz h/number.h depcomp missing \
|
||||
bc/libmath.h
|
||||
|
32
tools/bc/patches/002-fix-libmath.patch
Normal file
32
tools/bc/patches/002-fix-libmath.patch
Normal file
@ -0,0 +1,32 @@
|
||||
--- a/bc/fix-libmath_h
|
||||
+++ b/bc/fix-libmath_h
|
||||
@@ -1,9 +1,9 @@
|
||||
-ed libmath.h <<EOS-EOS
|
||||
-1,1s/^/{"/
|
||||
-1,\$s/\$/",/
|
||||
-2,\$s/^/"/
|
||||
-\$,\$d
|
||||
-\$,\$s/,\$/,0}/
|
||||
-w
|
||||
-q
|
||||
-EOS-EOS
|
||||
+#!/usr/bin/env bash
|
||||
+sed -e '1 s/^/{"/' \
|
||||
+ -e 's/$/",/' \
|
||||
+ -e '2,$ s/^/"/' \
|
||||
+ -e '$ d' \
|
||||
+ -i libmath.h
|
||||
+
|
||||
+sed -e '$ s/$/0}/' \
|
||||
+ -i libmath.h
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -5288,7 +5288,7 @@ case $bcle-$bcrl-$LEX in
|
||||
?-?-flex)
|
||||
LEX="flex -I -8" ;;
|
||||
?-y-*)
|
||||
- as_fn_error $? "readline works only with flex." "$LINENO" 5 ;;
|
||||
+ : ;; # as_fn_error $? "readline works only with flex." "$LINENO" 5 ;;
|
||||
esac
|
||||
|
||||
case $LEX-`uname -s` in
|
@ -19,14 +19,14 @@ include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOST_CONFIGURE_ARGS += --enable-threads=posix --disable-nls
|
||||
|
||||
define Host/Clean
|
||||
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
|
||||
$(call Host/Clean/Default)
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(call Host/Install/Default)
|
||||
$(INSTALL_BIN) ./scripts/yacc $(STAGING_DIR_HOST)/bin/yacc
|
||||
endef
|
||||
|
||||
define Host/Uninstall
|
||||
rm -f $(STAGING_DIR_HOST)/bin/yacc
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -8,13 +8,11 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
PKG_NAME:=ccache
|
||||
PKG_VERSION:=4.5.1
|
||||
PKG_VERSION:=4.6.3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/ccache/ccache/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=51186ebe0326365f4e6131e1caa8911de7da4aa6718efc00680322d63a759517
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
PKG_HASH:=1e3a251bb112632553b8255a78661fe526c3a16598496d51128c32b218fd8b22
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/src/ccache.cpp
|
||||
+++ b/src/ccache.cpp
|
||||
@@ -1633,6 +1633,7 @@ calculate_result_and_manifest_key(Contex
|
||||
@@ -1756,6 +1756,7 @@ calculate_result_and_manifest_key(Contex
|
||||
"CPLUS_INCLUDE_PATH",
|
||||
"OBJC_INCLUDE_PATH",
|
||||
"OBJCPLUS_INCLUDE_PATH", // clang
|
||||
|
@ -7,14 +7,15 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=cmake
|
||||
PKG_VERSION:=3.22.2
|
||||
PKG_VERSION:=3.24.2
|
||||
PKG_VERSION_MAJOR:=$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION)))
|
||||
PKG_RELEASE:=1
|
||||
PKG_CPE_ID:=cpe:/a:kitware:cmake
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \
|
||||
https://cmake.org/files/v3.19/
|
||||
PKG_HASH:=3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced
|
||||
https://cmake.org/files/v$(PKG_VERSION_MAJOR)/
|
||||
PKG_HASH:=0d9020f06f3ddf17fb537dc228e1a56c927ee506b486f55fe2dc19f69bf0c8db
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
HOST_CONFIGURE_PARALLEL:=1
|
||||
@ -31,8 +32,14 @@ HOST_CONFIGURE_VARS += \
|
||||
HOST_CONFIGURE_ARGS := \
|
||||
$(if $(MAKE_JOBSERVER),--parallel="$(MAKE_JOBSERVER)") \
|
||||
--prefix="$(STAGING_DIR_HOST)" \
|
||||
--system-expat \
|
||||
--system-liblzma \
|
||||
--system-zlib \
|
||||
--system-zstd \
|
||||
--generator=Ninja
|
||||
|
||||
HOST_LDFLAGS += -Wl,-rpath,$(STAGING_DIR_HOST)/lib
|
||||
|
||||
define Host/Compile/Default
|
||||
+$(NINJA) -C $(HOST_BUILD_DIR) $(1)
|
||||
endef
|
||||
|
17
tools/cmake/patches/110-liblzma.patch
Normal file
17
tools/cmake/patches/110-liblzma.patch
Normal file
@ -0,0 +1,17 @@
|
||||
--- a/Modules/FindLibLZMA.cmake
|
||||
+++ b/Modules/FindLibLZMA.cmake
|
||||
@@ -43,7 +43,13 @@ This module will set the following varia
|
||||
version number as a string (ex: "5.0.3")
|
||||
#]=======================================================================]
|
||||
|
||||
-find_path(LIBLZMA_INCLUDE_DIR lzma.h )
|
||||
+if(UNIX)
|
||||
+ find_package(PkgConfig QUIET)
|
||||
+ pkg_search_module(PC_liblzma liblzma)
|
||||
+endif()
|
||||
+
|
||||
+find_path(LIBLZMA_INCLUDE_DIR lzma.h HINTS ${PC_liblzma_INCLUDEDIR} ${PC_liblzma_INCLUDE_DIRS})
|
||||
+find_library(LIBLZMA_LIBRARY NAMES lzma HINTS ${PC_liblzma_LIBDIR} ${PC_liblzma_LIBRARY_DIRS})
|
||||
if(NOT LIBLZMA_LIBRARY)
|
||||
find_library(LIBLZMA_LIBRARY_RELEASE NAMES lzma liblzma NAMES_PER_DIR PATH_SUFFIXES lib)
|
||||
find_library(LIBLZMA_LIBRARY_DEBUG NAMES lzmad liblzmad NAMES_PER_DIR PATH_SUFFIXES lib)
|
@ -20,7 +20,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
||||
---
|
||||
--- a/Utilities/cmcurl/CMakeLists.txt
|
||||
+++ b/Utilities/cmcurl/CMakeLists.txt
|
||||
@@ -565,6 +565,14 @@ if(CMAKE_USE_OPENSSL)
|
||||
@@ -594,6 +594,14 @@ if(CURL_USE_OPENSSL)
|
||||
endif()
|
||||
set(SSL_ENABLED ON)
|
||||
set(USE_OPENSSL ON)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/bootstrap
|
||||
+++ b/bootstrap
|
||||
@@ -1423,7 +1423,10 @@ int main(){ printf("1%c", (char)0x0a); r
|
||||
@@ -1441,7 +1441,10 @@ int main(){ printf("1%c", (char)0x0a); r
|
||||
' > "test.c"
|
||||
cmake_original_make_flags="${cmake_make_flags}"
|
||||
if test "x${cmake_parallel_make}" != "x"; then
|
||||
|
20
tools/cmake/patches/140-zlib.patch
Normal file
20
tools/cmake/patches/140-zlib.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- a/Modules/FindZLIB.cmake
|
||||
+++ b/Modules/FindZLIB.cmake
|
||||
@@ -85,10 +85,13 @@ else()
|
||||
set(ZLIB_NAMES_DEBUG zd zlibd zdlld zlibd1 zlib1d zlibstaticd zlibwapid zlibvcd zlibstatd)
|
||||
endif()
|
||||
|
||||
-# Try each search configuration.
|
||||
-foreach(search ${_ZLIB_SEARCHES})
|
||||
- find_path(ZLIB_INCLUDE_DIR NAMES zlib.h ${${search}} PATH_SUFFIXES include)
|
||||
-endforeach()
|
||||
+if(UNIX)
|
||||
+ find_package(PkgConfig QUIET)
|
||||
+ pkg_search_module(PC_zlib zlib)
|
||||
+endif()
|
||||
+
|
||||
+find_path(ZLIB_INCLUDE_DIR zlib.h HINTS ${PC_zlib_INCLUDEDIR} ${PC_zlib_INCLUDE_DIRS})
|
||||
+find_library(ZLIB_LIBRARY NAMES z HINTS ${PC_zlib_LIBDIR} ${PC_zlib_LIBRARY_DIRS})
|
||||
|
||||
# Allow ZLIB_LIBRARY to be set manually, as the location of the zlib library
|
||||
if(NOT ZLIB_LIBRARY)
|
18
tools/cmake/patches/150-zstd-libarchive.patch
Normal file
18
tools/cmake/patches/150-zstd-libarchive.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/Utilities/cmlibarchive/CMakeLists.txt
|
||||
+++ b/Utilities/cmlibarchive/CMakeLists.txt
|
||||
@@ -630,8 +630,13 @@ IF(ENABLE_ZSTD)
|
||||
SET(ZSTD_FIND_QUIETLY TRUE)
|
||||
ENDIF (ZSTD_INCLUDE_DIR)
|
||||
|
||||
- FIND_PATH(ZSTD_INCLUDE_DIR zstd.h)
|
||||
- FIND_LIBRARY(ZSTD_LIBRARY NAMES zstd libzstd)
|
||||
+ IF(UNIX)
|
||||
+ FIND_PACKAGE(PkgConfig QUIET)
|
||||
+ PKG_SEARCH_MODULE(PC_ZSTD libzstd)
|
||||
+ ENDIF()
|
||||
+
|
||||
+ FIND_PATH(ZSTD_INCLUDE_DIR zstd.h HINTS ${PC_ZSTD_INCLUDEDIR} ${PC_ZSTD_INCLUDE_DIRS})
|
||||
+ FIND_LIBRARY(ZSTD_LIBRARY NAMES zstd HINTS ${PC_ZSTD_LIBDIR} ${PC_ZSTD_LIBRARY_DIRS})
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(ZSTD DEFAULT_MSG ZSTD_LIBRARY ZSTD_INCLUDE_DIR)
|
||||
ELSE(ENABLE_ZSTD)
|
@ -16,7 +16,7 @@ PKG_HASH:=4458d8de7849df44ccab15e16b1548b285224dbba5f08fac070c1c0e0bcc4cfa
|
||||
|
||||
HOST_BUILD_PARALLEL := 1
|
||||
|
||||
BUILD_PROGRAMS = date readlink touch ln
|
||||
BUILD_PROGRAMS = date readlink touch ln chown ginstall
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
@ -31,7 +31,13 @@ HOST_MAKE_FLAGS += \
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(1)/bin
|
||||
$(CP) $(patsubst %,$(HOST_BUILD_DIR)/%,$(BUILD_BINS)) $(1)/bin/
|
||||
$(INSTALL_BIN) $(patsubst %,$(HOST_BUILD_DIR)/%,$(BUILD_BINS)) $(1)/bin/
|
||||
ln -sf ginstall $(1)/bin/install
|
||||
endef
|
||||
|
||||
define Host/Uninstall
|
||||
rm -f $(STAGING_DIR_HOST)/bin/install
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -11,4 +11,8 @@ PKG_HASH:=eab5bdc5ae1df285c59f2a4f140a98fc33678a0bf61bdba67d9436ae26b46f6d
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -4,8 +4,6 @@ https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=641d3f489cf6238bb916368d4b
|
||||
|
||||
* src/global.c: Remove superfluous declaration of program_name
|
||||
|
||||
diff --git a/src/global.c b/src/global.c
|
||||
index fb3abe9..acf92bc 100644
|
||||
--- a/src/global.c
|
||||
+++ b/src/global.c
|
||||
@@ -184,9 +184,6 @@ unsigned int warn_option = 0;
|
||||
|
11
tools/cpio/patches/010-clang.patch
Normal file
11
tools/cpio/patches/010-clang.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/gnu/xalloc-oversized.h
|
||||
+++ b/gnu/xalloc-oversized.h
|
||||
@@ -52,7 +52,7 @@ typedef size_t __xalloc_count_type;
|
||||
#elif ((5 <= __GNUC__ \
|
||||
|| (__has_builtin (__builtin_mul_overflow) \
|
||||
&& __has_builtin (__builtin_constant_p))) \
|
||||
- && !__STRICT_ANSI__)
|
||||
+ && !__STRICT_ANSI__) && !defined(__clang__)
|
||||
# define xalloc_oversized(n, s) \
|
||||
(__builtin_constant_p (n) && __builtin_constant_p (s) \
|
||||
? __xalloc_oversized (n, s) \
|
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dosfstools
|
||||
PKG_CPE_ID:=cpe:/a:dosfstools_project:dosfstools
|
||||
PKG_VERSION:=4.1
|
||||
PKG_VERSION:=4.2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/dosfstools/dosfstools/releases/download/v$(PKG_VERSION)/ \
|
||||
http://fossies.org/linux/misc
|
||||
PKG_HASH:=e6b2aca70ccc3fe3687365009dd94a2e18e82b688ed4e260e04b7412471cc173
|
||||
PKG_HASH:=ba7c716ff9b8208a3bba5094a77584a7dc814141de09ab4ce1ae9b84bbcd7844
|
||||
|
||||
HOST_FIXUP:=autoreconf
|
||||
|
||||
@ -24,4 +24,8 @@ ifeq ($(HOST_OS),Darwin)
|
||||
HOST_CFLAGS += -UHAVE_ENDIAN_H
|
||||
endif
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 1c6c135ee15e449c1bf2e76d5307f83a3a1d7425 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
|
||||
Date: Tue, 11 Oct 2016 12:07:48 +0200
|
||||
Subject: [PATCH] Switch to AC_CHECK_LIB for iconv library linking.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
AC_SEARCH_LIB doesn't work properly for openwrt/lede when building dosfstools
|
||||
as a package.
|
||||
|
||||
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -59,7 +59,7 @@ if test "x$with_udev" != "xno"; then
|
||||
[true])
|
||||
fi
|
||||
|
||||
-AC_SEARCH_LIBS(iconv_open, iconv)
|
||||
+AC_CHECK_LIB(iconv, iconv_open)
|
||||
|
||||
# xxd (distributed with vim) is used in the testsuite
|
||||
AC_CHECK_PROG([XXD_FOUND], [xxd], [yes])
|
157
tools/dosfstools/patches/source-date-epoch.patch
Normal file
157
tools/dosfstools/patches/source-date-epoch.patch
Normal file
@ -0,0 +1,157 @@
|
||||
From 8da7bc93315cb0c32ad868f17808468b81fa76ec Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
|
||||
Date: Wed, 5 Dec 2018 19:52:51 +0100
|
||||
Subject: [PATCH] Honor the SOURCE_DATE_EPOCH variable
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Implement the SOURCE_DATE_EPOCH specification[1] for reproducible
|
||||
builds. If SOURCE_DATE_EPOCH is set, use it as timestamp instead of the
|
||||
current time.
|
||||
|
||||
[1] https://reproducible-builds.org/specs/source-date-epoch/
|
||||
|
||||
Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
|
||||
---
|
||||
src/boot.c | 23 +++++++++++++++++++++--
|
||||
src/common.c | 18 ++++++++++++++++--
|
||||
src/mkfs.fat.c | 19 ++++++++++++++++---
|
||||
3 files changed, 53 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/boot.c b/src/boot.c
|
||||
index 4de450d..8f78e1c 100644
|
||||
--- a/src/boot.c
|
||||
+++ b/src/boot.c
|
||||
@@ -33,6 +33,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#include <time.h>
|
||||
+#include <errno.h>
|
||||
+#include <ctype.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "fsck.fat.h"
|
||||
@@ -672,6 +674,7 @@ void write_volume_label(DOS_FS * fs, char *label)
|
||||
{
|
||||
time_t now;
|
||||
struct tm *mtime;
|
||||
+ char *source_date_epoch = NULL;
|
||||
off_t offset;
|
||||
int created;
|
||||
DIR_ENT de;
|
||||
@@ -687,8 +690,24 @@ void write_volume_label(DOS_FS * fs, char *label)
|
||||
if (de.name[0] == 0xe5)
|
||||
de.name[0] = 0x05;
|
||||
|
||||
- now = time(NULL);
|
||||
- mtime = (now != (time_t)-1) ? localtime(&now) : NULL;
|
||||
+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
|
||||
+ if (source_date_epoch) {
|
||||
+ char *tmp = NULL;
|
||||
+ long long conversion = 0;
|
||||
+ errno = 0;
|
||||
+ conversion = strtoll(source_date_epoch, &tmp, 10);
|
||||
+ now = conversion;
|
||||
+ if (!isdigit((unsigned char)*source_date_epoch) || *tmp != '\0'
|
||||
+ || errno != 0 || (long long)now != conversion) {
|
||||
+ die("SOURCE_DATE_EPOCH is too big or contains non-digits: \"%s\"",
|
||||
+ source_date_epoch);
|
||||
+ }
|
||||
+ mtime = gmtime(&now);
|
||||
+ } else {
|
||||
+ now = time(NULL);
|
||||
+ mtime = (now != (time_t)-1) ? localtime(&now) : NULL;
|
||||
+ }
|
||||
+
|
||||
if (mtime && mtime->tm_year >= 80 && mtime->tm_year <= 207) {
|
||||
de.time = htole16((unsigned short)((mtime->tm_sec >> 1) +
|
||||
(mtime->tm_min << 5) +
|
||||
diff --git a/src/common.c b/src/common.c
|
||||
index 6a2e396..4f1afcb 100644
|
||||
--- a/src/common.c
|
||||
+++ b/src/common.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
+#include <ctype.h>
|
||||
#include <wctype.h>
|
||||
#include <termios.h>
|
||||
#include <sys/time.h>
|
||||
@@ -298,8 +299,21 @@ void check_atari(void)
|
||||
uint32_t generate_volume_id(void)
|
||||
{
|
||||
struct timeval now;
|
||||
-
|
||||
- if (gettimeofday(&now, NULL) != 0 || now.tv_sec == (time_t)-1 || now.tv_sec < 0) {
|
||||
+ char *source_date_epoch = NULL;
|
||||
+
|
||||
+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
|
||||
+ if (source_date_epoch) {
|
||||
+ char *tmp = NULL;
|
||||
+ long long conversion = 0;
|
||||
+ errno = 0;
|
||||
+ conversion = strtoll(source_date_epoch, &tmp, 10);
|
||||
+ if (!isdigit((unsigned char)*source_date_epoch) || *tmp != '\0'
|
||||
+ || errno != 0) {
|
||||
+ die("SOURCE_DATE_EPOCH is too big or contains non-digits: \"%s\"",
|
||||
+ source_date_epoch);
|
||||
+ }
|
||||
+ return (uint32_t)conversion;
|
||||
+ } else if (gettimeofday(&now, NULL) != 0 || now.tv_sec == (time_t)-1 || now.tv_sec < 0) {
|
||||
srand(getpid());
|
||||
/* rand() returns int from [0,RAND_MAX], therefore only 31 bits */
|
||||
return (((uint32_t)(rand() & 0xFFFF)) << 16) | ((uint32_t)(rand() & 0xFFFF));
|
||||
diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c
|
||||
index 37fc8ff..1948635 100644
|
||||
--- a/src/mkfs.fat.c
|
||||
+++ b/src/mkfs.fat.c
|
||||
@@ -1074,7 +1074,7 @@ static void setup_tables(void)
|
||||
}
|
||||
|
||||
/* If is not available then generate random 32 bit disk signature */
|
||||
- if (invariant)
|
||||
+ if (invariant || getenv("SOURCE_DATE_EPOCH"))
|
||||
disk_sig = volume_id;
|
||||
else if (!disk_sig)
|
||||
disk_sig = generate_volume_id();
|
||||
@@ -1287,7 +1287,7 @@ static void setup_tables(void)
|
||||
de->name[0] = 0x05;
|
||||
de->attr = ATTR_VOLUME;
|
||||
if (create_time != (time_t)-1) {
|
||||
- if (!invariant)
|
||||
+ if (!invariant && !getenv("SOURCE_DATE_EPOCH"))
|
||||
ctime = localtime(&create_time);
|
||||
else
|
||||
ctime = gmtime(&create_time);
|
||||
@@ -1477,6 +1477,7 @@ int main(int argc, char **argv)
|
||||
int blocks_specified = 0;
|
||||
struct timeval create_timeval;
|
||||
long long conversion;
|
||||
+ char *source_date_epoch = NULL;
|
||||
|
||||
enum {OPT_HELP=1000, OPT_INVARIANT, OPT_MBR, OPT_VARIANT, OPT_CODEPAGE, OPT_OFFSET};
|
||||
const struct option long_options[] = {
|
||||
@@ -1497,8 +1498,20 @@ int main(int argc, char **argv)
|
||||
program_name = p + 1;
|
||||
}
|
||||
|
||||
- if (gettimeofday(&create_timeval, NULL) == 0 && create_timeval.tv_sec != (time_t)-1)
|
||||
+ source_date_epoch = getenv("SOURCE_DATE_EPOCH");
|
||||
+ if (source_date_epoch) {
|
||||
+ errno = 0;
|
||||
+ conversion = strtoll(source_date_epoch, &tmp, 10);
|
||||
+ create_time = conversion;
|
||||
+ if (!isdigit((unsigned char)*source_date_epoch) || *tmp != '\0'
|
||||
+ || errno != 0 || (long long)create_time != conversion) {
|
||||
+ die("SOURCE_DATE_EPOCH is too big or contains non-digits: \"%s\"",
|
||||
+ source_date_epoch);
|
||||
+ }
|
||||
+ } else if (gettimeofday(&create_timeval, NULL) == 0 && create_timeval.tv_sec != (time_t)-1) {
|
||||
create_time = create_timeval.tv_sec;
|
||||
+ }
|
||||
+
|
||||
volume_id = generate_volume_id();
|
||||
check_atari();
|
||||
|
37
tools/dwarves/Makefile
Normal file
37
tools/dwarves/Makefile
Normal file
@ -0,0 +1,37 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dwarves
|
||||
PKG_VERSION:=1.24
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://fedorapeople.org/~acme/dwarves/
|
||||
PKG_HASH:=576bc112b95937dfbcd347c423696ee9e1992a338fdca1acacca736fd95f69c2
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
CMAKE_HOST_OPTIONS += \
|
||||
-D__LIB=lib \
|
||||
-DCMAKE_INSTALL_RPATH="$(STAGING_DIR_HOST)/lib" \
|
||||
-DCMAKE_SKIP_RPATH=FALSE
|
||||
|
||||
define Host/Clean
|
||||
$(RM) $(STAGING_DIR_HOST)/bin/{codiff,ctracer,dtagnames,pahole,pdwtags}
|
||||
$(RM) $(STAGING_DIR_HOST)/bin/{pfunct,pglobal,prefcnt,scncopy,syscse}
|
||||
$(RM) $(STAGING_DIR_HOST)/bin/{ostra-cg,btfdiff,fullcircle}
|
||||
$(RM) $(STAGING_DIR_HOST)/lib/libdwarves*.so*
|
||||
$(RM) $(STAGING_DIR_HOST)/share/man/man1/pahole.1
|
||||
rm -rf $(STAGING_DIR_HOST)/include/dwarves
|
||||
rm -rf $(STAGING_DIR_HOST)/share/dwarves
|
||||
$(call Host/Clean/Default)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
@ -9,8 +9,8 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=e2fsprogs
|
||||
PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs
|
||||
PKG_VERSION:=1.46.4
|
||||
PKG_HASH:=b11042533c1b1dcf17512f0da48e05b0c573dada1dd8b762864d10f4dc399713
|
||||
PKG_VERSION:=1.46.5
|
||||
PKG_HASH:=2f16c9176704cf645dc69d5b15ff704ae722d665df38b2ed3cfc249757d8d81e
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/e2fsck/e2fsck.h
|
||||
+++ b/e2fsck/e2fsck.h
|
||||
@@ -74,7 +74,7 @@
|
||||
@@ -81,7 +81,7 @@
|
||||
* Exit codes used by fsck-type programs
|
||||
*/
|
||||
#define FSCK_OK 0 /* No errors */
|
||||
|
37
tools/elfutils/Makefile
Normal file
37
tools/elfutils/Makefile
Normal file
@ -0,0 +1,37 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=elfutils
|
||||
PKG_VERSION:=0.187
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
|
||||
PKG_HASH:=e70b0dfbe610f90c4d1fe0d71af142a4e25c3c4ef9ebab8d2d72b65159d454c8
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
|
||||
PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--disable-debuginfod \
|
||||
--disable-libdebuginfod \
|
||||
--disable-nls \
|
||||
--disable-shared \
|
||||
--without-lzma \
|
||||
--without-zstd
|
||||
|
||||
HOST_MAKE_FLAGS += \
|
||||
SUBDIRS="lib libelf libcpu backends libebl libdwelf libdwfl libdw"
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
@ -9,21 +9,25 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=expat
|
||||
PKG_CPE_ID:=cpe:/a:libexpat:expat
|
||||
PKG_VERSION:=2.4.6
|
||||
PKG_VERSION:=2.4.9
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_HASH:=ce317706b07cae150f90cddd4253f5b4fba929607488af5ac47bf2bc08e31f09
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=6e8c0728fe5c7cd3f93a6acce43046c5e4736c7b4b68e032e9350daa0efc0354
|
||||
PKG_SOURCE_URL:=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$(PKG_VERSION))
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--without-docbook
|
||||
HOSTCC := $(HOSTCC_NOCACHE)
|
||||
|
||||
define Host/Install
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) install
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--disable-shared \
|
||||
--without-docbook \
|
||||
--with-pic
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fakeroot
|
||||
PKG_VERSION:=1.27
|
||||
PKG_VERSION:=1.29
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
|
||||
PKG_SOURCE_URL:=@DEBIAN/pool/main/f/fakeroot
|
||||
PKG_HASH:=3c45eb2d1802a2762069e2e9d21bdd6fb533592bc0cda74c9aff066ab01caddc
|
||||
PKG_HASH:=8fbbafb780c9173e3ace4a04afbc1d900f337f3216883939f5c7db3431be7c20
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_FIXUP:=autoreconf
|
||||
@ -25,4 +25,8 @@ HOST_CONFIGURE_VARS += \
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--with-ipc=tcp
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -21,7 +21,7 @@ Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: sy
|
||||
#define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b)
|
||||
#endif
|
||||
|
||||
@@ -136,8 +138,9 @@
|
||||
@@ -142,8 +144,9 @@
|
||||
|
||||
/* 10.10 uses id_t in getpriority/setpriority calls, so pretend
|
||||
id_t is used everywhere, just happens to be int on some OSes */
|
||||
|
@ -11,3 +11,46 @@
|
||||
static struct sockaddr *get_addr(void)
|
||||
{
|
||||
static struct sockaddr_in addr = { 0, 0, { 0 } };
|
||||
--- a/libfakeroot_inode64.c
|
||||
+++ b/libfakeroot_inode64.c
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "config.h"
|
||||
#include "communicate.h"
|
||||
|
||||
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
|
||||
|
||||
#include <stdio.h>
|
||||
#include <spawn.h>
|
||||
--- a/wrapfunc.inp
|
||||
+++ b/wrapfunc.inp
|
||||
@@ -48,9 +48,11 @@ getattrlist$UNIX2003;int;(const char *pa
|
||||
#endif
|
||||
#endif
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
+#if !__DARWIN_ONLY_64_BIT_INO_T
|
||||
lstat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf)
|
||||
stat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf)
|
||||
fstat$INODE64;int;(int fd, struct stat *buf);(fd, buf)
|
||||
+#endif
|
||||
posix_spawn;int;(pid_t * __restrict pid, const char * __restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t * __restrict attrp, char *const argv[ __restrict], char *const envp[ __restrict]);(pid, path, file_actions, attrp, argv, envp)
|
||||
posix_spawnp;int;(pid_t * __restrict pid, const char * __restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t * __restrict attrp, char *const argv[ __restrict], char *const envp[ __restrict]);(pid, path, file_actions, attrp, argv, envp)
|
||||
#endif
|
||||
@@ -229,7 +231,7 @@ facl;int;(int fd, int cmd, int cnt, void
|
||||
#ifdef HAVE_FTS_READ
|
||||
fts_read;FTSENT *;(FTS *ftsp);(ftsp)
|
||||
#ifdef __APPLE__
|
||||
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
|
||||
fts_read$INODE64;FTSENT *;(FTS *ftsp);(ftsp)
|
||||
#endif
|
||||
#endif /* ifdef __APPLE__ */
|
||||
@@ -237,7 +239,7 @@ fts_read$INODE64;FTSENT *;(FTS *ftsp);(f
|
||||
#ifdef HAVE_FTS_CHILDREN
|
||||
fts_children;FTSENT *;(FTS *ftsp, int options);(ftsp, options)
|
||||
#ifdef __APPLE__
|
||||
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
|
||||
fts_children$INODE64;FTSENT *;(FTS *ftsp, int options);(ftsp, options)
|
||||
#endif
|
||||
#endif /* ifdef __APPLE__ */
|
||||
|
@ -28,4 +28,8 @@ HOST_CONFIGURE_ARGS += \
|
||||
--disable-nls \
|
||||
--without-selinux
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -11,9 +11,9 @@ PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
|
||||
PKG_SOURCE_DATE:=2022-02-28
|
||||
PKG_SOURCE_VERSION:=002cfaf0204ef48fdced6f43c99d59394860e2cb
|
||||
PKG_MIRROR_HASH:=aa2ab50ab24474cd8b8342d8c6d88309a13117e2f1a34b7bfc61b15e0510bce6
|
||||
PKG_SOURCE_DATE:=2022-09-12
|
||||
PKG_SOURCE_VERSION:=0c92b20ad488a4fb5fb290f6d1b893df45761275
|
||||
PKG_MIRROR_HASH:=2cfd36e749b51d539cffe22c77a4c3ccd3bac2eca482affe23e1cab539e8bd16
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
@ -26,8 +26,12 @@ define Host/Install
|
||||
$(LN) flex $(STAGING_DIR_HOST)/bin/lex
|
||||
endef
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
|
||||
rm -f $(STAGING_DIR_HOST)/bin/lex
|
||||
$(call Host/Clean/Default)
|
||||
endef
|
||||
|
||||
|
@ -24,4 +24,8 @@ define Host/Install
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/flock $(STAGING_DIR_HOST)/bin/
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -f $(STAGING_DIR_HOST)/bin/flock
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=genext2fs
|
||||
PKG_VERSION:=1.4.1
|
||||
PKG_VERSION:=1.5.0
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/genext2fs
|
||||
PKG_HASH:=404dbbfa7a86a6c3de8225c8da254d026b17fd288e05cec4df2cc7e1f4feecfc
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/bestouff/$(PKG_NAME)/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=d3861e4fe89131bd21fbd25cf0b683b727b5c030c4c336fadcd738ada830aab0
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
@ -33,6 +33,13 @@ HOST_CONFIGURE_ARGS = \
|
||||
--mandir=/usr/man \
|
||||
--infodir=/usr/info \
|
||||
|
||||
define Host/Configure
|
||||
(cd $(HOST_BUILD_DIR); \
|
||||
./autogen.sh \
|
||||
);
|
||||
$(call Host/Configure/Default)
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) \
|
||||
CFLAGS="$(HOST_CFLAGS)" \
|
||||
|
@ -1,21 +0,0 @@
|
||||
commit 3b8ca0ce9a0b58287a780747c90c449bdebfe464
|
||||
Author: Xavier Bestel <bestouff@users.sourceforge.net>
|
||||
Date: Mon Jan 14 08:52:44 2008 +0000
|
||||
|
||||
removed use of %as is scanf (GNU conflicts with C99) by Giacomo Catenazzi <cate@debian.org>
|
||||
|
||||
diff --git a/genext2fs.c b/genext2fs.c
|
||||
index 070b270..f0d797d 100644
|
||||
--- a/genext2fs.c
|
||||
+++ b/genext2fs.c
|
||||
@@ -286,7 +286,9 @@ typedef unsigned int uint32;
|
||||
// older solaris. Note that this is still not very portable, in that
|
||||
// the return value cannot be trusted.
|
||||
|
||||
-#if SCANF_CAN_MALLOC
|
||||
+#if 0 // SCANF_CAN_MALLOC
|
||||
+// C99 define "a" for floating point, so you can have runtime surprise
|
||||
+// according the library versions
|
||||
# define SCANF_PREFIX "a"
|
||||
# define SCANF_STRING(s) (&s)
|
||||
#else
|
@ -1,13 +0,0 @@
|
||||
Index: genext2fs/m4/ac_func_scanf_can_malloc.m4
|
||||
===================================================================
|
||||
--- genext2fs.orig/m4/ac_func_scanf_can_malloc.m4 2011-09-03 21:28:49.000000000 +0200
|
||||
+++ genext2fs/m4/ac_func_scanf_can_malloc.m4 2011-09-03 21:29:41.000000000 +0200
|
||||
@@ -9,7 +9,7 @@
|
||||
# --------------------------------------
|
||||
AC_DEFUN([AC_FUNC_SCANF_CAN_MALLOC],
|
||||
[ AC_CHECK_HEADERS([stdlib.h])
|
||||
- AC_CACHE_CHECK([whether scanf can malloc], [ac_scanf_can_malloc],
|
||||
+ AC_CACHE_CHECK([whether scanf can malloc], [ac_cv_func_scanf_can_malloc],
|
||||
[ AC_RUN_IFELSE(
|
||||
[ AC_LANG_PROGRAM(
|
||||
[
|
@ -1,558 +0,0 @@
|
||||
Index: genext2fs/genext2fs.c
|
||||
===================================================================
|
||||
--- genext2fs.orig/genext2fs.c 2011-09-03 14:21:17.000000000 +0200
|
||||
+++ genext2fs/genext2fs.c 2011-09-03 14:21:17.000000000 +0200
|
||||
@@ -151,13 +151,24 @@
|
||||
|
||||
// block size
|
||||
|
||||
-#define BLOCKSIZE 1024
|
||||
+static int blocksize = 1024;
|
||||
+
|
||||
+#define BLOCKSIZE blocksize
|
||||
#define BLOCKS_PER_GROUP 8192
|
||||
#define INODES_PER_GROUP 8192
|
||||
/* Percentage of blocks that are reserved.*/
|
||||
#define RESERVED_BLOCKS 5/100
|
||||
#define MAX_RESERVED_BLOCKS 25/100
|
||||
|
||||
+/* The default value for s_creator_os. */
|
||||
+#if defined(__GNU__)
|
||||
+# define CREATOR_OS 1 /* Hurd */
|
||||
+#elif defined(__FreeBSD__)
|
||||
+# define CREATOR_OS 3 /* FreeBSD */
|
||||
+#else
|
||||
+# define CREATOR_OS 0 /* Linux */
|
||||
+#endif
|
||||
+
|
||||
|
||||
// inode block size (why is it != BLOCKSIZE ?!?)
|
||||
/* The field i_blocks in the ext2 inode stores the number of data blocks
|
||||
@@ -239,10 +250,10 @@
|
||||
(fs)->sb.s_blocks_per_group - 1) / (fs)->sb.s_blocks_per_group)
|
||||
|
||||
// Get group block bitmap (bbm) given the group number
|
||||
-#define GRP_GET_GROUP_BBM(fs,grp) ( get_blk((fs),(fs)->gd[(grp)].bg_block_bitmap) )
|
||||
+#define GRP_GET_GROUP_BBM(fs,grp) ( get_blk((fs), get_gd((fs),(grp))->bg_block_bitmap) )
|
||||
|
||||
// Get group inode bitmap (ibm) given the group number
|
||||
-#define GRP_GET_GROUP_IBM(fs,grp) ( get_blk((fs),(fs)->gd[(grp)].bg_inode_bitmap) )
|
||||
+#define GRP_GET_GROUP_IBM(fs,grp) ( get_blk((fs), get_gd((fs),(grp))->bg_inode_bitmap) )
|
||||
|
||||
// Given an inode number find the group it belongs to
|
||||
#define GRP_GROUP_OF_INODE(fs,nod) ( ((nod)-1) / (fs)->sb.s_inodes_per_group)
|
||||
@@ -532,7 +543,7 @@
|
||||
char d_name[0];
|
||||
} directory;
|
||||
|
||||
-typedef uint8 block[BLOCKSIZE];
|
||||
+typedef uint8 *block;
|
||||
|
||||
/* blockwalker fields:
|
||||
The blockwalker is used to access all the blocks of a file (including
|
||||
@@ -571,16 +582,12 @@
|
||||
|
||||
|
||||
/* Filesystem structure that support groups */
|
||||
-#if BLOCKSIZE == 1024
|
||||
typedef struct
|
||||
{
|
||||
- block zero; // The famous block 0
|
||||
- superblock sb; // The superblock
|
||||
- groupdescriptor gd[0]; // The group descriptors
|
||||
+ uint8 zero[1024]; // Room for bootloader stuff
|
||||
+ superblock sb; // The superblock, always at 1024
|
||||
+ // group descriptors come next, see get_gd() below
|
||||
} filesystem;
|
||||
-#else
|
||||
-#error UNHANDLED BLOCKSIZE
|
||||
-#endif
|
||||
|
||||
// now the endianness swap
|
||||
|
||||
@@ -820,6 +827,14 @@
|
||||
return (uint8*)fs + blk*BLOCKSIZE;
|
||||
}
|
||||
|
||||
+// the group descriptors are aligned on the block size
|
||||
+static inline groupdescriptor *
|
||||
+get_gd(filesystem *fs, int no)
|
||||
+{
|
||||
+ int gdblk = (sizeof (filesystem) + BLOCKSIZE - 1) / BLOCKSIZE;
|
||||
+ return ((groupdescriptor *) get_blk(fs, gdblk)) + no;
|
||||
+}
|
||||
+
|
||||
// return a given inode from a filesystem
|
||||
static inline inode *
|
||||
get_nod(filesystem *fs, uint32 nod)
|
||||
@@ -829,7 +844,7 @@
|
||||
|
||||
offset = GRP_IBM_OFFSET(fs,nod);
|
||||
grp = GRP_GROUP_OF_INODE(fs,nod);
|
||||
- itab = (inode *)get_blk(fs, fs->gd[grp].bg_inode_table);
|
||||
+ itab = (inode *)get_blk(fs, get_gd(fs,grp)->bg_inode_table);
|
||||
return itab+offset-1;
|
||||
}
|
||||
|
||||
@@ -875,18 +890,18 @@
|
||||
|
||||
grp = GRP_GROUP_OF_INODE(fs,nod);
|
||||
nbgroups = GRP_NBGROUPS(fs);
|
||||
- if(!(bk = allocate(get_blk(fs,fs->gd[grp].bg_block_bitmap), 0))) {
|
||||
+ if(!(bk = allocate(GRP_GET_GROUP_BBM(fs, grp), 0))) {
|
||||
for(grp=0;grp<nbgroups && !bk;grp++)
|
||||
- bk=allocate(get_blk(fs,fs->gd[grp].bg_block_bitmap),0);
|
||||
+ bk = allocate(GRP_GET_GROUP_BBM(fs, grp), 0);
|
||||
grp--;
|
||||
}
|
||||
if (!bk)
|
||||
error_msg_and_die("couldn't allocate a block (no free space)");
|
||||
- if(!(fs->gd[grp].bg_free_blocks_count--))
|
||||
+ if(!(get_gd(fs, grp)->bg_free_blocks_count--))
|
||||
error_msg_and_die("group descr %d. free blocks count == 0 (corrupted fs?)",grp);
|
||||
if(!(fs->sb.s_free_blocks_count--))
|
||||
error_msg_and_die("superblock free blocks count == 0 (corrupted fs?)");
|
||||
- return fs->sb.s_blocks_per_group*grp + bk;
|
||||
+ return fs->sb.s_first_data_block + fs->sb.s_blocks_per_group*grp + (bk-1);
|
||||
}
|
||||
|
||||
// free a block
|
||||
@@ -897,8 +912,8 @@
|
||||
|
||||
grp = bk / fs->sb.s_blocks_per_group;
|
||||
bk %= fs->sb.s_blocks_per_group;
|
||||
- deallocate(get_blk(fs,fs->gd[grp].bg_block_bitmap), bk);
|
||||
- fs->gd[grp].bg_free_blocks_count++;
|
||||
+ deallocate(GRP_GET_GROUP_BBM(fs, grp), bk);
|
||||
+ get_gd(fs, grp)->bg_free_blocks_count++;
|
||||
fs->sb.s_free_blocks_count++;
|
||||
}
|
||||
|
||||
@@ -918,16 +933,16 @@
|
||||
/* We do it for all inodes. */
|
||||
avefreei = fs->sb.s_free_inodes_count / nbgroups;
|
||||
for(grp=0; grp<nbgroups; grp++) {
|
||||
- if (fs->gd[grp].bg_free_inodes_count < avefreei ||
|
||||
- fs->gd[grp].bg_free_inodes_count == 0)
|
||||
+ if (get_gd(fs, grp)->bg_free_inodes_count < avefreei ||
|
||||
+ get_gd(fs, grp)->bg_free_inodes_count == 0)
|
||||
continue;
|
||||
if (!best_group ||
|
||||
- fs->gd[grp].bg_free_blocks_count > fs->gd[best_group].bg_free_blocks_count)
|
||||
+ get_gd(fs, grp)->bg_free_blocks_count > get_gd(fs, best_group)->bg_free_blocks_count)
|
||||
best_group = grp;
|
||||
}
|
||||
- if (!(nod = allocate(get_blk(fs,fs->gd[best_group].bg_inode_bitmap),0)))
|
||||
+ if (!(nod = allocate(GRP_GET_GROUP_IBM(fs, best_group), 0)))
|
||||
error_msg_and_die("couldn't allocate an inode (no free inode)");
|
||||
- if(!(fs->gd[best_group].bg_free_inodes_count--))
|
||||
+ if(!(get_gd(fs, best_group)->bg_free_inodes_count--))
|
||||
error_msg_and_die("group descr. free blocks count == 0 (corrupted fs?)");
|
||||
if(!(fs->sb.s_free_inodes_count--))
|
||||
error_msg_and_die("superblock free blocks count == 0 (corrupted fs?)");
|
||||
@@ -1390,7 +1405,7 @@
|
||||
case FM_IFDIR:
|
||||
add2dir(fs, nod, nod, ".");
|
||||
add2dir(fs, nod, parent_nod, "..");
|
||||
- fs->gd[GRP_GROUP_OF_INODE(fs,nod)].bg_used_dirs_count++;
|
||||
+ get_gd(fs, GRP_GROUP_OF_INODE(fs,nod))->bg_used_dirs_count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1860,7 +1875,7 @@
|
||||
swap_nod(nod);
|
||||
}
|
||||
for(i=0;i<GRP_NBGROUPS(fs);i++)
|
||||
- swap_gd(&(fs->gd[i]));
|
||||
+ swap_gd(get_gd(fs, i));
|
||||
swap_sb(&fs->sb);
|
||||
}
|
||||
|
||||
@@ -1870,7 +1885,7 @@
|
||||
uint32 i;
|
||||
swap_sb(&fs->sb);
|
||||
for(i=0;i<GRP_NBGROUPS(fs);i++)
|
||||
- swap_gd(&(fs->gd[i]));
|
||||
+ swap_gd(get_gd(fs, i));
|
||||
for(i = 1; i < fs->sb.s_inodes_count; i++)
|
||||
{
|
||||
inode *nod = get_nod(fs, i);
|
||||
@@ -1895,7 +1910,8 @@
|
||||
|
||||
// initialize an empty filesystem
|
||||
static filesystem *
|
||||
-init_fs(int nbblocks, int nbinodes, int nbresrvd, int holes, uint32 fs_timestamp)
|
||||
+init_fs(int nbblocks, int nbinodes, int nbresrvd, int holes,
|
||||
+ uint32 fs_timestamp, uint32 creator_os)
|
||||
{
|
||||
uint32 i;
|
||||
filesystem *fs;
|
||||
@@ -1921,10 +1937,14 @@
|
||||
*/
|
||||
min_nbgroups = (nbinodes + INODES_PER_GROUP - 1) / INODES_PER_GROUP;
|
||||
|
||||
+ /* On filesystems with 1k block size, the bootloader area uses a full
|
||||
+ * block. For 2048 and up, the superblock can be fitted into block 0.
|
||||
+ */
|
||||
+ first_block = (BLOCKSIZE == 1024);
|
||||
+
|
||||
/* nbblocks is the total number of blocks in the filesystem.
|
||||
* a block group can have no more than 8192 blocks.
|
||||
*/
|
||||
- first_block = (BLOCKSIZE == 1024);
|
||||
nbgroups = (nbblocks - first_block + BLOCKS_PER_GROUP - 1) / BLOCKS_PER_GROUP;
|
||||
if(nbgroups < min_nbgroups) nbgroups = min_nbgroups;
|
||||
nbblocks_per_group = rndup((nbblocks - first_block + nbgroups - 1)/nbgroups, 8);
|
||||
@@ -1936,10 +1956,10 @@
|
||||
gdsz = rndup(nbgroups*sizeof(groupdescriptor),BLOCKSIZE)/BLOCKSIZE;
|
||||
itblsz = nbinodes_per_group * sizeof(inode)/BLOCKSIZE;
|
||||
overhead_per_group = 3 /*sb,bbm,ibm*/ + gdsz + itblsz;
|
||||
- if((uint32)nbblocks - 1 < overhead_per_group * nbgroups)
|
||||
- error_msg_and_die("too much overhead, try fewer inodes or more blocks. Note: options have changed, see --help or the man page.");
|
||||
- free_blocks = nbblocks - overhead_per_group*nbgroups - 1 /*boot block*/;
|
||||
+ free_blocks = nbblocks - overhead_per_group*nbgroups - first_block;
|
||||
free_blocks_per_group = nbblocks_per_group - overhead_per_group;
|
||||
+ if(free_blocks < 0)
|
||||
+ error_msg_and_die("too much overhead, try fewer inodes or more blocks. Note: options have changed, see --help or the man page.");
|
||||
|
||||
if(!(fs = (filesystem*)calloc(nbblocks, BLOCKSIZE)))
|
||||
error_msg_and_die("not enough memory for filesystem");
|
||||
@@ -1959,28 +1979,31 @@
|
||||
fs->sb.s_wtime = fs_timestamp;
|
||||
fs->sb.s_magic = EXT2_MAGIC_NUMBER;
|
||||
fs->sb.s_lastcheck = fs_timestamp;
|
||||
+ fs->sb.s_creator_os = creator_os;
|
||||
|
||||
// set up groupdescriptors
|
||||
- for(i=0, bbmpos=gdsz+2, ibmpos=bbmpos+1, itblpos=ibmpos+1;
|
||||
+ for(i=0, bbmpos=first_block+1+gdsz, ibmpos=bbmpos+1, itblpos=ibmpos+1;
|
||||
i<nbgroups;
|
||||
i++, bbmpos+=nbblocks_per_group, ibmpos+=nbblocks_per_group, itblpos+=nbblocks_per_group)
|
||||
{
|
||||
+ groupdescriptor *gd = get_gd(fs, i);
|
||||
+
|
||||
if(free_blocks > free_blocks_per_group) {
|
||||
- fs->gd[i].bg_free_blocks_count = free_blocks_per_group;
|
||||
+ gd->bg_free_blocks_count = free_blocks_per_group;
|
||||
free_blocks -= free_blocks_per_group;
|
||||
} else {
|
||||
- fs->gd[i].bg_free_blocks_count = free_blocks;
|
||||
+ gd->bg_free_blocks_count = free_blocks;
|
||||
free_blocks = 0; // this is the last block group
|
||||
}
|
||||
if(i)
|
||||
- fs->gd[i].bg_free_inodes_count = nbinodes_per_group;
|
||||
+ gd->bg_free_inodes_count = nbinodes_per_group;
|
||||
else
|
||||
- fs->gd[i].bg_free_inodes_count = nbinodes_per_group -
|
||||
+ gd->bg_free_inodes_count = nbinodes_per_group -
|
||||
EXT2_FIRST_INO + 2;
|
||||
- fs->gd[i].bg_used_dirs_count = 0;
|
||||
- fs->gd[i].bg_block_bitmap = bbmpos;
|
||||
- fs->gd[i].bg_inode_bitmap = ibmpos;
|
||||
- fs->gd[i].bg_inode_table = itblpos;
|
||||
+ gd->bg_used_dirs_count = 0;
|
||||
+ gd->bg_block_bitmap = bbmpos;
|
||||
+ gd->bg_inode_bitmap = ibmpos;
|
||||
+ gd->bg_inode_table = itblpos;
|
||||
}
|
||||
|
||||
/* Mark non-filesystem blocks and inodes as allocated */
|
||||
@@ -1988,9 +2011,9 @@
|
||||
for(i = 0; i<nbgroups;i++) {
|
||||
|
||||
/* Block bitmap */
|
||||
- bbm = get_blk(fs,fs->gd[i].bg_block_bitmap);
|
||||
+ bbm = GRP_GET_GROUP_BBM(fs, i);
|
||||
//non-filesystem blocks
|
||||
- for(j = fs->gd[i].bg_free_blocks_count
|
||||
+ for(j = get_gd(fs, i)->bg_free_blocks_count
|
||||
+ overhead_per_group + 1; j <= BLOCKSIZE * 8; j++)
|
||||
allocate(bbm, j);
|
||||
//system blocks
|
||||
@@ -1998,7 +2021,7 @@
|
||||
allocate(bbm, j);
|
||||
|
||||
/* Inode bitmap */
|
||||
- ibm = get_blk(fs,fs->gd[i].bg_inode_bitmap);
|
||||
+ ibm = GRP_GET_GROUP_IBM(fs, i);
|
||||
//non-filesystem inodes
|
||||
for(j = fs->sb.s_inodes_per_group+1; j <= BLOCKSIZE * 8; j++)
|
||||
allocate(ibm, j);
|
||||
@@ -2012,9 +2035,9 @@
|
||||
// make root inode and directory
|
||||
/* We have groups now. Add the root filesystem in group 0 */
|
||||
/* Also increment the directory count for group 0 */
|
||||
- fs->gd[0].bg_free_inodes_count--;
|
||||
- fs->gd[0].bg_used_dirs_count = 1;
|
||||
- itab0 = (inode *)get_blk(fs,fs->gd[0].bg_inode_table);
|
||||
+ get_gd(fs, 0)->bg_free_inodes_count--;
|
||||
+ get_gd(fs, 0)->bg_used_dirs_count = 1;
|
||||
+ itab0 = (inode *)get_blk(fs, get_gd(fs,0)->bg_inode_table);
|
||||
itab0[EXT2_ROOT_INO-1].i_mode = FM_IFDIR | FM_IRWXU | FM_IRGRP | FM_IROTH | FM_IXGRP | FM_IXOTH;
|
||||
itab0[EXT2_ROOT_INO-1].i_ctime = fs_timestamp;
|
||||
itab0[EXT2_ROOT_INO-1].i_mtime = fs_timestamp;
|
||||
@@ -2338,8 +2361,9 @@
|
||||
for (i = 0; i < GRP_NBGROUPS(fs); i++) {
|
||||
printf("Group No: %d\n", i+1);
|
||||
printf("block bitmap: block %d,inode bitmap: block %d, inode table: block %d\n",
|
||||
- fs->gd[i].bg_block_bitmap, fs->gd[i].bg_inode_bitmap,
|
||||
- fs->gd[i].bg_inode_table);
|
||||
+ get_gd(fs, i)->bg_block_bitmap,
|
||||
+ get_gd(fs, i)->bg_inode_bitmap,
|
||||
+ get_gd(fs, i)->bg_inode_table);
|
||||
printf("block bitmap allocation:\n");
|
||||
print_bm(GRP_GET_GROUP_BBM(fs, i),fs->sb.s_blocks_per_group);
|
||||
printf("inode bitmap allocation:\n");
|
||||
@@ -2421,10 +2445,12 @@
|
||||
" -x, --starting-image <image>\n"
|
||||
" -d, --root <directory>\n"
|
||||
" -D, --devtable <file>\n"
|
||||
+ " -B, --block-size <bytes>\n"
|
||||
" -b, --size-in-blocks <blocks>\n"
|
||||
" -i, --bytes-per-inode <bytes per inode>\n"
|
||||
" -N, --number-of-inodes <number of inodes>\n"
|
||||
" -m, --reserved-percentage <percentage of blocks to reserve>\n"
|
||||
+ " -o, --creator-os <os> 'linux', 'hurd', 'freebsd' or a numerical value.\n"
|
||||
" -g, --block-map <path> Generate a block map file for this path.\n"
|
||||
" -e, --fill-value <value> Fill unallocated blocks with value.\n"
|
||||
" -z, --allow-holes Allow files with holes.\n"
|
||||
@@ -2446,6 +2472,29 @@
|
||||
extern char* optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
|
||||
+// parse the value for -o <os>
|
||||
+int
|
||||
+lookup_creator_os(const char *name)
|
||||
+{
|
||||
+ static const char *const creators[] =
|
||||
+ {"linux", "hurd", "2", "freebsd", NULL};
|
||||
+ char *endptr;
|
||||
+ int i;
|
||||
+
|
||||
+ // numerical value ?
|
||||
+ i = strtol(name, &endptr, 0);
|
||||
+ if(name[0] && *endptr == '\0')
|
||||
+ return i;
|
||||
+
|
||||
+ // symbolic name ?
|
||||
+ for(i=0; creators[i]; i++)
|
||||
+ if(strcasecmp(creators[i], name) == 0)
|
||||
+ return i;
|
||||
+
|
||||
+ // whatever ?
|
||||
+ return -1;
|
||||
+}
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
@@ -2455,6 +2504,7 @@
|
||||
float bytes_per_inode = -1;
|
||||
float reserved_frac = -1;
|
||||
int fs_timestamp = -1;
|
||||
+ int creator_os = CREATOR_OS;
|
||||
char * fsout = "-";
|
||||
char * fsin = 0;
|
||||
char * dopt[MAX_DOPT];
|
||||
@@ -2478,10 +2528,12 @@
|
||||
{ "starting-image", required_argument, NULL, 'x' },
|
||||
{ "root", required_argument, NULL, 'd' },
|
||||
{ "devtable", required_argument, NULL, 'D' },
|
||||
+ { "block-size", required_argument, NULL, 'B' },
|
||||
{ "size-in-blocks", required_argument, NULL, 'b' },
|
||||
{ "bytes-per-inode", required_argument, NULL, 'i' },
|
||||
{ "number-of-inodes", required_argument, NULL, 'N' },
|
||||
{ "reserved-percentage", required_argument, NULL, 'm' },
|
||||
+ { "creator-os", required_argument, NULL, 'o' },
|
||||
{ "block-map", required_argument, NULL, 'g' },
|
||||
{ "fill-value", required_argument, NULL, 'e' },
|
||||
{ "allow-holes", no_argument, NULL, 'z' },
|
||||
@@ -2497,11 +2549,11 @@
|
||||
|
||||
app_name = argv[0];
|
||||
|
||||
- while((c = getopt_long(argc, argv, "x:d:D:b:i:N:m:g:e:zfqUPhVv", longopts, NULL)) != EOF) {
|
||||
+ while((c = getopt_long(argc, argv, "x:d:D:B:b:i:N:m:o:g:e:zfqUPhVv", longopts, NULL)) != EOF) {
|
||||
#else
|
||||
app_name = argv[0];
|
||||
|
||||
- while((c = getopt(argc, argv, "x:d:D:b:i:N:m:g:e:zfqUPhVv")) != EOF) {
|
||||
+ while((c = getopt(argc, argv, "x:d:D:B:b:i:N:m:o:g:e:zfqUPhVv")) != EOF) {
|
||||
#endif /* HAVE_GETOPT_LONG */
|
||||
switch(c)
|
||||
{
|
||||
@@ -2512,6 +2564,9 @@
|
||||
case 'D':
|
||||
dopt[didx++] = optarg;
|
||||
break;
|
||||
+ case 'B':
|
||||
+ blocksize = SI_atof(optarg);
|
||||
+ break;
|
||||
case 'b':
|
||||
nbblocks = SI_atof(optarg);
|
||||
break;
|
||||
@@ -2524,6 +2579,9 @@
|
||||
case 'm':
|
||||
reserved_frac = SI_atof(optarg) / 100;
|
||||
break;
|
||||
+ case 'o':
|
||||
+ creator_os = lookup_creator_os(optarg);
|
||||
+ break;
|
||||
case 'g':
|
||||
gopt[gidx++] = optarg;
|
||||
break;
|
||||
@@ -2567,6 +2625,11 @@
|
||||
error_msg_and_die("Not enough arguments. Try --help or else see the man page.");
|
||||
fsout = argv[optind];
|
||||
|
||||
+ if(blocksize != 1024 && blocksize != 2048 && blocksize != 4096)
|
||||
+ error_msg_and_die("Valid block sizes: 1024, 2048 or 4096.");
|
||||
+ if(creator_os < 0)
|
||||
+ error_msg_and_die("Creator OS unknown.");
|
||||
+
|
||||
hdlinks.hdl = (struct hdlink_s *)malloc(hdlink_cnt * sizeof(struct hdlink_s));
|
||||
if (!hdlinks.hdl)
|
||||
error_msg_and_die("Not enough memory");
|
||||
@@ -2611,7 +2674,8 @@
|
||||
}
|
||||
if(fs_timestamp == -1)
|
||||
fs_timestamp = time(NULL);
|
||||
- fs = init_fs(nbblocks, nbinodes, nbresrvd, holes, fs_timestamp);
|
||||
+ fs = init_fs(nbblocks, nbinodes, nbresrvd, holes,
|
||||
+ fs_timestamp, creator_os);
|
||||
}
|
||||
|
||||
populate_fs(fs, dopt, didx, squash_uids, squash_perms, fs_timestamp, NULL);
|
||||
Index: genext2fs/test-gen.lib
|
||||
===================================================================
|
||||
--- genext2fs.orig/test-gen.lib 2011-09-03 13:40:35.000000000 +0200
|
||||
+++ genext2fs/test-gen.lib 2011-09-03 14:21:17.000000000 +0200
|
||||
@@ -8,7 +8,7 @@
|
||||
# Creates an image with a file of given size
|
||||
# Usage: dgen file-size number-of-blocks
|
||||
dgen () {
|
||||
- size=$1; blocks=$2
|
||||
+ size=$1; blocks=$2; blocksz=$3;
|
||||
rm -rf test
|
||||
mkdir -p test
|
||||
cd test
|
||||
@@ -20,7 +20,7 @@
|
||||
chmod 777 file.$1
|
||||
TZ=UTC-11 touch -t 200502070321.43 file.$1 .
|
||||
cd ..
|
||||
- ./genext2fs -N 17 -b $blocks -d test -f -q ext2.img
|
||||
+ ./genext2fs -B $blocksz -N 17 -b $blocks -d test -f -o Linux -q ext2.img
|
||||
}
|
||||
|
||||
# fgen - Exercises the -f spec-file option of genext2fs
|
||||
@@ -31,7 +31,7 @@
|
||||
mkdir -p test
|
||||
cp $fname test
|
||||
TZ=UTC-11 touch -t 200502070321.43 test/$fname
|
||||
- ./genext2fs -N 92 -b $blocks -D test/$fname -f ext2.img
|
||||
+ ./genext2fs -N 92 -b $blocks -D test/$fname -f -o Linux ext2.img
|
||||
}
|
||||
|
||||
# gen_cleanup - Remove the files generated by the above functions
|
||||
Index: genext2fs/test-mount.sh
|
||||
===================================================================
|
||||
--- genext2fs.orig/test-mount.sh 2011-09-03 13:40:35.000000000 +0200
|
||||
+++ genext2fs/test-mount.sh 2011-09-03 14:21:17.000000000 +0200
|
||||
@@ -33,9 +33,9 @@
|
||||
# and returns the command line with which to invoke dtest()
|
||||
# Usage: dtest-mount file-size number-of-blocks
|
||||
dtest_mount () {
|
||||
- size=$1; blocks=$2
|
||||
- echo Testing with file of size $size
|
||||
- dgen $size $blocks
|
||||
+ size=$1; blocks=$2; blocksz=$3;
|
||||
+ echo Testing $blocks blocks of $blocksz bytes with file of size $size
|
||||
+ dgen $size $blocks $blocksz
|
||||
/sbin/e2fsck -fn ext2.img || fail
|
||||
mkdir -p mnt
|
||||
mount -t ext2 -o ro,loop ext2.img mnt || fail
|
||||
@@ -44,7 +44,7 @@
|
||||
awk '{print $5}'`" ] ; then
|
||||
fail
|
||||
fi
|
||||
- pass dtest $size $blocks
|
||||
+ pass dtest $size $blocks $blocksz
|
||||
}
|
||||
|
||||
# ftest-mount - Exercise the -f spec-file option of genext2fs
|
||||
@@ -75,13 +75,21 @@
|
||||
pass ftest $fname $blocks
|
||||
}
|
||||
|
||||
-dtest_mount 0 4096
|
||||
-dtest_mount 0 8193
|
||||
-dtest_mount 0 8194
|
||||
-dtest_mount 1 4096
|
||||
-dtest_mount 12288 4096
|
||||
-dtest_mount 274432 4096
|
||||
-dtest_mount 8388608 9000
|
||||
-dtest_mount 16777216 20000
|
||||
+dtest_mount 0 4096 1024
|
||||
+dtest_mount 0 2048 2048
|
||||
+dtest_mount 0 1024 4096
|
||||
+dtest_mount 0 8193 1024
|
||||
+dtest_mount 0 8194 1024
|
||||
+dtest_mount 0 8193 4096
|
||||
+dtest_mount 0 8194 2048
|
||||
+dtest_mount 1 4096 1024
|
||||
+dtest_mount 1 1024 4096
|
||||
+dtest_mount 12288 4096 1024
|
||||
+dtest_mount 274432 4096 1024
|
||||
+dtest_mount 8388608 9000 1024
|
||||
+dtest_mount 8388608 4500 2048
|
||||
+dtest_mount 8388608 2250 4096
|
||||
+dtest_mount 16777216 20000 1024
|
||||
+dtest_mount 16777216 10000 2048
|
||||
|
||||
ftest_mount device_table.txt 4096
|
||||
Index: genext2fs/test.sh
|
||||
===================================================================
|
||||
--- genext2fs.orig/test.sh 2011-09-03 13:40:35.000000000 +0200
|
||||
+++ genext2fs/test.sh 2011-09-03 14:21:17.000000000 +0200
|
||||
@@ -30,9 +30,9 @@
|
||||
# Creates an image with a file of given size and verifies it
|
||||
# Usage: dtest file-size number-of-blocks correct-checksum
|
||||
dtest () {
|
||||
- size=$1; blocks=$2; checksum=$3
|
||||
+ size=$1; blocks=$2; blocksz=$3; checksum=$4
|
||||
echo Testing with file of size $size
|
||||
- dgen $size $blocks
|
||||
+ dgen $size $blocks $blocksz
|
||||
md5cmp $checksum
|
||||
gen_cleanup
|
||||
}
|
||||
@@ -53,12 +53,20 @@
|
||||
# replace the following lines with the output of
|
||||
# sudo sh test-mount.sh|grep test
|
||||
|
||||
-dtest 0 4096 3bc6424b8fcd51a0de34ee59d91d5f16
|
||||
-dtest 0 8193 f174804f6b433b552706cbbfc60c416d
|
||||
-dtest 0 8194 4855a55d0cbdc44584634df49ebd5711
|
||||
-dtest 1 4096 09c569b6bfb45222c729c42d04d5451f
|
||||
-dtest 12288 4096 61febcbfbf32024ef99103fcdc282c39
|
||||
-dtest 274432 4096 0c517803552c55c1806e4220b0a0164f
|
||||
-dtest 8388608 9000 e0e5ea15bced10ab486d8135584b5d8e
|
||||
-dtest 16777216 20000 fdf636eb905ab4dc1bf76dce5ac5d209
|
||||
+dtest 0 4096 1024 3bc6424b8fcd51a0de34ee59d91d5f16
|
||||
+dtest 0 2048 2048 230afa16496df019878cc2370c661cdc
|
||||
+dtest 0 1024 4096 ebff5eeb38b70f3f1cd081e60eb44561
|
||||
+dtest 0 8193 1024 f174804f6b433b552706cbbfc60c416d
|
||||
+dtest 0 8194 1024 4855a55d0cbdc44584634df49ebd5711
|
||||
+dtest 0 8193 4096 c493679698418ec7e6552005e2d2a6d8
|
||||
+dtest 0 8194 2048 ec13f328fa7543563f35f494bddc059c
|
||||
+dtest 1 4096 1024 09c569b6bfb45222c729c42d04d5451f
|
||||
+dtest 1 1024 4096 d318a326fdc907810ae9e6b0a20e9b06
|
||||
+dtest 12288 4096 1024 61febcbfbf32024ef99103fcdc282c39
|
||||
+dtest 274432 4096 1024 0c517803552c55c1806e4220b0a0164f
|
||||
+dtest 8388608 9000 1024 e0e5ea15bced10ab486d8135584b5d8e
|
||||
+dtest 8388608 4500 2048 39f4d537a72f5053fd6891721c59680d
|
||||
+dtest 8388608 2250 4096 1d697fa4bc2cfffe02ac91edfadc40bf
|
||||
+dtest 16777216 20000 1024 fdf636eb905ab4dc1bf76dce5ac5d209
|
||||
+dtest 16777216 10000 2048 f9824a81ea5e74fdf469c097927c292b
|
||||
ftest device_table.txt 4096 a0af06d944b11d2902dfd705484c64cc
|
@ -1,44 +0,0 @@
|
||||
Index: genext2fs/genext2fs.c
|
||||
===================================================================
|
||||
--- genext2fs.orig/genext2fs.c 2011-11-29 17:36:06.000000000 +0100
|
||||
+++ genext2fs/genext2fs.c 2011-11-29 17:37:37.000000000 +0100
|
||||
@@ -1779,7 +1779,8 @@
|
||||
assert(nod->i_block[EXT2_DIND_BLOCK] != 0);
|
||||
for(i = 0; i < BLOCKSIZE/4; i++)
|
||||
if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i )
|
||||
- swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i]));
|
||||
+ if (((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i])
|
||||
+ swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i]));
|
||||
swap_block(get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]));
|
||||
if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4)
|
||||
return;
|
||||
@@ -1792,7 +1793,8 @@
|
||||
(BLOCKSIZE/4)*(BLOCKSIZE/4) +
|
||||
i*(BLOCKSIZE/4)*(BLOCKSIZE/4) +
|
||||
j*(BLOCKSIZE/4)) )
|
||||
- swap_block(get_blk(fs,b2[j]));
|
||||
+ if (b2[j])
|
||||
+ swap_block(get_blk(fs,b2[j]));
|
||||
else {
|
||||
done = 1;
|
||||
break;
|
||||
@@ -1825,7 +1827,8 @@
|
||||
swap_block(get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]));
|
||||
for(i = 0; i < BLOCKSIZE/4; i++)
|
||||
if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i )
|
||||
- swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i]));
|
||||
+ if (((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i])
|
||||
+ swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i]));
|
||||
if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4)
|
||||
return;
|
||||
/* Adding support for triple indirection */
|
||||
@@ -1839,7 +1842,8 @@
|
||||
(BLOCKSIZE/4)*(BLOCKSIZE/4) +
|
||||
i*(BLOCKSIZE/4)*(BLOCKSIZE/4) +
|
||||
j*(BLOCKSIZE/4)) )
|
||||
- swap_block(get_blk(fs,b2[j]));
|
||||
+ if (b2[j])
|
||||
+ swap_block(get_blk(fs,b2[j]));
|
||||
else {
|
||||
done = 1;
|
||||
break;
|
@ -31,4 +31,8 @@ ifeq ($(GNU_HOST_NAME),x86_64-linux-gnux32)
|
||||
HOST_CONFIGURE_ARGS += ABI=x32
|
||||
endif
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -7,11 +7,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=isl
|
||||
PKG_VERSION:=0.24
|
||||
PKG_VERSION:=0.25
|
||||
|
||||
PKG_SOURCE_URL:=https://libisl.sourceforge.io/
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=043105cc544f416b48736fff8caf077fb0663a717d06b1113f16e391ac99ebad
|
||||
PKG_HASH:=be7b210647ccadf90a2f0b000fca11a4d40546374a850db67adb32fad4b230d9
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
@ -24,4 +24,8 @@ HOST_CONFIGURE_ARGS += \
|
||||
--disable-shared \
|
||||
--with-gmp-prefix=$(STAGING_DIR_HOST)
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -8,8 +8,8 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libressl
|
||||
PKG_VERSION:=3.4.1
|
||||
PKG_HASH:=107ceae6ca800e81cb563584c16afa36d6c7138fade94a2b3e9da65456f7c61c
|
||||
PKG_VERSION:=3.5.3
|
||||
PKG_HASH:=3ab5e5eaef69ce20c6b170ee64d785b42235f48f2e62b095fca5d7b6672b8b28
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_CPE_ID:=cpe:/a:openbsd:libressl
|
||||
@ -24,11 +24,18 @@ HOST_BUILD_PARALLEL:=1
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOSTCC := $(HOSTCC_NOCACHE)
|
||||
HOST_CONFIGURE_ARGS += --enable-static --disable-shared --disable-tests
|
||||
|
||||
HOST_CFLAGS += $(HOST_FPIC)
|
||||
|
||||
ifeq ($(GNU_HOST_NAME),x86_64-linux-gnux32)
|
||||
HOST_CONFIGURE_ARGS += --disable-asm
|
||||
endif
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--enable-static \
|
||||
--disable-shared \
|
||||
--disable-asm \
|
||||
--with-pic \
|
||||
--disable-tests
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -34,8 +34,11 @@ define Host/Install
|
||||
$(SED) 's,-lstdc++,-luClibc++,g' $(STAGING_DIR_HOST)/bin/libtool-ucxx
|
||||
endef
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
|
||||
$(call Host/Clean/Default)
|
||||
endef
|
||||
|
||||
|
56
tools/llvm-bpf/Makefile
Normal file
56
tools/llvm-bpf/Makefile
Normal file
@ -0,0 +1,56 @@
|
||||
#
|
||||
# Copyright (C) 2006-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=llvm-project
|
||||
PKG_VERSION:=14.0.6
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).src.tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/llvm/llvm-project/releases/download/llvmorg-$(PKG_VERSION)
|
||||
PKG_HASH:=8b3cfd7bc695bd6cea0f37f53f0981f34f87496e79e2529874fd03a2f9dd3a8a
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION).src
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
CMAKE_BINARY_SUBDIR := build
|
||||
CMAKE_SOURCE_SUBDIR := llvm
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
LLVM_BPF_PREFIX = llvm-bpf-$(PKG_VERSION).$(HOST_OS)-$(HOST_ARCH)
|
||||
|
||||
CMAKE_HOST_INSTALL_PREFIX = $(STAGING_DIR_HOST)/$(LLVM_BPF_PREFIX)
|
||||
|
||||
CMAKE_HOST_OPTIONS += \
|
||||
-DLLVM_ENABLE_BINDINGS=OFF \
|
||||
-DLLVM_INCLUDE_DOCS=OFF \
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
||||
-DLLVM_INCLUDE_TESTS=OFF \
|
||||
-DLLVM_ENABLE_PROJECTS="clang;lld" \
|
||||
-DLLVM_TARGETS_TO_BUILD=BPF \
|
||||
-DCLANG_BUILD_EXAMPLES=OFF \
|
||||
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON \
|
||||
-DLLVM_LINK_LLVM_DYLIB=ON \
|
||||
-DLLVM_TOOLCHAIN_TOOLS="llvm-objcopy;llvm-objdump;llvm-readelf;llvm-strip;llvm-ar;llvm-as;llvm-dis;llvm-link;llvm-nm;llvm-ranlib;llc;opt" \
|
||||
-DCMAKE_SKIP_RPATH=OFF
|
||||
|
||||
define Host/Install
|
||||
rm -rf $(STAGING_DIR_HOST)/llvm-bpf*
|
||||
$(Host/Install/Default)
|
||||
ln -s $(LLVM_BPF_PREFIX) $(STAGING_DIR_HOST)/llvm-bpf
|
||||
STRIP_KMOD= PATCHELF= STRIP=strip $(SCRIPT_DIR)/rstrip.sh $(STAGING_DIR_HOST)/llvm-bpf
|
||||
echo "$(PKG_VERSION)" > $(CMAKE_HOST_INSTALL_PREFIX)/.llvm-version
|
||||
endef
|
||||
|
||||
define Host/Uninstall
|
||||
rm -rf $(STAGING_DIR_HOST)/llvm-bpf*
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
@ -31,6 +31,7 @@ define Host/Install
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -f $(STAGING_DIR_HOST)/bin/lzma
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -21,9 +21,8 @@ include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOST_CONFIGURE_VARS += gl_cv_func_strstr_linear=no
|
||||
|
||||
define Host/Clean
|
||||
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
|
||||
$(call Host/Clean/Default)
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -1,11 +1,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=meson
|
||||
PKG_VERSION:=0.61.2
|
||||
PKG_VERSION:=0.61.5
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/mesonbuild/meson/releases/download/$(PKG_VERSION)
|
||||
PKG_HASH:=0233a7f8d959079318f6052b0939c27f68a5de86ba601f25c9ee6869fb5f5889
|
||||
PKG_HASH:=5e9a0d65c1a51936362b9686d1c5e9e184a6fd245d57e7269750ce50c20f5d9a
|
||||
|
||||
PKG_MAINTAINER:=Andre Heider <a.heider@gmail.com>
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
@ -25,7 +25,6 @@ define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/lib/meson
|
||||
$(INSTALL_CONF) files/openwrt-cross.txt.in $(STAGING_DIR_HOST)/lib/meson/
|
||||
$(INSTALL_CONF) files/openwrt-native.txt.in $(STAGING_DIR_HOST)/lib/meson/
|
||||
$(HOST_BUILD_DIR)/packaging/create_zipapp.py $(HOST_BUILD_DIR) --outfile $(STAGING_DIR_HOST)/lib/meson/meson.py
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
|
@ -6,6 +6,7 @@ strip = '@STRIP@'
|
||||
nm = '@NM@'
|
||||
pkgconfig = '@PKGCONFIG@'
|
||||
cmake = '@CMAKE@'
|
||||
python = '@PYTHON@'
|
||||
|
||||
[built-in options]
|
||||
c_args = [@CFLAGS@]
|
||||
|
@ -3,6 +3,7 @@ c = [@CC@]
|
||||
cpp = [@CXX@]
|
||||
pkgconfig = '@PKGCONFIG@'
|
||||
cmake = '@CMAKE@'
|
||||
python = '@PYTHON@'
|
||||
|
||||
[built-in options]
|
||||
c_args = [@CFLAGS@]
|
||||
|
21
tools/meson/patches/010-wsl2.patch
Normal file
21
tools/meson/patches/010-wsl2.patch
Normal file
@ -0,0 +1,21 @@
|
||||
From 7d1ef4343ed5b2b7ab51469177a42c32c47f0528 Mon Sep 17 00:00:00 2001
|
||||
From: Rosen Penev <rosenp@gmail.com>
|
||||
Date: Tue, 6 Sep 2022 01:36:17 -0700
|
||||
Subject: [PATCH] minstall: handle extra error for selinuxenabled
|
||||
|
||||
Microsoft's WSL2 uses a Plan 9 filesystem, which returns IOError when file is missing.
|
||||
---
|
||||
mesonbuild/minstall.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/mesonbuild/minstall.py
|
||||
+++ b/mesonbuild/minstall.py
|
||||
@@ -229,7 +229,7 @@ def restore_selinux_contexts() -> None:
|
||||
'''
|
||||
try:
|
||||
subprocess.check_call(['selinuxenabled'])
|
||||
- except (FileNotFoundError, NotADirectoryError, PermissionError, subprocess.CalledProcessError):
|
||||
+ except (FileNotFoundError, NotADirectoryError, OSError, PermissionError, subprocess.CalledProcessError):
|
||||
# If we don't have selinux or selinuxenabled returned 1, failure
|
||||
# is ignored quietly.
|
||||
return
|
@ -7,37 +7,36 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mkimage
|
||||
PKG_VERSION:=2021.10
|
||||
PKG_VERSION:=2022.10
|
||||
|
||||
PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:= \
|
||||
https://mirror.cyberbits.eu/u-boot \
|
||||
https://ftp.denx.de/pub/u-boot \
|
||||
ftp://ftp.denx.de/pub/u-boot
|
||||
PKG_HASH:=cde723e19262e646f2670d25e5ec4b1b368490de950d4e26275a988c36df0bd4
|
||||
PKG_HASH:=50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Host/Prepare
|
||||
$(Host/Prepare/Default)
|
||||
mkdir -p $(HOST_BUILD_DIR)/include/config
|
||||
touch $(HOST_BUILD_DIR)/include/config/auto.conf
|
||||
mkdir -p $(HOST_BUILD_DIR)/include/generated/
|
||||
touch $(HOST_BUILD_DIR)/include/generated/autoconf.h
|
||||
define Host/Configure
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS)" \
|
||||
HOSTLDFLAGS="$(HOST_LDFLAGS)" \
|
||||
PKG_CONFIG_EXTRAARGS="--static" \
|
||||
V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1) \
|
||||
tools-only_config
|
||||
|
||||
sed -i 's/CONFIG_TOOLS_MKEFICAPSULE=y/# CONFIG_TOOLS_MKEFICAPSULE is not set/' $(HOST_BUILD_DIR)/.config
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) \
|
||||
HOSTCFLAGS="$(HOST_CFLAGS)" \
|
||||
HOSTLDFLAGS="$(HOST_LDFLAGS)" \
|
||||
no-dot-config-targets=tools-only \
|
||||
CONFIG_MKIMAGE_DTC_PATH=dtc \
|
||||
CONFIG_FIT=y \
|
||||
CONFIG_FIT_SIGNATURE=y \
|
||||
CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 \
|
||||
CONFIG_TOOLS_LIBCRYPTO=y \
|
||||
PKG_CONFIG_EXTRAARGS="--static" \
|
||||
V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1) \
|
||||
tools-only
|
||||
endef
|
||||
|
||||
|
@ -2,7 +2,7 @@ This patch makes it possible to set a custom image magic.
|
||||
|
||||
--- a/tools/mkimage.c
|
||||
+++ b/tools/mkimage.c
|
||||
@@ -24,6 +24,7 @@ static struct image_tool_params params =
|
||||
@@ -26,6 +26,7 @@ static struct image_tool_params params =
|
||||
.arch = IH_ARCH_PPC,
|
||||
.type = IH_TYPE_KERNEL,
|
||||
.comp = IH_COMP_GZIP,
|
||||
@ -10,8 +10,8 @@ This patch makes it possible to set a custom image magic.
|
||||
.dtc = MKIMAGE_DEFAULT_DTC_OPTIONS,
|
||||
.imagename = "",
|
||||
.imagename2 = "",
|
||||
@@ -85,11 +86,12 @@ static void usage(const char *msg)
|
||||
" -l ==> list image header information\n",
|
||||
@@ -89,11 +90,12 @@ static void usage(const char *msg)
|
||||
" -q ==> quiet\n",
|
||||
params.cmdname);
|
||||
fprintf(stderr,
|
||||
- " %s [-x] -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_file...] image\n"
|
||||
@ -24,16 +24,16 @@ This patch makes it possible to set a custom image magic.
|
||||
" -a ==> set load address to 'addr' (hex)\n"
|
||||
" -e ==> set entry point to 'ep' (hex)\n"
|
||||
" -n ==> set image name to 'name'\n"
|
||||
@@ -155,7 +157,7 @@ static void process_args(int argc, char
|
||||
int opt;
|
||||
@@ -159,7 +161,7 @@ static int add_content(int type, const c
|
||||
}
|
||||
|
||||
while ((opt = getopt(argc, argv,
|
||||
- "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:ln:N:p:O:rR:qstT:vVx")) != -1) {
|
||||
+ "a:A:b:B:c:C:d:D:e:Ef:FG:k:i:K:lM:n:N:p:O:rR:qstT:vVx")) != -1) {
|
||||
switch (opt) {
|
||||
case 'a':
|
||||
params.addr = strtoull(optarg, &ptr, 16);
|
||||
@@ -245,6 +247,14 @@ static void process_args(int argc, char
|
||||
static const char optstring[] =
|
||||
- "a:A:b:B:c:C:d:D:e:Ef:Fg:G:i:k:K:ln:N:o:O:p:qrR:stT:vVx";
|
||||
+ "a:A:b:B:c:C:d:D:e:Ef:Fg:G:i:k:K:lM:n:N:o:O:p:qrR:stT:vVx";
|
||||
|
||||
static const struct option longopts[] = {
|
||||
{ "load-address", required_argument, NULL, 'a' },
|
||||
@@ -298,6 +300,14 @@ static void process_args(int argc, char
|
||||
case 'l':
|
||||
params.lflag = 1;
|
||||
break;
|
||||
@ -50,6 +50,15 @@ This patch makes it possible to set a custom image magic.
|
||||
break;
|
||||
--- a/tools/default_image.c
|
||||
+++ b/tools/default_image.c
|
||||
@@ -56,7 +56,7 @@ static int image_verify_header(unsigned
|
||||
*/
|
||||
memcpy(hdr, ptr, sizeof(image_header_t));
|
||||
|
||||
- if (be32_to_cpu(hdr->ih_magic) != IH_MAGIC) {
|
||||
+ if (be32_to_cpu(hdr->ih_magic) != params->magic) {
|
||||
debug("%s: Bad Magic Number: \"%s\" is no valid image\n",
|
||||
params->cmdname, params->imagefile);
|
||||
return -FDT_ERR_BADMAGIC;
|
||||
@@ -120,7 +120,7 @@ static void image_set_header(void *ptr,
|
||||
}
|
||||
|
||||
@ -61,7 +70,7 @@ This patch makes it possible to set a custom image magic.
|
||||
image_set_load(hdr, addr);
|
||||
--- a/tools/imagetool.h
|
||||
+++ b/tools/imagetool.h
|
||||
@@ -56,6 +56,7 @@ struct image_tool_params {
|
||||
@@ -59,6 +59,7 @@ struct image_tool_params {
|
||||
int arch;
|
||||
int type;
|
||||
int comp;
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Huangbin Zhan <zhanhb88@gmail.com>
|
||||
Date: Fri, 18 Feb 2022 14:19:23 +0800
|
||||
Subject: [PATCH] tools: disable TOOLS_FIT_FULL_CHECK
|
||||
|
||||
U-Boot disallows unit addresses by default. Disable TOOLS_FIT_FULL_CHECK
|
||||
to allow at symbol in node names.
|
||||
|
||||
https://github.com/openwrt/openwrt/commits/master/scripts/mkits.sh
|
||||
https://github.com/u-boot/u-boot/commit/3f04db891a353f4b127ed57279279f851c6b4917
|
||||
---
|
||||
tools/Kconfig | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/tools/Kconfig
|
||||
+++ b/tools/Kconfig
|
||||
@@ -31,7 +31,7 @@ config TOOLS_FIT
|
||||
Enable FIT support in the tools builds.
|
||||
|
||||
config TOOLS_FIT_FULL_CHECK
|
||||
- def_bool y
|
||||
+ bool "Do a full check of the FIT"
|
||||
help
|
||||
Do a full check of the FIT before using it in the tools builds
|
||||
|
@ -0,0 +1,11 @@
|
||||
--- a/tools/mkimage.h
|
||||
+++ b/tools/mkimage.h
|
||||
@@ -44,7 +44,7 @@ static inline ulong map_to_sysmem(void *
|
||||
#define ALLOC_CACHE_ALIGN_BUFFER(type, name, size) type name[size]
|
||||
|
||||
#define MKIMAGE_TMPFILE_SUFFIX ".tmp"
|
||||
-#define MKIMAGE_MAX_TMPFILE_LEN 256
|
||||
+#define MKIMAGE_MAX_TMPFILE_LEN 1024
|
||||
#define MKIMAGE_DEFAULT_DTC_OPTIONS "-I dts -O dtb -p 500"
|
||||
#define MKIMAGE_MAX_DTC_CMDLINE_LEN 2 * MKIMAGE_MAX_TMPFILE_LEN + 35
|
||||
|
@ -1,14 +0,0 @@
|
||||
OpenWrt links the libressl statically against mkimage, make sure all the
|
||||
needed dependencies are added too.
|
||||
|
||||
--- a/tools/Makefile
|
||||
+++ b/tools/Makefile
|
||||
@@ -158,7 +158,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON
|
||||
HOSTCFLAGS_kwbimage.o += \
|
||||
$(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "")
|
||||
HOSTLDLIBS_mkimage += \
|
||||
- $(shell pkg-config --libs libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto")
|
||||
+ $(shell pkg-config --libs --static libssl libcrypto 2> /dev/null || echo "-lssl -lcrypto")
|
||||
|
||||
# OS X deprecate openssl in favour of CommonCrypto, supress deprecation
|
||||
# warnings on those systems
|
@ -7,11 +7,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mklibs
|
||||
PKG_VERSION:=0.1.44
|
||||
PKG_VERSION:=0.1.45
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@DEBIAN/pool/main/m/mklibs/
|
||||
PKG_HASH:=3af0b6bd35e5b6fc58d8b68827fbae2ff6b7e20dd2b238ccb9b49d84722066c2
|
||||
PKG_HASH:=dd92a904b3942566f713fe536cd77dd1a5cfc62243c0e0bc6bb5d866e37422f3
|
||||
|
||||
HOST_FIXUP:=autoreconf
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
for name in unresolved:
|
||||
if not needed_symbols[name].weak:
|
||||
- raise Exception("Unresolvable symbol %s" % name)
|
||||
+ print "WARNING: Unresolvable symbol %s" % name
|
||||
+ print("WARNING: Unresolvable symbol %s" % name)
|
||||
break
|
||||
|
||||
previous_pass_unresolved = unresolved
|
||||
@ -14,7 +14,7 @@
|
||||
if not name in symbol_provider:
|
||||
if not needed_symbols[name].weak:
|
||||
- raise Exception("No library provides non-weak %s" % name)
|
||||
+ print "WARNING: Unresolvable symbol %s" % name
|
||||
+ print("WARNING: Unresolvable symbol %s" % name)
|
||||
else:
|
||||
lib = symbol_provider[name]
|
||||
library_symbols_used[lib].add(library_symbols[lib][name])
|
||||
|
@ -32,11 +32,11 @@
|
||||
- dest_path + "/" + so_file_name + "-so",
|
||||
- dest_path + "/" + so_file_name + "-so-stripped")
|
||||
## DEBUG
|
||||
debug(DEBUG_VERBOSE, so_file, "\t", `os.stat(so_file)[ST_SIZE]`)
|
||||
debug(DEBUG_VERBOSE, so_file, "\t", str(os.stat(so_file)[ST_SIZE]))
|
||||
debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so", "\t",
|
||||
`os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE]`)
|
||||
str(os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE]))
|
||||
- debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so-stripped",
|
||||
- "\t", `os.stat(dest_path + "/" + so_file_name + "-so-stripped")[ST_SIZE]`)
|
||||
- "\t", str(os.stat(dest_path + "/" + so_file_name + "-so-stripped")[ST_SIZE]))
|
||||
|
||||
# Finalising libs and cleaning up
|
||||
-for lib in regexpfilter(os.listdir(dest_path), "(.*)-so-stripped$"):
|
||||
|
@ -23,7 +23,7 @@
|
||||
for name in needed_symbols:
|
||||
- if not name in symbol_provider:
|
||||
- if not needed_symbols[name].weak:
|
||||
- print "WARNING: Unresolvable symbol %s" % name
|
||||
- print("WARNING: Unresolvable symbol %s" % name)
|
||||
- else:
|
||||
- lib = symbol_provider[name]
|
||||
- library_symbols_used[lib].add(library_symbols[lib][name])
|
||||
|
@ -1,14 +0,0 @@
|
||||
--- a/src/mklibs
|
||||
+++ b/src/mklibs
|
||||
@@ -604,6 +604,11 @@ while 1:
|
||||
extra_post_obj.append(sysroot + libc_extras_dir + "/sofini.o")
|
||||
symbols.add(ProvidedSymbol('__dso_handle', None, None, True))
|
||||
|
||||
+ if soname in ("libc.so.0"):
|
||||
+ symbols.add(ProvidedSymbol('__uClibc_init', None, None, True))
|
||||
+ symbols.add(ProvidedSymbol('__uClibc_fini', None, None, True))
|
||||
+ extra_flags.append("-Wl,-init,__uClibc_init")
|
||||
+
|
||||
map_file = find_pic_map(library)
|
||||
if map_file:
|
||||
extra_flags.append("-Wl,--version-script=" + map_file)
|
@ -1,6 +1,6 @@
|
||||
--- a/src/mklibs
|
||||
+++ b/src/mklibs
|
||||
@@ -616,7 +616,7 @@ while 1:
|
||||
@@ -611,7 +611,7 @@ while 1:
|
||||
# compile in only used symbols
|
||||
cmd = []
|
||||
cmd.extend(gcc_options)
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
symbols.update(library_symbols_used[library])
|
||||
|
||||
@@ -623,9 +621,10 @@ while 1:
|
||||
@@ -618,9 +616,10 @@ while 1:
|
||||
cmd.append(pic_file)
|
||||
cmd.extend(extra_post_obj)
|
||||
cmd.extend(extra_flags)
|
||||
|
@ -1,63 +0,0 @@
|
||||
--- a/src/mklibs
|
||||
+++ b/src/mklibs
|
||||
@@ -173,9 +173,10 @@ def undefined_symbols(obj):
|
||||
return result
|
||||
|
||||
class ProvidedSymbol(Symbol):
|
||||
- def __init__(self, name, version, library, default_version):
|
||||
+ def __init__(self, name, version, library, default_version, weak):
|
||||
super(ProvidedSymbol, self).__init__(name, version, library)
|
||||
self.default_version = default_version
|
||||
+ self.weak = weak
|
||||
|
||||
def base_names(self):
|
||||
ret = []
|
||||
@@ -216,11 +217,15 @@ def provided_symbols(obj):
|
||||
if version_string.lower() not in ('base', 'none'):
|
||||
version = version_string
|
||||
|
||||
+ weak = False
|
||||
+ if weak_string.lower() == 'true':
|
||||
+ weak = True
|
||||
+
|
||||
default_version = False
|
||||
if default_version_string.lower() == 'true':
|
||||
default_version = True
|
||||
|
||||
- result.append(ProvidedSymbol(name, version, library, default_version))
|
||||
+ result.append(ProvidedSymbol(name, version, library, default_version, weak))
|
||||
|
||||
return result
|
||||
|
||||
@@ -509,6 +514,9 @@ while 1:
|
||||
debug(DEBUG_SPAM, "present_symbols adding %s" % symbol)
|
||||
names = symbol.base_names()
|
||||
for name in names:
|
||||
+ if name in present_symbols:
|
||||
+ if symbol.library != present_symbols[name].library:
|
||||
+ needed_symbols[name] = UndefinedSymbol(name, True, symbol.version, symbol.library)
|
||||
present_symbols[name] = symbol
|
||||
|
||||
# are we finished?
|
||||
@@ -600,12 +608,16 @@ while 1:
|
||||
# may segfault in ptmalloc_init due to undefined weak reference
|
||||
extra_pre_obj.append(sysroot + libc_extras_dir + "/soinit.o")
|
||||
extra_post_obj.append(sysroot + libc_extras_dir + "/sofini.o")
|
||||
- symbols.add(ProvidedSymbol('__dso_handle', None, None, True))
|
||||
+ symbols.add(ProvidedSymbol('__dso_handle', None, None, True, True))
|
||||
|
||||
- if soname in ("libc.so.0"):
|
||||
- symbols.add(ProvidedSymbol('__uClibc_init', None, None, True))
|
||||
- symbols.add(ProvidedSymbol('__uClibc_fini', None, None, True))
|
||||
- extra_flags.append("-Wl,-init,__uClibc_init")
|
||||
+ if soname == "libc.so.0":
|
||||
+ symbols.add(ProvidedSymbol('__uClibc_init', None, None, True, True))
|
||||
+ symbols.add(ProvidedSymbol('__uClibc_fini', None, None, True, True))
|
||||
+ extra_pre_obj.append("-Wl,-init,__uClibc_init")
|
||||
+
|
||||
+ if soname == "libpthread.so.0":
|
||||
+ symbols.add(ProvidedSymbol('__pthread_initialize_minimal_internal', None, None, True, True))
|
||||
+ extra_flags.append("-Wl,-z,nodelete,-z,initfirst,-init=__pthread_initialize_minimal_internal")
|
||||
|
||||
map_file = find_pic_map(library)
|
||||
if map_file:
|
@ -1,6 +1,6 @@
|
||||
--- a/src/mklibs
|
||||
+++ b/src/mklibs
|
||||
@@ -274,6 +274,7 @@ def extract_soname(so_file):
|
||||
@@ -269,6 +269,7 @@ def extract_soname(so_file):
|
||||
return ""
|
||||
|
||||
def multiarch(paths):
|
||||
|
@ -1,10 +1,10 @@
|
||||
--- a/src/mklibs
|
||||
+++ b/src/mklibs
|
||||
@@ -57,18 +57,18 @@ debuglevel = DEBUG_NORMAL
|
||||
@@ -57,17 +57,17 @@ debuglevel = DEBUG_NORMAL
|
||||
|
||||
def debug(level, *msg):
|
||||
if debuglevel >= level:
|
||||
- print string.join(msg)
|
||||
- print(string.join(msg))
|
||||
+ print(' '.join(msg))
|
||||
|
||||
# return a list of lines of output of the command
|
||||
@ -15,82 +15,22 @@
|
||||
output = pipe.read().strip()
|
||||
status = pipe.close()
|
||||
if status is not None and os.WEXITSTATUS(status) != 0:
|
||||
- print "Command failed with status", os.WEXITSTATUS(status), ":", \
|
||||
- command, string.join(args)
|
||||
- print "With output:", output
|
||||
+ print("Command failed with status", os.WEXITSTATUS(status), ":", \
|
||||
print("Command failed with status", os.WEXITSTATUS(status), ":", \
|
||||
- command, string.join(args))
|
||||
+ command, ' '.join(args))
|
||||
+ print("With output:", output)
|
||||
print("With output:", output)
|
||||
sys.exit(1)
|
||||
return [i for i in output.split('\n') if i]
|
||||
|
||||
@@ -204,7 +204,7 @@ class ProvidedSymbol(Symbol):
|
||||
# Return a set of symbols provided by a library
|
||||
def provided_symbols(obj):
|
||||
if not os.access(obj, os.F_OK):
|
||||
- raise Exception("Cannot find lib" + obj)
|
||||
+ raise Exception("Cannot find lib " + obj)
|
||||
library = extract_soname(obj)
|
||||
|
||||
output = command("mklibs-readelf", "--print-symbols-provided", obj)
|
||||
@@ -297,27 +297,27 @@ def usage(was_err):
|
||||
outfd = sys.stderr
|
||||
else:
|
||||
outfd = sys.stdout
|
||||
- print >> outfd, "Usage: mklibs [OPTION]... -d DEST FILE ..."
|
||||
- print >> outfd, "Make a set of minimal libraries for FILE(s) in DEST."
|
||||
- print >> outfd, ""
|
||||
- print >> outfd, " -d, --dest-dir DIRECTORY create libraries in DIRECTORY"
|
||||
- print >> outfd, " -D, --no-default-lib omit default libpath (", ':'.join(default_lib_path), ")"
|
||||
- print >> outfd, " -L DIRECTORY[:DIRECTORY]... add DIRECTORY(s) to the library search path"
|
||||
- print >> outfd, " -l LIBRARY add LIBRARY always"
|
||||
- print >> outfd, " --ldlib LDLIB use LDLIB for the dynamic linker"
|
||||
- print >> outfd, " --libc-extras-dir DIRECTORY look for libc extra files in DIRECTORY"
|
||||
- print >> outfd, " --target TARGET prepend TARGET- to the gcc and binutils calls"
|
||||
- print >> outfd, " --root ROOT search in ROOT for library rpaths"
|
||||
- print >> outfd, " --sysroot ROOT prepend ROOT to all paths for libraries"
|
||||
- print >> outfd, " --gcc-options OPTIONS pass OPTIONS to gcc"
|
||||
- print >> outfd, " --libdir DIR use DIR (e.g. lib64) in place of lib in default paths"
|
||||
- print >> outfd, " -v, --verbose explain what is being done"
|
||||
- print >> outfd, " -h, --help display this help and exit"
|
||||
+ print("Usage: mklibs [OPTION]... -d DEST FILE ...", file=outfd)
|
||||
+ print("Make a set of minimal libraries for FILE(s) in DEST.", file=outfd)
|
||||
+ print("", file=outfd)
|
||||
+ print(" -d, --dest-dir DIRECTORY create libraries in DIRECTORY", file=outfd)
|
||||
@@ -296,7 +296,7 @@ def usage(was_err):
|
||||
print("Make a set of minimal libraries for FILE(s, file=outfd) in DEST.", file=outfd)
|
||||
print("" , file=outfd)
|
||||
print(" -d, --dest-dir DIRECTORY create libraries in DIRECTORY", file=outfd)
|
||||
- print(" -D, --no-default-lib omit default libpath (", ':'.join(default_lib_path, file=outfd), ", file=outfd)", file=outfd)
|
||||
+ print(" -D, --no-default-lib omit default libpath (", ':'.join(default_lib_path), ")", file=outfd)
|
||||
+ print(" -L DIRECTORY[:DIRECTORY]... add DIRECTORY(s) to the library search path", file=outfd)
|
||||
+ print(" -l LIBRARY add LIBRARY always", file=outfd)
|
||||
+ print(" --ldlib LDLIB use LDLIB for the dynamic linker", file=outfd)
|
||||
+ print(" --libc-extras-dir DIRECTORY look for libc extra files in DIRECTORY", file=outfd)
|
||||
+ print(" --target TARGET prepend TARGET- to the gcc and binutils calls", file=outfd)
|
||||
+ print(" --root ROOT search in ROOT for library rpaths", file=outfd)
|
||||
+ print(" --sysroot ROOT prepend ROOT to all paths for libraries", file=outfd)
|
||||
+ print(" --gcc-options OPTIONS pass OPTIONS to gcc", file=outfd)
|
||||
+ print(" --libdir DIR use DIR (e.g. lib64) in place of lib in default paths", file=outfd)
|
||||
+ print(" -v, --verbose explain what is being done", file=outfd)
|
||||
+ print(" -h, --help display this help and exit", file=outfd)
|
||||
sys.exit(was_err)
|
||||
|
||||
def version(vers):
|
||||
- print "mklibs: version ",vers
|
||||
- print ""
|
||||
+ print("mklibs: version ",vers)
|
||||
+ print("")
|
||||
|
||||
#################### main ####################
|
||||
## Usage: ./mklibs.py [OPTION]... -d DEST FILE ...
|
||||
@@ -368,8 +368,8 @@ script_pattern = re.compile("^#!\s*/")
|
||||
|
||||
try:
|
||||
optlist, proglist = getopt.getopt(sys.argv[1:], opts, longopts)
|
||||
-except getopt.GetoptError, msg:
|
||||
- print >> sys.stderr, msg
|
||||
+except getopt.GetoptError as msg:
|
||||
+ print(msg, file=sys.stderr)
|
||||
usage(1)
|
||||
|
||||
for opt, arg in optlist:
|
||||
@@ -377,7 +377,7 @@ for opt, arg in optlist:
|
||||
print(" -L DIRECTORY[:DIRECTORY]... add DIRECTORY(s, file=outfd) to the library search path", file=outfd)
|
||||
print(" -l LIBRARY add LIBRARY always", file=outfd)
|
||||
print(" --ldlib LDLIB use LDLIB for the dynamic linker", file=outfd)
|
||||
@@ -372,7 +372,7 @@ for opt, arg in optlist:
|
||||
if debuglevel < DEBUG_SPAM:
|
||||
debuglevel = debuglevel + 1
|
||||
elif opt == "-L":
|
||||
@ -99,7 +39,7 @@
|
||||
elif opt in ("-d", "--dest-dir"):
|
||||
dest_path = arg
|
||||
elif opt in ("-D", "--no-default-lib"):
|
||||
@@ -396,17 +396,17 @@ for opt, arg in optlist:
|
||||
@@ -391,7 +391,7 @@ for opt, arg in optlist:
|
||||
elif opt in ("-l",):
|
||||
force_libs.append(arg)
|
||||
elif opt == "--gcc-options":
|
||||
@ -108,19 +48,7 @@
|
||||
elif opt == "--libdir":
|
||||
libdir = arg
|
||||
elif opt in ("--help", "-h"):
|
||||
- usage(0)
|
||||
+ usage(0)
|
||||
sys.exit(0)
|
||||
elif opt in ("--version", "-V"):
|
||||
version(vers)
|
||||
sys.exit(0)
|
||||
else:
|
||||
- print "WARNING: unknown option: " + opt + "\targ: " + arg
|
||||
+ print("WARNING: unknown option: " + opt + "\targ: " + arg)
|
||||
|
||||
if include_default_lib_path == "yes":
|
||||
lib_path.extend([a.replace("/lib/", "/" + libdir + "/") for a in default_lib_path])
|
||||
@@ -424,22 +424,22 @@ if ldlib == "LDLIB":
|
||||
@@ -419,17 +419,17 @@ if ldlib == "LDLIB":
|
||||
objects = {} # map from inode to filename
|
||||
for prog in proglist:
|
||||
inode = os.stat(prog)[ST_INO]
|
||||
@ -141,45 +69,20 @@
|
||||
output = command("mklibs-readelf", "--print-interp", obj)
|
||||
if output:
|
||||
ldlib = output.pop()
|
||||
- if ldlib:
|
||||
- break
|
||||
+ if ldlib:
|
||||
+ break
|
||||
|
||||
if not ldlib:
|
||||
sys.exit("E: Dynamic linker not found, aborting.")
|
||||
@@ -454,10 +454,10 @@ for obj in sorted(objects.values()):
|
||||
for rpath_elem in rpath_val:
|
||||
if not rpath_elem in lib_rpath:
|
||||
if debuglevel >= DEBUG_VERBOSE:
|
||||
- print "Adding rpath " + rpath_elem + " for " + obj
|
||||
+ print("Adding rpath " + rpath_elem + " for " + obj)
|
||||
lib_rpath.append(rpath_elem)
|
||||
else:
|
||||
- print "warning: " + obj + " may need rpath, but --root not specified"
|
||||
+ print("warning: " + obj + " may need rpath, but --root not specified")
|
||||
|
||||
lib_path.extend(lib_rpath)
|
||||
|
||||
@@ -465,12 +465,12 @@ passnr = 1
|
||||
available_libs = []
|
||||
previous_pass_unresolved = set()
|
||||
@@ -462,9 +462,9 @@ previous_pass_unresolved = set()
|
||||
while 1:
|
||||
- debug(DEBUG_NORMAL, "I: library reduction pass", `passnr`)
|
||||
+ debug(DEBUG_NORMAL, "I: library reduction pass", repr(passnr))
|
||||
debug(DEBUG_NORMAL, "I: library reduction pass", str(passnr))
|
||||
if debuglevel >= DEBUG_VERBOSE:
|
||||
- print "Objects:",
|
||||
- print("Objects:",)
|
||||
- for obj in sorted([x[string.rfind(x, '/') + 1:] for x in objects.values()]):
|
||||
- print obj,
|
||||
- print
|
||||
- print(obj,)
|
||||
+ print("Objects:", end=' ')
|
||||
+ for obj in sorted([x[x.rfind('/') + 1:] for x in list(objects.values())]):
|
||||
+ print(obj, end=' ')
|
||||
+ print()
|
||||
print()
|
||||
|
||||
passnr = passnr + 1
|
||||
# Gather all already reduced libraries and treat them as objects as well
|
||||
@@ -479,7 +479,7 @@ while 1:
|
||||
@@ -474,7 +474,7 @@ while 1:
|
||||
obj = dest_path + "/" + lib
|
||||
small_libs.append(obj)
|
||||
inode = os.stat(obj)[ST_INO]
|
||||
@ -188,7 +91,7 @@
|
||||
debug(DEBUG_SPAM, obj, "is hardlink to", objects[inode])
|
||||
else:
|
||||
objects[inode] = obj
|
||||
@@ -509,7 +509,7 @@ while 1:
|
||||
@@ -504,7 +504,7 @@ while 1:
|
||||
present_symbols = {}
|
||||
checked_libs = small_libs
|
||||
checked_libs.extend(available_libs)
|
||||
@ -197,70 +100,8 @@
|
||||
for lib in checked_libs:
|
||||
for symbol in provided_symbols(lib):
|
||||
debug(DEBUG_SPAM, "present_symbols adding %s" % symbol)
|
||||
@@ -529,8 +529,8 @@ while 1:
|
||||
unresolved.add(name)
|
||||
num_unresolved = num_unresolved + 1
|
||||
|
||||
- debug (DEBUG_NORMAL, `len(needed_symbols)`, "symbols,",
|
||||
- `num_unresolved`, "unresolved")
|
||||
+ debug (DEBUG_NORMAL, repr(len(needed_symbols)), "symbols,",
|
||||
+ repr(num_unresolved), "unresolved")
|
||||
|
||||
if num_unresolved == 0:
|
||||
break
|
||||
@@ -539,7 +539,7 @@ while 1:
|
||||
# No progress in last pass. Verify all remaining symbols are weak.
|
||||
for name in unresolved:
|
||||
if not needed_symbols[name].weak:
|
||||
- print "WARNING: Unresolvable symbol %s" % name
|
||||
+ print("WARNING: Unresolvable symbol %s" % name)
|
||||
break
|
||||
|
||||
previous_pass_unresolved = unresolved
|
||||
@@ -641,9 +641,9 @@ while 1:
|
||||
command(target + "gcc", *cmd)
|
||||
|
||||
## DEBUG
|
||||
- debug(DEBUG_VERBOSE, so_file, "\t", `os.stat(so_file)[ST_SIZE]`)
|
||||
+ debug(DEBUG_VERBOSE, so_file, "\t", repr(os.stat(so_file)[ST_SIZE]))
|
||||
debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so", "\t",
|
||||
- `os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE]`)
|
||||
+ repr(os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE]))
|
||||
|
||||
# Finalising libs and cleaning up
|
||||
for lib in regexpfilter(os.listdir(dest_path), "(.*)-so$"):
|
||||
@@ -680,4 +680,4 @@ if not os.access(dest_path + "/" + ld_fu
|
||||
command(target + "objcopy", "--strip-unneeded -R .note -R .comment",
|
||||
ld_file, dest_path + "/" + ld_full_path)
|
||||
|
||||
-os.chmod(dest_path + "/" + ld_full_path, 0755)
|
||||
+os.chmod(dest_path + "/" + ld_full_path, 0o755)
|
||||
--- a/src/mklibs-copy
|
||||
+++ b/src/mklibs-copy
|
||||
@@ -51,9 +51,9 @@ def command(command, *args):
|
||||
output = pipe.read().strip()
|
||||
status = pipe.close()
|
||||
if status is not None and os.WEXITSTATUS(status) != 0:
|
||||
- print "Command failed with status", os.WEXITSTATUS(status), ":", \
|
||||
- command, ' '.join(args)
|
||||
- print "With output:", output
|
||||
+ print("Command failed with status", os.WEXITSTATUS(status), ":", \
|
||||
+ command, ' '.join(args))
|
||||
+ print("With output:", output)
|
||||
sys.exit(1)
|
||||
return output.split('\n')
|
||||
|
||||
@@ -134,8 +134,8 @@ def multiarch(paths):
|
||||
return paths
|
||||
|
||||
def version(vers):
|
||||
- print "mklibs: version ",vers
|
||||
- print ""
|
||||
+ print("mklibs: version ",vers)
|
||||
+ print("")
|
||||
|
||||
# Clean the environment
|
||||
vers="0.12"
|
||||
@@ -159,7 +159,7 @@ if include_default_lib_path:
|
||||
objects = {} # map from inode to filename
|
||||
for prog in proglist:
|
||||
@ -270,23 +111,15 @@
|
||||
logger.debug("%s is a hardlink to %s", prog, objects[inode])
|
||||
elif so_pattern.match(prog):
|
||||
logger.debug("%s is a library", prog)
|
||||
@@ -169,12 +169,12 @@ for prog in proglist:
|
||||
@@ -169,7 +169,7 @@ for prog in proglist:
|
||||
logger.debug("%s is no ELF", prog)
|
||||
|
||||
if not ldlib:
|
||||
- for obj in objects.values():
|
||||
+ for obj in list(objects.values()):
|
||||
output = command("mklibs-readelf", "-i", obj)
|
||||
- for x in output:
|
||||
+ for x in output:
|
||||
ldlib = x
|
||||
- if ldlib:
|
||||
- break
|
||||
+ if ldlib:
|
||||
+ break
|
||||
|
||||
if not ldlib:
|
||||
sys.exit("E: Dynamic linker not found, aborting.")
|
||||
for x in output:
|
||||
ldlib = x
|
||||
@@ -182,7 +182,7 @@ if not ldlib:
|
||||
logger.info('Using %s as dynamic linker', ldlib)
|
||||
|
||||
@ -319,9 +152,3 @@
|
||||
libraries.update(library_depends(obj))
|
||||
|
||||
if libraries == previous_pass_libraries:
|
||||
@@ -272,4 +272,4 @@ if not os.access(dest_path + "/" + ld_fu
|
||||
command(target + "objcopy", "--strip-unneeded -R .note -R .comment",
|
||||
ld_file, dest_path + "/" + ld_full_path)
|
||||
|
||||
-os.chmod(dest_path + "/" + ld_full_path, 0755)
|
||||
+os.chmod(dest_path + "/" + ld_full_path, 0o755)
|
||||
|
@ -1,33 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2010-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mm-macros
|
||||
PKG_VERSION:=1.0.0
|
||||
|
||||
PKG_SOURCE_URL:=@GNOME/mm-common/1.0
|
||||
PKG_SOURCE:=mm-common-$(PKG_VERSION).tar.xz
|
||||
PKG_HASH:=b97d9b041e5952486cab620b44ab09f6013a478f43b6699ae899b8a4da189cd4
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/mm-common-$(PKG_VERSION)
|
||||
|
||||
HOST_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/share/aclocal
|
||||
$(INSTALL_DATA) $(HOST_BUILD_DIR)/macros/*.m4 $(STAGING_DIR_HOST)/share/aclocal/
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
|
||||
$(call Host/Clean/Default)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
@ -25,4 +25,8 @@ HOST_CONFIGURE_ARGS += \
|
||||
--with-mpfr=$(TOPDIR)/staging_dir/host \
|
||||
--with-gmp=$(TOPDIR)/staging_dir/host
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -25,4 +25,8 @@ HOST_CONFIGURE_ARGS += \
|
||||
--enable-thread-safe \
|
||||
--with-gmp=$(STAGING_DIR_HOST)
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -7,12 +7,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mtd-utils
|
||||
PKG_VERSION:=2.1.2
|
||||
PKG_VERSION:=2.1.4
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=ftp://ftp.infradead.org/pub/mtd-utils/
|
||||
PKG_HASH:=8ad4c5f34716d40646aa28724a2f5616d325a6f119254f914e26976f1f76e9d6
|
||||
PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/
|
||||
PKG_HASH:=2c6711d15d282c47cb3867b6857340597e26d332c238465134c602e5eef71b99
|
||||
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
|
@ -70,7 +70,7 @@
|
||||
#include <sys/types.h>
|
||||
--- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
|
||||
+++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
|
||||
@@ -1549,6 +1549,7 @@ static int add_inode(struct stat *st, in
|
||||
@@ -1541,6 +1541,7 @@ static int add_inode(struct stat *st, in
|
||||
|
||||
if (c->default_compr != UBIFS_COMPR_NONE)
|
||||
use_flags |= UBIFS_COMPR_FL;
|
||||
@ -78,7 +78,7 @@
|
||||
if (flags & FS_COMPR_FL)
|
||||
use_flags |= UBIFS_COMPR_FL;
|
||||
if (flags & FS_SYNC_FL)
|
||||
@@ -1561,6 +1562,7 @@ static int add_inode(struct stat *st, in
|
||||
@@ -1553,6 +1554,7 @@ static int add_inode(struct stat *st, in
|
||||
use_flags |= UBIFS_DIRSYNC_FL;
|
||||
if (fctx)
|
||||
use_flags |= UBIFS_CRYPT_FL;
|
||||
@ -86,7 +86,7 @@
|
||||
memset(ino, 0, UBIFS_INO_NODE_SZ);
|
||||
|
||||
ino_key_init(&key, inum);
|
||||
@@ -1646,7 +1648,9 @@ static int add_dir_inode(const char *pat
|
||||
@@ -1638,7 +1640,9 @@ static int add_dir_inode(const char *pat
|
||||
fd = dirfd(dir);
|
||||
if (fd == -1)
|
||||
return sys_err_msg("dirfd failed");
|
||||
@ -96,7 +96,7 @@
|
||||
flags = 0;
|
||||
}
|
||||
|
||||
@@ -1857,6 +1861,7 @@ static int add_file(const char *path_nam
|
||||
@@ -1849,6 +1853,7 @@ static int add_file(const char *path_nam
|
||||
dn->ch.node_type = UBIFS_DATA_NODE;
|
||||
key_write(&key, &dn->key);
|
||||
out_len = NODE_BUFFER_SIZE - UBIFS_DATA_NODE_SZ;
|
||||
@ -104,7 +104,7 @@
|
||||
if (c->default_compr == UBIFS_COMPR_NONE &&
|
||||
!c->encrypted && (flags & FS_COMPR_FL))
|
||||
#ifdef WITHOUT_LZO
|
||||
@@ -1865,6 +1870,7 @@ static int add_file(const char *path_nam
|
||||
@@ -1857,6 +1862,7 @@ static int add_file(const char *path_nam
|
||||
use_compr = UBIFS_COMPR_LZO;
|
||||
#endif
|
||||
else
|
||||
@ -112,7 +112,7 @@
|
||||
use_compr = c->default_compr;
|
||||
compr_type = compress_data(buf, bytes_read, &dn->data,
|
||||
&out_len, use_compr);
|
||||
@@ -1924,7 +1930,9 @@ static int add_non_dir(const char *path_
|
||||
@@ -1916,7 +1922,9 @@ static int add_non_dir(const char *path_
|
||||
if (fd == -1)
|
||||
return sys_err_msg("failed to open file '%s'",
|
||||
path_name);
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/jffsX-utils/Makemodule.am
|
||||
+++ b/jffsX-utils/Makemodule.am
|
||||
@@ -4,11 +4,19 @@ mkfs_jffs2_SOURCES = \
|
||||
@@ -4,7 +4,10 @@ mkfs_jffs2_SOURCES = \
|
||||
jffsX-utils/compr_zlib.c \
|
||||
jffsX-utils/compr.h \
|
||||
jffsX-utils/rbtree.c \
|
||||
@ -10,7 +10,12 @@
|
||||
+ jffsX-utils/lzma/LzmaEnc.c \
|
||||
+ jffsX-utils/lzma/LzmaDec.c \
|
||||
jffsX-utils/compr.c \
|
||||
jffsX-utils/compr_rtime.c
|
||||
jffsX-utils/compr_rtime.c \
|
||||
jffsX-utils/compr.h \
|
||||
@@ -12,8 +15,13 @@ mkfs_jffs2_SOURCES = \
|
||||
jffsX-utils/summary.h \
|
||||
include/linux/jffs2.h \
|
||||
include/mtd/jffs2-user.h
|
||||
+
|
||||
+if !WITHOUT_LZO
|
||||
+mkfs_jffs2_SOURCES += jffsX-utils/compr_lzo.c
|
||||
@ -20,7 +25,7 @@
|
||||
-mkfs_jffs2_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS)
|
||||
+mkfs_jffs2_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CFLAGS) $(LZO_CFLAGS) -I./include/linux/lzma
|
||||
|
||||
jffs2reader_SOURCES = jffsX-utils/jffs2reader.c
|
||||
jffs2reader_SOURCES = jffsX-utils/jffs2reader.c include/mtd/jffs2-user.h
|
||||
jffs2reader_LDADD = libmtd.a $(ZLIB_LIBS) $(LZO_LIBS)
|
||||
--- a/jffsX-utils/compr.c
|
||||
+++ b/jffsX-utils/compr.c
|
||||
|
@ -7,11 +7,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mtools
|
||||
PKG_VERSION:=4.0.37
|
||||
PKG_VERSION:=4.0.41
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
|
||||
PKG_HASH:=799b197e23e47b61259628810b27790efb7a1fe36037ef1da8a27b0ae4fa8342
|
||||
PKG_HASH:=2542152264fb3eff7ed70662abf4f4eef8133bc37d0b7a686c240df2b5f80a13
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
|
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ninja
|
||||
PKG_VERSION:=1.10.2
|
||||
PKG_VERSION:=1.11.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ninja-build/ninja/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=ce35865411f0490368a8fc383f29071de6690cbadc27704734978221f25e2bed
|
||||
PKG_HASH:=3c6ba2e66400fe3f1ae83deb4b235faf3137ec20bd5b08c29bfc368db143e4c6
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -22,4 +22,8 @@ include $(INCLUDE_DIR)/host-build.mk
|
||||
HOSTCC := $(HOSTCC_NOCACHE)
|
||||
HOSTCXX := $(HOSTCXX_NOCACHE)
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -24,4 +24,8 @@ define Host/Install
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/src/patchelf $(STAGING_DIR_HOST)/bin/patchelf
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -rf $(STAGING_DIR_HOST)/bin/patchelf
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -7,29 +7,32 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=pkgconf
|
||||
PKG_VERSION:=1.7.3
|
||||
PKG_VERSION:=1.9.3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://distfiles.dereferenced.org/pkgconf
|
||||
PKG_HASH:=b846aea51cf696c3392a0ae58bef93e2e72f8e7073ca6ad1ed8b01c85871f9c0
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
PKG_HASH:=5fb355b487d54fb6d341e4f18d4e2f7e813a6622cf03a9e87affa6a40565699d
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/meson.mk
|
||||
|
||||
unexport PKG_CONFIG
|
||||
|
||||
HOSTCC := $(HOSTCC_NOCACHE)
|
||||
|
||||
MESON_HOST_ARGS += \
|
||||
-Ddefault_library=static \
|
||||
-Dtests=false
|
||||
|
||||
define Host/Install
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) install
|
||||
$(call Host/Install/Meson)
|
||||
mv $(STAGING_DIR_HOST)/bin/pkgconf $(STAGING_DIR_HOST)/bin/pkg-config.real
|
||||
$(INSTALL_BIN) ./files/pkg-config $(STAGING_DIR_HOST)/bin/pkg-config
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
-$(MAKE) -C $(HOST_BUILD_DIR) uninstall
|
||||
$(call Host/Clean/Default)
|
||||
rm -f $(STAGING_DIR_HOST)/bin/pkg-config.real $(STAGING_DIR_HOST)/bin/pkg-config
|
||||
$(call Host/Clean/Meson)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -1,8 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
pkg-config.real \
|
||||
${STAGING_DIR_HOST}/bin/pkg-config.real \
|
||||
--keep-system-cflags \
|
||||
--keep-system-libs \
|
||||
--define-variable=prefix="${STAGING_PREFIX}" \
|
||||
--define-variable=exec_prefix="${STAGING_PREFIX}" \
|
||||
--define-variable=bindir="${STAGING_PREFIX}/bin" "$@"
|
||||
--define-variable=bindir="${STAGING_PREFIX}/bin" \
|
||||
$PKG_CONFIG_EXTRAARGS "$@"
|
||||
|
@ -6,8 +6,8 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sparse
|
||||
|
||||
PKG_VERSION:=0.6.3
|
||||
PKG_HASH:=d4f6dbad8409e8e20a19f164b2c16f1edf76438ff77cf291935fde081b61a899
|
||||
PKG_VERSION:=0.6.4
|
||||
PKG_HASH:=6ab28b4991bc6aedbd73550291360aa6ab3df41f59206a9bde9690208a6e387c
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
@ -21,4 +21,8 @@ define Host/Install
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/sparse $(STAGING_DIR_HOST)/bin
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -f $(STAGING_DIR_HOST)/bin/sparse
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=squashfskit4
|
||||
PKG_VERSION:=4.14
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
PKG_SOURCE:=squashfskit-v$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://github.com/squashfskit/squashfskit/releases/download/v$(PKG_VERSION)/
|
||||
PKG_HASH:=5761aaa3aedc4f7112b708367d891c9abdc1ffea972e3fe47923ddba23984d95
|
||||
|
@ -28,16 +28,14 @@ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
squashfs-tools/mksquashfs.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h
|
||||
index 1beefef7..b6503063 100644
|
||||
--- a/squashfs-tools/mksquashfs.h
|
||||
+++ b/squashfs-tools/mksquashfs.h
|
||||
@@ -143,7 +143,7 @@ struct append_file {
|
||||
#endif
|
||||
@@ -133,7 +133,7 @@ struct append_file {
|
||||
#define BLOCK_OFFSET 2
|
||||
|
||||
extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache;
|
||||
-struct cache *bwriter_buffer, *fwriter_buffer;
|
||||
+extern struct cache *bwriter_buffer, *fwriter_buffer;
|
||||
extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer,
|
||||
*to_frag, *locked_fragment, *to_process_frag;
|
||||
*locked_fragment, *to_process_frag;
|
||||
extern struct append_file **file_mapping;
|
||||
|
14
tools/squashfskit4/patches/0020-big-endian.patch
Normal file
14
tools/squashfskit4/patches/0020-big-endian.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- a/squashfs-tools/xz_wrapper.c
|
||||
+++ b/squashfs-tools/xz_wrapper.c
|
||||
@@ -192,7 +192,10 @@ static void xz_display_options(void *buf
|
||||
if(size != sizeof(struct comp_opts))
|
||||
goto failed;
|
||||
|
||||
- SQUASHFS_INSWAP_LZMA_COMP_OPTS(comp_opts);
|
||||
+#if __BYTE_ORDER == __BIG_ENDIAN
|
||||
+ comp_opts->dictionary_size = inswap_le32(comp_opts->dictionary_size);
|
||||
+ comp_opts->flags = inswap_le32(comp_opts->flags);
|
||||
+#endif
|
||||
|
||||
dictionary_size = comp_opts->dictionary_size;
|
||||
flags = comp_opts->flags;
|
@ -7,12 +7,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sstrip
|
||||
PKG_VERSION:=3.1a
|
||||
PKG_VERSION:=3.2
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/ELFkickers-$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=https://www.muppetlabs.com/~breadbox/pub/software
|
||||
PKG_SOURCE:=ELFkickers-$(PKG_VERSION).tar.gz
|
||||
PKG_HASH:=06430880aaf4919c5f99fc629da7000347421668c2cf32bced2d401aac276508
|
||||
PKG_HASH:=9b81e6c53e0c94fc198d9882eb737156f36d565152dc32118897c77b06a2687c
|
||||
|
||||
PKG_RELEASE:=1
|
||||
|
||||
|
@ -28,4 +28,8 @@ HOST_CONFIGURE_ARGS += \
|
||||
--disable-acl \
|
||||
--disable-nls
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -17,7 +17,7 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOSTCC :=gcc
|
||||
HOST_CFLAGS +=-std=gnu89 -std=c90 -fPIC -Wno-error=implicit-function-declaration
|
||||
HOST_CFLAGS +=-std=gnu89
|
||||
|
||||
define Host/Prepare
|
||||
|
2923
tools/ucl/patches/200-ucl-apple-m1-configsub-fix.patch
Normal file
2923
tools/ucl/patches/200-ucl-apple-m1-configsub-fix.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xxd
|
||||
PKG_VERSION:=1.10
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://grail.cba.csuohio.edu/~somos/
|
||||
PKG_HASH:=9bf05c19b9084973e3cc877696a7f9881a5c87fa5a9fa438d9962519726559f9
|
||||
PKG_CPE_ID:=cpe:/a:vim:vim
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/xxd $(STAGING_DIR_HOST)/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
@ -7,12 +7,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xz
|
||||
PKG_VERSION:=5.2.5
|
||||
PKG_VERSION:=5.2.7
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=@SF/lzmautils \
|
||||
http://tukaani.org/xz
|
||||
PKG_HASH:=5117f930900b341493827d63aa910ff5e011e0b994197c3b71c08a20228a42df
|
||||
PKG_HASH:=b65f1d0c2708e57716f4dd2216989a73847ac6fdb4168ffceb155767e22b834b
|
||||
PKG_CPE_ID:=cpe:/a:tukaani:xz
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
@ -33,4 +33,8 @@ define Host/Install
|
||||
+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) install xzlinks="unxz xzcat"
|
||||
endef
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -32,5 +32,8 @@ define Host/Install
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/zip $(STAGING_DIR_HOST)/bin/
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -rf $(STAGING_DIR_HOST)/bin/zip
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
#$(eval $(call BuildPackage,zip))
|
||||
|
@ -1,145 +0,0 @@
|
||||
From 6d659fc87451c02c8777dc33f750b16834e4c715 Mon Sep 17 00:00:00 2001
|
||||
From: Mathias Kresin <dev@kresin.me>
|
||||
Date: Sat, 12 Jan 2019 19:33:33 +0100
|
||||
Subject: [PATCH] add option for reproducible archives
|
||||
|
||||
Add the option -mt/--mtime to pass a timestamp which is used as filedate
|
||||
for the containing files.
|
||||
|
||||
So far, it isn't used for anything written to the extra fields,
|
||||
therefore requires the -X (eXclude eXtra file attributes) parameter to
|
||||
be effective.
|
||||
|
||||
Signed-off-by: Mathias Kresin <dev@kresin.me>
|
||||
---
|
||||
globals.c | 1 +
|
||||
util.c | 22 ++++++++++++++++++++++
|
||||
zip.c | 6 ++++++
|
||||
zip.h | 1 +
|
||||
zipup.c | 4 +++-
|
||||
5 files changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/globals.c
|
||||
+++ b/globals.c
|
||||
@@ -205,6 +205,7 @@ uzoff_t bytes_this_split = 0; /* byt
|
||||
int read_split_archive = 0; /* 1=scanzipf_reg detected spanning signature */
|
||||
int split_method = 0; /* 0=no splits, 1=seekable, 2=data desc, -1=no */
|
||||
uzoff_t split_size = 0; /* how big each split should be */
|
||||
+time_t timestamp = -1; /* fixed timestamp for archive content filedate */
|
||||
int split_bell = 0; /* when pause for next split ring bell */
|
||||
uzoff_t bytes_prev_splits = 0; /* total bytes written to all splits before this */
|
||||
uzoff_t bytes_this_entry = 0; /* bytes written for this entry across all splits */
|
||||
--- a/util.c
|
||||
+++ b/util.c
|
||||
@@ -1217,6 +1217,7 @@ int DisplayNumString(file, i)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+
|
||||
/* Read numbers with trailing size multiplier (like 10M) and return number.
|
||||
10/30/04 EG */
|
||||
|
||||
@@ -1279,6 +1280,29 @@ uzoff_t ReadNumString( numstring )
|
||||
}
|
||||
|
||||
|
||||
+uzoff_t ReadNumStringUL( numstring )
|
||||
+ char *numstring;
|
||||
+{
|
||||
+ zoff_t num = 0;
|
||||
+
|
||||
+ /* check if valid number (currently no negatives) */
|
||||
+ if (numstring == NULL) {
|
||||
+ zipwarn("Unable to read empty number in ReadNumString", "");
|
||||
+ return (uzoff_t)-1;
|
||||
+ }
|
||||
+ if (numstring[0] < '0' || numstring[0] > '9') {
|
||||
+ zipwarn("Unable to read number (must start with digit): ", numstring);
|
||||
+ return (uzoff_t)-1;
|
||||
+ }
|
||||
+ if (strlen(numstring) > 10) {
|
||||
+ zipwarn("Number too long to read (10 characters max): ", numstring);
|
||||
+ return (uzoff_t)-1;
|
||||
+ }
|
||||
+
|
||||
+ return (uzoff_t)atoll(numstring);
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* Write the number as a string with a multiplier (like 10M) to outstring.
|
||||
Always writes no more than 3 digits followed maybe by a multiplier and
|
||||
returns the characters written or -1 if error.
|
||||
--- a/zip.c
|
||||
+++ b/zip.c
|
||||
@@ -1942,6 +1942,7 @@ int set_filetype(out_path)
|
||||
#ifdef UNICODE_TEST
|
||||
#define o_sC 0x146
|
||||
#endif
|
||||
+#define o_mt 0x255
|
||||
|
||||
|
||||
/* the below is mainly from the old main command line
|
||||
@@ -2036,6 +2037,7 @@ struct option_struct far options[] = {
|
||||
{"m", "move", o_NO_VALUE, o_NOT_NEGATABLE, 'm', "add files to archive then delete files"},
|
||||
{"mm", "", o_NO_VALUE, o_NOT_NEGATABLE, o_mm, "not used"},
|
||||
{"MM", "must-match", o_NO_VALUE, o_NOT_NEGATABLE, o_MM, "error if in file not matched/not readable"},
|
||||
+ {"mt", "mtime", o_REQUIRED_VALUE, o_NOT_NEGATABLE, o_mt, "use fixed timestamp for archive content filedate"},
|
||||
{"n", "suffixes", o_REQUIRED_VALUE, o_NOT_NEGATABLE, 'n', "suffixes to not compress: .gz:.zip"},
|
||||
{"nw", "no-wild", o_NO_VALUE, o_NOT_NEGATABLE, o_nw, "no wildcards during add or update"},
|
||||
#if defined(AMIGA) || defined(MACOS)
|
||||
@@ -2440,6 +2442,7 @@ char **argv; /* command line
|
||||
split_method = 0; /* 0=no splits, 1=update LHs, 2=data descriptors */
|
||||
split_size = 0; /* how big each split should be */
|
||||
split_bell = 0; /* when pause for next split ring bell */
|
||||
+ timestamp = -1; /* fixed timestamp for archive content filedate */
|
||||
bytes_prev_splits = 0; /* total bytes written to all splits before this */
|
||||
bytes_this_entry = 0; /* bytes written for this entry across all splits */
|
||||
noisy_splits = 0; /* be verbose about creating splits */
|
||||
@@ -2897,6 +2900,9 @@ char **argv; /* command line
|
||||
dispose = 1; break;
|
||||
case o_MM: /* Exit with error if input file can't be read */
|
||||
bad_open_is_error = 1; break;
|
||||
+ case o_mt: /* fixed timestamp for archive content filedate */
|
||||
+ timestamp = ReadNumStringUL(value);
|
||||
+ break;
|
||||
case 'n': /* Don't compress files with a special suffix */
|
||||
special = value;
|
||||
/* special = NULL; */ /* will be set at next argument */
|
||||
--- a/zip.h
|
||||
+++ b/zip.h
|
||||
@@ -502,6 +502,7 @@ extern uzoff_t bytes_this_split; /* byte
|
||||
extern int read_split_archive; /* 1=scanzipf_reg detected spanning signature */
|
||||
extern int split_method; /* 0=no splits, 1=seekable, 2=data descs, -1=no */
|
||||
extern uzoff_t split_size; /* how big each split should be */
|
||||
+extern time_t timestamp; /* fixed timestamp for archive content filedate */
|
||||
extern int split_bell; /* when pause for next split ring bell */
|
||||
extern uzoff_t bytes_prev_splits; /* total bytes written to all splits before this */
|
||||
extern uzoff_t bytes_this_entry; /* bytes written for this entry across all splits */
|
||||
@@ -789,6 +790,7 @@ char *zip_fzofft OF((zoff_t, char
|
||||
int DisplayNumString OF ((FILE *file, uzoff_t i));
|
||||
int WriteNumString OF((uzoff_t num, char *outstring));
|
||||
uzoff_t ReadNumString OF((char *numstring));
|
||||
+uzoff_t ReadNumStringUL OF((char *numstring));
|
||||
|
||||
/* returns true if abbrev is abbreviation for string */
|
||||
int abbrevmatch OF((char *, char *, int, int));
|
||||
--- a/zipup.c
|
||||
+++ b/zipup.c
|
||||
@@ -415,7 +415,6 @@ struct zlist far *z; /* zip entry to
|
||||
char *tempextra = NULL;
|
||||
char *tempcextra = NULL;
|
||||
|
||||
-
|
||||
#ifdef WINDLL
|
||||
# ifdef ZIP64_SUPPORT
|
||||
extern _int64 filesize64;
|
||||
@@ -441,6 +440,9 @@ struct zlist far *z; /* zip entry to
|
||||
if (tim == 0 || q == (zoff_t) -3)
|
||||
return ZE_OPEN;
|
||||
|
||||
+ if (timestamp > 0)
|
||||
+ tim = unix2dostime(×tamp);
|
||||
+
|
||||
/* q is set to -1 if the input file is a device, -2 for a volume label */
|
||||
if (q == (zoff_t) -2) {
|
||||
isdir = 1;
|
41
tools/zip/patches/011-reproducible-mtime.patch
Normal file
41
tools/zip/patches/011-reproducible-mtime.patch
Normal file
@ -0,0 +1,41 @@
|
||||
From 501ae4e93fd6fa2f7d20d00d1b011f9006802eae Mon Sep 17 00:00:00 2001
|
||||
From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
|
||||
Date: Fri, 3 May 2019 16:32:24 +0200
|
||||
Subject: [PATCH] Override mtime with zip -X
|
||||
|
||||
with SOURCE_DATE_EPOCH
|
||||
to allow for reproducible builds of .zip files
|
||||
|
||||
See https://reproducible-builds.org/ for why this is good
|
||||
and https://reproducible-builds.org/specs/source-date-epoch/
|
||||
for the definition of this variable.
|
||||
|
||||
Uses clamping to keep older mtimes than SOURCE_DATE_EPOCH intact.
|
||||
---
|
||||
zipup.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
--- a/zipup.c
|
||||
+++ b/zipup.c
|
||||
@@ -414,6 +414,7 @@ struct zlist far *z; /* zip entry to
|
||||
ush tempcext = 0;
|
||||
char *tempextra = NULL;
|
||||
char *tempcextra = NULL;
|
||||
+ const char *source_date_epoch;
|
||||
|
||||
|
||||
#ifdef WINDLL
|
||||
@@ -674,6 +675,13 @@ struct zlist far *z; /* zip entry to
|
||||
|
||||
} /* strcmp(z->name, "-") == 0 */
|
||||
|
||||
+ if (extra_fields == 0 && (source_date_epoch = getenv("SOURCE_DATE_EPOCH")) != NULL) {
|
||||
+ time_t epoch = strtoull(source_date_epoch, NULL, 10);
|
||||
+ if (epoch > 0) {
|
||||
+ ulg epochtim = unix2dostime(&epoch);
|
||||
+ if (z->tim > epochtim) z->tim = epochtim;
|
||||
+ }
|
||||
+ }
|
||||
if (extra_fields == 2) {
|
||||
unsigned len;
|
||||
char *p;
|
@ -0,0 +1,75 @@
|
||||
From db9165814823401d57383a8f9e82642129cf4223 Mon Sep 17 00:00:00 2001
|
||||
From: Sungbo Eo <mans0n@gorani.run>
|
||||
Date: Sat, 12 Feb 2022 16:42:14 +0900
|
||||
Subject: [PATCH] make encrypted archives reproducible
|
||||
|
||||
Zip always try to generate new encryption header depending on execution
|
||||
time and process id, which is far from being reproducible. This commit
|
||||
changes the zip srand() seed to a predictable value to generate
|
||||
reproducible random bytes for the encryption header. This will compromise
|
||||
the goal of secure archive encryption, but it would not be a big problem
|
||||
for our purpose.
|
||||
|
||||
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
|
||||
---
|
||||
crypt.c | 8 ++++++--
|
||||
globals.c | 1 +
|
||||
zip.h | 1 +
|
||||
zipup.c | 2 +-
|
||||
4 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
--- a/crypt.c
|
||||
+++ b/crypt.c
|
||||
@@ -29,7 +29,6 @@
|
||||
version without encryption capabilities).
|
||||
*/
|
||||
|
||||
-#define ZCRYPT_INTERNAL
|
||||
#include "zip.h"
|
||||
#include "crypt.h"
|
||||
#include "ttyio.h"
|
||||
@@ -219,7 +218,12 @@ void crypthead(passwd, crc)
|
||||
* often poorly implemented.
|
||||
*/
|
||||
if (++calls == 1) {
|
||||
- srand((unsigned)time(NULL) ^ ZCR_SEED2);
|
||||
+ unsigned zcr_seed1 = (unsigned)time(NULL);
|
||||
+#ifndef ZCRYPT_INTERNAL
|
||||
+ if (epoch > 0)
|
||||
+ zcr_seed1 = (unsigned)epoch;
|
||||
+#endif
|
||||
+ srand(zcr_seed1 ^ ZCR_SEED2);
|
||||
}
|
||||
init_keys(passwd);
|
||||
for (n = 0; n < RAND_HEAD_LEN-2; n++) {
|
||||
--- a/globals.c
|
||||
+++ b/globals.c
|
||||
@@ -206,6 +206,7 @@ int read_split_archive = 0; /* 1=s
|
||||
int split_method = 0; /* 0=no splits, 1=seekable, 2=data desc, -1=no */
|
||||
uzoff_t split_size = 0; /* how big each split should be */
|
||||
int split_bell = 0; /* when pause for next split ring bell */
|
||||
+time_t epoch = 0; /* timestamp from SOURCE_DATE_EPOCH */
|
||||
uzoff_t bytes_prev_splits = 0; /* total bytes written to all splits before this */
|
||||
uzoff_t bytes_this_entry = 0; /* bytes written for this entry across all splits */
|
||||
int noisy_splits = 0; /* note when splits are being created */
|
||||
--- a/zip.h
|
||||
+++ b/zip.h
|
||||
@@ -502,6 +502,7 @@ extern uzoff_t bytes_this_split; /* byte
|
||||
extern int read_split_archive; /* 1=scanzipf_reg detected spanning signature */
|
||||
extern int split_method; /* 0=no splits, 1=seekable, 2=data descs, -1=no */
|
||||
extern uzoff_t split_size; /* how big each split should be */
|
||||
+extern time_t epoch; /* timestamp from SOURCE_DATE_EPOCH */
|
||||
extern int split_bell; /* when pause for next split ring bell */
|
||||
extern uzoff_t bytes_prev_splits; /* total bytes written to all splits before this */
|
||||
extern uzoff_t bytes_this_entry; /* bytes written for this entry across all splits */
|
||||
--- a/zipup.c
|
||||
+++ b/zipup.c
|
||||
@@ -676,7 +676,7 @@ struct zlist far *z; /* zip entry to
|
||||
} /* strcmp(z->name, "-") == 0 */
|
||||
|
||||
if (extra_fields == 0 && (source_date_epoch = getenv("SOURCE_DATE_EPOCH")) != NULL) {
|
||||
- time_t epoch = strtoull(source_date_epoch, NULL, 10);
|
||||
+ epoch = strtoull(source_date_epoch, NULL, 10);
|
||||
if (epoch > 0) {
|
||||
ulg epochtim = unix2dostime(&epoch);
|
||||
if (z->tim > epochtim) z->tim = epochtim;
|
@ -8,34 +8,34 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zlib
|
||||
PKG_VERSION:=1.2.11
|
||||
PKG_VERSION:=1.2.13
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@SF/libpng http://www.zlib.net
|
||||
PKG_HASH:=4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066
|
||||
PKG_SOURCE_URL:=https://github.com/madler/zlib/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=d14c38e313afc35a9a8760dadf26042f51ea0f5d154b0630a31da0540107fb98
|
||||
|
||||
PKG_LICENSE:=Zlib
|
||||
PKG_LICENSE_FILES:=README
|
||||
PKG_CPE_ID:=cpe:/a:gnu:zlib
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
HOST_CFLAGS +=-fPIC
|
||||
HOSTCC := $(HOSTCC_NOCACHE)
|
||||
HOST_CFLAGS += $(HOST_FPIC)
|
||||
|
||||
define Host/Install
|
||||
$(CP) $(HOST_BUILD_DIR)/libz.a $(STAGING_DIR_HOST)/lib/
|
||||
$(CP) $(HOST_BUILD_DIR)/zconf.h $(STAGING_DIR_HOST)/include/
|
||||
$(CP) $(HOST_BUILD_DIR)/zlib.h $(STAGING_DIR_HOST)/include/
|
||||
$(CP) $(HOST_BUILD_DIR)/zlib.pc $(STAGING_DIR_HOST)/lib/pkgconfig/
|
||||
endef
|
||||
HOST_CONFIGURE_ARGS = \
|
||||
--prefix=$(STAGING_DIR_HOST) \
|
||||
--sysconfdir=$(STAGING_DIR_HOST)/etc \
|
||||
--localstatedir=$(STAGING_DIR_HOST)/var \
|
||||
--libdir=$(STAGING_DIR_HOST)/lib \
|
||||
--includedir=$(STAGING_DIR_HOST)/include \
|
||||
--static
|
||||
|
||||
define Host/Clean
|
||||
rm -f $(STAGING_DIR_HOST)/lib/libz.a
|
||||
rm -f $(STAGING_DIR_HOST)/include/zconf.h
|
||||
rm -f $(STAGING_DIR_HOST)/include/zlib.h
|
||||
rm -f $(STAGING_DIR_HOST)/lib/pkgconfig//zlib.pc
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
@ -1,26 +1,35 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zstd
|
||||
PKG_VERSION:=1.4.8
|
||||
PKG_VERSION:=1.5.2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/facebook/zstd/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=32478297ca1500211008d596276f5367c54198495cf677e9439f4791a4c69f24
|
||||
PKG_HASH:=7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_CPE_ID:=cpe:/a:facebook:zstandard
|
||||
|
||||
CMAKE_SOURCE_SUBDIR:=build/cmake
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
include $(INCLUDE_DIR)/meson.mk
|
||||
|
||||
CMAKE_HOST_OPTIONS += \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="" \
|
||||
-DCMAKE_C_COMPILER=$(HOSTCC_NOCACHE) \
|
||||
-DZSTD_LEGACY_SUPPORT=OFF
|
||||
MESON_HOST_BUILD_DIR:=$(HOST_BUILD_DIR)/build/meson/openwrt-build
|
||||
|
||||
HOSTCC:= $(HOSTCC_NOCACHE)
|
||||
HOST_LDFLAGS += -Wl,-rpath,$(STAGING_DIR_HOST)/lib
|
||||
|
||||
MESON_HOST_ARGS += \
|
||||
-Dlegacy_level=7 \
|
||||
-Ddebug_level=0 \
|
||||
-Dbacktrace=false \
|
||||
-Dstatic_runtime=false \
|
||||
-Dbin_programs=true \
|
||||
-Dbin_tests=false \
|
||||
-Dbin_contrib=false \
|
||||
-Dmulti_thread=enabled \
|
||||
-Dzlib=disabled \
|
||||
-Dlzma=disabled \
|
||||
-Dlz4=disabled
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
Loading…
x
Reference in New Issue
Block a user