]> git.proxmox.com Git - pve-firmware.git/commitdiff
Revert "compress each firmware file with ZSTD"
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 1 Sep 2023 13:33:16 +0000 (15:33 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 1 Sep 2023 13:34:57 +0000 (15:34 +0200)
While the kernel supports it well, the initramfs-tools lack support
for finding those files when assembling the initrd.

While ubuntu has already support, and the changes required seem not
all to bad (just a simple shell script checking if a path exists),
lets avoid patching and packaging a new initramfs-tools and rather
revert this for now..

This reverts commit 1885bf2becfe373b1988e0efb974a1b090f38dbb.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Makefile
assemble-firmware.pl

index edd16de25e8482e01e9c108db4439285194e5211..301feedfa3408dee30bcabc627b1307738745b19 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -47,7 +47,7 @@ $(BUILDDIR): linux-firmware.git/WHENCE dvb-firmware.git/README fw.list
        mkdir -p $@.tmp/lib/firmware
        cp -a debian $@.tmp
        echo "git clone git://git.proxmox.com/git/pve-firmware.git\\ngit checkout $$(git rev-parse HEAD)" >$@.tmp/debian/SOURCE
-       cd linux-firmware.git; ./copy-firmware.sh -v --zstd -19 ../$@.tmp/lib/firmware/
+       cd linux-firmware.git; ./copy-firmware.sh -v ../$@.tmp/lib/firmware/
        ./assemble-firmware.pl fw.list $@.tmp/lib/firmware
        find $@.tmp/lib/firmware -empty -type d -delete
        install -d $@.tmp/usr/share/doc/pve-firmware
index 1b1f78e0f21e385c3dd8b36bf64543881736639c..dbc0ee0d96f243d0eee43765aafc0c6ec223dfe0 100755 (executable)
@@ -488,7 +488,7 @@ sub add_fw :prototype($$) {
        $fw = 'cis/PE520.cis';
     }
 
-    if (-e "$target/$fw" || -e "$target/$fw.zst") {
+    if (-e "$target/$fw") {
        warn "WARN: allowed to skip existing '$fw'\n" if $ALLOW_MISSING->{$fw};
        return;
     }
@@ -501,7 +501,7 @@ sub add_fw :prototype($$) {
     my $name = basename($fw);
 
     if ($name =~ /\*/) {
-       my $sr = `find '$target' \\( -type f -o -type l \\) \\( -name '$name' -o -name '$name.zst' \\)`;
+       my $sr = `find '$target' \\( -type f -o -type l \\) -name '$name'`;
        chomp $sr;
        if ($sr) {
            for my $f (split("\n", $sr)) {
@@ -526,12 +526,12 @@ sub add_fw :prototype($$) {
        return;
     }
 
-    my $sr = `find '$target' \\( -type f -o -type l \\) \\( -name '$name' -o -name '$name.zst' \\)`;
+    my $sr = `find '$target' \\( -type f -o -type l \\) -name '$name'`;
     chomp $sr;
     if ($sr) {
        my $found = 0;
        for my $f (split("\n", $sr)) {
-           if ($f =~ /$fw(?:\.zst)?$/) {
+           if ($f =~ /$fw$/) {
                print "found linked $fw in $f\n";
                $found = 1;
            }
@@ -598,11 +598,10 @@ for my $f (@$all_fw_files) {
 
 for my $f (@$all_fw_files) {
     my $name = basename($f);
-    $name =~ s/\.zst$//;
 
-    if ($fwbase_name->{$name} || $fwbase_name->{"$name.zst"}) {
+    if ($fwbase_name->{$name}) {
        $keep++;
-    } elsif ($link_target->{$name} || $link_target->{"${name}.zst"}) {
+    } elsif ($link_target->{$name}) {
        #print "skip link target '$f'\n";
        $keep++;
     } else {