From patchwork Mon Jul 4 17:45:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christopher Harvey X-Patchwork-Id: 103149 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 69EA1B6F54 for ; Tue, 5 Jul 2011 03:45:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2B111280B5; Mon, 4 Jul 2011 19:45:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TMBaxzyarSld; Mon, 4 Jul 2011 19:45:45 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DE281280A0; Mon, 4 Jul 2011 19:45:44 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7CBEF28077 for ; Mon, 4 Jul 2011 19:45:43 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2TUga64HDdCr for ; Mon, 4 Jul 2011 19:45:43 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mtxmxout2.matrox.com (mtxmxout2.matrox.com [138.11.2.92]) by theia.denx.de (Postfix) with ESMTP id 0D930280A0 for ; Mon, 4 Jul 2011 19:45:40 +0200 (CEST) Received: from venus.matrox.com (venus.matrox.com [192.168.1.30]) by mtxmxout2.matrox.com (Postfix) with ESMTP id 8C4ED852D for ; Mon, 4 Jul 2011 13:45:37 -0400 (EDT) Received: (from ssmsp@localhost) by venus.matrox.com (8.14.4/8.13.2) id p64HjbD2008201 for u-boot@lists.denx.de; Mon, 4 Jul 2011 13:45:37 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by venus.matrox.com (Postfix) with ESMTP id DFCBDF4DCC for ; Mon, 4 Jul 2011 13:45:36 -0400 (EDT) X-Virus-MTX-Scanned: by Matrox Virus scanner at venus.matrox.com Received: from pluton.matrox.com (pluton.matrox.com [192.168.8.7]) by venus.matrox.com (Postfix) with ESMTP id BF81FF4DC0 for ; Mon, 4 Jul 2011 13:45:36 -0400 (EDT) Received: from harvey-pc.matrox.com (dyn-152-116.matrox.com [192.168.152.116]) by pluton.matrox.com (Postfix) with ESMTP id B3CF67F45A for ; Mon, 4 Jul 2011 13:45:36 -0400 (EDT) Date: Mon, 4 Jul 2011 13:45:41 -0400 From: Christopher Harvey To: u-boot@lists.denx.de Message-ID: <20110704174541.GF3016@harvey-pc.matrox.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: [U-Boot] [PATCH 5/5] Warn when the machine ID isn't passed to an ARM kernel and u-boot is compiled in debug mode. The kernel cannot boot without it. X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Christopher Harvey --- arch/arm/lib/board.c | 4 ++++ arch/arm/lib/bootm.c | 6 ++++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 169dfeb..dbb835a 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -404,6 +404,10 @@ void board_init_f (ulong bootflag) post_bootmode_init(); post_run (NULL, POST_ROM | post_bootmode_get(0)); #endif + /* 0xffffffff is used to mark is value as "unset". + Hopefully there will never be this many machines. + Can't use 0 since 0 is already used as a mach-type. */ + gd->bd->bi_arch_number = 0xffffffff; gd->bd->bi_baudrate = gd->baudrate; /* Ram ist board specific, so move it to board code ... */ diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 802e833..70b3b76 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -113,6 +113,12 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) printf ("Using machid 0x%x from environment\n", machid); } +#ifdef DEBUG + if(machid==0xffffffff) { + debug("\nWarning: machid not set! Linux will not finish booting.\n\n"); + } +#endif + show_boot_progress (15); #ifdef CONFIG_OF_LIBFDT