Skip to content

Commit

Permalink
check for zimage style kernel on aarch64+sles (#553)
Browse files Browse the repository at this point in the history
  • Loading branch information
crbaird committed Oct 16, 2017
1 parent bf7e08a commit 68433e1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--- wwbootstrap.orig 2017-10-13 18:34:31.987826928 -0400
+++ wwbootstrap 2017-10-13 18:39:15.904564374 -0400
@@ -153,7 +153,7 @@

mkpath("$tmpdir/initramfs");

-if (! -f "$opt_chroot/boot/vmlinuz-$opt_kversion" && -f "$opt_chroot/boot/vmlinux-$opt_kversion.gz") {
+if (! -f "$opt_chroot/boot/Image-$opt_kversion" ) {
&eprint("Can't locate the boot kernel\n");
exit 1;
}
@@ -308,12 +308,9 @@
close MODCONFFILE;
}

-# Attempt to gunzip the kernel, aarch64 kernels are compressed and iPXE can't boot gzip compressed kernels.
-# Note, if the kernel isn't a gzip, IO::Uncompress::Gunzip makes a direct copy of the file.
-if (-e "$opt_chroot/boot/vmlinuz-$opt_kversion") {
- gunzip "$opt_chroot/boot/vmlinuz-$opt_kversion" => "$tmpdir/kernel" or die "gunzip of kernel failed: $GunzipError\n";
-} elsif (-e "$opt_chroot/boot/vmlinux-$opt_kversion.gz") {
- gunzip "$opt_chroot/boot/vmlinux-$opt_kversion.gz" => "$tmpdir/kernel" or die "gunzip of kernel failed: $GunzipError\n";
+# copy zimage
+if( -e "$opt_chroot/boot/Image-$opt_kversion" ) {
+ copy("$opt_chroot/boot/Image-$opt_kversion", "$tmpdir/kernel");
}

&nprint("Building and compressing bootstrap\n");
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ Patch3: warewulf-vnfs.wwmkchroot.patch
Patch4: warewulf-vnfs.utf8.patch
# 10/10/17 reese.baird@intel.com - fixes bootstrap kernel name on sles
Patch5: warewulf-vnfs.bootstrap.kernel.patch
# 10/13/17 karl.w.schulz@intel.com - fixes bootstrap kernel format on aarch64 on sles
Patch6: warewulf-vnfs.bootstrap.aarch64.patch


%description
Expand All @@ -73,7 +75,13 @@ cd %{dname}
%patch2 -p1
%patch3 -p1
%patch4 -p1
%if 0%{!?sles_version} && 0%{!?suse_version}
%patch5 -p1
%else
%ifarch aarch64
%patch6 -p1
%endif
%endif


%build
Expand Down

0 comments on commit 68433e1

Please sign in to comment.