diff mbox

[09/34] x86: Allow to override the ROOT_DEV variable

Message ID 20110411150820.GA22004@sepie.suse.cz (mailing list archive)
State New, archived
Headers show

Commit Message

Michal Marek April 11, 2011, 3:08 p.m. UTC
On Wed, Apr 06, 2011 at 09:47:44AM +0200, Michal Marek wrote:
> On 5.4.2011 17:30, H. Peter Anvin wrote:
> >> --- a/arch/x86/boot/Makefile
> >> +++ b/arch/x86/boot/Makefile
> >> @@ -13,7 +13,7 @@
> >>  # This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
> >>  # the default of FLOPPY is used by 'build'.
> >>  
> >> -ROOT_DEV	:= CURRENT
> >> +ROOT_DEV	?= CURRENT
> >>  
> >>  # If you want to preset the SVGA mode, uncomment the next line and
> >>  # set SVGA_MODE to whatever number you want.
> > 
> > Is this a good thing?  As far as I understand ?= it may mean picking
> > something up from the outside environment.
> > 
> > Since ROOT_DEV has been obsolete for 15 years or more, this would seem
> > to be a needless new error mode.
> 
> So can we just set the default root device to (0, 0)?

Like this?

Subject: [PATCH] x86: Do not set the rood_dev field in bzImage

This has been obsoleted by the root= commandline for several years.
People who still depend on this will surely have a copy of the rdev
command around, the rest of the world gets rid of another piece of
buildhost-dependent data in the build.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
 arch/x86/boot/Makefile |    9 +--------
 1 files changed, 1 insertions(+), 8 deletions(-)

Comments

Valdis Kl ē tnieks April 12, 2011, 3:25 a.m. UTC | #1
On Mon, 11 Apr 2011 17:08:21 +0200, Michal Marek said:

> Like this?

> Subject: [PATCH] x86: Do not set the rood_dev field in bzImage

'rood'? ;)

> -# ROOT_DEV specifies the default root-device when making the image.
> -# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
> -# the default of FLOPPY is used by 'build'.

Does the default of FLOPPY still get used after this patch, or is this a stale comment?
Also, I sort of expected to see more code removed that *used* the no-longer-passed
value of ROOT_DEV.

(All my boxes have grub pass a root=, so I don't have a dog in this fight...)
H. Peter Anvin April 12, 2011, 3:39 a.m. UTC | #2
On 04/11/2011 08:08 AM, Michal Marek wrote:
>
> Like this?
>
> Subject: [PATCH] x86: Do not set the rood_dev field in bzImage
>
> This has been obsoleted by the root= commandline for several years.
> People who still depend on this will surely have a copy of the rdev
> command around, the rest of the world gets rid of another piece of
> buildhost-dependent data in the build.
>

Works for me.  "Several years" is even kind of an understatement ;)

	-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Paul Bolle April 12, 2011, 7:11 a.m. UTC | #3
On Mon, 2011-04-11 at 23:25 -0400, Valdis.Kletnieks@vt.edu wrote:

> Does the default of FLOPPY still get used after this patch, or is this a stale comment?

It looks like a stale comment to me. The default currently actually is
0, 0 (major, minor). I'm not sure "FLOPPY" even works. Is
'stat("FLOPPY", ...)' legal?

> Also, I sort of expected to see more code removed that *used* the no-longer-passed
> value of ROOT_DEV.

That's what I expect too. See my addendum to Michal's patch in the
message I sent a few hours ago.


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index f7cb086..95365a8 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -9,12 +9,6 @@ 
 # Changed by many, many contributors over the years.
 #
 
-# ROOT_DEV specifies the default root-device when making the image.
-# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
-# the default of FLOPPY is used by 'build'.
-
-ROOT_DEV	:= CURRENT
-
 # If you want to preset the SVGA mode, uncomment the next line and
 # set SVGA_MODE to whatever number you want.
 # Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
@@ -75,8 +69,7 @@  GCOV_PROFILE := n
 $(obj)/bzImage: asflags-y  := $(SVGA_MODE)
 
 quiet_cmd_image = BUILD   $@
-cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin \
-	$(ROOT_DEV) > $@
+cmd_image = $(obj)/tools/build $(obj)/setup.bin $(obj)/vmlinux.bin > $@
 
 $(obj)/bzImage: $(obj)/setup.bin $(obj)/vmlinux.bin $(obj)/tools/build FORCE
 	$(call if_changed,image)