# HG changeset patch # User Pascal Bellard # Date 1393925010 0 # Node ID 647e4ebbbcae1a45181a3310dfa7b955ab61c5b9 # Parent 9fdf99385a957e78134e81897291aa3b69261f6b syslinux/iso2exe: fix 16M hole diff -r 9fdf99385a95 -r 647e4ebbbcae syslinux-tools/receipt --- a/syslinux-tools/receipt Sun Mar 02 19:13:19 2014 +0100 +++ b/syslinux-tools/receipt Tue Mar 04 09:23:30 2014 +0000 @@ -20,4 +20,5 @@ done cp -a $src/iso2exe/isohybrid.exe $fs/usr/share/boot cp -a $src/iso2exe/meminfo.exe $fs/usr/share/boot + find $fs/usr -exec chown root.root {} \; } diff -r 9fdf99385a95 -r 647e4ebbbcae syslinux/stuff/iso2exe/README --- a/syslinux/stuff/iso2exe/README Sun Mar 02 19:13:19 2014 +0100 +++ b/syslinux/stuff/iso2exe/README Tue Mar 04 09:23:30 2014 +0000 @@ -79,15 +79,12 @@ Limitations: - Only DOS 3, 4 and 6 boot supported. Checked with http://www.allbootdisks.com/ - NT support via boot device creation. + NT/XP support via boot device creation. - Real mode support only. VM86 is not supported. Will not boot directly, but a removable boot media is created. -- Image/zImage format not supported, bzImage only. Can't boot memtest or gpxe. - -- The tiny Linux loader can't load more than 15Mb of files. (not really a - problem since many-in-1 ISO format). +- Image/zImage format not supported, bzImage only. Can't boot memtest or ipxe. - The DOS Linux loader and the ISO initramfs must fit in ~30Kb. diff -r 9fdf99385a95 -r 647e4ebbbcae syslinux/stuff/iso2exe/boot.c --- a/syslinux/stuff/iso2exe/boot.c Sun Mar 02 19:13:19 2014 +0100 +++ b/syslinux/stuff/iso2exe/boot.c Tue Mar 04 09:23:30 2014 +0000 @@ -25,7 +25,7 @@ static void bootiso(char **iso) { char *init = "rdinit=/init.exe", *mode="menu"; - char c, *s, rootfs[16], cmdline[256]; + char c, rootfs[16], cmdline[256]; int fd, restart; unsigned long magic; @@ -33,9 +33,10 @@ if (iso[1] && !strcmp(mode = iso[1], "text")) init = ""; for (c = 0, restart = 1; isoreaddir(restart) == 0; restart = 0) { - if (strncmp(isofilename, "rootfs", 6) || c > s[6]) continue; + if (strncmp(isofilename, "rootfs", 6) + || c > isofilename[6]) continue; strcpy(rootfs, isofilename); - c = s[6]; + c = isofilename[6]; } if (isoopen(mode)) isoopen("bzImage"); @@ -69,6 +70,11 @@ static char *iso; static int fakeopen(char *file) { + if (file) { + char *s = file; + while (*s && *s != '\r' && *s != '\n') s++; + *s = 0; + } if (iso) { isoreset(iso); return isoopen(file); @@ -141,6 +147,12 @@ while (*s && *s != ' ') s++; *s = 0; } + if (cmdline) { + char *last; + for (s = cmdline; *s && *s != '\r' && *s != '\n'; s++) + if (*s != ' ') last = s; + *++last = 0; + } if (fakeopen(kernel) == -1) usage(argv[0]); loadkernel(); diff -r 9fdf99385a95 -r 647e4ebbbcae syslinux/stuff/iso2exe/bootlinux.c --- a/syslinux/stuff/iso2exe/bootlinux.c Sun Mar 02 19:13:19 2014 +0100 +++ b/syslinux/stuff/iso2exe/bootlinux.c Tue Mar 04 09:23:30 2014 +0000 @@ -128,9 +128,10 @@ } p->align = PAGE_SIZE; break; - case 4096: // first initrd : skip mapping hole before 16M - initrd_addr = (extendedramsizeinkb() > 24000U) ? - 0x1000000 : p->base; + case PAGE_SIZE: // first initrd : skip mapping hole before 16M + if (extendedramsizeinkb() > 24000U && p->base < 0x1000000) + p->base = 0x1000000; + initrd_addr = p->base; p->align = 4; } while (size) {