From patchwork Tue Mar 22 16:40:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 64188 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2175007lbc; Tue, 22 Mar 2016 09:40:32 -0700 (PDT) X-Received: by 10.28.7.196 with SMTP id 187mr22152295wmh.12.1458664832877; Tue, 22 Mar 2016 09:40:32 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id x126si15706977wmg.60.2016.03.22.09.40.32; Tue, 22 Mar 2016 09:40:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 85BADA751B; Tue, 22 Mar 2016 17:40:31 +0100 (CET) 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 3BPxS_vR_w5P; Tue, 22 Mar 2016 17:40:31 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D64FDA74C3; Tue, 22 Mar 2016 17:40:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EC7C6A74C3 for ; Tue, 22 Mar 2016 17:40:26 +0100 (CET) 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 7seo1qsz2TWR for ; Tue, 22 Mar 2016 17:40:26 +0100 (CET) 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 conuserg011-v.nifty.com (conuserg011.nifty.com [202.248.44.37]) by theia.denx.de (Postfix) with ESMTPS id 31295A7498 for ; Tue, 22 Mar 2016 17:40:23 +0100 (CET) Received: from grover.sesame (FL1-203-136-65-164.osk.mesh.ad.jp [203.136.65.164]) (authenticated) by conuserg011-v.nifty.com with ESMTP id u2MGe65U018449; Wed, 23 Mar 2016 01:40:11 +0900 X-Nifty-SrcIP: [203.136.65.164] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Wed, 23 Mar 2016 01:40:05 +0900 Message-Id: <1458664805-12765-4-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1458664805-12765-1-git-send-email-yamada.masahiro@socionext.com> References: <1458664805-12765-1-git-send-email-yamada.masahiro@socionext.com> Subject: [U-Boot] [PATCH 3/3] ARM: uniphier: switch to raw U-Boot image X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Now everything is done to load a raw U-Boot proper image instead of an mkimage-processed one (as far as I tested on NAND, eMMC, NOR). The SPL already knows the load address of the U-Boot proper without parsing its uImage header because the load address is defined by CONFIG_SYS_TEXT_BASE, assuming that the two images are generated from the same build. My main motivation of this switch is to use u-boot-with-spl.bin, a concatenation of u-boot-spl.bin and u-boot.bin. (I wish there were a concatenation of u-boot-spl.bin and u-boot.img...) Anyway, this commit would be useful for one-shot image burn. Signed-off-by: Masahiro Yamada --- doc/README.uniphier | 22 ++++++++++++++++------ include/configs/uniphier.h | 9 ++++++--- 2 files changed, 22 insertions(+), 9 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/doc/README.uniphier b/doc/README.uniphier index 47863a4..49045a0 100644 --- a/doc/README.uniphier +++ b/doc/README.uniphier @@ -75,12 +75,17 @@ to use your favorite compiler. Burn U-Boot images to NAND -------------------------- -Write two files to the NAND device as follows: +Write the following to the NAND device: + - spl/u-boot-spl.bin at the offset address 0x00000000 - - u-boot.img at the offset address 0x00010000 + - u-boot.bin at the offset address 0x00010000 + +or + + - u-boot-with-spl.bin at the offset address 0x00000000 If a TFTP server is available, the images can be easily updated. -Just copy the u-boot-spl.bin and u-boot.img to the TFTP public directory, +Just copy the u-boot-spl.bin and u-boot.bin to the TFTP public directory, and then run the following command at the U-Boot command line: => run nandupdate @@ -89,12 +94,17 @@ and then run the following command at the U-Boot command line: Burn U-Boot images to eMMC -------------------------- -Write two files to the Boot partition 1 of the eMMC device as follows: +Write the following to the Boot partition 1 of the eMMC device: + - spl/u-boot-spl.bin at the offset address 0x00000000 - - u-boot.img at the offset address 0x00010000 + - u-boot.bin at the offset address 0x00010000 + +or + + - u-boot-with-spl.bin at the offset address 0x00000000 If a TFTP server is available, the images can be easily updated. -Just copy the u-boot-spl.bin and u-boot.img to the TFTP public directory, +Just copy the u-boot-spl.bin and u-boot.bin to the TFTP public directory, and then run the following command at the U-Boot command line: => run emmcupdate diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h index dd7b352..5f3d6b8 100644 --- a/include/configs/uniphier.h +++ b/include/configs/uniphier.h @@ -61,6 +61,7 @@ #define CONFIG_SYS_MAX_FLASH_SECT 256 #define CONFIG_SYS_MONITOR_BASE 0 +#define CONFIG_SYS_MONITOR_LEN 0x00080000 /* 512KB */ #define CONFIG_SYS_FLASH_BASE 0 /* @@ -233,12 +234,12 @@ "mmc erase 0 800 &&" \ "tftpboot u-boot-spl.bin &&" \ "mmc write $loadaddr 0 80 &&" \ - "tftpboot u-boot.img &&" \ + "tftpboot u-boot.bin &&" \ "mmc write $loadaddr 80 780\0" \ "nandupdate=nand erase 0 0x00100000 &&" \ "tftpboot u-boot-spl.bin &&" \ "nand write $loadaddr 0 0x00010000 &&" \ - "tftpboot u-boot.img &&" \ + "tftpboot u-boot.bin &&" \ "nand write $loadaddr 0x00010000 0x000f0000\0" \ LINUXBOOT_ENV_SETTINGS @@ -272,9 +273,11 @@ #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x10000 -#define CONFIG_SYS_UBOOT_BASE 0x60000 +/* subtract sizeof(struct image_header) */ +#define CONFIG_SYS_UBOOT_BASE (0x60000 - 0x40) #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x80 +#define CONFIG_SPL_TARGET "u-boot-with-spl.bin" #define CONFIG_SPL_MAX_FOOTPRINT 0x10000 #endif /* __CONFIG_UNIPHIER_COMMON_H__ */