* [U-Boot] ENV library broken with setenv/printenv argument structs
@ 2016-03-25 9:31 Stefano Babic
2016-03-25 14:00 ` Andreas Fenkart
0 siblings, 1 reply; 3+ messages in thread
From: Stefano Babic @ 2016-03-25 9:31 UTC (permalink / raw)
To: u-boot
Hi Andreas,
your series for the U-Boot environment tools does not let to use anymore
the tools as library to be linked to custom program.
In fact, tools/env/Makefile generates a library too:
lib-y += fw_env.o \
crc32.o ctype.o linux_string.o \
env_attr.o env_flags.o aes.o
that means that fw_main should not maintain any structure that is
referenced by the library.
In fact, linking with the library (renamed as ibubootenv.a), gives the
errors:
undefined reference to `printenv_args'
undefined reference to `common_args'
The two functions fw_printenv() and fw_setenv() are then supposed to be
called by a custom program, what it does not work anymore.
Can you take a look at it ?
Thanks,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread* [U-Boot] ENV library broken with setenv/printenv argument structs
2016-03-25 9:31 [U-Boot] ENV library broken with setenv/printenv argument structs Stefano Babic
@ 2016-03-25 14:00 ` Andreas Fenkart
2016-03-27 9:33 ` Stefano Babic
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Fenkart @ 2016-03-25 14:00 UTC (permalink / raw)
To: u-boot
HI Stefano,
I was not aware of the use case. I have sent out a simple patch that
moves the definition of the structs from fw_main_env.c to fw_env.c,
which should avoid the linking problem. Do you have test application
you could send me. I without doing the option parsing as done in
fw_env_main, you probably use only use a very limited subset of the
library.
/Andi
2016-03-25 10:31 GMT+01:00 Stefano Babic <sbabic@denx.de>:
> Hi Andreas,
>
> your series for the U-Boot environment tools does not let to use anymore
> the tools as library to be linked to custom program.
>
> In fact, tools/env/Makefile generates a library too:
>
> lib-y += fw_env.o \
> crc32.o ctype.o linux_string.o \
> env_attr.o env_flags.o aes.o
>
> that means that fw_main should not maintain any structure that is
> referenced by the library.
> In fact, linking with the library (renamed as ibubootenv.a), gives the
> errors:
>
> undefined reference to `printenv_args'
> undefined reference to `common_args'
>
> The two functions fw_printenv() and fw_setenv() are then supposed to be
> called by a custom program, what it does not work anymore.
>
> Can you take a look at it ?
>
> Thanks,
> Stefano Babic
>
> --
> =====================================================================
> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
> =====================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] ENV library broken with setenv/printenv argument structs
2016-03-25 14:00 ` Andreas Fenkart
@ 2016-03-27 9:33 ` Stefano Babic
0 siblings, 0 replies; 3+ messages in thread
From: Stefano Babic @ 2016-03-27 9:33 UTC (permalink / raw)
To: u-boot
Hi Andreas,
On 25/03/2016 15:00, Andreas Fenkart wrote:
> HI Stefano,
>
> I was not aware of the use case. I have sent out a simple patch that
> moves the definition of the structs from fw_main_env.c to fw_env.c,
> which should avoid the linking problem. Do you have test application
> you could send me.
> I without doing the option parsing as done in
> fw_env_main, you probably use only use a very limited subset of the
> library.
Yes, currently I am using just fw_parse_script. But exporting a library,
it can be possible that someone else need other options.
I see you sent a patch, I send an answer.
Stefano
>
> /Andi
>
> 2016-03-25 10:31 GMT+01:00 Stefano Babic <sbabic@denx.de>:
>> Hi Andreas,
>>
>> your series for the U-Boot environment tools does not let to use anymore
>> the tools as library to be linked to custom program.
>>
>> In fact, tools/env/Makefile generates a library too:
>>
>> lib-y += fw_env.o \
>> crc32.o ctype.o linux_string.o \
>> env_attr.o env_flags.o aes.o
>>
>> that means that fw_main should not maintain any structure that is
>> referenced by the library.
>> In fact, linking with the library (renamed as ibubootenv.a), gives the
>> errors:
>>
>> undefined reference to `printenv_args'
>> undefined reference to `common_args'
>>
>> The two functions fw_printenv() and fw_setenv() are then supposed to be
>> called by a custom program, what it does not work anymore.
>>
>> Can you take a look at it ?
>>
>> Thanks,
>> Stefano Babic
>>
>> --
>> =====================================================================
>> DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
>> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>> Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
>> =====================================================================
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-27 9:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-25 9:31 [U-Boot] ENV library broken with setenv/printenv argument structs Stefano Babic
2016-03-25 14:00 ` Andreas Fenkart
2016-03-27 9:33 ` Stefano Babic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox