From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] PXE support for grub2
Date: Sat, 2 Aug 2008 12:48:28 +0200 [thread overview]
Message-ID: <20080802104828.GA11358@thorin> (raw)
In-Reply-To: <ca0f59980807300950t5e155c9dw29ab517bab9bdab0@mail.gmail.com>
On Thu, Jul 31, 2008 at 12:50:22AM +0800, Bean wrote:
> +#if 1
> +#define GRUB_PXE_BOOTP_DHCPVEND 1024 /* DHCP extended vendor field size */
> +#else
> +#define GRUB_PXE_BOOTP_DHCPVEND 312 /* DHCP standard vendor field size */
> +#endif
A comment would be helpful to explain the 'if 1' option.
> --- a/kern/i386/pc/init.c
> +++ b/kern/i386/pc/init.c
> @@ -71,14 +71,19 @@ make_install_device (void)
> if (grub_root_drive == 0xFF)
> grub_root_drive = grub_boot_drive;
>
> - grub_sprintf (dev, "(%cd%u", (grub_root_drive & 0x80) ? 'h' : 'f',
> - grub_root_drive & 0x7f);
> + if (grub_root_drive == 0x7F)
> + grub_strcpy (dev, "(pxe");
> + else
> + {
> + grub_sprintf (dev, "(%cd%u", (grub_root_drive & 0x80) ? 'h' : 'f',
> + grub_root_drive & 0x7f);
>
> - if (grub_install_dos_part >= 0)
> - grub_sprintf (dev + grub_strlen (dev), ",%u", grub_install_dos_part + 1);
> + if (grub_install_dos_part >= 0)
> + grub_sprintf (dev + grub_strlen (dev), ",%u", grub_install_dos_part + 1);
>
> - if (grub_install_bsd_part >= 0)
> - grub_sprintf (dev + grub_strlen (dev), ",%c", grub_install_bsd_part + 'a');
> + if (grub_install_bsd_part >= 0)
> + grub_sprintf (dev + grub_strlen (dev), ",%c", grub_install_bsd_part + 'a');
> + }
>
> grub_sprintf (dev + grub_strlen (dev), ")%s", grub_prefix);
> grub_strcpy (grub_prefix, dev);
Can we avoid this? I wish make_install_device() was reduced and eventually
disappeared.
Since we already know at install time that the boot drive will be 0x7f, why not
just set the drive via grub-mkimage --prefix?
> --- a/kern/i386/pc/startup.S
> +++ b/kern/i386/pc/startup.S
> @@ -2053,3 +2053,102 @@ FUNCTION(grub_vbe_bios_set_palette_data)
> popl %ebx
> popl %ebp
> ret
> +
> +
> +pxe_rm_entry:
> + .long 0
> +
> +/*
> + * struct grub_pxenv *grub_pxe_scan (void);
> + */
> +FUNCTION(grub_pxe_scan)
Could these go in a module? If they're only used by disk/i386/pc/pxe.c,
maybe they could be merged with that?
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
next prev parent reply other threads:[~2008-08-02 10:49 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-30 16:50 [PATCH] PXE support for grub2 Bean
2008-08-01 3:46 ` Bean
2008-08-01 3:52 ` Pavel Roskin
2008-08-01 11:32 ` Robert Millan
2008-08-01 16:21 ` Pavel Roskin
2008-08-01 16:59 ` Bean
2008-08-02 4:34 ` Bean
2008-08-02 10:48 ` Robert Millan [this message]
2008-08-02 11:20 ` Bean
2008-08-02 11:49 ` Robert Millan
2008-08-04 21:08 ` Marco Gerards
2008-08-05 3:36 ` Bean
2008-08-05 8:16 ` Marco Gerards
2008-08-05 15:15 ` Bean
2008-08-06 6:18 ` Bean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080802104828.GA11358@thorin \
--to=rmh@aybabtu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.