[U-Boot] [PATCH] imx_common: Return MMCSD_MODE_FS in spl_boot_mode() also for EXTFS

2016-06-12 Thread Petr Kulhavy
spl_boot_mode() returned MMCSD_MODE_RAW on MMC if CONFIG_SPL_EXT_SUPPORT was configured. EXTFS is the default filesystem selected in imx6_spl.h and the function should return MMCSD_MODE_FS instead. Fix this and return MMCSD_MODE_FS instead in such cases. Signed-off-by: Petr Kulhavy CC: Stefano

[U-Boot] SPL: mmc_load_image_raw_sector() linked even if not used

2016-06-12 Thread Petr Kulhavy
Hi, it seems that mmc_load_image_raw_sector() in spl_mmc.c is always linked even if the board does not use raw MMC (and e.g. FS instead). This unnecessarily blows up the SPL code. I'm just wondering if there is some deeper reason behind. Otherwise I will prepare a patch to condition it out wit

[U-Boot] [PATCH] SPL ext: cosmetic: correct error message in spl_load_image_ext()

2016-06-14 Thread Petr Kulhavy
Correct the error message in spl_load_image_ext() when image parsing fails. Instead of "ext4fs_read failed" print "failed to parse image header". Signed-off-by: Petr Kulhavy CC: Guillaume GARDET --- common/spl/spl_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[U-Boot] [PATCH] SPL: ext: remove redundant ifdef statement

2016-06-14 Thread Petr Kulhavy
Remove redundant #if defined(CONFIG_SPL_OS_BOOT) statement around getenv() calls in spl_load_image_ext_os(). The whole function is surrounded by #ifdef CONFIG_SPL_OS_BOOT. No functional change. Signed-off-by: Petr Kulhavy CC: Guillaume GARDET --- common/spl/spl_ext.c | 3 +-- 1 file changed

[U-Boot] [PATCH v2] SPL ext: cosmetic: correct error message in spl_load_image_ext()

2016-06-18 Thread Petr Kulhavy
Correct the error message in spl_load_image_ext() when image parsing fails. Instead of "ext4fs_read failed" print "failed to parse image header". Signed-off-by: Petr Kulhavy CC: Guillaume GARDET CC: Tom Rini --- common/spl/spl_ext.c | 2 +- 1 file changed, 1 insertion(+),

[U-Boot] [PATCH] fastboot: add support for writing raw MMC

2016-10-05 Thread Petr Kulhavy
t;lba:" followed by the block address. The address can be in decimal or hexadecimal with the "0x" prefix. Signed-off-by: Petr Kulhavy --- common/fb_mmc.c | 38 +- doc/README.android-fastboot | 15 +++ 2 files changed, 52 inser

Re: [U-Boot] [PATCH] fastboot: add support for writing raw MMC

2016-10-07 Thread Petr Kulhavy
On 07/10/16 01:57, Jaehoon Chung wrote: On 10/05/2016 10:38 PM, Petr Kulhavy wrote: The current fastboot implementation is only able to flash partition images. However sometimes it is needed to write the raw MMC, e.g. when storing the U-boot environment image or SPL. This patch adds the

[U-Boot] Building u-boot.imx and SPL simultaneously

2016-09-02 Thread Petr Kulhavy
Hi, I'm facing a problem that the iMX Makefile does not allow to build u-boot.imx and the SPL binary simultaneously. This would be useful for generating images for flash and for a serial loading. The reason is that each target needs a different config file, but there is only one IMX_CONFIG var

Re: [U-Boot] Building u-boot.imx and SPL simultaneously

2016-09-02 Thread Petr Kulhavy
After all SPL is a completely different binary. ...or am I touching some skeleton in a cupboard? Thanks Petr On 02/09/16 20:18, Stefano Babic wrote: Hi, On 02/09/2016 18:46, Petr Kulhavy wrote: Hi, I'm facing a problem that the iMX Makefile does not allow to build u-boot.imx and the

Re: [U-Boot] Building u-boot.imx and SPL simultaneously

2016-09-02 Thread Petr Kulhavy
Hi Fabio, On 02/09/16 22:03, Fabio Estevam wrote: You don't need u-boot.imx to boot the board with imx_usb_loader. Check the README update that Stefano did with this commit: commit 40f4839ce12adfc0223d6e3035cf9c3a4754a0ec Author: Stefano Babic Date: Fri Dec 11 17:30:42 2015 +0100 imx_c

Re: [U-Boot] Building u-boot.imx and SPL simultaneously

2016-09-02 Thread Petr Kulhavy
hance for an error during build I want to have one Buildroot defconfig, run one build command and get all the necessary images. How do I do that with two U-boot defconfigs? On 02/09/16 23:45, Stefano Babic wrote: Hi Petr, On 02/09/2016 20:57, Petr Kulhavy wrote: Hi, you have already broug

Re: [U-Boot] Building u-boot.imx and SPL simultaneously

2016-09-06 Thread Petr Kulhavy
On 06/09/16 16:00, Eric Nelson wrote: Hi Tom, On 09/06/2016 06:40 AM, Tom Rini wrote: On Fri, Sep 02, 2016 at 10:53:58PM +0200, Petr Kulhavy wrote: Another place this doesn't work (which is where it doesn't work for me) is when the console is already open and I can't easily

[U-Boot] [PATCH 1/3] disk: part: implement generic function part_get_info_by_name()

2016-09-07 Thread Petr Kulhavy
. Signed-off-by: Petr Kulhavy --- common/fb_mmc.c | 4 ++-- disk/part.c | 26 ++ disk/part_amiga.c | 1 + disk/part_dos.c | 1 + disk/part_efi.c | 20 +--- disk/part_iso.c | 1 + disk/part_mac.c | 1 + include/part.h| 32

[U-Boot] [PATCH 3/3] disk: part: refactor generic name creation for DOS and ISO

2016-09-07 Thread Petr Kulhavy
In both DOS and ISO partition tables the same code to create partition name like "hda1" was repeated. Code moved to into a new function part_set_generic_name() in part.c and optimized. Added recognition of MMC and SD types, name is like "mmcsda1". Signed-off-by: Petr Kulha

[U-Boot] [PATCH 0/3] Fastboot MBR and generic partition support

2016-09-07 Thread Petr Kulhavy
This set extends the Fastboot implementation from GPT-only to any partition support. Further it adds a special target "mbr" (configurable) to write the DOS MBR. Petr Kulhavy (3): disk: part: implement generic function part_get_info_by_name() fastboot: add support for writing MBR

[U-Boot] [PATCH 2/3] fastboot: add support for writing MBR

2016-09-07 Thread Petr Kulhavy
Add special target "mbr" (otherwise configurable via CONFIG_FASTBOOT_MBR_NAME) to write MBR partition table. Partitions are now searched using the generic function which finds any partiiton by name. For MBR the partition names hda1, sda1, etc. are used. Signed-off-by: Petr Kulhavy -

[U-Boot] [PATCH v2 3/4] disk: part: refactor generic name creation for DOS and ISO

2016-09-09 Thread Petr Kulhavy
In both DOS and ISO partition tables the same code to create partition name like "hda1" was repeated. Code moved to into a new function part_set_generic_name() in part.c and optimized. Added recognition of MMC and SD types, name is like "mmcsda1". Signed-off-by: Petr Kulha

[U-Boot] [PATCH v2 1/4] disk: part: implement generic function part_get_info_by_name()

2016-09-09 Thread Petr Kulhavy
. Signed-off-by: Petr Kulhavy Reviewed-by: Tom Rini --- v1: initial v2: no change common/fb_mmc.c | 4 ++-- disk/part.c | 26 ++ disk/part_amiga.c | 1 + disk/part_dos.c | 1 + disk/part_efi.c | 20 +--- disk/part_iso.c | 1 + disk

[U-Boot] [PATCH v2 4/4] fastboot: move FASTBOOT_FLASH options into Kconfig

2016-09-09 Thread Petr Kulhavy
Move FASTBOOT_MBR_NAME and FASTBOOT_GPT_NAME into Kconfig. Add dependency on the FASTBOOT_FLASH setting (also for FASTBOOT_MBR_NAME). Remove the now redundant GPT_ENTRY_NAME. Signed-off-by: Petr Kulhavy --- v2: initial README | 2 +- cmd/fastboot/Kconfig | 24

[U-Boot] [PATCH v2 0/4] Fastboot MBR and generic partition support

2016-09-09 Thread Petr Kulhavy
ot/Kconfig Petr Kulhavy (4): disk: part: implement generic function part_get_info_by_name() fastboot: add support for writing MBR disk: part: refactor generic name creation for DOS and ISO fastboot: move FASTBOOT_FLASH options into Kconfig README | 9 +- cmd/fastbo

[U-Boot] [PATCH v2 2/4] fastboot: add support for writing MBR

2016-09-09 Thread Petr Kulhavy
Add special target "mbr" (otherwise configurable via CONFIG_FASTBOOT_MBR_NAME) to write MBR partition table. Partitions are now searched using the generic function which finds any partiiton by name. For MBR the partition names hda1, sda1, etc. are used. Signed-off-by: Petr Kulhavy R