* [Buildroot] Using u-boot tools
@ 2014-09-29 7:38 Kantanu Kumar Mohapatra
2014-09-29 9:18 ` Thomas Petazzoni
0 siblings, 1 reply; 13+ messages in thread
From: Kantanu Kumar Mohapatra @ 2014-09-29 7:38 UTC (permalink / raw)
To: buildroot
Hi,
I was using buildroot-2010.05, now I am upgrading it to buildroot-2014.03.
I am using customized uboot-tools 2010.03 and want to retain that. In 2014,
the tools selection is new, but I want to use the source code for
uboot-tools used in 2010.03, as this is having some changes. I want to get
the "fw_printenv" compiled with a "-D" flag.
Can anyone please help me in this regard?
Thanks,
Kantanu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140929/25411f33/attachment.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-29 7:38 [Buildroot] Using u-boot tools Kantanu Kumar Mohapatra
@ 2014-09-29 9:18 ` Thomas Petazzoni
2014-09-29 9:32 ` Thomas De Schampheleire
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2014-09-29 9:18 UTC (permalink / raw)
To: buildroot
Dear Kantanu Kumar Mohapatra,
On Mon, 29 Sep 2014 13:08:38 +0530, Kantanu Kumar Mohapatra wrote:
> I am using customized uboot-tools 2010.03 and want to retain that. In 2014,
> the tools selection is new, but I want to use the source code for
> uboot-tools used in 2010.03, as this is having some changes. I want to get
> the "fw_printenv" compiled with a "-D" flag.
>
> Can anyone please help me in this regard?
Well, just add a patch in package/uboot-tools/ to make whatever change
you want to the U-Boot source code used for your U-Boot tools.
Or am I missing something?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-29 9:18 ` Thomas Petazzoni
@ 2014-09-29 9:32 ` Thomas De Schampheleire
2014-09-29 13:21 ` Thomas Petazzoni
0 siblings, 1 reply; 13+ messages in thread
From: Thomas De Schampheleire @ 2014-09-29 9:32 UTC (permalink / raw)
To: buildroot
On Mon, Sep 29, 2014 at 11:18 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Kantanu Kumar Mohapatra,
>
> On Mon, 29 Sep 2014 13:08:38 +0530, Kantanu Kumar Mohapatra wrote:
>
>> I am using customized uboot-tools 2010.03 and want to retain that. In 2014,
>> the tools selection is new, but I want to use the source code for
>> uboot-tools used in 2010.03, as this is having some changes. I want to get
>> the "fw_printenv" compiled with a "-D" flag.
>>
>> Can anyone please help me in this regard?
>
> Well, just add a patch in package/uboot-tools/ to make whatever change
> you want to the U-Boot source code used for your U-Boot tools.
As this change will not be upstreamable to buildroot, I would rather
recommend to use BR2_GLOBAL_PATCH_DIR, to not pollute the upstream
buildroot sources. See http://nightly.buildroot.org/#customize-patches
Best regards,
Thomas
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-29 9:32 ` Thomas De Schampheleire
@ 2014-09-29 13:21 ` Thomas Petazzoni
2014-09-29 15:59 ` Kantanu Kumar Mohapatra
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2014-09-29 13:21 UTC (permalink / raw)
To: buildroot
Dear Thomas De Schampheleire,
On Mon, 29 Sep 2014 11:32:52 +0200, Thomas De Schampheleire wrote:
> >> I am using customized uboot-tools 2010.03 and want to retain that. In 2014,
> >> the tools selection is new, but I want to use the source code for
> >> uboot-tools used in 2010.03, as this is having some changes. I want to get
> >> the "fw_printenv" compiled with a "-D" flag.
> >>
> >> Can anyone please help me in this regard?
> >
> > Well, just add a patch in package/uboot-tools/ to make whatever change
> > you want to the U-Boot source code used for your U-Boot tools.
>
> As this change will not be upstreamable to buildroot, I would rather
> recommend to use BR2_GLOBAL_PATCH_DIR, to not pollute the upstream
> buildroot sources. See http://nightly.buildroot.org/#customize-patches
Absolutely, that's a good point. Thanks for reminding me about this!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-29 13:21 ` Thomas Petazzoni
@ 2014-09-29 15:59 ` Kantanu Kumar Mohapatra
2014-09-29 16:38 ` Thomas Petazzoni
0 siblings, 1 reply; 13+ messages in thread
From: Kantanu Kumar Mohapatra @ 2014-09-29 15:59 UTC (permalink / raw)
To: buildroot
?Frankly Speaking, I want to build fw_printenv in uboot-2010.03(for
buildroot-20104.03), in uboot-2010.03 way. Is it possible??
Thanks,
Kantanu
On Mon, Sep 29, 2014 at 6:51 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:
> Dear Thomas De Schampheleire,
>
> On Mon, 29 Sep 2014 11:32:52 +0200, Thomas De Schampheleire wrote:
>
> > >> I am using customized uboot-tools 2010.03 and want to retain that. In
> 2014,
> > >> the tools selection is new, but I want to use the source code for
> > >> uboot-tools used in 2010.03, as this is having some changes. I want
> to get
> > >> the "fw_printenv" compiled with a "-D" flag.
> > >>
> > >> Can anyone please help me in this regard?
> > >
> > > Well, just add a patch in package/uboot-tools/ to make whatever change
> > > you want to the U-Boot source code used for your U-Boot tools.
> >
> > As this change will not be upstreamable to buildroot, I would rather
> > recommend to use BR2_GLOBAL_PATCH_DIR, to not pollute the upstream
> > buildroot sources. See http://nightly.buildroot.org/#customize-patches
>
> Absolutely, that's a good point. Thanks for reminding me about this!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140929/2b1d56fc/attachment.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-29 15:59 ` Kantanu Kumar Mohapatra
@ 2014-09-29 16:38 ` Thomas Petazzoni
2014-09-29 18:43 ` Kantanu Kumar Mohapatra
0 siblings, 1 reply; 13+ messages in thread
From: Thomas Petazzoni @ 2014-09-29 16:38 UTC (permalink / raw)
To: buildroot
Dear Kantanu Kumar Mohapatra,
On Mon, 29 Sep 2014 21:29:40 +0530, Kantanu Kumar Mohapatra wrote:
> ?Frankly Speaking, I want to build fw_printenv in uboot-2010.03(for
> buildroot-20104.03), in uboot-2010.03 way. Is it possible??
Yes, in this case, just edit uboot-tools.mk and adapt it to take
sources from U-Boot 2010.03.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-29 16:38 ` Thomas Petazzoni
@ 2014-09-29 18:43 ` Kantanu Kumar Mohapatra
2014-09-29 19:14 ` Thomas De Schampheleire
0 siblings, 1 reply; 13+ messages in thread
From: Kantanu Kumar Mohapatra @ 2014-09-29 18:43 UTC (permalink / raw)
To: buildroot
Many thanks.
Yaa I too found it as the place to take the source. The thing is, uboot
tools is under auto-target. That's I am not much familiar with, how to make
changes to that to take the source?
I'll be thankful if you could help me to make changes to that makefile.
Thanks,
Kantanu
On 29-Sep-2014 10:08 PM, "Thomas Petazzoni" <
thomas.petazzoni@free-electrons.com> wrote:
> Dear Kantanu Kumar Mohapatra,
>
> On Mon, 29 Sep 2014 21:29:40 +0530, Kantanu Kumar Mohapatra wrote:
>
> > ?Frankly Speaking, I want to build fw_printenv in uboot-2010.03(for
> > buildroot-20104.03), in uboot-2010.03 way. Is it possible??
>
> Yes, in this case, just edit uboot-tools.mk and adapt it to take
> sources from U-Boot 2010.03.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140930/65c16369/attachment.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-29 18:43 ` Kantanu Kumar Mohapatra
@ 2014-09-29 19:14 ` Thomas De Schampheleire
2014-09-29 19:41 ` Kantanu Kumar Mohapatra
0 siblings, 1 reply; 13+ messages in thread
From: Thomas De Schampheleire @ 2014-09-29 19:14 UTC (permalink / raw)
To: buildroot
Hi Kantanu,
(please don't top post)
On Mon, Sep 29, 2014 at 8:43 PM, Kantanu Kumar Mohapatra
<kantanukumar@gmail.com> wrote:
> Many thanks.
>
> Yaa I too found it as the place to take the source. The thing is, uboot
> tools is under auto-target. That's I am not much familiar with, how to make
> changes to that to take the source?
>
> I'll be thankful if you could help me to make changes to that makefile.
Have a look at the manual chapter regarding adding new packages. It
explains the different variables that exist, both for the generic and
autotools infrastructures.
http://buildroot.uclibc.org/downloads/manual/manual.html#adding-packages
What Thomas Petazzoni suggested is to change the variable UBOOT_TOOLS_VERSION.
Best regards,
Thomas
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-29 19:14 ` Thomas De Schampheleire
@ 2014-09-29 19:41 ` Kantanu Kumar Mohapatra
2014-09-29 19:58 ` Thomas De Schampheleire
0 siblings, 1 reply; 13+ messages in thread
From: Kantanu Kumar Mohapatra @ 2014-09-29 19:41 UTC (permalink / raw)
To: buildroot
On 30-Sep-2014 12:44 AM, "Thomas De Schampheleire" <
patrickdepinguin@gmail.com> wrote:
>
> Hi Kantanu,
>
> (please don't top post)
>
> On Mon, Sep 29, 2014 at 8:43 PM, Kantanu Kumar Mohapatra
> <kantanukumar@gmail.com> wrote:
> > Many thanks.
> >
> > Yaa I too found it as the place to take the source. The thing is, uboot
> > tools is under auto-target. That's I am not much familiar with, how to
make
> > changes to that to take the source?
> >
> > I'll be thankful if you could help me to make changes to that makefile.
>
> Have a look at the manual chapter regarding adding new packages. It
> explains the different variables that exist, both for the generic and
> autotools infrastructures.
> http://buildroot.uclibc.org/downloads/manual/manual.html#adding-packages
>
> What Thomas Petazzoni suggested is to change the variable
UBOOT_TOOLS_VERSION.
>
> Best regards,
> Thomas
Thanks Thomas. I have tried with changing the tools version, that's not
working, as buildroot 10 not having uboot tool separate. fw_printenv comes
integrated with uboot-tools-10.03.
I can see the target fw_printenv, gets compiled like this,
$(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/$(U_BOOT_BIN)
$(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \
-DUSE_HOSTCC -o $@ \
$(U_BOOT_DIR)/tools/env/*.c $(U_BOOT_DIR)/lib_generic/crc32.c
I am using here another -D flag in uboot-tools-10.03. Same thing want to
replicated for uboot tools 14 and same source only want to take.
Thanks,
Kantanu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140930/c74e064e/attachment.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-29 19:41 ` Kantanu Kumar Mohapatra
@ 2014-09-29 19:58 ` Thomas De Schampheleire
2014-09-30 9:33 ` Kantanu Kumar Mohapatra
0 siblings, 1 reply; 13+ messages in thread
From: Thomas De Schampheleire @ 2014-09-29 19:58 UTC (permalink / raw)
To: buildroot
Hi Kantanu,
On Mon, Sep 29, 2014 at 9:41 PM, Kantanu Kumar Mohapatra
<kantanukumar@gmail.com> wrote:
>
> On 30-Sep-2014 12:44 AM, "Thomas De Schampheleire"
> <patrickdepinguin@gmail.com> wrote:
>>
>> Hi Kantanu,
>>
>> (please don't top post)
>>
>> On Mon, Sep 29, 2014 at 8:43 PM, Kantanu Kumar Mohapatra
>> <kantanukumar@gmail.com> wrote:
>> > Many thanks.
>> >
>> > Yaa I too found it as the place to take the source. The thing is, uboot
>> > tools is under auto-target. That's I am not much familiar with, how to
>> > make
>> > changes to that to take the source?
>> >
>> > I'll be thankful if you could help me to make changes to that makefile.
>>
>> Have a look at the manual chapter regarding adding new packages. It
>> explains the different variables that exist, both for the generic and
>> autotools infrastructures.
>> http://buildroot.uclibc.org/downloads/manual/manual.html#adding-packages
>>
>> What Thomas Petazzoni suggested is to change the variable
>> UBOOT_TOOLS_VERSION.
>>
>> Best regards,
>> Thomas
>
> Thanks Thomas. I have tried with changing the tools version, that's not
> working, as buildroot 10 not having uboot tool separate. fw_printenv comes
> integrated with uboot-tools-10.03.
>
> I can see the target fw_printenv, gets compiled like this,
> $(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/$(U_BOOT_BIN)
> $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \
> -DUSE_HOSTCC -o $@ \
> $(U_BOOT_DIR)/tools/env/*.c $(U_BOOT_DIR)/lib_generic/crc32.c
>
> I am using here another -D flag in uboot-tools-10.03. Same thing want to
> replicated for uboot tools 14 and same source only want to take.
I don't understand you anymore.
You want to remain at u-boot-tools 2010.03, when using buildroot
2014.xx, correct?
So what you would do is change UBOOT_TOOLS_VERSION = 2010.03 inside
buildroot 2014.xx.
The 'uboot-tools' package is just using standard uboot sources, but
only builds the tools in the tools directory.
If this information is not clear enough to you, please try to rephrase
in more details what you want to achieve. Please also be specific
about the versions. In your first mail you mentioned
buildroot-2014.03, but this does not exist.
Thanks,
Thomas
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-29 19:58 ` Thomas De Schampheleire
@ 2014-09-30 9:33 ` Kantanu Kumar Mohapatra
2014-09-30 9:58 ` Thomas De Schampheleire
0 siblings, 1 reply; 13+ messages in thread
From: Kantanu Kumar Mohapatra @ 2014-09-30 9:33 UTC (permalink / raw)
To: buildroot
On Tue, Sep 30, 2014 at 1:28 AM, Thomas De Schampheleire <
patrickdepinguin@gmail.com> wrote:
> Hi Kantanu,
>
>
> On Mon, Sep 29, 2014 at 9:41 PM, Kantanu Kumar Mohapatra
> <kantanukumar@gmail.com> wrote:
> >
> > On 30-Sep-2014 12:44 AM, "Thomas De Schampheleire"
> > <patrickdepinguin@gmail.com> wrote:
> >>
> >> Hi Kantanu,
> >>
> >> (please don't top post)
> >>
> >> On Mon, Sep 29, 2014 at 8:43 PM, Kantanu Kumar Mohapatra
> >> <kantanukumar@gmail.com> wrote:
> >> > Many thanks.
> >> >
> >> > Yaa I too found it as the place to take the source. The thing is,
> uboot
> >> > tools is under auto-target. That's I am not much familiar with, how to
> >> > make
> >> > changes to that to take the source?
> >> >
> >> > I'll be thankful if you could help me to make changes to that
> makefile.
> >>
> >> Have a look at the manual chapter regarding adding new packages. It
> >> explains the different variables that exist, both for the generic and
> >> autotools infrastructures.
> >>
> http://buildroot.uclibc.org/downloads/manual/manual.html#adding-packages
> >>
> >> What Thomas Petazzoni suggested is to change the variable
> >> UBOOT_TOOLS_VERSION.
> >>
> >> Best regards,
> >> Thomas
> >
> > Thanks Thomas. I have tried with changing the tools version, that's not
> > working, as buildroot 10 not having uboot tool separate. fw_printenv
> comes
> > integrated with uboot-tools-10.03.
> >
> > I can see the target fw_printenv, gets compiled like this,
> > $(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/$(U_BOOT_BIN)
> > $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \
> > -DUSE_HOSTCC -o $@ \
> > $(U_BOOT_DIR)/tools/env/*.c $(U_BOOT_DIR)/lib_generic/crc32.c
> >
> > I am using here another -D flag in uboot-tools-10.03. Same thing want to
> > replicated for uboot tools 14 and same source only want to take.
>
> I don't understand you anymore.
> You want to remain at u-boot-tools 2010.03, when using buildroot
> 2014.xx, correct?
> So what you would do is change UBOOT_TOOLS_VERSION = 2010.03 inside
> buildroot 2014.xx.
>
> The 'uboot-tools' package is just using standard uboot sources, but
> only builds the tools in the tools directory.
>
> If this information is not clear enough to you, please try to rephrase
> in more details what you want to achieve. Please also be specific
> about the versions. In your first mail you mentioned
> buildroot-2014.03, but this does not exist.
>
> Thanks,
> Thomas
>
?Thanks a lot Thomas for your reply. Sorry for the typo, please consider
the new version as buildroot-2014.02.
Let me explain all in detail.
old br2:
========
version: 2010.05
uboot: 2010.03(customized)
uboot-tools: 2010.03 (used from uboot src)
New br2 (which I am upgrading to):
===========================
version: 2014.02
uboot: 2010.03(customized, same should be across tools too)
uboot-tools: 2014.01 ( should be same as uboot-2010.03)
In br2-14, I am getting the uboot image(.bin) properly, which I customized
to get a .rom with my headers added to it, done in boot/uboot/uboot.mk
Here the problem which I faced is "fw_printenv" executable, which is built
in tools, for br2-2014.02. fw_printenv is created, when getting the uboot
image in br2-2010.03 (target/uboot/Makefile.in).
In br2-2014.02,
Tools should be taken from the source, which went into
output/build/uboot-2010.03, But instead it creates another
uboot-tools-2014.01 inside output/build/ and places source there.
How to build that fw_printenv, in old way like br2-10, seen as below?
$(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/$(U_BOOT_BIN)
mkdir -p $(@D)
$(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \
-D_custom_flag \
-DUSE_HOSTCC -o $@ \
$(U_BOOT_DIR)/tools/env/*.c $(U_BOOT_DIR)/lib_generic/crc32.c
I want to use another "-D_custom_flag" to build "fw_printenv", in br2-14.
Please suggest me the changes to be done. If I change UBOOT_TOOLS_VERSION
= 2010.03, in uboot-tools.mk, getting compilation error, as it has
dependency on host-tools.?
Thanks,
Kantanu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140930/55425bc3/attachment.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-30 9:33 ` Kantanu Kumar Mohapatra
@ 2014-09-30 9:58 ` Thomas De Schampheleire
2014-09-30 13:16 ` Kantanu Kumar Mohapatra
0 siblings, 1 reply; 13+ messages in thread
From: Thomas De Schampheleire @ 2014-09-30 9:58 UTC (permalink / raw)
To: buildroot
Hi Kantanu,
On Tue, Sep 30, 2014 at 11:33 AM, Kantanu Kumar Mohapatra
<kantanukumar@gmail.com> wrote:
>
> Thanks a lot Thomas for your reply. Sorry for the typo, please consider the
> new version as buildroot-2014.02.
>
> Let me explain all in detail.
>
> old br2:
> ========
> version: 2010.05
> uboot: 2010.03(customized)
> uboot-tools: 2010.03 (used from uboot src)
>
>
> New br2 (which I am upgrading to):
> ===========================
> version: 2014.02
> uboot: 2010.03(customized, same should be across tools too)
> uboot-tools: 2014.01 ( should be same as uboot-2010.03)
While I can understand that you do not want to update u-boot itself,
what is the problem to use the most recent version of u-boot-tools ?
In the cases I have seen, there was no conflict when using the most
recent u-boot-tools with images of an older u-boot.
>
> In br2-14, I am getting the uboot image(.bin) properly, which I customized
> to get a .rom with my headers added to it, done in boot/uboot/uboot.mk
>
> Here the problem which I faced is "fw_printenv" executable, which is built
> in tools, for br2-2014.02. fw_printenv is created, when getting the uboot
> image in br2-2010.03 (target/uboot/Makefile.in).
>
> In br2-2014.02,
> Tools should be taken from the source, which went into
> output/build/uboot-2010.03, But instead it creates another
> uboot-tools-2014.01 inside output/build/ and places source there.
>
> How to build that fw_printenv, in old way like br2-10, seen as below?
>
> $(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/$(U_BOOT_BIN)
> mkdir -p $(@D)
> $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \
> -D_custom_flag \
> -DUSE_HOSTCC -o $@ \
> $(U_BOOT_DIR)/tools/env/*.c $(U_BOOT_DIR)/lib_generic/crc32.c
This is no longer used. In buildroot 2010.05, the rules to build
fw_printenv were indeed part of buildroot explicitly, as shown above.
In buildroot 2014.02, we are using the u-boot makefiles to define how
to build these tools. So you cannot simply use the same way as you did
for buildroot-2010.05.
>
> I want to use another "-D_custom_flag" to build "fw_printenv", in br2-14.
> Please suggest me the changes to be done. If I change UBOOT_TOOLS_VERSION
> = 2010.03, in uboot-tools.mk, getting compilation error, as it has
> dependency on host-tools.
I think you have two options:
1. add a patch for u-boot itself, adding your custom -D flag in the
appropriate u-boot makefile (probably in tools/env/Makefile, but I
don't know if this was already the case in u-boot-2010.03, I haven't
checked).
2. In package/uboot-tools/uboot-tools.mk, there is this code:
define UBOOT_TOOLS_BUILD_CMDS
$(MAKE) -C $(@D) \
CROSS_COMPILE="$(TARGET_CROSS)" \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
CROSS_BUILD_TOOLS=y \
tools-only
$(MAKE) -C $(@D) \
CROSS_COMPILE="$(TARGET_CROSS)" \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
env no-dot-config-targets=env
endef
The second make command is (as far as I can see) responsible for
building the fw_printenv tool. If your custom flag can safely be
passed to other tools inside the tools/env directory of u-boot, then
you could consider adding your custom flag here too, something like:
$(MAKE) -C $(@D) \
CROSS_COMPILE="$(TARGET_CROSS)" \
CFLAGS="$(TARGET_CFLAGS) -Dcustom_flag" \
LDFLAGS="$(TARGET_LDFLAGS)" \
env no-dot-config-targets=env
Note that I have not tested this explicitly.
Hope this helps,
Thomas
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] Using u-boot tools
2014-09-30 9:58 ` Thomas De Schampheleire
@ 2014-09-30 13:16 ` Kantanu Kumar Mohapatra
0 siblings, 0 replies; 13+ messages in thread
From: Kantanu Kumar Mohapatra @ 2014-09-30 13:16 UTC (permalink / raw)
To: buildroot
Thanks Thomas,
On Tue, Sep 30, 2014 at 3:28 PM, Thomas De Schampheleire <
patrickdepinguin@gmail.com> wrote:
> Hi Kantanu,
>
> On Tue, Sep 30, 2014 at 11:33 AM, Kantanu Kumar Mohapatra
> <kantanukumar@gmail.com> wrote:
>
> >
> > Thanks a lot Thomas for your reply. Sorry for the typo, please consider
> the
> > new version as buildroot-2014.02.
> >
> > Let me explain all in detail.
> >
> > old br2:
> > ========
> > version: 2010.05
> > uboot: 2010.03(customized)
> > uboot-tools: 2010.03 (used from uboot src)
> >
> >
> > New br2 (which I am upgrading to):
> > ===========================
> > version: 2014.02
> > uboot: 2010.03(customized, same should be across tools too)
> > uboot-tools: 2014.01 ( should be same as uboot-2010.03)
>
> While I can understand that you do not want to update u-boot itself,
> what is the problem to use the most recent version of u-boot-tools ?
> In the cases I have seen, there was no conflict when using the most
> recent u-boot-tools with images of an older u-boot.
>
> ?The problem here is the files inside tools/env/, (fw_env.c, fw_env.h,
fw_env_main.c) where custom changes are placed.?
?I want to retain the old files?, I can't take the change and apply that to
tools-14, as I am not authorized to change those files.
> >
> > In br2-14, I am getting the uboot image(.bin) properly, which I
> customized
> > to get a .rom with my headers added to it, done in boot/uboot/uboot.mk
> >
> > Here the problem which I faced is "fw_printenv" executable, which is
> built
> > in tools, for br2-2014.02. fw_printenv is created, when getting the uboot
> > image in br2-2010.03 (target/uboot/Makefile.in).
> >
> > In br2-2014.02,
> > Tools should be taken from the source, which went into
> > output/build/uboot-2010.03, But instead it creates another
> > uboot-tools-2014.01 inside output/build/ and places source there.
> >
> > How to build that fw_printenv, in old way like br2-10, seen as below?
> >
> > $(TARGET_DIR)/usr/sbin/fw_printenv: $(U_BOOT_DIR)/$(U_BOOT_BIN)
> > mkdir -p $(@D)
> > $(TARGET_CC) -I$(U_BOOT_DIR)/include -I$(LINUX_HEADERS_DIR)/include \
> > -D_custom_flag \
> > -DUSE_HOSTCC -o $@ \
> > $(U_BOOT_DIR)/tools/env/*.c $(U_BOOT_DIR)/lib_generic/crc32.c
>
> This is no longer used. In buildroot 2010.05, the rules to build
> fw_printenv were indeed part of buildroot explicitly, as shown above.
> In buildroot 2014.02, we are using the u-boot makefiles to define how
> to build these tools. So you cannot simply use the same way as you did
> for buildroot-2010.05.
>
> >
> > I want to use another "-D_custom_flag" to build "fw_printenv", in br2-14.
> > Please suggest me the changes to be done. If I change
> UBOOT_TOOLS_VERSION
> > = 2010.03, in uboot-tools.mk, getting compilation error, as it has
> > dependency on host-tools.
>
> I think you have two options:
>
> 1. add a patch for u-boot itself, adding your custom -D flag in the
> appropriate u-boot makefile (probably in tools/env/Makefile, but I
> don't know if this was already the case in u-boot-2010.03, I haven't
> checked).
>
> 2. In package/uboot-tools/uboot-tools.mk, there is this code:
>
> define UBOOT_TOOLS_BUILD_CMDS
> $(MAKE) -C $(@D) \
> CROSS_COMPILE="$(TARGET_CROSS)" \
> CFLAGS="$(TARGET_CFLAGS)" \
> LDFLAGS="$(TARGET_LDFLAGS)" \
> CROSS_BUILD_TOOLS=y \
> tools-only
> $(MAKE) -C $(@D) \
> CROSS_COMPILE="$(TARGET_CROSS)" \
> CFLAGS="$(TARGET_CFLAGS)" \
> LDFLAGS="$(TARGET_LDFLAGS)" \
> env no-dot-config-targets=env
> endef
>
> The second make command is (as far as I can see) responsible for
> building the fw_printenv tool. If your custom flag can safely be
> passed to other tools inside the tools/env directory of u-boot, then
> you could consider adding your custom flag here too, something like:
> $(MAKE) -C $(@D) \
> CROSS_COMPILE="$(TARGET_CROSS)" \
> CFLAGS="$(TARGET_CFLAGS) -Dcustom_flag" \
> LDFLAGS="$(TARGET_LDFLAGS)" \
> env no-dot-config-targets=env
>
> Note that I have not tested this explicitly.
>
> ?I have tried to add the flag only for env, ?
?that gets compiled. I can see a fw_printenv executable inside tools/env/,
the size shows 30K in tools/env/, but it is not same in target/sbin/(22k).
I need the old files to compile with this flag?.
Hope this helps,
> Thomas
>
?Many thanks for your help,
Kantanu?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140930/2dc6c6a7/attachment.html>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2014-09-30 13:16 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29 7:38 [Buildroot] Using u-boot tools Kantanu Kumar Mohapatra
2014-09-29 9:18 ` Thomas Petazzoni
2014-09-29 9:32 ` Thomas De Schampheleire
2014-09-29 13:21 ` Thomas Petazzoni
2014-09-29 15:59 ` Kantanu Kumar Mohapatra
2014-09-29 16:38 ` Thomas Petazzoni
2014-09-29 18:43 ` Kantanu Kumar Mohapatra
2014-09-29 19:14 ` Thomas De Schampheleire
2014-09-29 19:41 ` Kantanu Kumar Mohapatra
2014-09-29 19:58 ` Thomas De Schampheleire
2014-09-30 9:33 ` Kantanu Kumar Mohapatra
2014-09-30 9:58 ` Thomas De Schampheleire
2014-09-30 13:16 ` Kantanu Kumar Mohapatra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox