From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vagrant Cascadian Date: Sat, 25 Apr 2015 09:22:12 -0700 Subject: [U-Boot] [U-Boot, v3, 5/5] mx6cuboxi: Load the correct 'fdt_file' variable In-Reply-To: <553B2EC1.8080203@denx.de> References: <1429876015-22540-5-git-send-email-festevam@gmail.com> <87zj5xozr3.fsf@aikidev.net> <553B2EC1.8080203@denx.de> Message-ID: <87wq10p497.fsf@aikidev.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2015-04-24, Stefano Babic wrote: > On 25/04/2015 01:47, Vagrant Cascadian wrote: >> On 2015-04-24, Fabio Estevam wrote: >>> Instead of hardcoding the 'fdt_file' variable, let's detect the SoC and >>> board variant on the fly and change the dtb name. >> ... >>> diff --git a/include/configs/mx6cuboxi.h b/include/configs/mx6cuboxi.h >>> index 5d58b16..c3cf633 100644 >>> --- a/include/configs/mx6cuboxi.h >>> +++ b/include/configs/mx6cuboxi.h >> ... >>> #define CONFIG_EXTRA_ENV_SETTINGS \ >>> "script=boot.scr\0" \ >>> "image=zImage\0" \ >>> - "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ >>> + "check_suffix=" \ >>> + "if is_hummingboard; then " \ >>> + "setenv dts_suffix -hummingboard.dtb;" \ >>> + "else " \ >>> + "setenv dts_suffix -cubox-i.dtb;" \ >>> + "fi; "\ >>> + "setenv fdt_file ${dts_prefix}${dts_suffix};" \ >>> "fdt_addr=0x18000000\0" \ >> >> The setenv fdt_file line needs to terminate with "\0", > > Are you sure ? I think Fabio's intention is to have setenv fdt_file as > part of check_suffix, and it is not if you add a trailing \0 Well, if you don't append the \0, then fdt_addr=0x18000000 is appended to check_suffix, and fdt_addr is left unset... At least, that's what a booted system showed. live well, vagrant -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 818 bytes Desc: not available URL: