From 67efb6a66146ac80986de928197b8116b2421779 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sun, 7 Aug 2022 19:59:42 +0200 Subject: [PATCH] tools: mtd-utils: Update to version 2.1.4 Update to most recent version of mtd-utils and sync with version from package folder. Use a https download server instead of ftp. Signed-off-by: Hauke Mehrtens --- tools/mtd-utils/Makefile | 6 +++--- tools/mtd-utils/patches/110-portability.patch | 12 ++++++------ tools/mtd-utils/patches/130-lzma_jffs2.patch | 11 ++++++++--- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/tools/mtd-utils/Makefile b/tools/mtd-utils/Makefile index 7eebcfb827..e4b951acfb 100644 --- a/tools/mtd-utils/Makefile +++ b/tools/mtd-utils/Makefile @@ -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 diff --git a/tools/mtd-utils/patches/110-portability.patch b/tools/mtd-utils/patches/110-portability.patch index 181e40653a..73b97796a2 100644 --- a/tools/mtd-utils/patches/110-portability.patch +++ b/tools/mtd-utils/patches/110-portability.patch @@ -70,7 +70,7 @@ #include --- 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); diff --git a/tools/mtd-utils/patches/130-lzma_jffs2.patch b/tools/mtd-utils/patches/130-lzma_jffs2.patch index 9778aa6d0a..55930ddc86 100644 --- a/tools/mtd-utils/patches/130-lzma_jffs2.patch +++ b/tools/mtd-utils/patches/130-lzma_jffs2.patch @@ -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 -- 2.30.2