Skip to content

Commit

Permalink
tools: switch to util-linux for libuuid
Browse files Browse the repository at this point in the history
  • Loading branch information
coolsnowwolf committed Nov 30, 2024
1 parent 912648f commit 471edf0
Show file tree
Hide file tree
Showing 8 changed files with 105 additions and 150 deletions.
31 changes: 16 additions & 15 deletions tools/e2fsprogs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=e2fsprogs
PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs
PKG_VERSION:=1.46.5
PKG_HASH:=2f16c9176704cf645dc69d5b15ff704ae722d665df38b2ed3cfc249757d8d81e
PKG_RELEASE:=2
PKG_VERSION:=1.47.0
PKG_HASH:=0b4fe723d779b0927fb83c9ae709bc7b40f66d7df36433bef143e41c54257084

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/

HOST_BUILD_PARALLEL:=1
Expand All @@ -27,28 +26,30 @@ HOST_CFLAGS += $(HOST_FPIC)

HOST_CONFIGURE_ARGS += \
--disable-elf-shlibs \
--enable-libuuid \
--disable-libuuid \
--disable-tls \
--disable-nls \
--enable-threads=pth
--enable-threads=pth \
--disable-fuse2fs \
--with-crond-dir=no

# The following uses pkg-config the wrong way around. Just override it.
HOST_CONFIGURE_VARS += \
ac_cv_lib_uuid_uuid_generate=yes

define Host/Prepare
$(call Host/Prepare/Default)
rm -rf $(HOST_BUILD_DIR)/doc
endef

define Host/Install
$(Host/Install/Default)
$(MAKE) -C $(HOST_BUILD_DIR)/lib/uuid install
mkdir -p $(STAGING_DIR_HOST)/include/e2fsprogs
$(CP) $(STAGING_DIR_HOST)/include/uuid $(STAGING_DIR_HOST)/include/e2fsprogs/
rm -rf $(STAGING_DIR_HOST)/include/uuid
$(INSTALL_DATA) $(HOST_BUILD_DIR)/lib/uuid/libuuid.a $(STAGING_DIR_HOST)/lib/
$(call Host/Install/Default)
$(SED) 's|^DIR=.*|DIR=$$$${STAGING_DIR_HOST}/share/et|' $(STAGING_DIR_HOST)/bin/compile_et
$(SED) 's|^DIR=.*|DIR=$$$${STAGING_DIR_HOST}/share/ss|' $(STAGING_DIR_HOST)/bin/mk_cmds
endef

define Host/Clean
rm -f $(STAGING_DIR_HOST)/bin/e2fsck
rm -f $(STAGING_DIR_HOST)/bin/tune2fs
define Host/Uninstall
-$(call Host/Compile/Default,uninstall)
endef

$(eval $(call HostBuild))
11 changes: 0 additions & 11 deletions tools/e2fsprogs/patches/001-exit_0_on_corrected_errors.patch

This file was deleted.

11 changes: 0 additions & 11 deletions tools/e2fsprogs/patches/002-dont-build-e4defrag.patch

This file was deleted.

11 changes: 0 additions & 11 deletions tools/e2fsprogs/patches/003-no-crond.patch

This file was deleted.

This file was deleted.

10 changes: 6 additions & 4 deletions tools/mtd-utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=mtd-utils
PKG_VERSION:=2.1.5
PKG_VERSION:=2.2.1
PKG_RELEASE:=1

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://infraroot.at/pub/mtd/
PKG_HASH:=386e27fd121699b6b729bc2e8e04dda987b31cca6b16e12fb6cc6dcf26449f46
PKG_HASH:=f7ae20b2eb79ee83441468f0b99d897024cd96ff853eea59106fb1952065c803
PKG_CPE_ID:=cpe:/a:mtd-utils_project:mtd-utils

PKG_FIXUP:=autoreconf

Expand All @@ -29,11 +30,12 @@ ifneq ($(HOST_OS),Linux)
endif

HOST_CONFIGURE_ARGS+= \
--disable-tests \
--without-tests \
--without-crypto \
--without-xattr \
--without-zstd \
--without-lzo
--without-lzo \
--with-lzma

HOST_MAKE_FLAGS += \
PROGRAMS="mkfs.jffs2 ubinize mkfs.ubifs"
Expand Down
26 changes: 13 additions & 13 deletions tools/mtd-utils/patches/110-portability.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
--- a/jffsX-utils/compr_lzo.c
+++ b/jffsX-utils/compr_lzo.c
@@ -26,7 +26,6 @@
@@ -24,7 +24,6 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>

#ifndef WITHOUT_LZO
-#include <asm/types.h>
#include <linux/jffs2.h>
#include <lzo/lzo1x.h>
Expand All @@ -18,8 +18,8 @@
#include <linux/jffs2.h>
#include "common.h"
#include "compr.h"
--- a/jffsX-utils/rbtree.h
+++ b/jffsX-utils/rbtree.h
--- a/include/rbtree.h
+++ b/include/rbtree.h
@@ -94,8 +94,7 @@ static inline struct page * rb_insert_pa
#ifndef _LINUX_RBTREE_H
#define _LINUX_RBTREE_H
Expand Down Expand Up @@ -70,23 +70,23 @@
#include <sys/types.h>
--- a/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
+++ b/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c
@@ -1541,6 +1541,7 @@ static int add_inode(struct stat *st, in
@@ -1568,6 +1568,7 @@ static int add_inode(struct stat *st, in

if (c->default_compr != UBIFS_COMPR_NONE)
use_flags |= UBIFS_COMPR_FL;
+#ifndef NO_NATIVE_SUPPORT
if (flags & FS_COMPR_FL)
use_flags |= UBIFS_COMPR_FL;
if (flags & FS_SYNC_FL)
@@ -1553,6 +1554,7 @@ static int add_inode(struct stat *st, in
@@ -1580,6 +1581,7 @@ static int add_inode(struct stat *st, in
use_flags |= UBIFS_DIRSYNC_FL;
if (fctx)
use_flags |= UBIFS_CRYPT_FL;
+#endif
memset(ino, 0, UBIFS_INO_NODE_SZ);

ino_key_init(&key, inum);
@@ -1638,7 +1640,9 @@ static int add_dir_inode(const char *pat
@@ -1665,7 +1667,9 @@ static int add_dir_inode(const char *pat
fd = dirfd(dir);
if (fd == -1)
return sys_err_msg("dirfd failed");
Expand All @@ -96,23 +96,23 @@
flags = 0;
}

@@ -1849,6 +1853,7 @@ static int add_file(const char *path_nam
@@ -1878,6 +1882,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;
+#ifndef NO_NATIVE_SUPPORT
if (c->default_compr == UBIFS_COMPR_NONE &&
!c->encrypted && (flags & FS_COMPR_FL))
#ifdef WITHOUT_LZO
@@ -1857,6 +1862,7 @@ static int add_file(const char *path_nam
use_compr = UBIFS_COMPR_LZO;
#ifdef WITH_LZO
@@ -1888,6 +1893,7 @@ static int add_file(const char *path_nam
use_compr = UBIFS_COMPR_NONE;
#endif
else
+#endif
use_compr = c->default_compr;
compr_type = compress_data(buf, bytes_read, &dn->data,
&out_len, use_compr);
@@ -1916,7 +1922,9 @@ static int add_non_dir(const char *path_
@@ -1947,7 +1953,9 @@ static int add_non_dir(const char *path_
if (fd == -1)
return sys_err_msg("failed to open file '%s'",
path_name);
Expand Down
Loading

0 comments on commit 471edf0

Please sign in to comment.