Re: multiboot on EFI

2009-03-26 Thread Vladimir Serbinenko
Hello. Unfortunately my laptop broke down. I have a copy of all my data but no system suitable for developement. So I'll take a break (about a week probably) from grub2 developement. BTW I have also some initial work on i386/linux and i386/efi/linux unification. On Tue, Mar 24, 2009 at 11:58 AM,

Re: unknown command 'boot' with coreboot/grub2

2009-03-27 Thread Vladimir Serbinenko
Have you updated the grub2 completely? (including core.img) On Fri, Mar 27, 2009 at 1:38 PM, Ward Vandewege wrote: > On Fri, Mar 27, 2009 at 12:42:41AM -0400, Pavel Roskin wrote: > > On Tue, 2009-03-24 at 16:07 -0400, Ward Vandewege wrote: > > > I've built grub2 from source (r2045). My modules l

Re: Eliminating nested functions

2009-04-17 Thread Vladimir Serbinenko
On Fri, Apr 17, 2009 at 9:33 PM, Bean wrote: > Hi, > > One of the advantage of nested function is to use local variables. > Without it, we would need to pass them as global variable, or add > custom data pointer in many of the iterate function, which would make > the code a lot uglier IMO. > Do y

Re: status grub2 port of grub-legasy map command

2009-04-17 Thread Vladimir Serbinenko
Thank you for the feedback on my patch. Also I'll add a function to allocation and register map for hook. Also > The preboot hooks patch works beautifully. Don't forget to make cleanup function in case loader fails > However, mmap causes some > sort of glitch that makes FreeDOS (one of my three

Re: [PATCH] xnu

2009-04-17 Thread Vladimir Serbinenko
On Sat, Apr 18, 2009 at 1:22 AM, Joey Korkames > wrote: > I have your whole patch series applied and have been trying to use this to > boot the PureDarwin 9 kernel (on various x86 32 & 64 bit machines): > > menuentry "PureDarwin 9 (phcoder efiemu)" { > #efiemu_loadcore /osstore/STAGE1a/grub

Re: status grub2 port of grub-legasy map command

2009-04-17 Thread Vladimir Serbinenko
On Sat, Apr 18, 2009 at 1:12 AM, John Stanley wrote: > Hi Javier and all, > I could probably have a version of the drivemap completed this weekend as > well, but since I've basically simply adapted your drivempa.patch.8 to > r2106, with little change, I'd be more comfortable going with your new pa

Re: [PATCH] xnu

2009-04-17 Thread Vladimir Serbinenko
> > xnu_kernel /osstore/STAGE2/DARWIN/live/mach_kernel -v -s rd=md0 >> > -v option controls the booter and not the kernel. It's totally ignored by grub which always boots the kernel in verbose mode. In future I'll add a command to load the splash which will switch to splash mode _

Re: status grub2 port of grub-legasy map command

2009-04-17 Thread Vladimir Serbinenko
> > we tell it not to touch the 640K-1M area? > On most machines this range is in ROM and VGA buffer so FreeDOS doesn't touch it anyway > > -- > -- Lazy, Oblivious, Rational Disaster -- Habbit > > ___ > Grub-devel mailing list > Grub-devel@gnu.org > http

[PATCH] bless command

2009-04-18 Thread Vladimir Serbinenko
Hello, due to request by ams I wrote this. It's an analog of "bless" command available under OSX rewritten using grub2 fs functions and according to apple specification of hfs+ on-disk format. This command only update the blessed folder on a partition it doesn't change which drive is used for booti

Re: [PATCH] bless command

2009-04-18 Thread Vladimir Serbinenko
Sorry, forgot to attach the file On Sat, Apr 18, 2009 at 8:59 PM, Vladimir Serbinenko wrote: > Hello, due to request by ams I wrote this. It's an analog of "bless" > command available under OSX rewritten using grub2 fs functions and according > to apple specification of h

Re: [PATCH] bless command

2009-04-19 Thread Vladimir Serbinenko
4-bit VSDB volume id: 0x0F87F7680B9C5211 > im81:~ pxw$ > > Now it just needs to bless the file in order to boot from grub.efi on Apple > EFI > > hfspbless > > This would be VERY useful, making grub.efi boot possible on Apple Mac > without needing Mac OSX or refit. >

Re: [PATCH] bless command

2009-04-19 Thread Vladimir Serbinenko
e. I've seen that genisoimage can create iso+hfs disks. Is anybody interested in writing corresponding script? > > > On Sun, Apr 19, 2009 at 8:50 PM, Vladimir Serbinenko wrote: > >> Hello, thank you for the testing. Two concepts together (system folder and >> system fil

Re: Eliminating nested functions

2009-04-19 Thread Vladimir Serbinenko
In my opinion a far better way would be to add an additional void * argument which is passed unchanged to the hook. Like: struct local { ... }; main_func () { struct local locvars; grub_*_iterate (arg1,arg2,arg3, &locvars); } hook (arg1, arg2, arg3, voidparg) { struct local *locvars = (struc

Re: Idea: Move kernel to upper memory

2009-04-19 Thread Vladimir Serbinenko
Hello, I resurrect this thread because of the recent developement in preboot, mmap and drivemap this subject becomes very actual On Fri, Aug 29, 2008 at 1:15 PM, Bean wrote: > Hi, > > The traditional memory is quite small, and is used by real mode apps. > By moving grub2 kernel to upper memory,

Re: [PATCH] bless command

2009-04-19 Thread Vladimir Serbinenko
Hello > Do you mean run grub-emu as part of a linux installation to bless grub.ef? > It seems to leave the problem of booting the linux installer, which is easy > to do from grub.efi - if it is blessed. > At present we install grub.efi manually, using only grub-mkimage to build > grub.efi, without

[PATCH] gptsync

2009-04-19 Thread Vladimir Serbinenko
Hello, this is a common way to boot non GPT-aware OS on GPT systems. For this protective MBR is replaced by a so-called hybrid mbr where first partition entry is a protective entry and the rest contains legal partitions. So here is the syntax: gptsync DISK [PARTITIONSPEC1] [PARTITIONSPEC2] [PARTITI

Re: [PATCH] gptsync

2009-04-20 Thread Vladimir Serbinenko
, I would like to try it. > > On Mon, Apr 20, 2009 at 9:17 AM, Vladimir Serbinenko wrote: > >> Hello, this is a common way to boot non GPT-aware OS on GPT systems. For >> this protective MBR is replaced by a so-called hybrid mbr where first >> partition entry is a protecti

Re: [PATCH] bless command

2009-04-20 Thread Vladimir Serbinenko
On Mon, Apr 20, 2009 at 11:17 AM, Peter Cros wrote: > Hi, > > On Mon, Apr 20, 2009 at 6:05 AM, Vladimir Serbinenko wrote: > >> Hello >> >>> >>> You can use the bootable CD of your favourite distro. I hope that >> grub2.efi will become a default

Re: Booting to .iso? - Possible with GRUB4DOS - Please add this support to GRUB2

2009-04-20 Thread Vladimir Serbinenko
Usefulness of this is limited to situation where payload uses bios calls which are quite few (dos and dos based tools, some booters). You can't boot a modern OS this way: it will fail the millisecond OS switches to its own drivers. Additionally to do such thing you need to leave kernel in memory. L

Re: [PATCH]: grub: Partitions can start at zero.

2009-04-20 Thread Vladimir Serbinenko
On Mon, Apr 20, 2009 at 2:30 AM, David Miller wrote: > > With Sun partitions, individual partitions can start at disk > address zero. That's right, zero. > > This works because UFS and EXT{2,3,4} superblocks are offset > far enough into the partition that it won't overwrite the > disk label nor

Re: Booting to .iso? - Possible with GRUB4DOS - Please add this support to GRUB2

2009-04-20 Thread Vladimir Serbinenko
/caspar) on this system you don't need any additional command. Just load kernel from loopback > This only works if specifically supported by > some iso, it will not work to boot isos in general. > > On Mon, Apr 20, 2009 at 6:52 PM, Vladimir Serbinenko > wrote: > > Usef

Framebuffer/vbe separation

2009-04-20 Thread Vladimir Serbinenko
Hello, currently vbe module contains all the framebuffer functions which are actually adapter-independent and I think more adapters can be implementing by providing a function which sets mode and framebuffer. Additionally it provides an interface to retrieve framebuffer address for loaders: check t

Re: [PATCH] gptsync

2009-04-21 Thread Vladimir Serbinenko
On Tue, Apr 21, 2009 at 1:29 PM, Peter Cros wrote: > Hi, > > I have been playing with grub gptsync, on apple intel mac with GUID > partitioned 8 GB usb stick, 8 partitions. #1 is the standard fat32 EFI > system part for macs. > > I am comparing with the gptsync utility from linux, or rEFIt gptsyn

Re: [PATCH] FreeBSD 64-bit kernel support

2009-04-21 Thread Vladimir Serbinenko
__ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > > diff --git a/ChangeLog b/ChangeLog index ca0ab43..bd1776b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,40 @@ +2009-04-21 Bean Vladimir Serbinenko + + FreeBSD 64-bit support + + *

Re: [PATCH] gptsync

2009-04-21 Thread Vladimir Serbinenko
partition and is required for some tools including grub2 itself to recognise gpt disk as such. About compatibiliy: hybrid MBR is against specifications - it's a trick to boot legacy OS. So the only compatibility you can speak about is the ability to boot a legacy OS of your choice. > > >

Re: [PATCH] gptsync

2009-04-21 Thread Vladimir Serbinenko
HFS autodetect added. With changelog this time. Should already be suitable for inclusion On Wed, Apr 22, 2009 at 12:03 AM, Vladimir Serbinenko wrote: > > > On Tue, Apr 21, 2009 at 9:49 PM, Isaac Dupree < > m...@isaac.cedarswampstudios.org> wrote: > >> Peter Cros wrot

Re: Grub2 SVN on 64bit Xserve 2,1

2009-04-23 Thread Vladimir Serbinenko
You need to transform the code which switches to i386 into a trampoline in i386/efi/linux.c and i386/linux.c. I have no time to do it now. However I attach 2 patches with this mail which should help you. Apply only one of them (each of them tries a quick hack in a different way). On Thu, Apr 23, 2

Re: [PATCH] xnu

2009-04-24 Thread Vladimir Serbinenko
big? (full /System/Library/Extensions) - yes, box will > reboot before kernel turnover Can you give more info about it > > # ^^if ramdisk is invalid, like FBSD, will attempt NFSMOUNT (to > nowhere) - else, tries /sbin/launchd > } > > Thanks > -joey > > Vl

Re: [PATCH] parttool

2009-04-25 Thread Vladimir Serbinenko
committed On Fri, Apr 17, 2009 at 1:12 PM, phcoder wrote: > Thank you for the testing > >> Please remove one space after "list". >> > done > >> >> I've tested the command quickly. A few notes. >> >> We need a command to list the partition table, as "ls" doesn't show the >> partition types. >> >

Re: [PATCH] Test command

2009-04-25 Thread Vladimir Serbinenko
commited On Thu, Apr 16, 2009 at 3:15 PM, phcoder wrote: > BTW, I think you can simplify test_parse. For example, you write "if (*argn >> + 2 < argc ...)" many times, but it should be possible to test this >> condition only once per loop. >> > Optimised. Perhaps compiler optimised this anyway bu

Re: [PATCH] Split #2: parser/reader separation

2009-04-25 Thread Vladimir Serbinenko
Hello. Could you say how it influences the size of kernel and also write a changlog? I looked at it and it seems to be ok but I'm not sure that I haven't missed few files between moved functions. I haven't tested the patch yet On Wed, Apr 22, 2009 at 7:47 AM, Bean wrote: > Hi, > > ping ? > > On

[PATCH 3/3] keccak: Disable acceleration with SSE asm

2024-05-16 Thread Vladimir Serbinenko
--- grub-core/lib/libgcrypt/cipher/keccak.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/lib/libgcrypt/cipher/keccak.c b/grub-core/lib/libgcrypt/cipher/keccak.c index 11e64b3e7..8b570263b 100644 --- a/grub-core/lib/libgcrypt/cipher/keccak.c +++ b/grub-core/lib/lib

[PATCH 2/3] Adjust import script, definitions and API users for libgcrypt 1.10

2024-05-16 Thread Vladimir Serbinenko
--- autogen.sh | 1 + conf/Makefile.common | 4 +- grub-core/Makefile.core.def| 36 +- grub-core/commands/hashsum.c | 2 +- grub-core/commands/legacycfg.c | 6 +- grub-core/commands/pgp.c

[PATCH] bfs: Fix improper free() on non-existing files

2024-05-16 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/fs/bfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/fs/bfs.c b/grub-core/fs/bfs.c index 07cb3e3ac..9bc478ce8 100644 --- a/grub-core/fs/bfs.c +++ b/grub-core/fs/bfs.c @@ -808,7 +808,7 @@ find_file (const char

[PATCH] Add --noefistub option for linux

2024-05-16 Thread Vladimir Serbinenko
In some cases like loading kernel from native disk (e.g. nvme) not supported by EFI in question efi stub is not an option. Allow user to disable efi stub and fallback to older protocol --- grub-core/loader/efi/linux.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gr

[PATCH] Implement NVMe native disk support

2024-05-16 Thread Vladimir Serbinenko
This is useful 2-fold: 1) On coreboot port it allows to boot from NVMe devices 2) On older systems you can install NVMe via PCIe adapter and boot from it Signed-off-by: Vladimir Serbinenko --- grub-core/Makefile.core.def | 6 + grub-core/commands/nativedisk.c | 3 +- grub-core/disk

[PATCH 2/2] Support qcow in grub-fstest

2024-05-16 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- util/grub-fstest.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/util/grub-fstest.c b/util/grub-fstest.c index 7ff9037b8..3c4fa26c6 100644 --- a/util/grub-fstest.c +++ b/util/grub-fstest.c @@ -383,12 +383,14 @@ static int

[PATCH 1/2] Support qcow disks in GRUB

2024-05-16 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- Makefile.util.def | 1 + grub-core/Makefile.core.def | 6 + grub-core/commands/nativedisk.c | 1 + grub-core/disk/qcow.c | 464 include/grub/disk.h | 1 + 5 files changed, 473

[PATCH] Add Fedora-specific font paths

2024-05-16 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 84a202c6e..c76a29af4 100644 --- a/configure.ac +++ b/configure.ac @@ -1847,7 +1847,7 @@ if test "x$with_dejavufont" = x; then

[PATCH] Add convenience TARGET_CROSS

2024-05-16 Thread Vladimir Serbinenko
This allows to set up cross environment with just 3 parameters: target, platform and TARGET_CROSS Signed-off-by: Vladimir Serbinenko --- configure.ac | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 84a202c6e..cacbdb6ef 100644

[PATCH] Add missing cast in compile-time byteswaps

2024-05-16 Thread Vladimir Serbinenko
Without them 0x80LL is 32-bit byte-swapped to 0x8000 instead of correct 0x8000 Signed-off-by: Vladimir Serbinenko --- include/grub/types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/grub/types.h b/include/grub/types.h index 064066e2e

[PATCH] Mark vdev_zaps_v2 and head_errlog as supported

2024-05-16 Thread Vladimir Serbinenko
We don't need any actual adjustments as we don't use the affected structures Signed-off-by: Vladimir Serbinenko --- grub-core/fs/zfs/zfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/grub-core/fs/zfs/zfs.c b/grub-core/fs/zfs/zfs.c index b5453e006..dbe4ea503 100644 --- a/gr

[PATCH 1/3] Add grub_font_get_no_fallback

2024-05-16 Thread Vladimir Serbinenko
This allows the caller to handle the fallback Signed-off-by: Vladimir Serbinenko --- grub-core/font/font.c | 21 - include/grub/font.h | 2 ++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/grub-core/font/font.c b/grub-core/font/font.c index 18de52562

[PATCH 2/3] gfxmenu: Add missing error handling

2024-05-16 Thread Vladimir Serbinenko
We don't currently handle errors from gfxterm Signed-off-by: Vladimir Serbinenko --- grub-core/gfxmenu/view.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grub-core/gfxmenu/view.c b/grub-core/gfxmenu/view.c index e02eba8b0..19d3f2f14 100644 --- a/grub-core/gf

[PATCH 3/3] Improve font fallback scanning and validation for gfxterm

2024-05-16 Thread Vladimir Serbinenko
Choosing a font which is too large breaks gfxterm. Be more diligent in font choice. This being said it's better to specify the correct font explicitly in config when several fonts are loaded. Signed-off-by: Vladimir Serbinenko --- grub-core/gfxmenu/view.c | 7 + grub-core/term/gfxt

[PATCH 1/3] Decrease minimal gfxterm size to 10x6

2024-05-16 Thread Vladimir Serbinenko
10x6 is still marginally usable. Erroring out may leave user without any console Signed-off-by: Vladimir Serbinenko --- grub-core/term/gfxterm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/grub-core/term/gfxterm.c b/grub-core/term/gfxterm.c index addad5ee2

[PATCH 2/3] Don't attempt to do terminal functions on non-functional gfxterm

2024-05-16 Thread Vladimir Serbinenko
Attempting to do anything easily leads to a crash Signed-off-by: Vladimir Serbinenko --- grub-core/term/gfxterm.c | 12 1 file changed, 12 insertions(+) diff --git a/grub-core/term/gfxterm.c b/grub-core/term/gfxterm.c index e8734a388..6513a529b 100644 --- a/grub-core/term

[PATCH 3/3] grub_unicode_destroy_glyph: Don't destroy NULL glyph

2024-05-16 Thread Vladimir Serbinenko
This is more in-line with free() behaviour. Signed-off-by: Vladimir Serbinenko --- include/grub/unicode.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/grub/unicode.h b/include/grub/unicode.h index 9360b0b97..9a3a1d02a 100644 --- a/include/grub/unicode.h +++ b/include/grub

[PATCH 1/2] zfs: Support zstd compression

2024-05-16 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/Makefile.core.def | 1 + grub-core/fs/zfs/zfs.c | 32 include/grub/zfs/zio.h | 1 + 3 files changed, 34 insertions(+) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index

[PATCH 2/2] Add test for zfs zstd

2024-05-16 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- tests/util/grub-fs-tester.in | 2 +- tests/zfs_test.in| 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in index ea8b2d1f6..f0451ecd9 100644 --- a/tests/util/grub-fs

[PATCH] Implement fmap support as used by coreboot

2024-05-16 Thread Vladimir Serbinenko
This patch limits itself to fmap coming from booted coreboot, not as used in images. Signed-off-by: Vladimir Serbinenko --- grub-core/Makefile.core.def | 7 ++ grub-core/partmap/fmap.c| 172 2 files changed, 179 insertions(+) create mode 100644 grub

[PATCH] Add commands for reading and writing raw bytes to CMOS

2024-05-16 Thread Vladimir Serbinenko
With some coreboot configs setting a byte to a magic value changes behaviour on next boot. Setting bit-by-bit is possible but not convenient. Add cmosread and cmoswrite for convenience. Signed-off-by: Vladimir Serbinenko --- grub-core/commands/i386/cmostest.c | 72

[PATCH vRESEND] Support openbsd disklabels embed in GPT

2024-05-17 Thread Vladimir Serbinenko
Add support for bsdlabel as it's used by OpenBSD on GPT-partirioned hard drive. Signed-off-by: Vladimir Serbinenko --- grub-core/partmap/bsdlabel.c | 80 +++- include/grub/gpt_partition.h | 7 2 files changed, 76 insertions(+), 11 deletions(-) diff --

[PATCH v2 3/4] Do NULL memory quirk workaround only when explicitly requested

2024-05-17 Thread Vladimir Serbinenko
It's only needed for DragonFlyBSD and breaks OpenBSD bsd.mp variant Signed-off-by: Vladimir Serbinenko --- grub-core/loader/i386/bsd.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c index 58b9

[PATCH v2 1/4] smbios: Export grub_smbios_get_eps3 function

2024-05-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/commands/smbios.c | 2 +- include/grub/smbios.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/grub-core/commands/smbios.c b/grub-core/commands/smbios.c index 1a9086ddd..8d9b2e548 100644 --- a/grub-core/commands

[PATCH vRESEND] relocator: Switch to own page table while moving chunks on x86-64

2024-05-17 Thread Vladimir Serbinenko
We need to avoid clobering existing table between starting of chunk movers and the moment we install target page table. Generate temporary table for this rather than hoping that we don't clober existing one. Fixes 64-bit GhostBSD on 64-bit EFI Signed-off-by: Vladimir Serbinenko --- grub

[PATCH v2 4/4] loader/bsd: Add missing zeros

2024-05-17 Thread Vladimir Serbinenko
kern_end is 64-bit and so we need to add this additional zero. entry is unused and is explicitly zero in own FreeBSD bootloader Signed-off-by: Vladimir Serbinenko --- grub-core/loader/i386/bsd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/grub-core/loader/i386/bsd.c

[PATCH v2 2/4] loader/bsd: Improve loading of *BSD on EFI platforms

2024-05-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/loader/i386/bsd.c | 515 +++- include/grub/i386/freebsd_linker.h | 39 +++ include/grub/i386/netbsd_bootinfo.h | 12 +- include/grub/i386/openbsd_bootarg.h | 24 ++ 4 files changed, 495 insertions(+), 95

[PATCH vRESEND 1/4] Add "noescape" argument to cmdline creation

2024-05-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/lib/cmdline.c | 40 ++- grub-core/loader/arm/linux.c | 4 +-- grub-core/loader/arm64/xen_boot.c | 4 +-- grub-core/loader/efi/linux.c | 4 +-- grub-core/loader/i3

[PATCH vRESEND] Improve cbfs detection

2024-05-17 Thread Vladimir Serbinenko
With FMAP and non-continuous SPI old way of reading CBFS pointer is no longer reliable. Hence use new lbio tags to detect the correct cbfs layout Signed-off-by: Vladimir Serbinenko --- grub-core/fs/cbfs.c | 131 --- include/grub/coreboot/lbio.h | 25

[PATCH vRESEND 3/4] loader/xen: Add --noescape option.

2024-05-17 Thread Vladimir Serbinenko
--- grub-core/loader/i386/xen.c | 43 +++-- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/grub-core/loader/i386/xen.c b/grub-core/loader/i386/xen.c index d24ef151b..12d920294 100644 --- a/grub-core/loader/i386/xen.c +++ b/grub-core/loader/i386/xen.

[PATCH vRESEND 2/4] loader/multiboot: Add --noescape option

2024-05-17 Thread Vladimir Serbinenko
This is needed to boot Solaris/Illumos on some boot paths that need quotes. Signed-off-by: Vladimir Serbinenko --- grub-core/loader/i386/multiboot_mbi.c | 13 grub-core/loader/multiboot.c | 46 --- grub-core/loader/multiboot_mbi2.c | 12

[PATCH vRESEND 4/4] 10_illumos: Use --noescape so that $ZFS_BOOTFS is passed properly

2024-05-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- util/grub.d/10_illumos.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/grub.d/10_illumos.in b/util/grub.d/10_illumos.in index a133e1b3f..5649e441f 100644 --- a/util/grub.d/10_illumos.in +++ b/util/grub.d/10_illumos.in @@ -47,7

[PATCH vRESEND] MULTIBOOT: Fix handling of errors in broken aout-kludge

2024-05-17 Thread Vladimir Serbinenko
Current code in some codepaths neither discards nor reports errors. Properly surface the error While on it split 2 cases of unrelated variables both named err. Signed-off-by: Vladimir Serbinenko --- grub-core/loader/i386/multiboot_mbi.c | 9 ++--- 1 file changed, 6 insertions(+), 3

[PATCH v3 4/5] Add DSA and RSA SEXP tests

2024-05-24 Thread Vladimir Serbinenko
--- grub-core/tests/dsa_sexp_test.c | 107 grub-core/tests/rsa_sexp_test.c | 81 2 files changed, 188 insertions(+) create mode 100644 grub-core/tests/dsa_sexp_test.c create mode 100644 grub-core/tests/rsa_sexp_test.c diff --git a/grub-

[PATCH v3 5/5] keccak: Disable acceleration with SSE asm

2024-05-24 Thread Vladimir Serbinenko
/02_keccak_sse.diff new file mode 100644 index 0..980ebb2b7 --- /dev/null +++ b/grub-core/lib/libgcrypt-patches/02_keccak_sse.diff @@ -0,0 +1,19 @@ +commit b0cf06271da5fe20360953a53a47c69da89669cd +Author: Vladimir Serbinenko +Date: Sun Apr 7 06:33:11 2024 +0300 + +keccak: Disable acceleration with SSE

[PATCH v3 3/5] Adjust import script, definitions and API users for libgcrypt 1.10

2024-05-24 Thread Vladimir Serbinenko
--- autogen.sh | 5 + conf/Makefile.common | 4 +- grub-core/Makefile.core.def| 36 ++- grub-core/commands/hashsum.c | 2 +- grub-core/commands/legacycfg.c | 6 +- grub-core/commands/pgp.c

[PATCH v3 2/5] Import b64dec from gpg-error

2024-05-24 Thread Vladimir Serbinenko
--- grub-core/lib/b64dec.c | 293 + 1 file changed, 293 insertions(+) create mode 100644 grub-core/lib/b64dec.c diff --git a/grub-core/lib/b64dec.c b/grub-core/lib/b64dec.c new file mode 100644 index 0..8aafa9700 --- /dev/null +++ b/grub-core/lib/b

[PATCH 2/2] zfs: Add test for zfs zstd

2024-06-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- tests/util/grub-fs-tester.in | 2 +- tests/zfs_test.in| 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in index df5dc7542..5690665d0 100644 --- a/tests/util/grub-fs

[PATCH 1/2] zfs: Support zstd compression

2024-06-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/Makefile.core.def | 1 + grub-core/fs/zfs/zfs.c | 35 +++ include/grub/zfs/zio.h | 1 + 3 files changed, 37 insertions(+) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index

[PATCH] Add --noefistub option for linux

2024-06-17 Thread Vladimir Serbinenko
In some cases like loading kernel from native disk (e.g. nvme) not supported by EFI in question efi stub is not an option. Allow user to disable efi stub and fallback to older protocol Signed-off-by: Vladimir Serbinenko --- grub-core/loader/efi/linux.c | 10 +- 1 file changed, 9

[PATCH v3] Add --noefistub option for linux

2024-06-17 Thread Vladimir Serbinenko
In some cases like loading kernel from native disk (e.g. nvme) not supported by EFI in question efi stub is not an option. Allow user to disable efi stub and fallback to older protocol Signed-off-by: Vladimir Serbinenko --- grub-core/loader/efi/linux.c | 10 +- 1 file changed, 9

[PATCH 2/2] emu/linux: Fix determination of program name

2024-06-17 Thread Vladimir Serbinenko
Current code works only if package matches binary name transformation rules. It's often true but is no waz guaranteed Fixes bug #64410 Signed-off-by: Vladimir Serbinenko --- grub-core/loader/emu/linux.c | 3 ++- include/grub/emu/misc.h | 2 +- 2 files changed, 3 insertions(+), 2 dele

[PATCH 1/2] cryptodisk: Fix translatable message

2024-06-17 Thread Vladimir Serbinenko
Fixes bug #64408. Signed-off-by: Vladimir Serbinenko --- grub-core/disk/cryptodisk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c index f98acade6..5e1eb2743 100644 --- a/grub-core/disk/cryptodisk.c +++ b/grub

[PATCH] getroot: Unmark 2 strings for translation

2024-06-17 Thread Vladimir Serbinenko
First they're use macros so they can't be translated as-is. Second there is no point in translating them as they're too technical. Signed-off-by: Vladimir Serbinenko --- grub-core/osdep/devmapper/getroot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/

[PATCH 2/2] date_unit_test: test dates outside of 32-bit unix range

2024-08-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- tests/date_unit_test.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/tests/date_unit_test.c b/tests/date_unit_test.c index 99774f199..a42801936 100644 --- a/tests/date_unit_test.c +++ b/tests

[PATCH 1/2] datetime: Support dates outside of 1901..2038 range

2024-08-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/lib/datetime.c | 31 --- include/grub/datetime.h | 15 +++ 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/grub-core/lib/datetime.c b/grub-core/lib/datetime.c index 9120128ca..9badd53dd

[PATCH v2 1/2] datetime: Support dates outside of 1901..2038 range

2024-08-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- grub-core/lib/datetime.c | 31 --- include/grub/datetime.h | 15 +++ 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/grub-core/lib/datetime.c b/grub-core/lib/datetime.c index 9120128ca..e4bdc5c4f

[PATCH v2 2/2] date_unit_test: test dates outside of 32-bit unix range

2024-08-17 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- tests/date_unit_test.c | 35 ++- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/tests/date_unit_test.c b/tests/date_unit_test.c index 99774f199..a489fc3d8 100644 --- a/tests/date_unit_test.c +++ b/tests

[PATCH 2/6] erofs: Replace 64-bit modulo with bitwise operations

2024-09-01 Thread Vladimir Serbinenko
Otherwise depending on compiler we end up with umoddi3 reference and failed module dependency resolution Signed-off-by: Vladimir Serbinenko --- grub-core/fs/erofs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/fs/erofs.c b/grub-core/fs/erofs.c index

[PATCH 3/6] xzembed: Silence warning when no BCJ is available

2024-09-01 Thread Vladimir Serbinenko
BCJ is not available for all platforms hence arguments may end up unused Signed-off-by: Vladimir Serbinenko --- grub-core/lib/xzembed/xz_dec_bcj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/lib/xzembed/xz_dec_bcj.c b/grub-core/lib/xzembed/xz_dec_bcj.c index

[PATCH 1/6] configure: Look for .otf fonts

2024-09-01 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d4a14bf93..fe5493246 100644 --- a/configure.ac +++ b/configure.ac @@ -1875,7 +1875,7 @@ AC_ARG_WITH([unifont], if test "x$with_unifont

[PATCH 4/6] configure: Add -mno-gpopt option

2024-09-01 Thread Vladimir Serbinenko
Without it compiler generates GPREL16 references which do not work with our memory layout Signed-off-by: Vladimir Serbinenko --- configure.ac | 12 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index fe5493246..c3d9398ab 100644 --- a/configure.ac +++ b

[PATCH 5/6] mkimage: Fix section_align for Loongson

2024-09-01 Thread Vladimir Serbinenko
Correct value has been 4 fromthe beginning but it started mattering only recently whether because of compiler or because of code reshuffling --- util/mkimage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/mkimage.c b/util/mkimage.c index 8c5660825..d77399778 100644 ---

[PATCH 6/6] gentpl: Put startup_raw.S into beginning of the image

2024-09-01 Thread Vladimir Serbinenko
Otherwise it breaks the decompressors for mips platforms Signed-off-by: Vladimir Serbinenko --- gentpl.py | 4 ++-- grub-core/Makefile.core.def | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gentpl.py b/gentpl.py index 3b12eca6c..d8c6965d8 100644

[PATCH v4 2/5] Import b64dec from gpg-error

2024-09-02 Thread Vladimir Serbinenko
Base on libgpg-error 1.49 but with modifications to make it compile in GRUB environment Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 293 + 1 file changed, 293 insertions(+) create mode 100644 grub-core/lib/b64dec.c diff --git a/grub

[PATCH v4 4/5] Add DSA and RSA SEXP tests

2024-09-02 Thread Vladimir Serbinenko
This allows us to test purely the integration of the implementation of DSA and RSA from libgcrypt without concerning with additional code. Signed-off-by: Vladimir Serbinenko --- grub-core/tests/dsa_sexp_test.c | 125 grub-core/tests/rsa_sexp_test.c | 99

[PATCH v4 3/5] Adjust import script, definitions and API users for libgcrypt 1.10

2024-09-02 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- autogen.sh | 5 + conf/Makefile.common| 4 +- grub-core/Makefile.core.def | 36 ++- grub-core/commands/hashsum.c| 2 +- grub-core/commands/legacycfg.c

[PATCH v4 5/5] keccak: Disable acceleration with SSE asm

2024-09-02 Thread Vladimir Serbinenko
Libgcrypt code assumes that on x64 all SSE registers are fair game. While it's true that CPUs in question support it, we disable it in our compilation options. Disable the offending optimization. Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/02_keccak_sse.patch

[PATCH v5 2/5] Import b64dec from gpg-error

2024-09-03 Thread Vladimir Serbinenko
Base on libgpg-error 1.49 but with modifications to make it compile in GRUB environment Signed-off-by: Vladimir Serbinenko --- grub-core/lib/b64dec.c | 293 + 1 file changed, 293 insertions(+) create mode 100644 grub-core/lib/b64dec.c diff --git a/grub

[PATCH v5 3/5] Adjust import script, definitions and API users for libgcrypt 1.10

2024-09-03 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- autogen.sh | 5 + conf/Makefile.common| 4 +- grub-core/Makefile.core.def | 36 ++- grub-core/commands/hashsum.c| 2 +- grub-core/commands/legacycfg.c

[PATCH v5 4/5] Add DSA and RSA SEXP tests

2024-09-03 Thread Vladimir Serbinenko
This allows us to test purely the integration of the implementation of DSA and RSA from libgcrypt without concerning with additional code. Signed-off-by: Vladimir Serbinenko --- grub-core/tests/dsa_sexp_test.c | 125 grub-core/tests/rsa_sexp_test.c | 99

[PATCH v5 5/5] keccak: Disable acceleration with SSE asm

2024-09-03 Thread Vladimir Serbinenko
Libgcrypt code assumes that on x64 all SSE registers are fair game. While it's true that CPUs in question support it, we disable it in our compilation options. Disable the offending optimization. Signed-off-by: Vladimir Serbinenko --- .../lib/libgcrypt-patches/02_keccak_sse.patch

[PATCH v2 2/7] erofs: Replace 64-bit modulo with bitwise operations

2024-09-03 Thread Vladimir Serbinenko
Otherwise depending on compiler we end up with umoddi3 reference and failed module dependency resolution Signed-off-by: Vladimir Serbinenko --- grub-core/fs/erofs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grub-core/fs/erofs.c b/grub-core/fs/erofs.c index

[PATCH v2 1/7] configure: Look for .otf fonts

2024-09-03 Thread Vladimir Serbinenko
Signed-off-by: Vladimir Serbinenko --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d4a14bf93..fe5493246 100644 --- a/configure.ac +++ b/configure.ac @@ -1875,7 +1875,7 @@ AC_ARG_WITH([unifont], if test "x$with_unifont

[PATCH v2 7/7] mkimage: Explicitly move modules to __bss_start

2024-09-03 Thread Vladimir Serbinenko
Assembly code looks for modules at __bss_start. Make this position explicit rather than matching bss alignment and module alignment. Signed-off-by: Vladimir Serbinenko --- util/grub-mkimagexx.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/util/grub-mkimagexx.c b/util

[PATCH v2 4/7] configure: Add -mno-gpopt option

2024-09-03 Thread Vladimir Serbinenko
Without it compiler generates GPREL16 references which do not work with our memory layout Signed-off-by: Vladimir Serbinenko --- configure.ac | 12 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index fe5493246..c3d9398ab 100644 --- a/configure.ac +++ b

[PATCH v2 6/7] offsets: Set mod_align to 4 on mips

2024-09-03 Thread Vladimir Serbinenko
Module structure has natural alignment of 4. Respect it explicitly rather than relying on the fact that _end is usually aligned Signed-off-by: Vladimir Serbinenko --- include/grub/offsets.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/grub/offsets.h b

[PATCH v2 3/7] xzembed: Silence warning when no BCJ is available

2024-09-03 Thread Vladimir Serbinenko
BCJ is not available for all platforms hence arguments may end up unused Signed-off-by: Vladimir Serbinenko --- grub-core/lib/xzembed/xz_dec_bcj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/lib/xzembed/xz_dec_bcj.c b/grub-core/lib/xzembed/xz_dec_bcj.c index

[PATCH v2 5/7] gentpl: Put startup_raw.S into beginning of the image

2024-09-03 Thread Vladimir Serbinenko
Otherwise it breaks the decompressors for mips platforms Signed-off-by: Vladimir Serbinenko --- gentpl.py | 4 ++-- grub-core/Makefile.core.def | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gentpl.py b/gentpl.py index 3b12eca6c..d8c6965d8 100644

  1   2   >