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

2013-01-05 Thread Marek Vasut
Dear 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 Reviewed-by: Marek Vasut Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lis

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

2013-01-05 Thread Marek Vasut
Dear 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 Reviewed-by: Marek Vasut Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http

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

2013-01-05 Thread Marek Vasut
Dear 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 (mk

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

2013-01-05 Thread Marek Vasut
Dear Simon Glass, > Move this definition from aisimage.c to mkimage.h so that it is available > more widely. > > Signed-off-by: Simon Glass > --- Acked-by: Marek Vasut Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx.de http://lis

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

2013-01-05 Thread Marek Vasut
Dear 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

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

2013-01-05 Thread Marek Vasut
Dear 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 Reviewed-by: Marek Vasut Be

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

2013-01-05 Thread Marek Vasut
Dear Simon Glass, [...] > + /* Signatures have a time stamp */ > + if (IMAGE_ENABLE_TIMESTAMP && keyname) { > + time_t timestamp; > + > + printf("%s Timestamp:", p); > + if (fit_get_timestamp(fit, noffset, ×tamp)) > + printf("un

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

2013-01-05 Thread Marek Vasut
Dear 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 Reviewed-by: Marek Vasut Best regards, Marek Vasut

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

2013-01-05 Thread Marek Vasut
Dear 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 translati

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

2013-01-05 Thread Marek Vasut
Dear 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

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

2013-01-05 Thread Marek Vasut
Dear 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 Reviewed-by: Marek Vasut Best regards, Marek Vasut ___

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

2013-01-05 Thread Marek Vasut
Dear 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 Acked-by: Marek Vasut Best regards, Marek Vasut

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

2013-01-05 Thread Marek Vasut
Dear Simon Glass, > The string " error\n" appears in each error string. Move it out to a > common place. > > Signed-off-by: Simon Glass > --- > common/image-fit.c | 16 > 1 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/common/image-fit.c b/common/image-fit.

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

2013-01-05 Thread Marek Vasut
Dear Simon Glass, > This function will be needed by signature checking code, so export it, > and also add docs. > > Signed-off-by: Simon Glass [...] > +/** > + * fit_conf_get_prop_node() - Get node refered to by a configuration > + * > + * The conf@ nodes contain references to other nodes, usin

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

2013-01-05 Thread Marek Vasut
Dear 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 Reviewed-by: Marek Vasut Best regards, Marek Vasut ___ U

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

2013-01-05 Thread Marek Vasut
Dear 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 > --- > common/image-fit.c | 128 > 1 files cha

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

2013-01-05 Thread Marek Vasut
Dear Simon Glass, [...] > + int string_size; > + int ret; > + > + /* > + * Get the current string size, before we update the FIT and add > + * more > + */ > + string_size = fdt_size_dt_strings(fit); > + > + ret = fdt_setprop(fit, noffset, FIT_VALUE_PROP, value,

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

2013-01-05 Thread Marek Vasut
Dear 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

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

2013-01-05 Thread Marek Vasut
Dear Simon Glass, > The fit_handle_file() function is quiet long quite ;-) > - 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.

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

2013-01-05 Thread Marek Vasut
Dear 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 writt

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

2013-01-05 Thread Marek Vasut
Dear 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 Reviewed-by: Marek Vasut Best regards, Marek Vasut _

Re: [U-Boot] [RFC PATCH 07/44] image: Split FIT code into new image-fit.c

2013-01-05 Thread Marek Vasut
Dear Simon Glass, > The FIT code is about half the size of the >3000-line image.c. Split this > code into its own file. > > Signed-off-by: Simon Glass Reviewed-by: Marek Vasut [...] Best regards, Marek Vasut ___ U-Boot mailing list U-Boot@lists.denx

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

2013-01-05 Thread Jeroen Hofstee
Hi, On 01/03/2013 09:28 PM, Wolfgang Denk wrote: Hm... I'm not sure if this is the right approach, then. If mainline Linux insists on such a 2 MB alignment, we shoud rather teach lcd_setmem() to follow tha rule, too. That should solve the problem as well (and probably more efficiently, especi

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

2013-01-05 Thread Stefano Babic
On 26/12/2012 02:08, Marek Vasut wrote: > Adjust the NAND partitioning layout so that there is a separate partition > for the ramdisk and fdt blob on the NAND. > > Signed-off-by: Marek Vasut > Cc: Detlev Zundel > Cc: Stefano Babic > Cc: Wolfgang Denk > --- > include/configs/m28evk.h |2 ++

Re: [U-Boot] [PATCH] mx35pdk:Use IMX_GPIO_NR macro

2013-01-05 Thread Stefano Babic
On 07/11/2012 18:37, Ashok Kumar Reddy wrote: > Use IMX_GPO_NR macro > > Signed-off-by: Ashok Kumar Reddy > --- > board/freescale/mx35pdk/mx35pdk.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/board/freescale/mx35pdk/mx35pdk.c > b/board/freescale/mx35pdk/mx35pdk.

Re: [U-Boot] [PATCH v2 2/6] mx28evk: We shouldn't hardcode a rootfs filesystem type

2013-01-05 Thread Stefano Babic
On 28/12/2012 20:17, Otavio Salvador wrote: > For a generic environment, we shouldn't have a fixed rootfs filesystem > so we drop it from env. > > Signed-off-by: Otavio Salvador > --- Hi Otavio, > Changes in v2: > - reformat environment change to fit in 80 cols > > include/configs/mx28evk.h

Re: [U-Boot] [PATCH 1/3] fsl_esdhc: add MMC_MODE_HC host_caps

2013-01-05 Thread Stefano Babic
On 31/12/2012 01:14, Shawn Guo wrote: > All esdhc variants we know should support high capacity MMC cards, > so let's add MMC_MODE_HC host_caps unconditionally to support those > MMC cards (capacity > 2 GB). > > Signed-off-by: Shawn Guo > --- > drivers/mmc/fsl_esdhc.c |3 ++- > 1 file change

Re: [U-Boot] [PATCH 3/3] mx6qsabresd: use on-board eMMC to store environment

2013-01-05 Thread Stefano Babic
On 31/12/2012 01:15, Shawn Guo wrote: > It makes more sense to use on-board eMMC to store environments. The > boot partition 1 is selected by default. > > Signed-off-by: Shawn Guo > --- Applied to u-boot-imx, thanks. Best regards, Stefano Babic -- ==

Re: [U-Boot] [PATCH 2/3] mx6qsabresd: add usdhc2 and usdhc4 support

2013-01-05 Thread Stefano Babic
On 31/12/2012 01:14, Shawn Guo wrote: > The on-board number of available usdhc devices is something board > specific. The patch moves CONFIG_SYS_FSL_USDHC_NUM out of > mx6qsabre_common.h and adds usdhc2 and usdhc4 support for mx6qsabresd > board. > > To keep the default mmc device for environment

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

2013-01-05 Thread Marek Vasut
Dear Stefano Babic, > On 26/12/2012 02:08, Marek Vasut wrote: > > Adjust the NAND partitioning layout so that there is a separate partition > > for the ramdisk and fdt blob on the NAND. > > > > Signed-off-by: Marek Vasut > > Cc: Detlev Zundel > > Cc: Stefano Babic > > Cc: Wolfgang Denk > > --

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

2013-01-05 Thread Stefano Babic
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. > > This issue was observed with gcc 4.6.2/4.7.3, which caused data aborts: > > U-Boot 2013.01-rc2-00172-gf8cfcf1-dirty (Dec 26 2012 - 13:13:2

Re: [U-Boot] [PATCH v2 2/2] mx53loco: Improve error handling on power_init()

2013-01-05 Thread Stefano Babic
On 28/12/2012 15:05, Fabio Estevam wrote: > From: Fabio Estevam > > Make the error handling more robust. > > Check if each one of the PMIC writes fail and if they do, just return > immediately. > > Also, print the cause for the failures. > > Signed-off-by: Fabio Estevam > --- Applied to u-bo

Re: [U-Boot] [PATCH] mx51evk: Remove unneeded comment

2013-01-05 Thread Stefano Babic
On 27/12/2012 16:46, Fabio Estevam wrote: > From: Fabio Estevam > > Looks like the original comment came from a copy and paste from mx31ads.h. > > It does not have a context on mx51evk anymore, so delete it. > > Signed-off-by: Fabio Estevam > --- Applied to u-boot-imx, thanks. Best regards,

Re: [U-Boot] [PATCH v2 1/2] mx53loco: Remove unneeded 'retval' variable

2013-01-05 Thread Stefano Babic
On 28/12/2012 15:05, Fabio Estevam wrote: > From: Fabio Estevam > > commit c73368150 (pmic: Extend PMIC framework to support multiple instances > of PMIC devices) introduced an extra 'retval' variable, but this is not > necessary since we have already the variable 'ret' in place. > > So use 'r

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

2013-01-05 Thread Stefano Babic
On 05/01/2013 18:10, Marek Vasut wrote: > Dear Stefano Babic, > >> On 26/12/2012 02:08, Marek Vasut wrote: >>> Adjust the NAND partitioning layout so that there is a separate partition >>> for the ramdisk and fdt blob on the NAND. >>> >>> Signed-off-by: Marek Vasut >>> Cc: Detlev Zundel >>> Cc:

[U-Boot] [PULL] : Please pull u-boot-imx

2013-01-05 Thread Stefano Babic
Hi Albert, please pull from u-boot-imx, thanks. The following changes since commit b874df74afc986b069738b180763f2464ac3f5f4: mx25pdk: Allow booting a device tree kernel (2012-12-13 09:23:59 +0100) are available in the git repository at: git://www.denx.de/git/u-boot-imx.git master for you

[U-Boot] global variables from comon/lcd.c

2013-01-05 Thread Jeroen Hofstee
Hi, While looking at the common/lcd.c I fail to understand why it declares and uses global variables like lcd_color_fg, lcd_color_color_bg, lcd_base and relies on the drivers / boards to provide them, leading to code duplication. It also provides getters / setters for some of these variables. To

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

2013-01-05 Thread Marek Vasut
Dear Stefano Babic, > On 05/01/2013 18:10, Marek Vasut wrote: > > Dear Stefano Babic, > > > >> On 26/12/2012 02:08, Marek Vasut wrote: > >>> Adjust the NAND partitioning layout so that there is a separate > >>> partition for the ramdisk and fdt blob on the NAND. > >>> > >>> Signed-off-by: Marek

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

2013-01-05 Thread Wolfgang Denk
Dear Jeroen, In message <50e7fb65.9000...@myspectrum.nl> you wrote: > > > Hm... I'm not sure if this is the right approach, then. If mainline > > Linux insists on such a 2 MB alignment, we shoud rather teach > > lcd_setmem() to follow tha rule, too. That should solve the problem > > as well (a

Re: [U-Boot] global variables from comon/lcd.c

2013-01-05 Thread Wolfgang Denk
Dear Jeroen, In message <50e86dfc.20...@myspectrum.nl> you wrote: > > While looking at the common/lcd.c I fail to understand why it declares > and uses global variables like lcd_color_fg, lcd_color_color_bg, lcd_base > and relies on the drivers / boards to provide them, leading to code > duplicat

[U-Boot] [PATCH] common/lcd.c: cleanup use of global variables

2013-01-05 Thread Wolfgang Denk
lcd_color_fg and lcd_color_bg had to be declared in board specific code, but were not actually used there; in addition, we have getter / setter functions for these, which were not used either. Get rid of the global variables, and use the getter function where needed (so far no setter calls are nee

Re: [U-Boot] [PATCH] common/lcd.c: cleanup use of global variables

2013-01-05 Thread Wolfgang Denk
Dear Anatolij, In message <1357415148-9243-1-git-send-email...@denx.de> you wrote: > lcd_color_fg and lcd_color_bg had to be declared in board specific > code, but were not actually used there; in addition, we have getter / > setter functions for these, which were not used either. > > Get rid of

[U-Boot] [PATCH] nds32: Add a basic errno.h

2013-01-05 Thread Simon Glass
This is available on other architectures, and nds32 will start to break without it as code starts to use error numbers more. Signed-off-by: Simon Glass --- arch/nds32/include/asm/errno.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 arch/nds32/include/asm/errno.h

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

2013-01-05 Thread Simon Glass
Hi Marek, On Sat, Jan 5, 2013 at 12:20 AM, Marek Vasut wrote: > Dear Simon Glass, > > [...] > >> + /* Signatures have a time stamp */ >> + if (IMAGE_ENABLE_TIMESTAMP && keyname) { >> + time_t timestamp; >> + >> + printf("%s Timestamp:", p); >> + if

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

2013-01-05 Thread Simon Glass
Hi Marek, On Sat, Jan 5, 2013 at 12:19 AM, Marek Vasut wrote: > Dear Simon Glass, > > [...] > >> + int string_size; >> + int ret; >> + >> + /* >> + * Get the current string size, before we update the FIT and add >> + * more >> + */ >> + string_size = fdt_size_dt_str

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

2013-01-05 Thread Simon Glass
Hi Marek, On Sat, Jan 5, 2013 at 12:24 AM, Marek Vasut wrote: > Dear Simon Glass, > >> The fit_handle_file() function is quiet long > > quite ;-) Quite. > >> - 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 de