From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754423AbcAHJD0 (ORCPT ); Fri, 8 Jan 2016 04:03:26 -0500 Received: from mail-lf0-f45.google.com ([209.85.215.45]:33105 "EHLO mail-lf0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754368AbcAHJDN convert rfc822-to-8bit (ORCPT ); Fri, 8 Jan 2016 04:03:13 -0500 Date: Fri, 8 Jan 2016 12:28:00 +0300 From: Antony Pavlov To: Alban Bedel Cc: linux-mips@linux-mips.org, Ralf Baechle , Alex Smith , Wu Zhangjin , Andrew Bresticker , linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] MIPS: ath79: Add zboot debug serial support Message-Id: <20160108122800.fd116b9c2f74c72be9ac4d05@gmail.com> In-Reply-To: <1449741444-29110-3-git-send-email-albeu@free.fr> References: <1449741444-29110-1-git-send-email-albeu@free.fr> <1449741444-29110-3-git-send-email-albeu@free.fr> X-Mailer: Sylpheed 3.5.0beta3 (GTK+ 2.24.25; i586-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 10 Dec 2015 10:57:22 +0100 Alban Bedel wrote: > Reuse the early printk code to support the serial in zboot. We copy > early_printk.c instead of referencing it because we need to build a > different object file for the normal kernel and zboot. > > Signed-off-by: Alban Bedel > --- > arch/mips/Kconfig | 2 +- > arch/mips/boot/compressed/Makefile | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig > index ef1d665..bb2987b 100644 > --- a/arch/mips/Kconfig > +++ b/arch/mips/Kconfig > @@ -138,7 +138,7 @@ config ATH79 > select SYS_SUPPORTS_32BIT_KERNEL > select SYS_SUPPORTS_BIG_ENDIAN > select SYS_SUPPORTS_MIPS16 > - select SYS_SUPPORTS_ZBOOT > + select SYS_SUPPORTS_ZBOOT_UART_PROM > select USE_OF > help > Support for the Atheros AR71XX/AR724X/AR913X SoCs. > diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile > index 4eff1ef..f648bf7 100644 > --- a/arch/mips/boot/compressed/Makefile > +++ b/arch/mips/boot/compressed/Makefile > @@ -37,8 +37,12 @@ vmlinuzobjs-$(CONFIG_DEBUG_ZBOOT) += $(obj)/dbg.o > vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj)/uart-16550.o > vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM) += $(obj)/uart-prom.o > vmlinuzobjs-$(CONFIG_MIPS_ALCHEMY) += $(obj)/uart-alchemy.o > +vmlinuzobjs-$(CONFIG_ATH79) += $(obj)/uart-ath79.o > endif > > +$(obj)/uart-ath79.c: $(srctree)/arch/mips/ath79/early_printk.c > + $(call cmd,shipped) > + > vmlinuzobjs-$(CONFIG_KERNEL_XZ) += $(obj)/ashldi3.o > > $(obj)/ashldi3.o: KBUILD_CFLAGS += -I$(srctree)/arch/mips/lib > -- > 2.0.0 > This patch has a side effect: git untracked file arch/mips/boot/compressed/uart-ath79.c after build. This untracked file is not removed by 'make mrproper'. Here is my build log: $ git clone -b ath79 https://github.com/AlbanBedel/linux ... $ cd linux linux$ make ARCH=mips ath79_defconfig ... linux$ grep -w CONFIG_DEBUG_ZBOOT .config # CONFIG_DEBUG_ZBOOT is not set linux$ sed -i "s/^# \(CONFIG_DEBUG_ZBOOT\) .*$/\1=y/" .config linux$ make ARCH=mips oldconfig linux$ grep -w CONFIG_DEBUG_ZBOOT .config CONFIG_DEBUG_ZBOOT=y linux$ git status On branch ath79 Your branch is up-to-date with 'origin/ath79'. nothing to commit, working directory clean linux$ make -s ARCH=mips CROSS_COMPILE=mips-linux-gnu- vmlinuz ... linux$ git status On branch ath79 Your branch is up-to-date with 'origin/ath79'. Untracked files: (use "git add ..." to include in what will be committed) arch/mips/boot/compressed/uart-ath79.c nothing added to commit but untracked files present (use "git add" to track) linux$ make ARCH=mips mrproper ... linux$ git status On branch ath79 Your branch is up-to-date with 'origin/ath79'. Untracked files: (use "git add ..." to include in what will be committed) arch/mips/boot/compressed/uart-ath79.c nothing added to commit but untracked files present (use "git add" to track) --  Best regards,   Antony Pavlov