Re: [PATCH] add clear screen command

2009-04-09 Thread phcoder

Carlos Roberto do Nascimento Costa wrote:

Hello phcoder. thank you for reviewing this patch.

You're welcome


phcoder wrote:

Perhaps putting it into normal.mod instead of separate module is a good
idea


When I did this patch, I was thinking: clear is a command like ls, lspci,
reboot, sleep, suspend, halt, exit, etc... so, clear needs to be at commands/
dir and follows the same ideas behind other commands.

Is there any reason to not follows this idea?

With your patch the created elf contains much more overhead then code. 
While it isn't really a problem it's still a thing about which some 
thinking is needed

Best regards,




--

Regards
Vladimir 'phcoder' Serbinenko


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: no commit allowed under discussion

2009-04-09 Thread Peter Cros
Hi,
It will be good to get this resolved and on SVN grub2 so people
(ubuntuforums) can build for Apple efi with the latest 'hacks'
(fakebios, loadbios etc) found necessary in testing. Particlarly
Xserve which requires efi boot.


On 4/7/09, Bean bean12...@gmail.com wrote:
 On Tue, Apr 7, 2009 at 8:37 AM, Yoshinori K. Okuji ok...@enbug.org wrote:
 On Tuesday 07 April 2009 01:43:17 Bean wrote:
 On Sat, Apr 4, 2009 at 8:53 PM, Bean bean12...@gmail.com wrote:
  On Sat, Apr 4, 2009 at 5:30 PM, Yoshinori K. Okuji ok...@enbug.org
 wrote:
  I've undone r2063, since we're still discussing how to / not to split
  modules. Bean, you must respect teamwork. If you are unable to follow
  such a fundamental rule, I will have to disable your permission.
 
  Hi,
 
  I thought the previous mail is about replacing grub_printf with
  grub_dprint, I'm ok with that. This patch has been in mail list for
  sometime, it is essential to get a working display in intel macs.

 Hi,

 How about this patch ? The split is necessary as it introduces new
 command loadbios and fakebios that uses the fake_bios_data function,
 and it would be ugly to put them all inside linux.c.

 Do you have any strong reason to make loadbios and fakebios separate? I
 think
 the overhead is negligible.

 Hi,

 loadbios and fakebios are sort of like hacks for the efi platform, I
 think they shouldn't be placed in the linux loader. Also, by moving
 the platform dependent code out, we can merge it with i386 generic
 loader loader/i386/linux.c.

 --
 Bean


 ___
 Grub-devel mailing list
 Grub-devel@gnu.org
 http://lists.gnu.org/mailman/listinfo/grub-devel



-- 
Cros (pxw)


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH]: grub: Fix ieee1275 call block typing.

2009-04-09 Thread David Miller
From: David Miller da...@davemloft.net
Date: Tue, 07 Apr 2009 17:03:26 -0700 (PDT)

 2009-04-07  David S. Miller  da...@davemloft.net
 
   * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
   slots are of type grub_ieee1275_cell_t.
   (grub_nand_read): Likewise.
   * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
   IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
   macros are used to compare values in arg/ret block of the call.
   (grub_ieee1275_finddevice, grub_ieee1275_get_property,
   grub_ieee1275_next_property, grub_ieee1275_get_property_length,
   grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
   grub_ieee1275_instance_to_path, grub_ieee1275_write,
   grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
   grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
   grub_ieee1275_close, grub_ieee1275_set_property,
   grub_ieee1275_set_color): All ieee1275 call arg slots are of type
   grub_ieee1275_cell_t.
   * kern/ieee1275/openfw.c (grub_map): Likewise.
   * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
   grub_ieee1275_phandle_t): Define as grub_unit32_t type.

Ping?  I'm touching non-sparc code so at least one review would
be appreciated before I check this in.


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH]: grub: Fix type of 'actual' size arguments to ieee1275 interfaces.

2009-04-09 Thread David Miller
From: David Miller da...@davemloft.net
Date: Tue, 07 Apr 2009 17:03:27 -0700 (PDT)

 The 'actual' argument to various ieee1275 functions is of type
 grub_ssize_t but several spots were erroneously using int.
 
 This happens to work on powerpc but does not on sparc64.
 
 2009-04-07  David S. Miller  da...@davemloft.net
 
   * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
   * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
   (grub_devalias_iterate): Likewise.

Ping?  Review appreciated, thanks!


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH]: grub: Fix ieee1275 call block typing.

2009-04-09 Thread David Miller
From: Manoel Rebelo Abranches mrab...@linux.vnet.ibm.com
Date: Thu, 09 Apr 2009 18:42:08 -0300

 At first it seems ok. I'll test it in the weekend ok?

Thanks!  Let me know how it goes.



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH]: grub: Fix type of 'actual' size arguments to ieee1275 interfaces.

2009-04-09 Thread Manoel Rebelo Abranches
This patch is ok. it shouldn't be int.

On Thu, 2009-04-09 at 14:05 -0700, David Miller wrote:
 From: David Miller da...@davemloft.net
 Date: Tue, 07 Apr 2009 17:03:27 -0700 (PDT)
 
  The 'actual' argument to various ieee1275 functions is of type
  grub_ssize_t but several spots were erroneously using int.
  
  This happens to work on powerpc but does not on sparc64.
  
  2009-04-07  David S. Miller  da...@davemloft.net
  
  * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
  * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
  (grub_devalias_iterate): Likewise.
 
 Ping?  Review appreciated, thanks!
 
 
 ___
 Grub-devel mailing list
 Grub-devel@gnu.org
 http://lists.gnu.org/mailman/listinfo/grub-devel
-- 
Best Regards,

Manoel Rebelo Abranches 
IBM Linux Technology Center Brazil



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB2 - Please add support for 64-bit FreeBSD

2009-04-09 Thread Joey Korkames

phcoder writes:

Hello, could you do a research and tell me which binary format does 
bsd64 use, the handoff CPU and the arguments on the stack?


*planes fly over my head*

Does this help?
http://svn.freebsd.org/viewvc/base?view=revisionrevision=114379

I got that from looking over the svn log for FBSD-HEAD:/boot/loader:
http://svn.freebsd.org/viewvc/base/head/sys/boot/i386/loader/main.c?view=log 


Gosh, I wish there was a git mirror of freebsd-base...

-joey


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB2 - Please add support for 64-bit FreeBSD

2009-04-09 Thread phcoder

You can use git with svn backend.
Your info helps, I'll have a look at the issue. Depending on how much 
work is needed it may be desirable to copy the code from bsd loader. as 
it's under bsd-licence it's gpl-compatible. Could just the maintainers 
confirm that it's ok to include some chunks of this code? Alternatively 
it may be that actually it needs only minor adjustments to the load code

Joey Korkames wrote:

phcoder writes:

Hello, could you do a research and tell me which binary format does 
bsd64 use, the handoff CPU and the arguments on the stack?


*planes fly over my head*

Does this help?
http://svn.freebsd.org/viewvc/base?view=revisionrevision=114379

I got that from looking over the svn log for FBSD-HEAD:/boot/loader:
http://svn.freebsd.org/viewvc/base/head/sys/boot/i386/loader/main.c?view=log 


Gosh, I wish there was a git mirror of freebsd-base...

-joey


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel



--

Regards
Vladimir 'phcoder' Serbinenko


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: no commit allowed under discussion

2009-04-09 Thread Yoshinori K. Okuji
On Tuesday 07 April 2009 14:25:53 Bean wrote:
 On Tue, Apr 7, 2009 at 8:37 AM, Yoshinori K. Okuji ok...@enbug.org wrote:
  On Tuesday 07 April 2009 01:43:17 Bean wrote:
  On Sat, Apr 4, 2009 at 8:53 PM, Bean bean12...@gmail.com wrote:
   On Sat, Apr 4, 2009 at 5:30 PM, Yoshinori K. Okuji ok...@enbug.org
 
  wrote:
   I've undone r2063, since we're still discussing how to / not to split
   modules. Bean, you must respect teamwork. If you are unable to follow
   such a fundamental rule, I will have to disable your permission.
  
   Hi,
  
   I thought the previous mail is about replacing grub_printf with
   grub_dprint, I'm ok with that. This patch has been in mail list for
   sometime, it is essential to get a working display in intel macs.
 
  Hi,
 
  How about this patch ? The split is necessary as it introduces new
  command loadbios and fakebios that uses the fake_bios_data function,
  and it would be ugly to put them all inside linux.c.
 
  Do you have any strong reason to make loadbios and fakebios separate? I
  think the overhead is negligible.

 Hi,

 loadbios and fakebios are sort of like hacks for the efi platform, I
 think they shouldn't be placed in the linux loader. Also, by moving
 the platform dependent code out, we can merge it with i386 generic
 loader loader/i386/linux.c.

I reviewed your patch again, and I confirmed that it was good. Thanks.

Regards,
Okuji


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB2 - Please add support for 64-bit FreeBSD

2009-04-09 Thread Joey Korkames
I can test any patches with FBSD6/7/i386/amd64/pxe/xen/etc. I don't have a 
grub-gdb setup yet, but I probably should build one anyways.


Building a git-svn mirror of fbsd-base would be resource intensive to say 
the least ;-) (It has been done on a few private systems)


joey

 phcoder writes:


You can use git with svn backend.
Your info helps, I'll have a look at the issue. Depending on how much 
work is needed it may be desirable to copy the code from bsd loader. as 
it's under bsd-licence it's gpl-compatible. Could just the maintainers 
confirm that it's ok to include some chunks of this code? Alternatively 
it may be that actually it needs only minor adjustments to the load code

Joey Korkames wrote:

phcoder writes:

Hello, could you do a research and tell me which binary format does 
bsd64 use, the handoff CPU and the arguments on the stack?


*planes fly over my head*

Does this help?
http://svn.freebsd.org/viewvc/base?view=revisionrevision=114379

I got that from looking over the svn log for FBSD-HEAD:/boot/loader:
http://svn.freebsd.org/viewvc/base/head/sys/boot/i386/loader/main.c?view=log 


Gosh, I wish there was a git mirror of freebsd-base...





___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: stat for FreeBSD

2009-04-09 Thread Yoshinori K. Okuji
On Wednesday 08 April 2009 23:32:18 Andrey Shuvikov wrote:
 --- On Mon, 4/6/09, Yoshinori K. Okuji ok...@enbug.org wrote:
  From: Yoshinori K. Okuji ok...@enbug.org
  Subject: Re: stat for FreeBSD
  To: The development of GRUB 2 grub-devel@gnu.org
  Date: Monday, April 6, 2009, 8:35 PM
  On Tuesday 07 April 2009 00:48:37
 
  Andrey Shuvikov wrote:
   Here is the patch against the latest revision to make
 
  grub-probe working on
 
   FreeBSD. It includes this ioctl call, FreeBSD device
 
  names parsing, and
 
   accounts for the fact that disk drives are character
 
  devices under FreeBSD.
 
  Do you have an account on Savannah? I can have you to check
  it in yourself. ;)
 
  Regards,
  Okuji

 No I don't have an account. I was just trying to compile Grub2 under
 FreeBSD. :-)

Ok, but if you are willing to maintain the FreeBSD port, I think it would be 
convenient for you to have an account, otherwise you will have to wait for 
someone else to pick up your patch and check it in instead of you all the 
time. It's up to you.

Regards,
Okuji


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB2 - Please add support for 64-bit FreeBSD

2009-04-09 Thread Yoshinori K. Okuji
On Friday 10 April 2009 08:20:26 phcoder wrote:
 Your info helps, I'll have a look at the issue. Depending on how much
 work is needed it may be desirable to copy the code from bsd loader. as
 it's under bsd-licence it's gpl-compatible. Could just the maintainers
 confirm that it's ok to include some chunks of this code?

Not quite preferrable, but still acceptable. If feasible, please steal only 
ideas.

Regards,
Okuji


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] Split of normal mode (version 2)

2009-04-09 Thread Yoshinori K. Okuji
On Tuesday 07 April 2009 01:39:23 Bean wrote:
 Hi,

 This is another update of the patch.

 1, Now completion.c is in menu.mod, and menu_viewer.c is in misc.mod,
 the reason for the switch is to allow configfile to depend on misc.mod
 only.

I think the name misc.mod is ugly. Can you think about a better name?

 2, Auto generate handler.lst file, which contain module information
 for handlers. normal.mod uses it to register commands to set active
 handler, for example:

 parser.sh
 menu_viewer.text
 terminal_output.gfxterm

Great.

 3, configfile now support an optional parameter to specify the script
 engine, for example:

 configfile /aa.cfg sh

 When configfile returns, the script engine would be restored to the
 previous value. This is useful for switching script engine. For
 example, you can parse a file in another language, then switch back to
 sh for the rest of grub.cfg.

I object to the syntax, but not to the idea. configfile is GRUB-specific, so 
it might be acceptable. But IIRC the underlying function is shared 
with source, right? In Bourne Shell, source FILE ARG means that the file 
FILE is executed with a positional argument ARG. So it is not intuitive to 
specify a parser this way.

I proposed using a shebang some days ago. Was it so bad?

 4, normal.mod set the default parser and menu viewer before parsing
 grub.cfg: parser.sh
 menu_viewer.text


Regards,
Okuji


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB2 - Please add support for 64-bit FreeBSD

2009-04-09 Thread Chip Panarchy
Hello

Thanks everyone for your replies.

I know for a fact that FreeBSD 32-bit can work with GRUB2
(http://forums.freebsd.org/showthread.php?t=3194page=2).

I have asked Djn (I'd created a topic asking how to install FreeBSD
onto Logical Partitions, and he had worked out how to do so... with
32-bit, but couldn't work out 64-bit, which is why I am here) to reply
to this mailing list, either through me, or personally.

In the meantime, hopefully that forum topic will answer some of your questions.

I will investigate the FreeBSD bootloader, and see what sections may
be ported to GRUB2.

Thanks for all antecedent  subsequent replies,

Chip D. Panarchy

On Fri, Apr 10, 2009 at 9:39 AM, Yoshinori K. Okuji ok...@enbug.org wrote:
 On Friday 10 April 2009 08:20:26 phcoder wrote:
 Your info helps, I'll have a look at the issue. Depending on how much
 work is needed it may be desirable to copy the code from bsd loader. as
 it's under bsd-licence it's gpl-compatible. Could just the maintainers
 confirm that it's ok to include some chunks of this code?

 Not quite preferrable, but still acceptable. If feasible, please steal only
 ideas.

 Regards,
 Okuji


 ___
 Grub-devel mailing list
 Grub-devel@gnu.org
 http://lists.gnu.org/mailman/listinfo/grub-devel



___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: stat for FreeBSD

2009-04-09 Thread Andrey Shuvikov

--- On Thu, 4/9/09, Yoshinori K. Okuji ok...@enbug.org wrote:
 From: Yoshinori K. Okuji ok...@enbug.org
 Subject: Re: stat for FreeBSD
 To: The development of GRUB 2 grub-devel@gnu.org
 Date: Thursday, April 9, 2009, 7:31 PM
 On Wednesday 08 April 2009 23:32:18
 Andrey Shuvikov wrote:
  --- On Mon, 4/6/09, Yoshinori K. Okuji ok...@enbug.org
 wrote:
   From: Yoshinori K. Okuji ok...@enbug.org
   Subject: Re: stat for FreeBSD
   To: The development of GRUB 2 grub-devel@gnu.org
   Date: Monday, April 6, 2009, 8:35 PM
   On Tuesday 07 April 2009 00:48:37
  
   Andrey Shuvikov wrote:
Here is the patch against the latest
 revision to make
  
   grub-probe working on
  
FreeBSD. It includes this ioctl call,
 FreeBSD device
  
   names parsing, and
  
accounts for the fact that disk drives are
 character
  
   devices under FreeBSD.
  
   Do you have an account on Savannah? I can have
 you to check
   it in yourself. ;)
  
   Regards,
   Okuji
 
  No I don't have an account. I was just trying to
 compile Grub2 under
  FreeBSD. :-)
 
 Ok, but if you are willing to maintain the FreeBSD port, I
 think it would be 
 convenient for you to have an account, otherwise you will
 have to wait for 
 someone else to pick up your patch and check it in instead
 of you all the 
 time. It's up to you.
 

I'm an expert in neither FreeBSD nor Grub, I just wanted to dual-boot FreeBSD 
to play with it. :-) And frankly I don't know how much time I can devote to it. 
But I can try. I'm on vacation for the next two weeks anyway and if nobody 
picks up the patch until then I can check it in myself. What's involved in 
creating an account?

Thanks,
Andrey


  


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: GRUB2 - Please add support for 64-bit FreeBSD

2009-04-09 Thread Bean
On Fri, Apr 10, 2009 at 8:51 AM, Chip Panarchy forumanar...@gmail.com wrote:
 Hello

 Thanks everyone for your replies.

 I know for a fact that FreeBSD 32-bit can work with GRUB2
 (http://forums.freebsd.org/showthread.php?t=3194page=2).

 I have asked Djn (I'd created a topic asking how to install FreeBSD
 onto Logical Partitions, and he had worked out how to do so... with
 32-bit, but couldn't work out 64-bit, which is why I am here) to reply
 to this mailing list, either through me, or personally.

 In the meantime, hopefully that forum topic will answer some of your 
 questions.

 I will investigate the FreeBSD bootloader, and see what sections may
 be ported to GRUB2.

 Thanks for all antecedent  subsequent replies,

 Chip D. Panarchy

Hi,

Please try the btx loader in /boot/loader, which I believe to be
32-bit even in amd64 freebsd. The btx loader is an a.out executable,
grurb2 has supported for it already.

-- 
Bean


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel


Re: [PATCH] Split of normal mode (version 2)

2009-04-09 Thread Bean
On Fri, Apr 10, 2009 at 7:49 AM, Yoshinori K. Okuji ok...@enbug.org wrote:
 On Tuesday 07 April 2009 01:39:23 Bean wrote:
 Hi,

 This is another update of the patch.

 1, Now completion.c is in menu.mod, and menu_viewer.c is in misc.mod,
 the reason for the switch is to allow configfile to depend on misc.mod
 only.

 I think the name misc.mod is ugly. Can you think about a better name?


Hi,

Perhaps lib.mod, or helper.mod ?

 2, Auto generate handler.lst file, which contain module information
 for handlers. normal.mod uses it to register commands to set active
 handler, for example:

 parser.sh
 menu_viewer.text
 terminal_output.gfxterm

 Great.

 3, configfile now support an optional parameter to specify the script
 engine, for example:

 configfile /aa.cfg sh

 When configfile returns, the script engine would be restored to the
 previous value. This is useful for switching script engine. For
 example, you can parse a file in another language, then switch back to
 sh for the rest of grub.cfg.

 I object to the syntax, but not to the idea. configfile is GRUB-specific, so
 it might be acceptable. But IIRC the underlying function is shared
 with source, right? In Bourne Shell, source FILE ARG means that the file
 FILE is executed with a positional argument ARG. So it is not intuitive to
 specify a parser this way.

Yeah, I don't like the syntax either, but we need to find a way to
distinguish between the configfile and source. source operates
on the current environment, while configfile create a new
environment.


 I proposed using a shebang some days ago. Was it so bad?

I like that idea too, but it needs to change grub_file_getline a
little bit as currently it treats lines starting with '#' as comment,
so we don't have a chance to examine the contents behind it.

Perhaps we can combine this with configfile/source. For example, when
it reads a file starts with #!, it automatically switch parser, and
restore back to the original parser on exit. This way, we don't need
to hack the configfile/source command at all.

-- 
Bean


___
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel