[U-Boot] [PATCH] scripts: use CROSS_COMPILE environment variable

Stefan Agner stefan at agner.ch
Fri Mar 23 15:30:56 UTC 2018


On 03.03.2018 23:02, Lukasz Majewski wrote:
> Hi Stefan,
> 
>> On 02.03.2018 17:33, Lukasz Majewski wrote:
>> > Hi Stefan,
>> >
>> >> From: Stefan Agner <stefan.agner at toradex.com>
>> >>
>> >> Make sure we use objcopy from the cross compiler toolchain.
>> >>
>> >> Signed-off-by: Stefan Agner <stefan.agner at toradex.com>
>> >> ---
>> >>  scripts/get_default_envs.sh | 3 ++-
>> >>  1 file changed, 2 insertions(+), 1 deletion(-)
>> >>
>> >> diff --git a/scripts/get_default_envs.sh
>> >> b/scripts/get_default_envs.sh index 7955db60e5..84e9f51695 100755
>> >> --- a/scripts/get_default_envs.sh
>> >> +++ b/scripts/get_default_envs.sh
>> >> @@ -24,7 +24,8 @@ cp ${env_obj_file_path} ${ENV_OBJ_FILE_COPY}
>> >>
>> >>  # NOTE: objcopy saves its output to file passed in
>> >>  # (copy_env_common.o in this case)
>> >> -objcopy -O binary -j ".rodata.default_environment"
>> >> ${ENV_OBJ_FILE_COPY} +${CROSS_COMPILE}objcopy -O binary -j
>> >> ".rodata.default_environment" \
>> >> +	${ENV_OBJ_FILE_COPY}
>> >
>> > Stefan, could you check if this is not already solved in newest
>> > mainline?
>> >
>> > It seems like this is v2 or v1 of the patch. The v3 was finally
>> > pulled to main line:
>> >
>> > +${OBJCOPY} -O binary -j ".rodata.default_environment"
>> > ${ENV_OBJ_FILE_COPY}
>> >
>>
>> Tested again with vanilla mainline, and the scripts works indeed fine
>> and does exactly what I tried to achieve. Thanks Lukasz.
> 
> Happy to could help.
> 
> I've also tested this patch with OE|Yocto u-boot (for 2.3.3) recipe to
> generate images with primary and redundant envs.
> 
> I will try to upstream it, so creating env images would be easy.
> 

That sounds interesting.

Did you already send a patch for this? Do you happen to have a
link/patchfile you could share?

--
Stefan

>>
>> I did backport it, but had to set the object file back to env_common.o
>> for our case.
>>
>> So disregard this patch.
> 
> Ok.
> 
>>
>> --
>> Stefan
>>
>> >>
>> >>  # Replace default '\0' with '\n' and sort entries
>> >>  tr '\0' '\n' < ${ENV_OBJ_FILE_COPY} | sort -u
>> >
>> >
>> >
>> >
>> > Best regards,
>> >
>> > Lukasz Majewski
>> >
>> > --
>> >
>> > DENX Software Engineering GmbH,      Managing Director: Wolfgang
>> > Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell,
>> > Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email:
>> > wd at denx.de
> 
> 
> 
> 
> Best regards,
> 
> Lukasz Majewski
> 
> --
> 
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de


More information about the U-Boot mailing list