summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2024-04-01 07:17:09 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2024-04-01 07:17:09 +0200
commit61529d3eb35c738fe61b62f11443a955af597cb0 (patch)
tree38623a0a3f5bb59233dd0a163df8454f4b0ea634
parentf89d075247f067799af765e8373c5b39a1fad49a (diff)
avoid xz where possible
-rw-r--r--mk/fetch.mk2
-rw-r--r--mk/image.mk34
-rw-r--r--mk/vars.mk3
-rw-r--r--package/Config.in.options8
-rw-r--r--package/xz/Makefile41
-rw-r--r--package/xz/patches/patch-src_liblzma_liblzma_pc_in15
-rwxr-xr-xscripts/prereq.sh12
-rwxr-xr-xscripts/tarpkg4
-rw-r--r--target/config/Config.in.tools6
-rw-r--r--target/linux/config/Config.in.compression21
10 files changed, 17 insertions, 129 deletions
diff --git a/mk/fetch.mk b/mk/fetch.mk
index 0d3e90a34..bc6838256 100644
--- a/mk/fetch.mk
+++ b/mk/fetch.mk
@@ -92,7 +92,7 @@ $(1):
(cd $${PKG_NAME}-$${PKG_VERSION}; git submodule update --init --recursive) $(DL_TRACE); \
fi; \
rm -rf $${PKG_NAME}-$${PKG_VERSION}/.git; \
- PATH='$(HOST_PATH)' tar cJf $${PKG_NAME}-$${PKG_VERSION}.tar.xz $${PKG_NAME}-$${PKG_VERSION}; \
+ PATH='$(HOST_PATH)' tar czf $${PKG_NAME}-$${PKG_VERSION}.tar.gz $${PKG_NAME}-$${PKG_VERSION}; \
touch $$$${filename}.nohash; \
rm -rf $${PKG_NAME}-$${PKG_VERSION}; \
: check the size here; \
diff --git a/mk/image.mk b/mk/image.mk
index 601b0352b..8fe0bc3eb 100644
--- a/mk/image.mk
+++ b/mk/image.mk
@@ -122,8 +122,8 @@ INITRAMFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}
ROOTFSSQUASHFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.img
ROOTFSJFFS2= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-jffs2.img
ROOTFSUBIFS= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-ubifs.img
-ROOTFSTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.tar.xz
-ROOTFSUSERTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.tar.xz
+ROOTFSTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}+kernel.tar.gz
+ROOTFSUSERTARBALL= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}-${ADK_TARGET_FS}.tar.gz
ROOTFSISO= ${ADK_TARGET_SYSTEM}-${ADK_TARGET_LIBC}.iso
kernel-package: kernel-strip
@@ -145,14 +145,14 @@ endif
${FW_DIR}/${ROOTFSTARBALL}: ${TARGET_DIR}/.adk kernel-package
cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \
- $(CPIO) --quiet -o -Hustar --owner=0:0 | $(XZ) -c >$@
+ $(CPIO) --quiet -o -Hustar --owner=0:0 | gzip -c >$@
ifeq ($(ADK_TARGET_QEMU),y)
@cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL)
endif
${FW_DIR}/${ROOTFSUSERTARBALL}: ${TARGET_DIR}/.adk
cd ${TARGET_DIR}; find . | grep -v ./boot/ | sed -n '/^\.\//s///p' | sort | \
- $(CPIO) --quiet -o -Hustar --owner=0:0 | $(XZ) -c >$@
+ $(CPIO) --quiet -o -Hustar --owner=0:0 | gzip -c >$@
${STAGING_TARGET_DIR}/${INITRAMFS}_list: ${TARGET_DIR}/.adk
PATH='${HOST_PATH}' $(BASH) ${SCRIPT_DIR}/gen_initramfs_list.sh -u squash -g squash \
@@ -193,7 +193,7 @@ ${FW_DIR}/${INITRAMFS}: ${STAGING_TARGET_DIR}/${INITRAMFS}_list
${BUILD_DIR}/root.squashfs: ${TARGET_DIR}/.adk
${STAGING_HOST_DIR}/usr/bin/mksquashfs ${TARGET_DIR} \
- ${BUILD_DIR}/root.squashfs -comp xz \
+ ${BUILD_DIR}/root.squashfs -comp gzip \
-nopad -noappend -root-owned $(MAKE_TRACE)
${FW_DIR}/${ROOTFSJFFS2}: ${TARGET_DIR}
@@ -237,24 +237,6 @@ createinitramfs: ${STAGING_TARGET_DIR}/${INITRAMFS}_list
echo 'CONFIG_INITRAMFS_IS_LARGE=n'; \
echo 'CONFIG_INITRAMFS_PRESERVE_MTIME=n'; \
) >> ${LINUX_DIR}/.config
-ifeq ($(ADK_LINUX_KERNEL_COMP_XZ),y)
- echo "CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_RD_GZIP=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_RD_LZMA=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_RD_LZ4=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_RD_LZO=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_RD_XZ=y" >> ${LINUX_DIR}/.config
- echo "CONFIG_RD_ZSTD=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_INITRAMFS_COMPRESSION_XZ=y" >> ${LINUX_DIR}/.config
- echo "CONFIG_XZ_DEC_X86=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_XZ_DEC_POWERPC=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_XZ_DEC_IA64=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_XZ_DEC_ARM=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_XZ_DEC_ARMTHUMB=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_XZ_DEC_SPARC=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_XZ_DEC_TEST=n" >> ${LINUX_DIR}/.config
- echo "CONFIG_XZ_DEC_MICROLZMA=n" >> ${LINUX_DIR}/.config
-endif
ifeq ($(ADK_LINUX_KERNEL_COMP_ZSTD),y)
echo "CONFIG_RD_XZ=n" >> ${LINUX_DIR}/.config
echo "CONFIG_RD_BZIP2=n" >> ${LINUX_DIR}/.config
@@ -407,10 +389,10 @@ endif
ifeq ($(ADK_TARGET_DUAL_BOOT),y)
(cd ${TARGET_DIR}; find . | sed -n '/^\.\//s///p' | sort | \
PATH='${HOST_PATH}' $(CPIO) -o --quiet -Hustar --owner=0:0 | \
- ${XZ} -c > ${FW_DIR}/openadk.tar.xz)
- (cd ${FW_DIR}; PATH='${HOST_PATH}' sha256sum openadk.tar.xz \
+ ${GZIP} -c > ${FW_DIR}/openadk.tar.gz)
+ (cd ${FW_DIR}; PATH='${HOST_PATH}' sha256sum openadk.tar.gz \
| cut -d\ -f1 > sha256.txt)
- (cd ${FW_DIR}; PATH='${HOST_PATH}' tar -cf ${ADK_TARGET_SYSTEM}-update.tar openadk.tar.xz sha256.txt)
+ (cd ${FW_DIR}; PATH='${HOST_PATH}' tar -cf ${ADK_TARGET_SYSTEM}-update.tar openadk.tar.gzip sha256.txt)
@rm -rf ${FW_DIR}/temp
endif
ifeq ($(ADK_PACKAGE_GRUB_EFI_X86)$(ADK_PACKAGE_GRUB_EFI_X86_64),y)
diff --git a/mk/vars.mk b/mk/vars.mk
index d99634443..1585833c6 100644
--- a/mk/vars.mk
+++ b/mk/vars.mk
@@ -333,7 +333,6 @@ HOST_STATIC_LDFLAGS:= -Wl,-static
endif
SED:= PATH='${HOST_PATH}' sed -i -e
-XZ:= PATH='${HOST_PATH}' xz
CPIO:= PATH='${HOST_PATH}' cpio
LINUX_DIR:= $(BUILD_DIR)/$(ADK_TARGET_OS)
KERNEL_MODULE_FLAGS:= ARCH=${ADK_TARGET_KARCH} \
@@ -417,7 +416,7 @@ PKG_INSTALL:= PATH='${HOST_PATH}' \
PKG_STATE_DIR:= $(TARGET_DIR)/usr/lib/opkg
endif
-ifeq ($(ADK_TARGET_PACKAGE_TXZ),y)
+ifeq ($(ADK_TARGET_PACKAGE_TGZ),y)
PKG_BUILD:= ${BASH} ${SCRIPT_DIR}/tarpkg build
PKG_INSTALL:= PKG_INSTROOT='$(TARGET_DIR)' \
PATH='${HOST_PATH}' ${BASH} ${SCRIPT_DIR}/tarpkg install
diff --git a/package/Config.in.options b/package/Config.in.options
index a806da895..cdf3f436a 100644
--- a/package/Config.in.options
+++ b/package/Config.in.options
@@ -2,14 +2,14 @@ config ADK_PACKAGE_SUFFIX
string
default "ipk" if ADK_TARGET_PACKAGE_IPKG
default "ipk" if ADK_TARGET_PACKAGE_OPKG
- default "tar.xz" if ADK_TARGET_PACKAGE_TXZ
+ default "tar.gz" if ADK_TARGET_PACKAGE_TGZ
choice
prompt "Package format"
-default ADK_TARGET_PACKAGE_TXZ
+default ADK_TARGET_PACKAGE_TGZ
-config ADK_TARGET_PACKAGE_TXZ
- bool "xz compressed tar archive"
+config ADK_TARGET_PACKAGE_TGZ
+ bool "gzip compressed tar archive"
help
Create compressed tar archives of packages.
Pre- and post install scripts will be executed in the target
diff --git a/package/xz/Makefile b/package/xz/Makefile
deleted file mode 100644
index 4a58f0047..000000000
--- a/package/xz/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-# This file is part of the OpenADK project. OpenADK is copyrighted
-# material, please see the LICENCE file in the top-level directory.
-
-include $(ADK_TOPDIR)/rules.mk
-
-PKG_NAME:= xz
-PKG_VERSION:= 5.4.6
-PKG_RELEASE:= 1
-PKG_HASH:= 913851b274e8e1d31781ec949f1c23e8dbcf0ecf6e73a2436dc21769dd3e6f49
-PKG_DESCR:= compression utility
-PKG_SECTION:= app/archive
-PKG_DEPENDS:= libxz
-PKG_SITES:= https://distfiles.openadk.org/
-PKG_LIBNAME:= libxz
-PKG_OPTS:= dev
-
-DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
-
-PKG_SUBPKGS:= XZ LIBXZ
-PKGSD_LIBXZ:= xz compression library
-PKGSC_LIBXZ:= libs/comp
-
-include $(ADK_TOPDIR)/mk/host.mk
-include $(ADK_TOPDIR)/mk/package.mk
-
-$(eval $(call HOST_template,XZ,xz,$(PKG_VERSION)-$(PKG_RELEASE)))
-$(eval $(call PKG_template,XZ,xz,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
-$(eval $(call PKG_template,LIBXZ,libxz,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_LIBXZ),$(PKGSD_LIBXZ),$(PKGSC_LIBXZ),$(PKG_OPTS)))
-
-HOST_CONFIGURE_ARGS+= --disable-shared
-
-xz-install:
- $(INSTALL_DIR) $(IDIR_XZ)/usr/bin
- $(CP) $(WRKINST)/usr/bin/* $(IDIR_XZ)/usr/bin
-
-libxz-install:
- $(INSTALL_DIR) $(IDIR_LIBXZ)/usr/lib
- $(CP) $(WRKINST)/usr/lib/liblzma.so* $(IDIR_LIBXZ)/usr/lib
-
-include $(ADK_TOPDIR)/mk/host-bottom.mk
-include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/xz/patches/patch-src_liblzma_liblzma_pc_in b/package/xz/patches/patch-src_liblzma_liblzma_pc_in
deleted file mode 100644
index 9481466af..000000000
--- a/package/xz/patches/patch-src_liblzma_liblzma_pc_in
+++ /dev/null
@@ -1,15 +0,0 @@
---- xz-5.2.2.orig/src/liblzma/liblzma.pc.in 2015-09-29 12:57:36.000000000 +0200
-+++ xz-5.2.2/src/liblzma/liblzma.pc.in 2016-11-23 16:04:15.407184892 +0100
-@@ -6,9 +6,9 @@
- #
-
- prefix=@prefix@
--exec_prefix=@exec_prefix@
--libdir=@libdir@
--includedir=@includedir@
-+exec_prefix=${prefix}
-+libdir=${prefix}/lib
-+includedir=${prefix}/include
-
- Name: liblzma
- Description: General purpose data compression library
diff --git a/scripts/prereq.sh b/scripts/prereq.sh
index d73ae73f2..717ddf15c 100755
--- a/scripts/prereq.sh
+++ b/scripts/prereq.sh
@@ -618,15 +618,6 @@ else
host_build_cpio=1
fi
-printf " ---> checking if xz is installed.. "
-host_build_xz=0
-if ! which xz >/dev/null 2>&1; then
- printf "not found\n"
- host_build_xz=1
-else
- printf "found\n"
-fi
-
# optional
host_build_cdrtools=0
if ! which mkisofs >/dev/null 2>&1; then
@@ -725,9 +716,6 @@ fi
if [ $host_build_cpio -eq 1 ]; then
printf "\t%s\n" "select ADK_HOST_BUILD_CPIO" >> $topdir/target/config/Config.in.prereq
fi
-if [ $host_build_xz -eq 1 ]; then
- printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq
-fi
# optional
if [ $host_build_cdrtools -eq 1 ]; then
printf "\t%s\n" "select ADK_HOST_BUILD_CDRTOOLS if ADK_HOST_NEED_CDRTOOLS" >> $topdir/target/config/Config.in.prereq
diff --git a/scripts/tarpkg b/scripts/tarpkg
index 40ff94122..43a7ab4a1 100755
--- a/scripts/tarpkg
+++ b/scripts/tarpkg
@@ -16,14 +16,14 @@ if [ "$1" = "build" ];then
chmod +x ${2}/usr/lib/pkg/${pkgname}.$file )
done
rm -rf $2/CONTROL
- (cd $2 && tar -cf - .|xz -c > $3/${pkgname}_${version}_${arch}.tar.xz)
+ (cd $2 && tar -cf - .|gzip -c > $3/${pkgname}_${version}_${arch}.tar.gz)
elif [ "$1" = "install" ];then
pkg=$(echo $(basename $2)|sed -e "s#_.*##")
if [ -x ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.preinst ]; then
IPKG_INSTROOT="$PKG_INSTROOT" ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.preinst
rm ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.preinst
fi
- xz -d -c $2|tar -xpf - -C ${PKG_INSTROOT}
+ gzip -d -c $2|tar -xpf - -C ${PKG_INSTROOT}
if [ -x ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst ]; then
IPKG_INSTROOT="$PKG_INSTROOT" ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst
rm ${PKG_INSTROOT}/usr/lib/pkg/${pkg}.postinst
diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools
index 9433bfa89..cdeeb90ed 100644
--- a/target/config/Config.in.tools
+++ b/target/config/Config.in.tools
@@ -137,10 +137,6 @@ config ADK_HOST_BUILD_TAR
bool
default n
-config ADK_HOST_BUILD_XZ
- bool
- default n
-
# optional, but can be provided by host
config ADK_HOST_BUILD_DOSFSTOOLS
bool
@@ -290,7 +286,6 @@ config ADK_HOST_NEED_SQUASHFS
config ADK_HOST_BUILD_SQUASHFS
bool
- select ADK_HOST_BUILD_XZ
default y if ADK_HOST_NEED_SQUASHFS
default n
@@ -322,7 +317,6 @@ config ADK_COMPRESSION_TOOL
string
default "gzip -n9" if ADK_LINUX_KERNEL_INITRAMFS_COMPRESSION_GZIP
default "bzip2" if ADK_LINUX_KERNEL_INITRAMFS_COMPRESSION_BZIP2
- default "xz -v --check=crc32 --lzma2=dict=1MiB" if ADK_LINUX_KERNEL_INITRAMFS_COMPRESSION_XZ
default "zstd" if ADK_LINUX_KERNEL_INITRAMFS_COMPRESSION_ZSTD
default "lz4c -l" if ADK_LINUX_KERNEL_INITRAMFS_COMPRESSION_LZ4
default "lzma -9" if ADK_LINUX_KERNEL_INITRAMFS_COMPRESSION_LZMA
diff --git a/target/linux/config/Config.in.compression b/target/linux/config/Config.in.compression
index 2e3d16b6c..c2461ba80 100644
--- a/target/linux/config/Config.in.compression
+++ b/target/linux/config/Config.in.compression
@@ -4,10 +4,6 @@
config ADK_LINUX_KERNEL_INITRAMFS_COMPRESSION_NONE
bool
-config ADK_LINUX_KERNEL_INITRAMFS_COMPRESSION_XZ
- bool
- select ADK_HOST_NEED_XZ
-
config ADK_LINUX_KERNEL_INITRAMFS_COMPRESSION_ZSTD
bool
select ADK_HOST_NEED_ZSTD
@@ -67,12 +63,6 @@ config ADK_LINUX_KERNEL_RD_ZSTD
config ADK_LINUX_KERNEL_KERNEL_ZSTD
bool
-config ADK_LINUX_KERNEL_RD_XZ
- bool
-
-config ADK_LINUX_KERNEL_KERNEL_XZ
- bool
-
config ADK_LINUX_KERNEL_KERNEL_COMPRESS_NONE
bool
@@ -83,9 +73,8 @@ config ADK_LINUX_KERNEL_INITRAMFS_SOURCE
choice
prompt "Kernel compression"
depends on ADK_TARGET_OS_LINUX && !ADK_APPLIANCE_TOOLCHAIN && !ADK_TARGET_CHOOSE_ARCH
-default ADK_LINUX_KERNEL_COMP_GZIP if ADK_TARGET_BOARD_BCM28XX
default ADK_LINUX_KERNEL_COMP_ZSTD if ADK_TARGET_ARCH_OR1K
-default ADK_LINUX_KERNEL_COMP_XZ
+default ADK_LINUX_KERNEL_COMP_GZIP
config ADK_LINUX_KERNEL_COMP_ZSTD
bool "use Zstandard compression"
@@ -95,14 +84,6 @@ config ADK_LINUX_KERNEL_COMP_ZSTD
depends on ADK_TARGET_KERNEL_WITH_COMPRESSION \
|| ADK_TARGET_GENERIC
-config ADK_LINUX_KERNEL_COMP_XZ
- bool "use XZ compression"
- select ADK_LINUX_KERNEL_RD_XZ
- select ADK_LINUX_KERNEL_KERNEL_XZ
- select ADK_LINUX_KERNEL_INITRAMFS_COMPRESSION_XZ
- depends on ADK_TARGET_KERNEL_WITH_COMPRESSION \
- || ADK_TARGET_GENERIC
-
config ADK_LINUX_KERNEL_COMP_LZ4
bool "use LZ4 compression"
select ADK_LINUX_KERNEL_RD_LZ4