Re: [U-Boot] [PATCH v2 7/7] imx: add status reporting for HAB status
Hi, Am 12.08.13 16:39, schrieb Stefano Babic: + +bool is_hab_enabled(void) +{ + struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR; + struct fuse_bank *bank = ocotp-bank[0]; + struct fuse_bank0_regs *fuse = + (struct fuse_bank0_regs *)bank-fuse_regs; + uint32_t reg = readl(fuse-cfg5); + + return (reg 0x2) == 0x2; +} With the exception of that function and the required structure definitions, the whole code also works with i.MX53 (tested with LOCO board), too. Also AN4581 [1] that describes HAB doesn't differentiate between i.MX53 and i.MX6 in that case as they both use HAB v4. I think you have more experience how to organize the code (I added a few symlinks and modified only the Makefile, but I guess that symlink are not the best solution). Regards, Bernhard [1] http://cache.freescale.com/files/32bit/doc/app_note/AN4581.pdf ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH v2 6/7] tools: add support for setting the CSF into imximage
Am 12.08.13 16:39, schrieb Stefano Babic: BOOT_FROM spi + CSF value + + Total size of CSF (Command Sequence File) + used for Secure Boot/ High Assurance Boot + (HAB). + + Using this command will populate the IVT + (Initial Vector Table) CSF pointer and adjust Isn't that Image Vector Table? Regards, Bernhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] Introduce a global bool type
* Wolfgang Denk w...@denx.de [2013-01-08 18:49]: In message 6ae080b68d46fc4ba2d2769e68d765b708205...@039-sn2mpn1-023.039d.mgd.msft.net you wrote: This seems broken to me. Can we rather try8 and get rid of all this bool stuff instead? It's just obfuscating the code... Like Scott said, we sometimes copy code from Linux that uses 'bool', so it's simpler if we just retain this commonly-used type. If it's part of the language, how is it obfuscating? Maybe the Linux _Bool has been introduced very late to any C standard, and you can still see this from the ugly, unnatural name. But C99 (well, that's 12 years now!) also includes stdbool.h that defines 'bool', 'true' and 'false'. Regards, Bernhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] Booting an i.MX53 from NAND with u-boot
Hello, we have a custom board with an Freescale i.MX 53 CPU and NAND flash (MT29F1G08ABADAWP if it matters). It's quite similar to the i.MX 53 LOCO (Quick Start Board), but the LOCO has no Flash and only boots from Micro SD card. I'm using u-boot 2012.07 from mainline with some additional patches, notably the patch to add i.M53 support to mxc_nand driver from Benoît Thébaudeau that has been posted on the mailing list recently. When booting from SD card, everything is fine, i.e. I can read and write the flash from u-boot. And also from Linux. However, the goal is to boot from NAND. :) I used the kobs-ng-11.09.01 software from Freescale to write the bootloader to NAND, since it also writes the necessary boot header and has support for bad pages. Is it correct to use 'u-boot.bin' (and not 'u-boot.imx')? There's some information floating around in the internet that I need some proprietary tool to convert 'u-boot.bin' to some 'streaming' format. But that information is for i.MX 28 and not for i.MX 53. I found also tools/mxsboot.c in the u-boot sources which seems to be a replacement for kobs-ng. Some ideas what we're doing wrong or how to debug this? Of course it can be also the boot GPIO settings, but I wanted to ask here if the procedure looks correct from u-boot side. Regards, Bernhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] UBIFS: Improve error message when reading superblock failed
In addition to the error message also display the error code. I had the problem that my malloc memory was not enough (ENOMEM), and if u-boot had displayed the error code immediately that would have saved me some debugging. Signed-off-by: Bernhard Walle wa...@corscience.de --- v2: Print the non-negated error value. fs/ubifs/super.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 26b48f0..e6c02f5 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -1191,7 +1191,7 @@ int ubifs_mount(char *vol_name) mnt = NULL; ret = ubifs_get_sb(ubifs_fs_type, flags, name, data, mnt); if (ret) { - printf(Error reading superblock on volume '%s'!\n, name); + printf(Error reading superblock on volume '%s': %d!\n, name, ret); return -1; } -- 1.7.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] UBIFS: Improve error message when reading superblock failed
Am 20.02.2012 09:59, schrieb Albert ARIBAUD: Dry numbers as error messages are better than no error messages but only marginally IMO. Isn't there a way to emit a readable message re malloc instead of emitting an int value? Well, I'm not familiar with the u-boot codebase. Does u-boot have a strerror table? How is it handled on other places? Should an error message printed directly before returning -ENOMEM? Regards, Bernhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
Re: [U-Boot] [PATCH] UBIFS: Improve error message when reading superblock failed
Hi Detlev, * Detlev Zundel d...@denx.de [2012-02-17 15:15]: @@ -1191,7 +1191,7 @@ int ubifs_mount(char *vol_name) mnt = NULL; ret = ubifs_get_sb(ubifs_fs_type, flags, name, data, mnt); if (ret) { - printf(Error reading superblock on volume '%s'!\n, name); + printf(Error reading superblock on volume '%s': %d!\n, name, -ret); return -1; } I think this makes sense, but I think it would be more natural to print the real error code, not the negative value. I don't know how to search for all such occurrences, but I cannot find any but a lot of sites printing the error code as is. well, the return value is negative, so my intention was to print the error code as positive number. So you think we should display it as negative number (-12 instead of 12 for ENOMEM)? Regards, Bernhard ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
[U-Boot] [PATCH] UBIFS: Improve error message when reading superblock failed
In addition to the error message also display the error code. I had the problem that my malloc memory was not enough (ENOMEM), and if u-boot had displayed the error code immediately that would have saved me some debugging. Signed-off-by: Bernhard Walle wa...@corscience.de --- fs/ubifs/super.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 26b48f0..0b1440b 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -1191,7 +1191,7 @@ int ubifs_mount(char *vol_name) mnt = NULL; ret = ubifs_get_sb(ubifs_fs_type, flags, name, data, mnt); if (ret) { - printf(Error reading superblock on volume '%s'!\n, name); + printf(Error reading superblock on volume '%s': %d!\n, name, -ret); return -1; } -- 1.7.9 ___ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot