All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Etienne Lorrain <etienne_lorrain@yahoo.fr>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Compressed ia32 ELF file generation for loading by Gujin 1/3
Date: Mon, 05 Feb 2007 16:37:43 -0800	[thread overview]
Message-ID: <45C7CDD7.20806@zytor.com> (raw)
In-Reply-To: <522909.27613.qm@web26909.mail.ukl.yahoo.com>

First of all, if sending attached patches, *MAKE SURE* they're text/plain.

> diff -uprN -X linux-2.6.20/Documentation/dontdiff linux-2.6.20/arch/i386/kernel/setup.c linux-2.6.20-gujin/arch/i386/kernel/setup.c
> --- linux-2.6.20/arch/i386/kernel/setup.c       2007-02-04 18:44:54.000000000 +0000
> +++ linux-2.6.20-gujin/arch/i386/kernel/setup.c 2007-02-05 21:27:01.000000000 +0000
> @@ -579,6 +579,19 @@ void __init setup_arch(char **cmdline_p)
>         strlcpy(command_line, saved_command_line, COMMAND_LINE_SIZE);
>         *cmdline_p = command_line;
> 
> +       /*
> +        * If the command line begin with '/', it is the filename of the
> +        * kernel file - like a shell command line. That can be used to
> +        * deduce where root was located when the kernel was compiled,
> +        * inside a directory of root named /boot, inside a small partition
> +        * mounted on a directory of root named /boot or in the root
> +        * directory itself.
> +        */
> +       if (**cmdline_p == '/')
> +               while (**cmdline_p != ' ' && **cmdline_p != '\t'
> +                       && **cmdline_p != '\n' && **cmdline_p != '\0')
> +                       ++*cmdline_p;
> +
>         max_low_pfn = setup_memory();
> 
>         /*

The standard way to do this is to have a command line argument named 
BOOT_IMAGE (as in BOOT_IMAGE=/foo/bar/baz).  There is no reason to do 
this differently from every other bootloader.

Why build the real-mode code as part of the kernel binary?  If you have 
to reference kernel symbols, you can do that with the -R option to ld. 
Bundling it into the kernel binary just to then extract it later is 
silly at best.

> @@ -1106,6 +1179,9 @@ help:
>         @echo  'Other generic targets:'
>         @echo  '  all             - Build all targets marked with [*]'
>         @echo  '* vmlinux         - Build the bare kernel'
> +       @echo  "  /boot/linux-$(KERNELRELEASE).kgz - create a boot kernel for the Gujin bootloader"
> +       @echo  '  /boot/linux.kgz ROOT=/dev/hda1   - do not autodetect root filesystem at boot time'
> +       @echo  '  /boot/linux.kgz ROOT=auto        - root filesystem from current /proc/cmdline'
>         @echo  '* modules         - Build all modules'
>         @echo  '  modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
>         @echo  '  dir/            - Build all files in dir and below'

This doesn't exactly fit very well the standard pattern.  Something like 
  make gujin TARGET=... would be more like it.

Given how many of your files are highly Gujin-specific, and have generic 
names, please put them in a subdirectory (e.g. arch/i386/boot/gujin/).

	-hpa

  reply	other threads:[~2007-02-06  0:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-05 23:56 [PATCH] Compressed ia32 ELF file generation for loading by Gujin 1/3 Etienne Lorrain
2007-02-06  0:37 ` H. Peter Anvin [this message]
2007-02-06  5:25   ` Vivek Goyal
2007-02-06  6:16     ` H. Peter Anvin
2007-02-06  6:33       ` Vivek Goyal
2007-02-06  6:38         ` H. Peter Anvin
2007-02-06  6:51           ` Vivek Goyal
2007-02-06  7:24             ` Eric W. Biederman
2007-02-06 15:50               ` H. Peter Anvin

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=45C7CDD7.20806@zytor.com \
    --to=hpa@zytor.com \
    --cc=etienne_lorrain@yahoo.fr \
    --cc=linux-kernel@vger.kernel.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.