File 15.5.patch of Package installation-images.15.5

diff --git a/data/initrd/modules.file_list b/data/initrd/modules.file_list
index 8df03026..ff75cfc0 100644
--- a/data/initrd/modules.file_list
+++ b/data/initrd/modules.file_list
@@ -58,8 +58,6 @@ e /sbin/depmod -a -b . -F System.map <kernel_ver>
 r System.map
 
 # copy needed firmware files
-# XXX: usrmerge
-d usr/lib/firmware
 d lib/firmware
 e mlist3 <kernel_ver> fw || true
 
diff --git a/gefrickel b/gefrickel
index ae060261..5b9ed04e 100755
--- a/gefrickel
+++ b/gefrickel
@@ -10,8 +10,18 @@ function err {
 }
 
 function squash {
+  local compression
   mkdir -p parts
-  $mksquashfs $1 parts/$2 -comp xz -noappend -no-progress
+  case $(uname -m) in
+    ppc64le)
+      compression=-no-compression
+      ;;
+    *)
+      compression='-comp xz'
+      ;;
+  esac
+
+  $mksquashfs $1 parts/$2 $compression -noappend -no-progress
   chmod 644 parts/$2
 }
 
@@ -20,7 +30,7 @@ dir=$1
 [ -d "$dir" ] || err "$dir: not a directory"
 cd $dir
 
-[ -d "parts" ] && { echo "$dir: already gefrickelt" ; exit 1 ; }
+[ -d "parts" ] && err "$dir: already gefrickelt"
 
 [ -x "/usr/bin/mksquashfs" ] && mksquashfs="/usr/bin/mksquashfs"
 [ -x "/usr/bin/mksquashfs4" ] && mksquashfs="/usr/bin/mksquashfs4"
@@ -39,6 +49,23 @@ base_modules="loop squashfs lz4_decompress xxhash zstd_decompress zram ext4 crc1
 echo "$base_modules" > .base_modules
 m_dir=`echo ${pfx}lib/modules/*/initrd`
 [ -d "$m_dir" ] || err "no kernel module dir"
+kernel_ver=$(basename $(dirname $m_dir))
+case $(uname -m) in
+  ppc64le)
+    find ${pfx}lib/modules -type f -name \*.zst -exec unzstd -v --rm '{}' \;
+    if [ -d ${pfx}lib/firmware ] ; then
+      broken="$(find -L ${pfx}lib/firmware -type l)"
+      echo Broken links: "$broken"
+      find ${pfx}lib/firmware -type l -name \*.xz -exec unxz -vv '{}' \;
+      find ${pfx}lib/firmware -type f -name \*.xz -exec unxz -vv '{}' \;
+      broken_after="$(find -L ${pfx}lib/firmware -type l)"
+      if [ "$broken" != "$broken_after" ] ; then
+        echo ERROR: Broken links after decompression "$broken_after"
+      fi
+    fi
+    /sbin/depmod -a -b . -F /boot/System.map* $kernel_ver || err "Failed to regenerate modules.dep"
+    ;;
+esac
 mkdir -p "b/$m_dir"
 for i in $base_modules ; do
   for suffix in ko ko.xz ko.zst; do
diff --git a/lib/CompressImage.pm b/lib/CompressImage.pm
index 68373464..210989d5 100644
--- a/lib/CompressImage.pm
+++ b/lib/CompressImage.pm
@@ -60,7 +60,7 @@ sub CompressImage
   print "compressing $image...\n";
 
   $prog_opt = '-cf9N' if $prog eq 'gzip';
-  $prog_opt = '--check=crc32 -cf' if $prog eq 'xz';
+  $prog_opt = '-9 --check=crc32 -cf' if $prog eq 'xz';
 
   die "$Script: $prog failed" if system "$prog $prog_opt '$image2' >'$image2.tmp'";
 
diff --git a/obs/installation-images.spec b/obs/installation-images.spec
index 2d705af5..1070fca9 100644
--- a/obs/installation-images.spec
+++ b/obs/installation-images.spec
@@ -557,6 +557,7 @@ BuildRequires:  yast2-widget-demo
 %if 0%{?with_storage_ng}
 BuildRequires:  libstorage-ng-lang
 BuildRequires:  yast2-storage-ng
+BuildRequires:  zstd
 #!BuildIgnore:  yast2-storage
 #!BuildIgnore:  libstorage7
 %endif
openSUSE Build Service is sponsored by