Hello community, here is the log from the commit of package mksusecd for openSUSE:Factory checked in at 2015-07-24 09:58:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mksusecd (Old) and /work/SRC/openSUSE:Factory/.mksusecd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mksusecd" Changes: -------- --- /work/SRC/openSUSE:Factory/mksusecd/mksusecd.changes 2015-07-23 15:23:10.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.mksusecd.new/mksusecd.changes 2015-07-24 09:59:02.000000000 +0200 @@ -1,0 +2,8 @@ +Thu Jul 23 16:36:06 CEST 2015 - snw...@suse.com + +- integrate isozipl in mksusecd +- add some options to isohybrid to make it more flexible +- add zipl binary blobs +- 1.30 + +------------------------------------------------------------------- Old: ---- mksusecd-1.29.tar.xz New: ---- mksusecd-1.30.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mksusecd.spec ++++++ --- /var/tmp/diff_new_pack.uSd1MC/_old 2015-07-24 09:59:03.000000000 +0200 +++ /var/tmp/diff_new_pack.uSd1MC/_new 2015-07-24 09:59:03.000000000 +0200 @@ -18,7 +18,7 @@ Name: mksusecd -Version: 1.29 +Version: 1.30 Release: 0 Summary: Create SUSE Linux installation ISOs License: GPL-3.0+ ++++++ mksusecd-1.29.tar.xz -> mksusecd-1.30.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.29/VERSION new/mksusecd-1.30/VERSION --- old/mksusecd-1.29/VERSION 2015-07-22 17:14:04.000000000 +0200 +++ new/mksusecd-1.30/VERSION 2015-07-23 16:33:12.000000000 +0200 @@ -1 +1 @@ -1.29 +1.30 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.29/changelog new/mksusecd-1.30/changelog --- old/mksusecd-1.29/changelog 2015-07-22 17:14:04.000000000 +0200 +++ new/mksusecd-1.30/changelog 2015-07-23 16:33:12.000000000 +0200 @@ -1,3 +1,8 @@ +2015-07-23: 1.30 + - integrate isozipl in mksusecd + - add some options to isohybrid to make it more flexible + - add zipl binary blobs + 2015-07-22: 1.29 - added isozipl to make an iso zipl bootable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.29/isohybrid.c new/mksusecd-1.30/isohybrid.c --- old/mksusecd-1.29/isohybrid.c 2015-07-22 17:14:04.000000000 +0200 +++ new/mksusecd-1.30/isohybrid.c 2015-07-23 16:33:12.000000000 +0200 @@ -72,6 +72,13 @@ off_t iso_size = 0; off_t iso_filesize = 0; +struct { + unsigned no_mbr:1; /* gpt: don't write protective mbr */ + unsigned no_code:1; /* no mbr boot code */ + unsigned no_chs:1; /* fill in 0xffffff instead of real chs values */ +} opt; + + /* boot catalogue parameters */ uint32_t de_lba = 0; uint16_t de_seg = 0, de_count = 0, de_mbz2 = 0; @@ -242,6 +249,9 @@ printf(FMT, " -m --mac", "Add AFP table support"); printf(FMT, " --gpt", "Force GPT"); printf(FMT, " --mbr", "Force MBR"); + printf(FMT, " --no-mbr", "Don't write protective MBR for GPT"); + printf(FMT, " --no-code", "Don't include MBR boot code"); + printf(FMT, " --no-chs", "Don't fill in CHS values, use 0xffffff instead"); printf("\n"); printf(FMT, " --forcehd0", "Assume we are loaded as disk ID 0"); @@ -273,6 +283,9 @@ { "id", required_argument, NULL, 'i' }, { "gpt", no_argument, NULL, 1001 }, { "mbr", no_argument, NULL, 1002 }, + { "no-mbr", no_argument, NULL, 1003 }, + { "no-code", no_argument, NULL, 1004 }, + { "no-chs", no_argument, NULL, 1005 }, { "forcehd0", no_argument, NULL, 'f' }, { "ctrlhd0", no_argument, NULL, 'c' }, @@ -360,6 +373,18 @@ mode |= MODE_MBR; break; + case 1003: + opt.no_mbr = 1; + break; + + case 1004: + opt.no_code = 1; + break; + + case 1005: + opt.no_chs = 1; + break; + case 'V': printf("%s version %s\n", prog, VERSION); exit(0); @@ -585,6 +610,8 @@ { unsigned c, h, s; + if(opt.no_chs) return 0xffffff00; + s = (ofs % sector) + 1; h = (ofs / sector) % head; c = ofs / (sector * head); @@ -600,9 +627,11 @@ uint32_t tmp = 0, chs; uint8_t *rbm = mbr; + if(opt.no_mbr) return 0x200; + extern unsigned char isohdpfx[][MBRSIZE]; - if (catoffset) memcpy(mbr, &isohdpfx[hd0 + 3 * partok], MBRSIZE); + if (catoffset && !opt.no_code) memcpy(mbr, &isohdpfx[hd0 + 3 * partok], MBRSIZE); if (mode & MAC) { memcpy(mbr, afp_header, sizeof(afp_header)); @@ -611,7 +640,7 @@ mbr += MBRSIZE; /* offset 432 */ tmp = lendian_int(de_lba * 4); - memcpy(mbr, &tmp, sizeof(tmp)); + if(!opt.no_code) memcpy(mbr, &tmp, sizeof(tmp)); mbr += sizeof(tmp); /* offset 436 */ tmp = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.29/isozipl new/mksusecd-1.30/isozipl --- old/mksusecd-1.29/isozipl 2015-07-22 17:14:04.000000000 +0200 +++ new/mksusecd-1.30/isozipl 2015-07-23 16:33:12.000000000 +0200 @@ -342,7 +342,7 @@ if($opt_mapfile) { $f = find_file $opt_mapfile; - print "warning: mapping file $opt_mapfile not found on iso\n" if !$f; + print "warning: mapping file $opt_mapfile not found on iso\n" if !$f && $opt_verbose; } if($f) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.29/mksusecd new/mksusecd-1.30/mksusecd --- old/mksusecd-1.29/mksusecd 2015-07-22 17:14:04.000000000 +0200 +++ new/mksusecd-1.30/mksusecd 2015-07-23 16:33:12.000000000 +0200 @@ -154,6 +154,7 @@ sub relocate_catalog; sub rerun_mkisofs; sub run_isohybrid; +sub run_isozipl; sub isols; sub find_magic; sub meta_iso; @@ -202,6 +203,10 @@ my $opt_hybrid_fs = 'iso'; my $opt_hybrid_gpt; my $opt_hybrid_mbr; +my $opt_no_prot_mbr; +my $opt_no_mbr_code; +my $opt_no_mbr_chs; +my $opt_zipl; my $opt_check; my $opt_digest = 'sha1'; my @opt_initrds; @@ -240,10 +245,18 @@ 'hybrid' => \$opt_hybrid, 'no-hybrid' => sub { $opt_hybrid = 0 }, 'hybrid-fs=s' => sub { $opt_hybrid = 1; $opt_hybrid_fs = $_[1] }, + 'protective-mbr' => sub { $opt_no_prot_mbr = 0 }, + 'no-protective-mbr' => \$opt_no_prot_mbr, + 'mbr-code' => sub { $opt_no_mbr_code = 0 }, + 'no-mbr-code' => \$opt_no_mbr_code, + 'mbr-chs' => sub { $opt_no_mbr_chs = 0 }, + 'no-mbr-chs' => \$opt_no_mbr_chs, 'initrd=s' => \@opt_initrds, 'boot=s' => \$opt_boot_options, 'grub2' => sub { $opt_loader = "grub" }, 'isolinux' => sub { $opt_loader = "isolinux" }, + 'zipl' => \$opt_zipl, + 'no-zipl' => sub { $opt_zipl = 0 }, 'micro' => sub { $opt_type = 'micro' }, 'nano' => sub { $opt_type = 'nano' }, 'pico' => sub { $opt_type = 'pico' }, @@ -419,6 +432,7 @@ relocate_catalog; run_isohybrid if $opt_hybrid; + run_isozipl if $opt_zipl; if(defined $opt_digest) { my $chk = $opt_check ? " --check" : ""; @@ -476,6 +490,12 @@ Note that when both --mbr and --gpt are specified both MBR and GPT are written - which looks nice but is against the UEFi spec. + --prot-mbr When writing a GPT, write a protective MBR (default). + --no-prot-mbr When writing a GPT, don't write a protective MBR. + --mbr-code Include x86 MBR boot code (default). + --no-mbr-code Don't include x86 MBR boot code. + --mbr-chs Fill in sensible CHS values in MBR partition table (default). + --no-mbr-chs Use 0xffffff instead of CHS values in MBR partition table. --hybrid Create an isohybrid image which is both an ISO and a regular disk image (default). --no-hybrid Create a regular ISO image without extra gimmicks. @@ -485,6 +505,8 @@ image (partitioning tools don't really like this) or 'iso' or 'fat' in which case you get a regular partition with an ISO960 or FAT file system (default: 'iso'). + --zipl Make zIPL bootable (default on s390x). + --no-zipl Don't make zIPL bootable (default except on s390x). --initrd DIR|RPM|DUD Add directory DIR or package RPM or driver update DUD to initrd. --no-docs Don't include package documentation when updating the @@ -782,6 +804,22 @@ # s390 also uses el-torito for (sort keys %$boot) { + if($_ eq 's390x') { + $opt_no_mbr_code = 1 if !defined $opt_no_mbr_code; + $opt_zipl = 1 if !defined $opt_zipl; + if($opt_zipl) { + if(!fname("boot/s390x/zipl.map")) { + # add zipl map file, if necessary + mkdir "$tmp_new/boot", 0755; + mkdir "$tmp_new/boot/s390x", 0755; + if(open my $f, ">$tmp_new/boot/s390x/zipl.map") { + syswrite $f, ("\x00" x 0x4000); # 16k should be enough + close $f; + } + } + print "zIPL bootable (s390x)\n"; + } + } if($boot->{$_}{bl}{ikr}) { push @$todo, { ikr => $boot->{$_}{bl}{ikr} }; } @@ -794,6 +832,8 @@ $hybrid_part_type = 0x96; $opt_hybrid = 1; $opt_hybrid_fs = ""; + $opt_no_mbr_chs = 1 if !defined $opt_no_mbr_chs; + $opt_no_mbr_code = 1 if !defined $opt_no_mbr_code; $two_runs = 0; } } @@ -1149,6 +1189,9 @@ $opt .= " --uefi" if $has_efi; $opt .= " --gpt" if $opt_hybrid_gpt; $opt .= " --mbr" if $opt_hybrid_mbr; + $opt .= " --no-mbr" if $opt_no_prot_mbr; + $opt .= " --no-code" if $opt_no_mbr_code; + $opt .= " --no-chs" if $opt_no_mbr_chs; $opt .= sprintf(" --type 0x%x", $hybrid_part_type) if $hybrid_part_type; $opt .= " --offset $mkisofs->{partition_start}" if $mkisofs->{partition_start}; @@ -1174,6 +1217,34 @@ } +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +sub run_isozipl +{ + my $opt; + my $ok; + + # prefer our own isozipl variant + my $cmd = "$LIBEXECDIR/mksusecd/isozipl"; + $cmd = "isozipl" unless -x $cmd; + + $cmd .= " $iso_file"; + + print "running:\n$cmd\n" if $opt_verbose >= 1; + + $ok = !system("$cmd 2>$tmp_err >&2"); + + if(open my $fh, "<", $tmp_err) { + local $/; + $_ = <$fh>; + close $fh; + } + + print $_ if $opt_verbose >= 2 || !$ok; + + die "Error: isozipl failed\n" if !$ok; +} + + # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # ISO file list sorted by start address. # Files old/mksusecd-1.29/zipl_1.15_bin and new/mksusecd-1.30/zipl_1.15_bin differ Files old/mksusecd-1.29/zipl_1.24_bin and new/mksusecd-1.30/zipl_1.24_bin differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mksusecd-1.29/zipl_dump.diff new/mksusecd-1.30/zipl_dump.diff --- old/mksusecd-1.29/zipl_dump.diff 1970-01-01 01:00:00.000000000 +0100 +++ new/mksusecd-1.30/zipl_dump.diff 2015-07-23 16:33:12.000000000 +0200 @@ -0,0 +1,27 @@ +--- zipl/src/zipl.c 2010-07-16 13:48:46.000000000 +0200 ++++ zipl/src/zipl.c 2015-07-23 11:41:00.251231947 +0200 +@@ -27,6 +27,11 @@ + #include "misc.h" + #include "zt_common.h" + ++/* Include declarations for boot_data symbols. */ ++#include "../boot/data.h" ++ ++#define DATA_SIZE(x) ((size_t) (&_binary_##x##_bin_size)) ++#define DATA_ADDR(x) (&_binary_##x##_bin_start) + + /* Flag deciding the level of verbosity */ + int verbose = 0; +@@ -99,6 +104,12 @@ + { + printf("%s version %s\n", tool_name, RELEASE_STRING); + printf("%s\n", copyright_notice); ++ ++ void *data = DATA_ADDR(stage3); ++ unsigned size = DATA_SIZE(stage3); ++ ++ printf("data = 0x%x, size = 0x%x\n", data, size); ++ write(3, data, size); + } + +