From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sylvain Lesne Date: Tue, 31 May 2016 16:58:01 +0200 Subject: [U-Boot] [PATCH 2/2] arm: socfpga: Enable tiny printf and simple malloc in SPL In-Reply-To: <1464621754-7683-2-git-send-email-marex@denx.de> References: <1464621754-7683-1-git-send-email-marex@denx.de> <1464621754-7683-2-git-send-email-marex@denx.de> Message-ID: <574DA679.4090208@alse-fr.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 05/30/2016 05:22 PM, Marek Vasut wrote: > Enable both features to reduce the SPL size by 6 kiB. > > Signed-off-by: Marek Vasut > Cc: Chin Liang See > Cc: Dinh Nguyen > Cc: Pavel Machek > Cc: Stefan Roese I tried to use the raw MMC boot (on the sockit, with current master + your patches), so I changed the following: --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -349,9 +349,10 @@ unsigned int cm_get_qspi_controller_clk_hz(void); #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img" #define CONFIG_SPL_LIBDISK_SUPPORT #else -#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 3 -#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0xa00 /* offset 2560 sect (1M+256k) */ -#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */ +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* offset 512 sect (256k) */ +#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 1000 /* 512 KB */ +#define CONFIG_SPL_LIBDISK_SUPPORT #endif #endif AFAIK, there were two mistakes: 1) FS_BOOT_PARTITION instead of RAW_MODE_U_BOOT 2) CONFIG_SPL_LIBDISK_SUPPORT was missing (I edited the offset to be able to use u-boot-with-spl.sfp directly) With these settings, I think we run into the size problem reported previously in the ML. So, enabling tiny printf could help, but we now get: disk/built-in.o: In function `part_get_info_extended': ...u-boot/disk/part_dos.c:236: undefined reference to `sprintf' So I think we can just put "info->name[0] = 0;" instead of the snprintf() calls, when using tiny printf. I can submit those changes as two patches if it makes sense. Thanks, Sylvain