Re: [U-Boot] [PATCH] arm:exynos4:pinmux: Modify the gpio function for mmc

2013-01-04 Thread Lukasz Majewski
Hi Jaehoon, On 01/03/2013 04:31 PM, Piotr Wilczek wrote: This patch add pinmux settings for Exynos4 for mmc0 and mmc2 Didn't consider about the mmc4? I know that exynos4 can be used mmc4 for eMMC. This patch shall be regarded as fixing regression introduced after merge. We would like to

Re: [U-Boot] is it possilbe to have uboot find the kernel in the file system?

2013-01-04 Thread Wolfgang Denk
Dear John Stile, In message 1357265217.7939.131.camel@genx you wrote: u-boot-2012.10.tar.bz2 does not have support for the at91sam9g20ek I treid to apply my patches for u-boot-1.3.4, but they are way too old. Is there a newer patch set? I see the following board configurations supported in

Re: [U-Boot] [PATCH v2] tools: imximage: Load a size that is multiple of 512

2013-01-04 Thread Stefano Babic
On 04/01/2013 07:20, Dirk Behme wrote: On 03.01.2013 19:24, Fabio Estevam wrote: In order to mx53 ROM to properly load the U-boot image, its header size should be multiple of 512 bytes. Hi Dirk, ... Signed-off-by: Troy Kisky troy.ki...@boundarydevices.com Signed-off-by: Fabio Estevam

Re: [U-Boot] [PATCH 0/3] Enable eMMC on mx6qsabresd board

2013-01-04 Thread Stefano Babic
On 31/12/2012 01:22, Shawn Guo wrote: On Mon, Dec 31, 2012 at 08:14:57AM +0800, Shawn Guo wrote: The series is to enable the use of eMMC on mx6qsabresd board, so that we do not need to carry an external card to boot the board. The DDR mode support for eMMC is not included. Hi Shawn, Shawn

[U-Boot] [PATCH V4 3/9] DWMMC: Initialise dwmci and resolve EMMC read write issues

2013-01-04 Thread Amar
This patch enumerates dwmci and set auto stop command during dwmci initialisation. EMMC read/write is not happening in current implementation due to improper fifo size computation. Hence Modified the fifo size computation to resolve EMMC read write issues. Changes from V1: 1)Created the

[U-Boot] [PATCH V4 0/9] EXYNOS5: Enable DWMMC, add FDT support for DWMMC and

2013-01-04 Thread Amar
This patch set enables and initialises DWMMC for Exynos5250 on SMDK5250. Adds driver changes required for DWMMC. Adds FDT support for DWMMC. Adds EMMC boot support for SMDK5250. This patch set is based on: EXYNOS: mmc: support DesignWare Controller for Samsung-SoC, which is merged in u-boot-mmc.

[U-Boot] [PATCH V4 6/9] SMDK5250: Initialise and Enable DWMMC, support FDT and non-FDT

2013-01-04 Thread Amar
This patch enables and initialises DWMMC for SMDK5250. Supports both FDT and non-FDT. This patch creates a new file 'exynos5-dt.c' meant for FDT support. exynos5-dt.c: This file shall contain all code which supports FDT. Any addition of FDT support for any module

[U-Boot] [PATCH V4 1/9] FDT: Add compatible string for DWMMC

2013-01-04 Thread Amar
Add required compatible information for DWMMC driver. Changes from V1: No change. Changes from V2: 1)Updation of commit message and resubmition of proper patch set. Changes from V3: No change. Signed-off-by: Vivek Gautam gautam.vi...@samsung.com Signed-off-by: Amar

[U-Boot] [PATCH V4 7/9] MMC: APIs to support resize of EMMC boot partition

2013-01-04 Thread Amar
This patch adds APIs to open, close and to resize boot partiton for EMMC. Changes from V1: New patch. Changes from V2: 1)Updation of commit message and resubmition of proper patch set. Changes from V3: No change. Signed-off-by: Amar amarendra...@samsung.com ---

[U-Boot] [PATCH V4 9/9] COMMON: MMC: Command to support EMMC booting and to

2013-01-04 Thread Amar
This patch adds commands to open, close and resize boot partitions on EMMC. Changes from V1: 1)Combined the common piece of code between 'open' and 'close' operations. Changes from V2: 1)Updation of commit message and resubmition of proper patch set. Changes from V3:

[U-Boot] [PATCH V4 2/9] EXYNOS5: FDT: Add DWMMC device node data

2013-01-04 Thread Amar
This patch adds DWMMC device node data for exynos5. This patch also adds binding file for DWMMC device node. Changes from V1: 1)Added binding file for DWMMC device node at the location doc/device-tree-bindings/exynos/dwmmc.txt. 2)Removed the propname 'index' from device

[U-Boot] [PATCH V4 4/9] EXYNOS5: DWMMC: Added FDT support for DWMMC

2013-01-04 Thread Amar
This patch adds FDT support for DWMMC, by reading the DWMMC node data from the device tree and initialising DWMMC channels as per data obtained from the node. Changes from V1: 1)Updated code to have same signature for the function exynos_dwmci_init() for both FDT and non-FDT

[U-Boot] [PATCH V4 5/9] EXYNOS5: DWMMC: API to set mmc clock divisor

2013-01-04 Thread Amar
This API computes the divisor value based on MPLL clock and writes it into the FSYS1 register. Changes from V1: 1)Updated the function exynos5_mmc_set_clk_div() to receive 'device_i'd as input parameter instead of 'index'. Changes from V2: 1)Updation of commit message and

[U-Boot] [PATCH V4 8/9] SMDK5250: Enable EMMC booting

2013-01-04 Thread Amar
This patch adds support for EMMC booting on SMDK5250. Changes from V1: 1)Updated spl_boot.c file to maintain irom pointer table instead of using the #define values defined in header file. Changes from V2: 1)Updation of commit message and resubmition of proper patch set.

Re: [U-Boot] [PATCH 9/9] COMMON: MMC: Command to support EMMC booting

2013-01-04 Thread Amarendra Reddy
Dear Wolfgang, Thanks for the review comments. I would like to clarify that this patch resizes EMMC partitions. But does not create partitions. I think the statement *..close and create partitions on EMMC* was misleading, which I corrected in latest patch set. The EMMC4.4 chips are provided with

Re: [U-Boot] [PATCH] drivers/block/systemace: replaced in16/out16 with more common readw/writew macros

2013-01-04 Thread Алексей Бродкин
Hi Wolfgang, but then do you think if there's any way to use some generic read/write routines? The problem is we use ml509 board loaded with Synopsys DW ACR700 core and we need to access SystemACE CF-card controller (to boot Linux kernel mainly). Or should I just add conditional branch for ARC

Re: [U-Boot] [PATCH 9/9] COMMON: MMC: Command to support EMMC booting

2013-01-04 Thread Wolfgang Denk
Dear Amarendra Reddy, In message CAPbRUm=2t8=mojzewv98eq15nv8rqo0sbjxwm7mzj+zft2q...@mail.gmail.com you wrote: Thanks for the review comments. I would like to clarify that this patch resizes EMMC partitions. But does not create partitions. I think the statement *..close and create

Re: [U-Boot] [PATCH] drivers/block/systemace: replaced in16/out16 with more common readw/writew macros

2013-01-04 Thread Wolfgang Denk
Dear Alexey, In message caml3pwxy7_fivqjvgmm4-ahbspdy6bnmszonyfzcw_ha9fe...@mail.gmail.com you wrote: but then do you think if there's any way to use some generic read/write routines? For reference, please see section KERNEL I/O BARRIER EFFECTS in the Linux kernel

Re: [U-Boot] [PATCH V4 7/9] MMC: APIs to support resize of EMMC boot partition

2013-01-04 Thread Jaehoon Chung
Hi Amar, I wonder that include the moviNAND specific code in mmc.c? mmc_boot_partiton_size_change() looks like every vendor can use this function. Best Regards, Jaehoon Chung On 01/04/2013 06:34 PM, Amar wrote: This patch adds APIs to open, close and to resize boot partiton for EMMC.

Re: [U-Boot] [PATCH v7] qi_lb60: add nand spl support

2013-01-04 Thread Xiangfu Liu
Hi Any chance merge this commit to upstream. make it a new year gift for me. :) Thanks Xiangfu On 10/30/2012 08:41 AM, Scott Wood wrote: On 10/26/2012 08:07:47 PM, xian...@openmobilefree.net wrote: From: Xiangfu xian...@openmobilefree.net The JZ4740 CPU can load 8KB from two different

[U-Boot] [PATCH 0/2] powerpc/p2041: u-boot.pbl build for P2041RDB

2013-01-04 Thread Valentin Longchamp
This series enables the build of a u-boot.pbl for the P2041RDB dev board. Valentin Longchamp (2): powerpc/p2041: add RCW file for P2041RDB powerpc/p2041: set RCW and PBI files for .pbl build or P2041RDB board/freescale/corenet_ds/rcw_p2041rdb.cfg | 11 +++

[U-Boot] [PATCH 1/2] powerpc/p2041: add RCW file for P2041RDB

2013-01-04 Thread Valentin Longchamp
All the dev boards of Freescale's QorIQ family have a RCW that is supported by the u-boot.pbl build target. This patch adds one for the P2041 dev board. This RCW is suitable for the RAMBOOT_PBL scenarios and was tested on the P2041RDB booting from the eSPI NOR Flash (P2041RDB_SPIFLASH config).

[U-Boot] [PATCH 2/2] powerpc/p2041: set RCW and PBI files for .pbl build or P2041RDB

2013-01-04 Thread Valentin Longchamp
In order to be able to build a u-boot.pbl image, both the CONFIG_PBLPBI_CONFIG and CONFIG_PBLRCW_CONFIG variables have to be defined. This patch sets these two files for the P2041RDB board. Signed-off-by: Valentin Longchamp valentin.longch...@keymile.com --- include/configs/P2041RDB.h |2 ++

Re: [U-Boot] [PATCH] mxs: Add NAND fdt and ramdisk partition to m28evk

2013-01-04 Thread Scott Wood
On 01/03/2013 11:19:35 PM, Marek Vasut wrote: Dear Scott Wood, On 12/26/2012 12:26:13 PM, Otavio Salvador wrote: On Wed, Dec 26, 2012 at 1:13 AM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Tue, Dec 25, 2012 at 11:08 PM, Marek Vasut ma...@denx.de wrote:

Re: [U-Boot] [PATCH] mxs: Add NAND fdt and ramdisk partition to m28evk

2013-01-04 Thread Scott Wood
On 01/03/2013 06:49:05 PM, Otavio Salvador wrote: On Thu, Jan 3, 2013 at 9:42 PM, Scott Wood scottw...@freescale.com wrote: On 12/26/2012 12:26:13 PM, Otavio Salvador wrote: On Wed, Dec 26, 2012 at 1:13 AM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Tue, Dec 25, 2012 at

Re: [U-Boot] [PATCH] mxs: Add NAND fdt and ramdisk partition to m28evk

2013-01-04 Thread Marek Vasut
Dear Scott Wood, On 01/03/2013 11:19:35 PM, Marek Vasut wrote: Dear Scott Wood, On 12/26/2012 12:26:13 PM, Otavio Salvador wrote: On Wed, Dec 26, 2012 at 1:13 AM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador, On Tue, Dec 25, 2012 at 11:08 PM, Marek Vasut

Re: [U-Boot] [PATCH] mxs: Add NAND fdt and ramdisk partition to m28evk

2013-01-04 Thread Scott Wood
On 01/04/2013 09:58:28 AM, Marek Vasut wrote: Dear Scott Wood, On 01/03/2013 11:19:35 PM, Marek Vasut wrote: Dear Scott Wood, On 12/26/2012 12:26:13 PM, Otavio Salvador wrote: On Wed, Dec 26, 2012 at 1:13 AM, Marek Vasut ma...@denx.de wrote: Dear Otavio Salvador,

Re: [U-Boot] [PATCH] mxs: Add NAND fdt and ramdisk partition to m28evk

2013-01-04 Thread Marek Vasut
Dear Scott Wood, On 01/04/2013 09:58:28 AM, Marek Vasut wrote: Dear Scott Wood, On 01/03/2013 11:19:35 PM, Marek Vasut wrote: Dear Scott Wood, On 12/26/2012 12:26:13 PM, Otavio Salvador wrote: On Wed, Dec 26, 2012 at 1:13 AM, Marek Vasut ma...@denx.de wrote:

Re: [U-Boot] [PATCH] mxs: Add NAND fdt and ramdisk partition to m28evk

2013-01-04 Thread Scott Wood
On 01/04/2013 10:04:06 AM, Marek Vasut wrote: Dear Scott Wood, On 01/04/2013 09:58:28 AM, Marek Vasut wrote: Dear Scott Wood, On 01/03/2013 11:19:35 PM, Marek Vasut wrote: Dear Scott Wood, On 12/26/2012 12:26:13 PM, Otavio Salvador wrote: On Wed, Dec 26, 2012 at 1:13

Re: [U-Boot] [PATCH] mxs: Add NAND fdt and ramdisk partition to m28evk

2013-01-04 Thread Marek Vasut
Dear Scott Wood, On 01/04/2013 10:04:06 AM, Marek Vasut wrote: Dear Scott Wood, On 01/04/2013 09:58:28 AM, Marek Vasut wrote: Dear Scott Wood, On 01/03/2013 11:19:35 PM, Marek Vasut wrote: Dear Scott Wood, On 12/26/2012 12:26:13 PM, Otavio Salvador

Re: [U-Boot] [PATCH 9/9] dfu: Support larger than memory transfers.

2013-01-04 Thread Pantelis Antoniou
Hi Kasim, On Jan 3, 2013, at 10:30 AM, kasim ling wrote: Hi, Pantelis, A little confusion about FAT fs write supporting, On Sat, Dec 1, 2012 at 12:51 AM, Pantelis Antoniou pa...@antoniou-consulting.com wrote: We didn't support upload/download larger than available memory. This is

[U-Boot] [PATCH 7/7] powerpc/mpc8xxx: FSL DDR debugger auto run of stored commands

2013-01-04 Thread York Sun
From: James Yang james.y...@freescale.com This patch adds the ability for the FSL DDR interactive debugger to automatically run the sequence of commands stored in the ddr_interactive environment variable. Commands are separated using ';'. For example, ddr_interactive=compute; edit c0 d0

[U-Boot] [PATCH 4/7] Add copy command to FSL DDR interactive

2013-01-04 Thread York Sun
From: James Yang james.y...@freescale.com Add copy command which allows copying of DIMM/controller settings. This saves tedious retyping of parameters for each identical DIMM or controller. Signed-off-by: James Yang james.y...@freescale.com --- arch/powerpc/cpu/mpc8xxx/ddr/interactive.c | 127

[U-Boot] [PATCH 1/7] powerpc/mpc8xxx: Enable entering DDR debugging by key press

2013-01-04 Thread York Sun
Using environmental variable ddr_interactive to activate interactive DDR debugging seomtiems is not enough. For example, after updating SPD with a valid but wrong image, u-boot won't come up due to wrong DDR configuration. By enabling key press method, we can enter debug mode to have a chance to

[U-Boot] [PATCH 2/7] Move DDR command parsing to separate function

2013-01-04 Thread York Sun
From: James Yang james.y...@freescale.com Move the FSL DDR prompt command parsing to a separate function so that it can be reused. Signed-off-by: James Yang james.y...@freescale.com --- arch/powerpc/cpu/mpc8xxx/ddr/interactive.c | 153 ++-- 1 file changed, 74

[U-Boot] [PATCH 3/7] Fix data stage name matching issue

2013-01-04 Thread York Sun
From: James Yang james.y...@freescale.com This fix allows the name of the stage to be specifed after the controler and DIMM is specified. Prior to this fix, if the data stage name is not the first entry on the command line, the operation is applied to all controller and DIMMs. Signed-off-by:

[U-Boot] [PATCH 5/7] README.fsl-ddr typos and update to reflect hotkey

2013-01-04 Thread York Sun
From: James Yang james.y...@freescale.com Documentation fix to README.fsl-ddr to fix typos and to reflect use of 'd' hotkey to enter the FSL DDR debugger. Signed-off-by: James Yang james.y...@freescale.com --- doc/README.fsl-ddr | 35 +-- 1 file changed, 21

[U-Boot] [PATCH 6/7] getenv_f() env variable exist w/o needing a buffer

2013-01-04 Thread York Sun
From: James Yang james.y...@freescale.com getenv_f() searches the environment for a variable name and copies the value of the variable to a buffer pointed to by one of the function's parameters. However, this means that the buffer needs to exist and needs to be of sufficient length (passed as

Re: [U-Boot] is it possilbe to have uboot find the kernel in the file system?

2013-01-04 Thread John Stile
On Fri, 2013-01-04 at 09:00 +0100, Wolfgang Denk wrote: Dear John Stile, In message 1357265217.7939.131.camel@genx you wrote: u-boot-2012.10.tar.bz2 does not have support for the at91sam9g20ek I treid to apply my patches for u-boot-1.3.4, but they are way too old. Is there a newer

Re: [U-Boot] [RFC]: always relocate u-boot before the framebuffer

2013-01-04 Thread Jeroen Hofstee
Hi Wolfgang, On 01/03/2013 09:28 PM, Wolfgang Denk wrote: The frame buffer is then at the same physical address and I regain 15MB of memory. So solved as far as I am concerned till proven that it really hurts performance. I can't grok this, though. I could understand if you say you saved up

Re: [U-Boot] is it possilbe to have uboot find the kernel in the file system?

2013-01-04 Thread Jeroen Hofstee
Hello John, On 01/04/2013 07:19 PM, John Stile wrote: On Fri, 2013-01-04 at 09:00 +0100, Wolfgang Denk wrote: Dear John Stile, In message 1357265217.7939.131.camel@genx you wrote: u-boot-2012.10.tar.bz2 does not have support for the at91sam9g20ek I treid to apply my patches for

Re: [U-Boot] [PATCH 6/7] getenv_f() env variable exist w/o needing a buffer

2013-01-04 Thread Wolfgang Denk
Dear York Sun, In message 1357323245-12455-6-git-send-email-york...@freescale.com you wrote: From: James Yang james.y...@freescale.com getenv_f() searches the environment for a variable name and copies the value of the variable to a buffer pointed to by one of the function's parameters.

Re: [U-Boot] is it possilbe to have uboot find the kernel in the file system?

2013-01-04 Thread Wolfgang Denk
Dear John Stile, In message 1357323597.6335.19.ca...@genx.eng.msli.com you wrote: I see the following board configurations supported in current mainline code: at91sam9g20ek_nandflash, at91sam9g20ek_dataflash_cs0, and at91sam9g20ek_dataflash_cs1 . Anything wrong with those? I'm going to

Re: [U-Boot] [PATCH v2] tools: imximage: Load a size that is multiple of 512

2013-01-04 Thread Fabio Estevam
On Fri, Jan 4, 2013 at 10:08 PM, Fabio Estevam feste...@gmail.com wrote: On Fri, Jan 4, 2013 at 7:03 AM, Stefano Babic sba...@denx.de wrote: Is this i.MX53 specific or is this valid for i.MX6, too? It seems that i.MX6 is not afflicted by this issue. For i.MX6 it adds only some padding to the

[U-Boot] [PATCH] mx6: Add workaround for ARM errata

2013-01-04 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com Add workaround for the following ARM errata: 743622 and 751472. The motivation for this change is the following kernel commit 62e4d357a (ARM: 7609/1: disable errata work-arounds which access secure registers), which removes the errata from

[U-Boot] [PATCH v2] mx6: Add workaround for ARM errata

2013-01-04 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com Add workaround for the following ARM errata: 743622 and 751472. The motivation for this change is the following kernel commit 62e4d357a (ARM: 7609/1: disable errata work-arounds which access secure registers), which removes the errata from

Re: [U-Boot] [PATCH v4 1/2] arm: move C runtime setup code in crt0.S

2013-01-04 Thread Simon Glass
Hi Albert, On Wed, Dec 26, 2012 at 12:41 PM, Simon Glass s...@chromium.org wrote: Hi Albert, On Sun, Dec 23, 2012 at 7:03 AM, Albert ARIBAUD albert.u.b...@aribaud.net wrote: Hi Simon, On Fri, 30 Nov 2012 14:10:01 -0800, Simon Glass s...@chromium.org wrote: I tried to test it on a snow

Re: [U-Boot] [PATCH RESEND] video:cache:fix: Buffer alignment and dcache flush for lcd subsystem

2013-01-04 Thread Simon Glass
Hi Lukasz, On Wed, Jan 2, 2013 at 8:25 AM, Lukasz Majewski l.majew...@samsung.com wrote: This commit makes the video subsystem code cache aware. Memory allocated for decompressed BMP memory is now cache line aligned. Flushing of the dcache is also performed after copying BMP data to fb

Re: [U-Boot] is it possilbe to have uboot find the kernel in the file system?

2013-01-04 Thread John Stile
On Fri, 2013-01-04 at 23:12 +0100, Wolfgang Denk wrote: Dear John Stile, In message 1357323597.6335.19.ca...@genx.eng.msli.com you wrote: I see the following board configurations supported in current mainline code: at91sam9g20ek_nandflash, at91sam9g20ek_dataflash_cs0, and

Re: [U-Boot] [PATCH v2] mx6: Add workaround for ARM errata

2013-01-04 Thread Troy Kisky
On 1/4/2013 5:54 PM, Fabio Estevam wrote: From: Fabio Estevam fabio.este...@freescale.com Add workaround for the following ARM errata: 743622 and 751472. The motivation for this change is the following kernel commit 62e4d357a (ARM: 7609/1: disable errata work-arounds which access secure

[U-Boot] [RFC PATCH 0/44] RFC: Verified boot implementation based on FIT

2013-01-04 Thread Simon Glass
This series implemented a verified boot system based around FIT images as discussed on the U-Boot mailing list, including on this thread: http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/147830 RSA is used to implement the encryption. Images are signed by mkimage using private keys

[U-Boot] [RFC PATCH 01/44] sandbox: config: Enable CONFIG_FIT and CONFIG_CMD_FIT

2013-01-04 Thread Simon Glass
Enable these options to use FITs on sandbox. Signed-off-by: Simon Glass s...@chromium.org --- include/configs/sandbox.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index 406da43..67d788a 100644 ---

[U-Boot] [RFC PATCH 09/44] image: Split hash node processing into its own function

2013-01-04 Thread Simon Glass
This function has become quite long and much of the body is indented quite a bit. Move it into a separate function to make it easier to work with. Signed-off-by: Simon Glass s...@chromium.org --- tools/image-host.c | 106 +++- 1 files changed, 63

[U-Boot] [RFC PATCH 13/44] image: Move error! string to common place

2013-01-04 Thread Simon Glass
The string error\n appears in each error string. Move it out to a common place. Signed-off-by: Simon Glass s...@chromium.org --- common/image-fit.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index

[U-Boot] [RFC PATCH 05/44] image: Move timestamp #ifdefs to header file

2013-01-04 Thread Simon Glass
Rather than repeat the line #if defined(CONFIG_TIMESTAMP) || defined(CONFIG_CMD_DATE) || \ defined(USE_HOSTCC) everywhere, put this in a header file and #define IMAGE_ENABLE_TIMESTAMP to either 1 or 0. Then we can use a plain if() in most code and avoid the #ifdefs. The compiler's dead

[U-Boot] [RFC PATCH 03/44] mkimage: Move ARRAY_SIZE to header file

2013-01-04 Thread Simon Glass
Move this definition from aisimage.c to mkimage.h so that it is available more widely. Signed-off-by: Simon Glass s...@chromium.org --- tools/aisimage.c |1 - tools/mkimage.h |2 ++ 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tools/aisimage.c b/tools/aisimage.c index

[U-Boot] [RFC PATCH 10/44] image: Convert fit_image_hash_set_value() to static, and rename

2013-01-04 Thread Simon Glass
This function doesn't need to be exported, and with verification we want to use it for setting the 'value' property in any node, so rename it. Signed-off-by: Simon Glass s...@chromium.org --- include/image.h|2 - tools/image-host.c | 62

[U-Boot] [RFC PATCH 08/44] image: Move HOSTCC image code to tools/

2013-01-04 Thread Simon Glass
This code is never compiled into U-Boot, so move it into a separate file in tools/ to avoid the large #ifdef. Signed-off-by: Simon Glass s...@chromium.org --- common/image-fit.c | 175 + include/image.h|3 + tools/Makefile |2 +

[U-Boot] [RFC PATCH 26/44] Add minor updates to README.fdt-control

2013-01-04 Thread Simon Glass
A few things have changed since this doc was written, so update it to match the current state of things. Signed-off-by: Simon Glass s...@chromium.org --- doc/README.fdt-control |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/doc/README.fdt-control

[U-Boot] [RFC PATCH 23/44] fdt: Skip checking FDT if the pointer is NULL

2013-01-04 Thread Simon Glass
If we have no FDT, don't attempt to read from it. This allows sandbox to run without an FDT if required. Signed-off-by: Simon Glass s...@chromium.org --- lib/fdtdec.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 6dba438..740bd56

[U-Boot] [RFC PATCH 24/44] Revert fdt- Tell the FDT library where the device tree is

2013-01-04 Thread Simon Glass
This reverts commit 3b73459ea3421e9f8c6c8c62e1d3fe458ca5bc56. In practice it doesn't seem like a good idea to make the the working FDT point to the control FDT. Now that we can access the control FDT using the 'fdt' command, there is no need for this feature. Remove it. Signed-off-by: Simon

[U-Boot] [RFC PATCH 11/44] image: Rename fit_image_check_hashes() to fit_image_verify()

2013-01-04 Thread Simon Glass
This is the main entry point to the FIT image verification code. We will be using it to handle image verification with signatures, so rename the function. Signed-off-by: Simon Glass s...@chromium.org --- common/cmd_bootm.c |4 ++-- common/cmd_fpga.c |2 +- common/cmd_source.c |2

[U-Boot] [RFC PATCH 15/44] image: Rename fit_add_hashes() to fit_add_verification_data()

2013-01-04 Thread Simon Glass
We intend to add signatures to FITs also, so rename this function so that it is not specific to hashing. Also rename fit_image_set_hashes() and make it static since it is not used outside this file. Signed-off-by: Simon Glass s...@chromium.org --- include/image.h| 10 +++-

[U-Boot] [RFC PATCH 37/44] mkimage: Add -K to write public keys to an FDT blob

2013-01-04 Thread Simon Glass
FIT image verification requires public keys. Add a convenient option to mkimage to write the public keys to an FDT blob when it uses then for signing an image. This allows us to use: mkimage -f test.its -K dest.dtb -k keys test.fit and have the signatures written to test.fit and the

[U-Boot] [RFC PATCH 14/44] image: Export fit_conf_get_prop_node()

2013-01-04 Thread Simon Glass
This function will be needed by signature checking code, so export it, and also add docs. Signed-off-by: Simon Glass s...@chromium.org --- common/image-fit.c |8 include/image.h| 15 +++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git

[U-Boot] [RFC PATCH 35/44] mkimage: Put FIT loading in function and tidy error handling

2013-01-04 Thread Simon Glass
The fit_handle_file() function is quiet long - split out the part that loads and checks a FIT into its own function. We will use this function for storing public keys into a destination FDT file. The error handling is currently a bit repetitive - tidy it. Signed-off-by: Simon Glass

[U-Boot] [RFC PATCH 04/44] libfdt: Add fdt_next_subnode() to permit easy subnode iteration

2013-01-04 Thread Simon Glass
This allows use to replace code like this: for (ndepth = 0, count = 0, noffset = fdt_next_node(fit, images_noffset, ndepth); (noffset = 0) (ndepth 0); noffset = fdt_next_node(fit, noffset, ndepth)) { if (ndepth == 1) ... with: for (ndepth = 0,

[U-Boot] [RFC PATCH 12/44] image: Move hash checking into its own functions

2013-01-04 Thread Simon Glass
The existing function is long and most of the code is indented a long way. Before adding yet more code, split this out into its own function. Signed-off-by: Simon Glass s...@chromium.org --- common/image-fit.c | 128 1 files changed, 69

[U-Boot] [RFC PATCH 22/44] env: Fix minor comment typos in cmd_nvedit

2013-01-04 Thread Simon Glass
This should say 'environmnent'. Signed-off-by: Simon Glass s...@chromium.org --- common/cmd_nvedit.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index d6d5eea..7685a19 100644 --- a/common/cmd_nvedit.c +++

[U-Boot] [RFC PATCH 16/44] image: Rename hash printing to fit_image_print_verification_data()

2013-01-04 Thread Simon Glass
This function will be used to print signatures as well as hashes, so rename it. Also make it static since it is not used outside this file. Signed-off-by: Simon Glass s...@chromium.org --- common/image-fit.c | 132 +++- include/image.h|1 -

[U-Boot] [RFC PATCH 20/44] fdt: Allow fdt command to check and update control FDT

2013-01-04 Thread Simon Glass
There is an existing fdt command to deal with the working FDT. Enhance this to support the control FDT also (CONFIG_OF_CONTROL). Some nasty #ifdefs are added here - they are required until we move to generic board and every arch has an fdt_blob. Signed-off-by: Simon Glass s...@chromium.org ---

[U-Boot] [RFC PATCH 33/44] image: Verify signatures in FIT images

2013-01-04 Thread Simon Glass
After checking hashes, also check signatures of FIT images. Signed-off-by: Simon Glass s...@chromium.org --- common/image-fit.c | 80 common/image-sig.c | 148 include/image.h| 37 + 3 files

[U-Boot] [RFC PATCH 40/44] mkimage: Add -r option to specify keys that must be verified

2013-01-04 Thread Simon Glass
Normally, multiple public keys can be provided and U-Boot is not required to use all of them for verification. This is because some images may not be signed, or may be optionally signed. But we still need a mechanism to determine when a key must be used. This feature cannot be implemented in the

[U-Boot] [RFC PATCH 19/44] Add getenv_hex() to return an environment variable as hex

2013-01-04 Thread Simon Glass
This conversion is required in a number of places in U-Boot. Add a standard function to provide this feature, so we avoid all the different variations in the way it is coded. Signed-off-by: Simon Glass s...@chromium.org --- common/cmd_nvedit.c | 15 +++ include/common.h| 13

[U-Boot] [RFC PATCH 18/44] fdt: Add a parameter to fdt_valid()

2013-01-04 Thread Simon Glass
At present this only checks working_fdt, but we want to check other FDTs also. So add the FDT to check as a parameter to fdt_valid(). Signed-off-by: Simon Glass s...@chromium.org --- common/cmd_fdt.c | 27 ++- 1 files changed, 14 insertions(+), 13 deletions(-) diff

[U-Boot] [RFC PATCH 17/44] sandbox: Add CONFIG_OF_HOSTFILE to read FDT from host file

2013-01-04 Thread Simon Glass
With sandbox it is tricky to add an FDT to the image at build time (or later) since we build an ELF file, not a plain binary, and the address space of the whole U-Boot is not accessible in the emulated memory map of sandbox. Sandbox can read files directly from the host, though, so add an option

[U-Boot] [RFC PATCH 06/44] image: Export fit_check_ramdisk()

2013-01-04 Thread Simon Glass
One we split out the FIT code from image.c we will need this function. Export it in the header. Signed-off-by: Simon Glass s...@chromium.org --- common/image.c |9 ++--- include/image.h |3 +++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/common/image.c

[U-Boot] [RFC PATCH 44/44] WIP: sandbox: config: Add test config for verified boot

2013-01-04 Thread Simon Glass
This adds a test command to sandbox so that it can be used for running verified boot tests. This patch is not intended to be merged. Signed-off-by: Simon Glass s...@chromium.org --- include/configs/sandbox.h | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git

[U-Boot] [RFC PATCH 29/44] sandbox: Provide a way to map from host RAM to U-Boot RAM

2013-01-04 Thread Simon Glass
In many cases, pointers to memory are passed around, and these pointers refer to U-Boot memory, not host memory. This in itself is not a problem. However, in a few places, we cast that pointer back to a ulong (being a U-Boot memory address). It is possible to convert many of these cases to avoid

[U-Boot] [RFC PATCH 43/44] Add verified boot information and test

2013-01-04 Thread Simon Glass
Add a description of how to implement verified boot using signed FIT images, and a simple test which verifies operation on sandbox. Signed-off-by: Simon Glass s...@chromium.org --- doc/uImage.FIT/verified-boot.txt | 104 test/vboot/.gitignore|3 +

[U-Boot] [RFC PATCH 27/44] hash: Add a way to calculate a hash for any algortihm

2013-01-04 Thread Simon Glass
Rather than needing to call one of many hashing algorithms in U-Boot, provide a function hash_block() which handles this, and can support all available hash algorithms. Once we have md5 supported within hashing, we can use this function in the FIT image code. Signed-off-by: Simon Glass

[U-Boot] [RFC PATCH 31/44] image: Add signing infrastructure

2013-01-04 Thread Simon Glass
Add a structure to describe an algorithm which can sign and (later) verify images. Signed-off-by: Simon Glass s...@chromium.org --- README |5 + common/Makefile |1 + common/image-sig.c | 42 + doc/uImage.FIT/signature.txt | 211

[U-Boot] [RFC PATCH 32/44] image: Support signing of images

2013-01-04 Thread Simon Glass
Add support for signing images using a new signature node. The process is handled by fdt_add_verification_data() which now takes parameters to provide the keys and related information. Signed-off-by: Simon Glass s...@chromium.org --- doc/uImage.FIT/sign-images.its | 42 +

[U-Boot] [RFC PATCH 21/44] sandbox: fdt: Support fdt command for sandbox

2013-01-04 Thread Simon Glass
By using map_sysmem() we can get the fdt command to work correctly with sandbox. Signed-off-by: Simon Glass s...@chromium.org --- common/cmd_fdt.c | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index a193cc3..3d5ff0f 100644

[U-Boot] [RFC PATCH 28/44] sandbox: config: Enable FIT signatures with RSA

2013-01-04 Thread Simon Glass
We want to sign and verify images using sandbox, so enable these options. Signed-off-by: Simon Glass s...@chromium.org --- include/configs/sandbox.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h index

[U-Boot] [RFC PATCH 30/44] sandbox: image: Add support for booting images in sandbox

2013-01-04 Thread Simon Glass
Much of the image code uses addresses as ulongs and pointers interchangeably, casting between the two forms as needed. This doesn't work with sandbox, which has a U-Boot RAM buffer which is separate from the host machine's memory. Adjust the cost so that translating from a U-Boot address to a

[U-Boot] [RFC PATCH 38/44] mkimage: Add -F option to modify an existing .fit file

2013-01-04 Thread Simon Glass
When signing images it is sometimes necessary to sign with different keys at different times, or make the signer entirely separate from the FIT creation to avoid needing the private keys to be publicly available in the system. Add a -F option so that key signing can be a separate step, and

[U-Boot] [RFC PATCH 34/44] image: Add RSA support for image signing

2013-01-04 Thread Simon Glass
RSA provides a public key encryption facility which is ideal for image signing and verification. Images are signed using a private key by mkimage. Then at run-time, the images are verified using a private key. This implementation uses openssl for the host part (mkimage). To avoid bringing large

[U-Boot] [RFC PATCH 36/44] mkimage: Add -k option to specify key directory

2013-01-04 Thread Simon Glass
Keys required for signing images will be in a specific directory. Add a -k option to specify that directory. Also update the mkimage man page with this information and a clearer list of available commands. Signed-off-by: Simon Glass s...@chromium.org --- doc/mkimage.1 | 25

[U-Boot] [RFC PATCH 42/44] image: Add support for signing of FIT configurations

2013-01-04 Thread Simon Glass
While signing images is useful, it does not provide complete protection against several types of attack. For example, it it possible to create a FIT with the same signed images, but with the configuration changed such that a different one is selected (mix and match attack). It is also possible to

[U-Boot] [RFC PATCH 41/44] libfdt: Add fdt_find_regions()

2013-01-04 Thread Simon Glass
Add a function to find regions in device tree given a list of nodes to include and properties to exclude. See the header file for full documentation. Signed-off-by: Simon Glass s...@chromium.org --- include/libfdt.h | 64 + lib/libfdt/fdt_wip.c | 129

[U-Boot] [RFC PATCH 25/44] Add stdarg to vsprintf.h

2013-01-04 Thread Simon Glass
This file uses varargs, so add the header file so that it can be used when common has not been included. TODO: Probably should drop this patch? Signed-off-by: Simon Glass s...@chromium.org --- include/vsprintf.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

[U-Boot] [RFC PATCH 39/44] mkimage: Add -c option to specify a comment for key signing

2013-01-04 Thread Simon Glass
When signing an image, it is useful to add some details about which tool or person is authorising the signing. Add a comment field which can take care of miscellaneous requirements. Signed-off-by: Simon Glass s...@chromium.org --- doc/mkimage.1 |6 ++ tools/fit_image.c |2 +-

Re: [U-Boot] is it possilbe to have uboot find the kernel in the file system?

2013-01-04 Thread Bo Shen
Hi John Stile, On 01/05/2013 09:25 AM, John Stile wrote: u-boot-2012.10 build does compile with buildroot's .conf settings BR2_TARGET_UBOOT_BOARDNAME=at91sam9g20ek_dataflash_cs1 or BR2_TARGET_UBOOT_BOARDNAME=at91sam9g20ek_nandflash But after writing my ubootEnvtFileDataFlash.bin to NOR with

[U-Boot] [PATCH v3] mx6: Add workaround for ARM errata

2013-01-04 Thread Fabio Estevam
From: Fabio Estevam fabio.este...@freescale.com Add workaround for the following ARM errata: 743622 and 751472. The motivation for this change is the following kernel commit 62e4d357a (ARM: 7609/1: disable errata work-arounds which access secure registers), which removes the errata from

Re: [U-Boot] [PATCH 6/7] getenv_f() env variable exist w/o needing a buffer

2013-01-04 Thread James Yang
Hello Wolfgang, On Fri, 4 Jan 2013, Wolfgang Denk wrote: Dear York Sun, In message 1357323245-12455-6-git-send-email-york...@freescale.com you wrote: From: James Yang james.y...@freescale.com getenv_f() searches the environment for a variable name and copies the value of the

[U-Boot] NOR NAND Interference question

2013-01-04 Thread Andrei
Hi, Recently I am start getting strange problem with u-boot-2011.09. MPC8313ERDB like configuration ( main change - I am using different NAND flash - 256MBib - need change page size) If I am access NAND flash before nor u-boot not always read NOR correctly. mtdparts device nor0

Re: [U-Boot] [PATCH 6/7] getenv_f() env variable exist w/o needing a buffer

2013-01-04 Thread Wolfgang Denk
Dear James Yang, In message alpine.lrh.2.00.1301041608190.3...@ra8135-ec1.am.freescale.net you wrote: Hm... this adds a special case and as such increases complexity - and what is the benefit for you? The purpose is to avoid having to allocate memory for getenv_f() to What exactly is