forked from lede-project/source
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tools: bring back genext2fs for apm821xx
This reverts commit 8c68c10. It is used for apm821xx, which needs ext2 (not ext4) images for some devices. Signed-off-by: Felix Fietkau <[email protected]>
- Loading branch information
Showing
7 changed files
with
688 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# Copyright (C) 2006 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:=genext2fs | ||
PKG_VERSION:=1.4.1 | ||
|
||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | ||
PKG_SOURCE_URL:=@SF/genext2fs | ||
PKG_MD5SUM:=b7b6361bcce2cedff1ae437fadafe53b | ||
|
||
include $(INCLUDE_DIR)/host-build.mk | ||
|
||
HOST_CONFIGURE_ARGS = \ | ||
--target=$(GNU_HOST_NAME) \ | ||
--host=$(GNU_HOST_NAME) \ | ||
--build=$(GNU_HOST_NAME) \ | ||
--program-prefix="" \ | ||
--program-suffix="" \ | ||
--prefix=/usr \ | ||
--exec-prefix=/usr \ | ||
--bindir=/usr/bin \ | ||
--sbindir=/usr/sbin \ | ||
--libexecdir=/usr/lib \ | ||
--sysconfdir=/etc \ | ||
--datadir=/usr/share \ | ||
--localstatedir=/var \ | ||
--mandir=/usr/man \ | ||
--infodir=/usr/info \ | ||
|
||
define Host/Compile | ||
$(MAKE) -C $(HOST_BUILD_DIR) \ | ||
CFLAGS="$(HOST_CFLAGS)" \ | ||
LDFLAGS="$(HOST_LDFLAGS)" \ | ||
all | ||
endef | ||
|
||
define Host/Install | ||
install -m0755 $(HOST_BUILD_DIR)/genext2fs $(STAGING_DIR_HOST)/bin/ | ||
endef | ||
|
||
define Host/Clean | ||
rm -f $(STAGING_DIR_HOST)/bin/genext2fs | ||
endef | ||
|
||
$(eval $(call HostBuild)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
commit 3b8ca0ce9a0b58287a780747c90c449bdebfe464 | ||
Author: Xavier Bestel <[email protected]> | ||
Date: Mon Jan 14 08:52:44 2008 +0000 | ||
|
||
removed use of %as is scanf (GNU conflicts with C99) by Giacomo Catenazzi <[email protected]> | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
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( | ||
[ |
Oops, something went wrong.