* [Buildroot] How to create the package from software using "bootstrap" to configure?
@ 2013-12-21 13:15 Wojciech Zabolotny
2013-12-21 13:46 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Wojciech Zabolotny @ 2013-12-21 13:15 UTC (permalink / raw)
To: buildroot
Hi,
I want to add the avrdude (extended with the linuxspi programmer) to
the buildroot.
The sources generally seem to be autotools-package compatible, but unfortunately
it is necessary to run the "bootstrap" script, before the ./configure.
I tried to create the avrdude.mk file as:
AVRDUDE_VERSION = eabe067c4527bc2eedc5db9288ef5cf1818ec720
AVRDUDE_SITE = http://github.com/kcuzner/avrdude/tarball/$(AVRDUDE_VERSION)
AVRDUDE_LICENSE = GPLv2
AVRDUDE_INSTALL_TARGET = YES
AVRDUDE_AURORECONF = YES
define AVRDUDE_CONFIGURE_CMDS
(cd $(@D)/avrdude; \
./bootstrap --prefix=$(TARGET_DIR)/usr
--parallel=$(PARALLEL_JOBS) ;\
./configure --prefix=$(TARGET_DIR)/usr \
)
endef
define AVRDUDE_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/avrdude
endef
define AVRDUDE_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/avrdude install
endef
$(eval $(generic-package))
but it leads to compilation of binaries for my host CPU, not for the target.
What is the proper way to port such packages to the buildroot.
--
Wojciech M. Zabo?otny
My GPG/PGP keys:
standard: B191 ACF0 7909 83FA 3F9B 450C 407E 3C4B 4569 D119
confidential: 2BF3 F90F 6EA8 7D35 59FD 5080 78ED 33DE 1312 D8F8
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] How to create the package from software using "bootstrap" to configure?
2013-12-21 13:15 [Buildroot] How to create the package from software using "bootstrap" to configure? Wojciech Zabolotny
@ 2013-12-21 13:46 ` Thomas Petazzoni
2013-12-21 17:54 ` Wojciech Zabolotny
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2013-12-21 13:46 UTC (permalink / raw)
To: buildroot
Dear Wojciech Zabolotny,
On Sat, 21 Dec 2013 14:15:44 +0100, Wojciech Zabolotny wrote:
> AVRDUDE_VERSION = eabe067c4527bc2eedc5db9288ef5cf1818ec720
> AVRDUDE_SITE =
> http://github.com/kcuzner/avrdude/tarball/$(AVRDUDE_VERSION)
> AVRDUDE_LICENSE = GPLv2 AVRDUDE_INSTALL_TARGET = YES
> AVRDUDE_AURORECONF = YES
>
>
> define AVRDUDE_CONFIGURE_CMDS
> (cd $(@D)/avrdude; \
> ./bootstrap --prefix=$(TARGET_DIR)/usr
> --parallel=$(PARALLEL_JOBS) ;\
> ./configure --prefix=$(TARGET_DIR)/usr \
> )
> endef
>
> define AVRDUDE_BUILD_CMDS
> $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/avrdude
> endef
>
> define AVRDUDE_INSTALL_TARGET_CMDS
> $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/avrdude install
> endef
>
> $(eval $(generic-package))
Make it an autools-package instead, and specify AVRDUDE_AUTORECONF =
YES. This will have the same effect as calling avrdude's bootstrap
script.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] How to create the package from software using "bootstrap" to configure?
2013-12-21 13:46 ` Thomas Petazzoni
@ 2013-12-21 17:54 ` Wojciech Zabolotny
2013-12-21 18:01 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Wojciech Zabolotny @ 2013-12-21 17:54 UTC (permalink / raw)
To: buildroot
Dear Thomas,
Thanks. I have created Config.in and avrdude.mk as attached, and they
seem to work (however I want to test it better before I submit the
patch proposal).
Thanks & greetings,
Wojtek
On Sat, Dec 21, 2013 at 2:46 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Wojciech Zabolotny,
>
> On Sat, 21 Dec 2013 14:15:44 +0100, Wojciech Zabolotny wrote:
>
>> AVRDUDE_VERSION = eabe067c4527bc2eedc5db9288ef5cf1818ec720
>> AVRDUDE_SITE =
>> http://github.com/kcuzner/avrdude/tarball/$(AVRDUDE_VERSION)
>> AVRDUDE_LICENSE = GPLv2 AVRDUDE_INSTALL_TARGET = YES
>> AVRDUDE_AURORECONF = YES
>>
>>
>> define AVRDUDE_CONFIGURE_CMDS
>> (cd $(@D)/avrdude; \
>> ./bootstrap --prefix=$(TARGET_DIR)/usr
>> --parallel=$(PARALLEL_JOBS) ;\
>> ./configure --prefix=$(TARGET_DIR)/usr \
>> )
>> endef
>>
>> define AVRDUDE_BUILD_CMDS
>> $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/avrdude
>> endef
>>
>> define AVRDUDE_INSTALL_TARGET_CMDS
>> $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/avrdude install
>> endef
>>
>> $(eval $(generic-package))
>
> Make it an autools-package instead, and specify AVRDUDE_AUTORECONF =
> YES. This will have the same effect as calling avrdude's bootstrap
> script.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
--
Wojciech M. Zabo?otny
My GPG/PGP keys:
standard: B191 ACF0 7909 83FA 3F9B 450C 407E 3C4B 4569 D119
confidential: 2BF3 F90F 6EA8 7D35 59FD 5080 78ED 33DE 1312 D8F8
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avrdude.mk
Type: application/octet-stream
Size: 505 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131221/1f467c09/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Config.in
Type: application/octet-stream
Size: 323 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20131221/1f467c09/attachment-0001.obj>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] How to create the package from software using "bootstrap" to configure?
2013-12-21 17:54 ` Wojciech Zabolotny
@ 2013-12-21 18:01 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2013-12-21 18:01 UTC (permalink / raw)
To: buildroot
Dear Wojciech Zabolotny,
On Sat, 21 Dec 2013 18:54:57 +0100, Wojciech Zabolotny wrote:
> Thanks. I have created Config.in and avrdude.mk as attached, and they
> seem to work (however I want to test it better before I submit the
> patch proposal).
Looks pretty good. A few comments:
* In the Config.in file, you need to inherit the dependencies of the
libraries you're selecting. For example, libusb depends on thread
support, so avrdude should depend on thread support. See
http://buildroot.org/downloads/manual/manual.html#dependencies-target-toolchain-options
for details.
* In your .mk file, use the github helper function instead of a
complete github URL.
* The license is GPLv2+, not GPLv2.
* You should add AVRDUDE_LICENSE_FILES = avrdude/COPYING
* You should remove the AVRDUDE_INSTALL_TARGET line, since YES is
the default value.
* You should add a comment on top of the AUTORECONF line explaining
why it is needed.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-21 18:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-21 13:15 [Buildroot] How to create the package from software using "bootstrap" to configure? Wojciech Zabolotny
2013-12-21 13:46 ` Thomas Petazzoni
2013-12-21 17:54 ` Wojciech Zabolotny
2013-12-21 18:01 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox