[packages/geninitrd] - rel 8; silence ramdisk_size warning for initramfs

arekm arekm at pld-linux.org
Fri Aug 10 10:47:55 CEST 2018


commit ce25c101295b15018a154730a166c52ddccbe52c
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Aug 10 10:47:48 2018 +0200

    - rel 8; silence ramdisk_size warning for initramfs

 geninitrd-git.patch | 34 ++++++++++++++++++++++++++++++++++
 geninitrd.spec      |  2 +-
 2 files changed, 35 insertions(+), 1 deletion(-)
---
diff --git a/geninitrd.spec b/geninitrd.spec
index 5305cd3..2bfddc5 100644
--- a/geninitrd.spec
+++ b/geninitrd.spec
@@ -7,7 +7,7 @@ Summary:	Creates an initial ramdisk image for preloading modules
 Summary(pl.UTF-8):	Narzędzie do tworzenia inicjalnego ramdysku używanego przy starcie systemu
 Name:		geninitrd
 Version:	12757
-Release:	8
+Release:	9
 License:	GPL
 Group:		Applications/System
 Source0:	%{name}-%{version}.tar.gz
diff --git a/geninitrd-git.patch b/geninitrd-git.patch
index a6ac79d..26658e8 100644
--- a/geninitrd-git.patch
+++ b/geninitrd-git.patch
@@ -95,3 +95,37 @@ index 0a18298..c75c22b 100755
  				crc-t10dif)
  					find_depmod "-crct10dif-pclmul"
  					find_depmod "-crct10dif"
+commit 256e0bedb591a982ce87fb2ca1b38e1353d5b33a
+Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
+Date:   Fri Aug 10 10:40:59 2018 +0200
+
+    ramdisk_size warning makes no sense for initramfs.
+
+diff --git a/geninitrd b/geninitrd
+index c75c22b..025674d 100755
+--- a/geninitrd
++++ b/geninitrd
+@@ -1759,14 +1759,16 @@ case "$INITRDFS" in
+ 	die "Filesystem $INITRDFS not supported by $PROGRAM"
+ esac
+ 
+-CONFIG_BLK_DEV_RAM_SIZE=$(ikconfig | awk -F= '/^CONFIG_BLK_DEV_RAM_SIZE/{print $2}')
+-if [ -z "$CONFIG_BLK_DEV_RAM_SIZE" ]; then
+-	CONFIG_BLK_DEV_RAM_SIZE=4096
+-	warn "No CONFIG_BLK_DEV_RAM_SIZE detected, fallback to $CONFIG_BLK_DEV_RAM_SIZE"
+-fi
++if [ "$INITRDFS" != "initramfs" ]; then
++	CONFIG_BLK_DEV_RAM_SIZE=$(ikconfig | awk -F= '/^CONFIG_BLK_DEV_RAM_SIZE/{print $2}')
++	if [ -z "$CONFIG_BLK_DEV_RAM_SIZE" ]; then
++		CONFIG_BLK_DEV_RAM_SIZE=4096
++		warn "No CONFIG_BLK_DEV_RAM_SIZE detected, fallback to $CONFIG_BLK_DEV_RAM_SIZE"
++	fi
+ 
+-if [ "$IMAGESIZE" -gt $CONFIG_BLK_DEV_RAM_SIZE ]; then
+-	warn "Your image size is larger than $CONFIG_BLK_DEV_RAM_SIZE, Be sure to boot kernel with ramdisk_size=$IMAGESIZE!"
++	if [ "$IMAGESIZE" -gt $CONFIG_BLK_DEV_RAM_SIZE ]; then
++		warn "Your image size is larger than $CONFIG_BLK_DEV_RAM_SIZE, Be sure to boot kernel with ramdisk_size=$IMAGESIZE!"
++	fi
+ fi
+ 
+ if ! is_no "$COMPRESS"; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/geninitrd.git/commitdiff/ce25c101295b15018a154730a166c52ddccbe52c



More information about the pld-cvs-commit mailing list