From patchwork Thu Oct 9 00:00:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Ignatov X-Patchwork-Id: 397912 X-Patchwork-Delegate: sbabic@denx.de 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 9249C1400B8 for ; Thu, 9 Oct 2014 15:22:13 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EDF5DA7447; Thu, 9 Oct 2014 06:21:54 +0200 (CEST) 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 3PhI46qnd96M; Thu, 9 Oct 2014 06:21:54 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4E104A7444; Thu, 9 Oct 2014 06:21:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7972BA73E9 for ; Thu, 9 Oct 2014 02:01:31 +0200 (CEST) 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 H-NzM6++XMj4 for ; Thu, 9 Oct 2014 02:01:31 +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 mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by theia.denx.de (Postfix) with ESMTPS id 4056F4B5FA for ; Thu, 9 Oct 2014 02:01:28 +0200 (CEST) Received: by mail-la0-f54.google.com with SMTP id gm9so129821lab.41 for ; Wed, 08 Oct 2014 17:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=FhyVqMxz7i8/DSvxuF5M383xWz+zAtbuBlircrimS8c=; b=exrpC3wLaAKR0h7pt0of0aTAVjTEcNjVndubh/gESBrH+lmSD+zgkU2FHcg6044JSb wTCmvmkZU3CkJnoQcoCaLVF1IQOhd5QXrCgfkx0rVbSVzBmEURktpyVjKtnYZ0slzQg1 pD6bJqXkboO2vQOU0XSXiD8S4GCRp+cuictxTOI15vcUcJTrpVzCLRBqV7KC4HMY8AB6 MHsBH32PB+CEPGDqPm9fVLqFrUUjmoBV79KVqBYMHYuAzmp22kHtAunVLpcv+fH+1mGg 13BpxkoHcFL/4720yMI0Se82bNhbSytMlySGK8FojAI7XjvHYsWFHftyiokz3RXFLuDv XmLg== X-Received: by 10.112.130.4 with SMTP id oa4mr14111412lbb.37.1412812887650; Wed, 08 Oct 2014 17:01:27 -0700 (PDT) Received: from nyapad (128-68-95-71.broadband.corbina.ru. [128.68.95.71]) by mx.google.com with ESMTPSA id eg2sm473685lbb.29.2014.10.08.17.01.25 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Oct 2014 17:01:26 -0700 (PDT) Received: by nyapad (sSMTP sendmail emulation); Thu, 09 Oct 2014 04:00:59 +0400 From: Alexey Ignatov To: u-boot@lists.denx.de Date: Thu, 9 Oct 2014 04:00:57 +0400 Message-Id: <1412812857-8311-1-git-send-email-lexszero@gmail.com> X-Mailer: git-send-email 1.8.5.3 X-Mailman-Approved-At: Thu, 09 Oct 2014 06:21:32 +0200 Cc: Marek Vasut , Alexey Ignatov Subject: [U-Boot] [PATCH v3] ARM: mxs: tools: Add support for boot progress display flag X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de mkimage -T mxs now support new flag in config file: DISPLAYPROGRESS - makes boot process print HTLLC characters for each BootROM instruction. Signed-off-by: Alexey Ignatov --- arch/arm/cpu/arm926ejs/mxs/mxsimage-signed.cfg | 1 + arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg | 1 + arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg | 1 + doc/README.mxsimage | 13 +++++++++---- tools/mxsimage.c | 16 ++++++++++------ tools/mxsimage.h | 5 +++-- 6 files changed, 25 insertions(+), 12 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/mxsimage-signed.cfg b/arch/arm/cpu/arm926ejs/mxs/mxsimage-signed.cfg index 1520bba..83953da 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxsimage-signed.cfg +++ b/arch/arm/cpu/arm926ejs/mxs/mxsimage-signed.cfg @@ -1,3 +1,4 @@ +DISPLAYPROGRESS SECTION 0x0 BOOTABLE TAG LAST LOAD 0x1000 spl/u-boot-spl.bin diff --git a/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg b/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg index 55510e9..e702809 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg +++ b/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg @@ -1,3 +1,4 @@ +DISPLAYPROGRESS SECTION 0x0 BOOTABLE TAG LAST LOAD 0x1000 spl/u-boot-spl.bin diff --git a/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg b/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg index bb78cb0..3f7bf59 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg +++ b/arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg @@ -1,3 +1,4 @@ +DISPLAYPROGRESS SECTION 0x0 BOOTABLE TAG LAST LOAD 0x1000 spl/u-boot-spl.bin diff --git a/doc/README.mxsimage b/doc/README.mxsimage index 0d31cba..c3975ee 100644 --- a/doc/README.mxsimage +++ b/doc/README.mxsimage @@ -27,7 +27,7 @@ These semantics and rules will be outlined now. - Each line of the configuration file contains exactly one instruction. - Every numeric value must be encoded in hexadecimal and in format 0xabcdef12 . - The configuration file is a concatenation of blocks called "sections" and - optionally "DCD blocks" (see below). + optionally "DCD blocks" (see below), and optional flags lines. - Each "section" is started by the "SECTION" instruction. - The "SECTION" instruction has the following semantics: @@ -139,9 +139,14 @@ These semantics and rules will be outlined now. NOOP - This instruction does nothing. -- If the verbose output from the BootROM is enabled, the BootROM will produce a - letter on the Debug UART for each instruction it started processing. Here is a - mapping between the above instructions and the BootROM verbose output: + - An optional flags lines can be one of the following: + + DISPLAYPROGRESS + - Enable boot progress output form the BootROM. + +- If the boot progress output from the BootROM is enabled, the BootROM will + produce a letter on the Debug UART for each instruction it started processing. + Here is a mapping between the above instructions and the BootROM output: H -- SB Image header loaded T -- TAG instruction diff --git a/tools/mxsimage.c b/tools/mxsimage.c index 81c7f2d..ab18041 100644 --- a/tools/mxsimage.c +++ b/tools/mxsimage.c @@ -125,7 +125,7 @@ struct sb_image_ctx { unsigned int in_section:1; unsigned int in_dcd:1; /* Image configuration */ - unsigned int verbose_boot:1; + unsigned int display_progress:1; unsigned int silent_dump:1; char *input_filename; char *output_filename; @@ -1308,8 +1308,7 @@ static int sb_prefill_image_header(struct sb_image_ctx *ictx) sizeof(struct sb_sections_header) / SB_BLOCK_SIZE; hdr->timestamp_us = sb_get_timestamp() * 1000000; - /* FIXME -- add proper config option */ - hdr->flags = ictx->verbose_boot ? SB_IMAGE_FLAG_VERBOSE : 0, + hdr->flags = ictx->display_progress ? SB_IMAGE_FLAG_DISPLAY_PROGRESS : 0; /* FIXME -- We support only default key */ hdr->key_count = 1; @@ -1427,6 +1426,12 @@ static int sb_parse_line(struct sb_image_ctx *ictx, struct sb_cmd_list *cmd) } cmd->cmd = rptr; + + /* set DISPLAY_PROGRESS flag */ + if (!strcmp(tok, "DISPLAYPROGRESS")) { + ictx->display_progress = 1; + return 0; + } /* DCD */ if (!strcmp(tok, "DCD")) { @@ -1681,10 +1686,10 @@ static int sb_verify_image_header(struct sb_image_ctx *ictx, ntohs(hdr->component_version.minor), ntohs(hdr->component_version.revision)); - if (hdr->flags & ~SB_IMAGE_FLAG_VERBOSE) + if (hdr->flags & ~SB_IMAGE_FLAGS_MASK) ret = -EINVAL; soprintf(ictx, "%s Image flags: %s\n", stat[!!ret], - hdr->flags & SB_IMAGE_FLAG_VERBOSE ? "Verbose_boot" : ""); + hdr->flags & SB_IMAGE_FLAG_DISPLAY_PROGRESS ? "Display_progress" : ""); if (ret) return ret; @@ -2287,7 +2292,6 @@ static int mxsimage_generate(struct image_tool_params *params, ctx.cfg_filename = params->imagename; ctx.output_filename = params->imagefile; - ctx.verbose_boot = 1; ret = sb_build_tree_from_cfg(&ctx); if (ret) diff --git a/tools/mxsimage.h b/tools/mxsimage.h index 6cd59d2..9c61b4c 100644 --- a/tools/mxsimage.h +++ b/tools/mxsimage.h @@ -81,8 +81,9 @@ struct sb_boot_image_header { #define SB_VERSION_MAJOR 1 #define SB_VERSION_MINOR 1 -/* Enable to HTLLC verbose boot report. */ -#define SB_IMAGE_FLAG_VERBOSE (1 << 0) +/* Enable to HTLLC boot report. */ +#define SB_IMAGE_FLAG_DISPLAY_PROGRESS (1 << 0) +#define SB_IMAGE_FLAGS_MASK (SB_IMAGE_FLAG_DISPLAY_PROGRESS) struct sb_key_dictionary_key { /* The CBC-MAC of image and sections header. */