Re: [PATCH] fix scripting problems

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
On Sat, May 30, 2009 at 11:50 PM, Pavel Roskin wrote: > On Sat, 2009-05-30 at 23:43 +0200, Vladimir 'phcoder' Serbinenko wrote: >> Hello. This patch fixes a bunch of bugs in scripting engine > > Please give a detailed description of the changes. It fixes the following bugs: -lexer failing if varia

Re: [PATH 13/18] Don't use aliases when compiled with Apple's CC

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
On Sat, May 30, 2009 at 11:48 PM, Pavel Roskin wrote: > On Sat, 2009-05-30 at 17:03 +0200, Vladimir 'phcoder' Serbinenko wrote: >> Apple's toolchain has troubles handling aliases. Disable them when >> Apple's toolchain detected. > > The patch does some other things.  In particular, it introduces >

Re: [PATCH] fix scripting problems

2009-05-30 Thread Pavel Roskin
On Sat, 2009-05-30 at 23:43 +0200, Vladimir 'phcoder' Serbinenko wrote: > Hello. This patch fixes a bunch of bugs in scripting engine Please give a detailed description of the changes. -- Regards, Pavel Roskin ___ Grub-devel mailing list Grub-devel@g

Re: [PATH 13/18] Don't use aliases when compiled with Apple's CC

2009-05-30 Thread Pavel Roskin
On Sat, 2009-05-30 at 17:03 +0200, Vladimir 'phcoder' Serbinenko wrote: > Apple's toolchain has troubles handling aliases. Disable them when > Apple's toolchain detected. The patch does some other things. In particular, it introduces grub_macho2img. > + printf ("Invalid Mach-O fle\n"); I t

[PATCH] fix scripting problems

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Hello. This patch fixes a bunch of bugs in scripting engine -- Regards Vladimir 'phcoder' Serbinenko diff --git a/include/grub/script_sh.h b/include/grub/script_sh.h index 159da62..ab5bf43 100644 --- a/include/grub/script_sh.h +++ b/include/grub/script_sh.h @@ -77,11 +77,6 @@ struct grub_script_c

Re: Fwd: [PATCH] gfxpayload

2009-05-30 Thread Robert Millan
On Sat, May 30, 2009 at 05:23:18PM +0200, Vladimir 'phcoder' Serbinenko wrote: > On Sun, May 17, 2009 at 10:36 PM, Robert Millan wrote: > > > > Hi, > > > > On Sun, May 17, 2009 at 04:34:16PM +0200, Vladimir 'phcoder' Serbinenko > > wrote: > >>  #ifndef GRUB_ASSUME_LINUX_HAS_FB_SUPPORT > >> -#defi

Re: status grub2 port of grub-legasy map command

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
>> > I'm fine with the change from "const void" to "const char", but we need >> > to remove a preceding comment about void labels. >> It's not that I'm opposed to void in principle. Just using the same >> constructions to do the same things in different files makes code >> easier to learn and port

Re: [PATCH] add true and false commands

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
On Wed, May 27, 2009 at 2:16 PM, Felix Zielcke wrote: > Hi, > > here's a simple patch which adds a `true' and a `false' command. > `true' is actually needed by the compatibility code generated by > grub-mkconfig for the terminal. As far as I understand they are useful only in normal mode. Perhaps

Re: [PATCH] RFC: allow compilation without target libc

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Hello. I like this patch On Sat, May 23, 2009 at 1:33 AM, Pavel Roskin wrote: > ChangeLog: > >        * configure.ac: Define GRUB_SOURCE to identify GRUB sources >        in include/multiboot2.h.  Use "-nostdlib" when testing target >        compiler. >        * include/multiboot2.h: Use GRUB type

[PATCH 18/18] Add nop block to workaround a bug in Apple's AS

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
-- Regards Vladimir 'phcoder' Serbinenko diff --git a/kern/i386/pc/startup.S b/kern/i386/pc/startup.S index 6cdc79a..0a2a174 100644 --- a/kern/i386/pc/startup.S +++ b/kern/i386/pc/startup.S @@ -1120,6 +1120,16 @@ FUNCTION(grub_get_mmap_entry) xnosmap: xorl %ecx, %ecx +/* Apple's cc jumps few

[PATCH 17/18] Change '\b' to 8

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
-- Regards Vladimir 'phcoder' Serbinenko diff --git a/include/grub/term.h b/include/grub/term.h index d12d0f0..3251e36 100644 --- a/include/grub/term.h +++ b/include/grub/term.h @@ -31,7 +31,7 @@ #define GRUB_TERM_NPAGE 3 #define GRUB_TERM_ESC '\e' #define GRUB_TERM_TAB '\t' -#define GRUB_TE

[PATCH 16/18] Define asm symbol macros when compiling on Apple's CC

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
-- Regards Vladimir 'phcoder' Serbinenko diff --git a/include/grub/symbol.h b/include/grub/symbol.h index ef19a73..68d9f00 100644 --- a/include/grub/symbol.h +++ b/include/grub/symbol.h @@ -28,7 +28,10 @@ # define EXT_C(sym) sym #endif -#if ! defined (__CYGWIN__) && ! defined (__MINGW32__) +#i

[PATCH 15/18] Disable lnxboot.img when building with Apple's CC

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
-- Regards Vladimir 'phcoder' Serbinenko diff --git a/boot/i386/pc/lnxboot.S b/boot/i386/pc/lnxboot.S index 0db6826..f244fec 100644 --- a/boot/i386/pc/lnxboot.S +++ b/boot/i386/pc/lnxboot.S @@ -24,9 +24,15 @@ #include .file "lnxboot.S" + +#ifdef APPLE_CC +#error Building lnxboot.i

Re: [PATCH 9/18] support small mcmodel when compiling 64-bit

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
On Sat, May 30, 2009 at 4:52 PM, Vladimir 'phcoder' Serbinenko wrote: > This patch allows 64-bit grub2 to be compiled on older cc/gcc although > with limitation that it can't access memory beyond 4-GiB > > -- > Regards > Vladimir 'phcoder' Serbinenko > -- Regards Vladimir 'phcoder' Serbinenko

Re: [PATCH 9/18] support small mcmodel when compiling 64-bit

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
On Sat, May 30, 2009 at 4:52 PM, Vladimir 'phcoder' Serbinenko wrote: > This patch allows 64-bit grub2 to be compiled on older cc/gcc although > with limitation that it can't access memory beyond 4-GiB > > -- > Regards > Vladimir 'phcoder' Serbinenko > -- Regards Vladimir 'phcoder' Serbinenko

[PATH 13/18] Don't use aliases when compiled with Apple's CC

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Apple's toolchain has troubles handling aliases. Disable them when Apple's toolchain detected. -- Regards Vladimir 'phcoder' Serbinenko diff --git a/conf/common.rmk b/conf/common.rmk index 1b9a6cd..1d0427d 100644 --- a/conf/common.rmk +++ b/conf/common.rmk @@ -125,6 +125,16 @@ endif grub_pe2elf_

[PATCH 14/18] Address with 32-bit register in trampolines when compiled with Apple's CC

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Workarounds unsupported feature in Apple's CC. Since trampolines switch to 32-bit mode anyway it should introduce no additional limitation -- Regards Vladimir 'phcoder' Serbinenko diff --git a/loader/i386/linux_trampoline.S b/loader/i386/linux_trampoline.S index eddaaf2..e2cd6ec 100644 --- a/load

[PATCH 12/18] macho2img

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
I found no way to generate a raw image with apple's toolchain so wrote a converter from Mach-O to raw Thanks to Islam M. Ahmed Zaid for pointing me the options to simplify generated Mach-O. -- Regards Vladimir 'phcoder' Serbinenko diff --git a/conf/common.rmk b/conf/common.rmk index 1b9a6cd..1d04

[PATCH 10/18] sections names in Mach-O

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Section names in Mach-O are of form "SEGMENT, SECTION". -- Regards Vladimir 'phcoder' Serbinenko diff --git a/efiemu/runtime/efiemu.c b/efiemu/runtime/efiemu.c index 7118813..189f502 100644 --- a/efiemu/runtime/efiemu.c +++ b/efiemu/runtime/efiemu.c @@ -40,18 +40,23 @@ grub_efi_status_t efiemu_s

[PATCH 11/18] Support objconv

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Apple's CC generates a Mach-O file but grub2 modules need to be ELF. Use objconv (available under GPL from http://www.agner.org/optimize/) to convert. The adjustments needed for objconv have already been incorporated to upstream -- Regards Vladimir 'phcoder' Serbinenko diff --git a/conf/i386-pc.r

[PATCH 9/18] support small mcmodel when compiling 64-bit

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
This patch allows 64-bit grub2 to be compiled on older cc/gcc although with limitation that it can't access memory beyond 4-GiB -- Regards Vladimir 'phcoder' Serbinenko ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listin

[PATCH 8/18] Eliminate nested function in efiemu core

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Instead of adding -fnested-functions to efiemu core compilation I simply removed the only nested functions it had (made it static) -- Regards Vladimir 'phcoder' Serbinenko diff --git a/efiemu/runtime/efiemu.c b/efiemu/runtime/efiemu.c index f73f843..7118813 100644 --- a/efiemu/runtime/efiemu.c +

[PATCH 7/18] Don't clobber ebx/rbx in inline assembly when compiling with Apple's CC

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Unfortunately Apple's CC doesn't accept ebx to be clobbered. This patch makes inline assembly restore ebx -- Regards Vladimir 'phcoder' Serbinenko diff --git a/efiemu/runtime/efiemu.c b/efiemu/runtime/efiemu.c index 5887c48..f73f843 100644 --- a/efiemu/runtime/efiemu.c +++ b/efiemu/runtime/efiemu

Re: [PATCH 5/18] Check if cc is from apple toolchain

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
On Sat, May 30, 2009 at 4:45 PM, Vladimir 'phcoder' Serbinenko wrote: > This patch checks if cc is Apple's version and enables additional > command line arguments if it is > > -- > Regards > Vladimir 'phcoder' Serbinenko > -- Regards Vladimir 'phcoder' Serbinenko diff --git a/Makefile.in b/Mak

Re: [PATCH 3/18] start symbol

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
On Sat, May 30, 2009 at 4:42 PM, Vladimir 'phcoder' Serbinenko wrote: > Start symbol are required in for .S which are compiled to .img to > satisfy the linker in Apple's toolchain (perhaps in other toolchains > too). It shouldn't increase the size of .img > > -- > Regards > Vladimir 'phcoder' Serb

[PATCH 6/18] define asm constant for absolute memory access

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
To access an absolute address you need to do it through a label on Apple's cc -- Regards Vladimir 'phcoder' Serbinenko diff --git a/boot/i386/pc/boot.S b/boot/i386/pc/boot.S index fc31f5a..c22dccd 100644 --- a/boot/i386/pc/boot.S +++ b/boot/i386/pc/boot.S @@ -30,7 +30,11 @@ #define ABS(x) (x-_st

[PATCH 5/18] Check if cc is from apple toolchain

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
This patch checks if cc is Apple's version and enables additional command line arguments if it is -- Regards Vladimir 'phcoder' Serbinenko ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel

[PATCH 4/18] Simplify sed script and make awk script more robust

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
sed on apple's platform is more limited here is workaround. awk needs a check not to make module depend on itself in some cases -- Regards Vladimir 'phcoder' Serbinenko diff --git a/Makefile.in b/Makefile.in index cd79b0b..e00f9c3 100644 --- a/Makefile.in +++ b/Makefile.in @@ -213,7 +213,7 @@ ins

[PATCH 3/18] start symbol

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Start symbol are required in for .S which are compiled to .img to satisfy the linker in Apple's toolchain (perhaps in other toolchains too). It shouldn't increase the size of .img -- Regards Vladimir 'phcoder' Serbinenko ___ Grub-devel mailing list Gr

[PATCH 2/18] Fixes for grub-mkimage for efi

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Fix wrong assumptions -- Regards Vladimir 'phcoder' Serbinenko diff --git a/boot/i386/pc/boot.S b/boot/i386/pc/boot.S index 8056731..9ccfbca 100644 --- a/boot/i386/pc/boot.S +++ b/boot/i386/pc/boot.S @@ -390,11 +390,11 @@ general_error: int $0x18 stop: jmp stop -notification_string: .

[PATCH 1/18] Use more standard .asciz instead of .string

2009-05-30 Thread Vladimir 'phcoder' Serbinenko
Hello. Here begins series of patches to make grub2 compile with apple's toolchain. It's actually just a split of previous patch. As there were no opposition to previous patch I will commit this series soon if nobody opposes -- Regards Vladimir 'phcoder' Serbinenko diff --git a/boot/i386/pc/boot.S