Re: [PATCH -queue 2/2] MIPS: Cleanup the debugging of compressed kernel support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2010-01-26 at 11:51 +0100, Ralf Baechle wrote:
[...]
> >  
> > +config DEBUG_ZBOOT
> > +	bool "Enable compressed kernel support debugging"
> > +	depends on SYS_SUPPORTS_ZBOOT_UART16550
> 
> This should probably depend on DEBUG_KERNEL also.
> 

ok, will add it.

[...]
> > diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
> > index 91a57a6..68e5db8 100644
> > --- a/arch/mips/boot/compressed/Makefile
> > +++ b/arch/mips/boot/compressed/Makefile
> > @@ -32,7 +32,9 @@ KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
> >  
> >  obj-y := $(obj)/head.o $(obj)/decompress.o $(obj)/dbg.o
> >  
> > +ifdef CONFIG_DEBUG_ZBOOT
> >  obj-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
> > +endif
> 
> DEBUG_ZBOOT already depends on SYS_SUPPORTS_ZBOOT_UART16550 so this can be
> simplified into just obj-$(CONFIG_DEBUG_ZBOOT) and no ifdef.
> 

Yes, currently, we can simplify it, but the ifdef can make people be
easier to add new debugging supports, for example:

ifdef CONFIG_DEBUG_ZBOOT
obj-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o
+obj-$(CONFIG_SYS_SUPPORTS_ZBOOT_UARTXXXX) += $(obj)/uart-xxxx.o
+obj-$(CONFIG_SYS_SUPPORTS_ZBOOT_VGA) += $(obj)/vga.o
endif

otherwise, we need:

obj-$(CONFIG_SYS_SUPPORTS_ZBOOT) += $(obj)/uart-16550.o  \ 
                                    $(obj)/uart-xxxx.o \
                                    $(obj)/vga.o

and then wrap the $(obj)/uart-16550.c, $(obj)/uart-xxxx.c, $(obj)/vga.c
internally with related ifdefs.

So, which method we choose?

Best Regards,
	Wu Zhangjin



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux