Skip to contentSkip to conversation

using a local package file : why copy it to the dl directory ?

Buildroot Sagaert Johan 4 participants 5 messages Oct 8, 2013 – Oct 9, 2013

lore
Share & tools
lore
#0 lore raw

Hi

I noticed when using SITE_METHOD = file, the package is copied to the download directory. Is this needed, since the package is already on our local filesystem ?

Sagaert Johan

#1 lore raw

Dear Sagaert Johan,

Quoted 2 lines · Sagaert Johan

I noticed when using SITE_METHOD = file, the package is copied to the download directory. Is this needed, since the package is already on our local filesystem ?

Yes it is needed, because:

(1) Buildroot do not want to make changes outside of its output directory. We clearly do not want Buildroot to mess up with your source directory, and create its stamp files, and the result of the compilation there.

(2) Buildroot does not use out of tree build for packages. If it was using out of tree build, then we could avoid that copy by using your local directory as the source tree, and the output/build/<pkgname>-<pkgversion> directory as the build tree. A while ago, I started working on out-of-tree build for packages, precisely to improve this situation. See
http://lists.busybox.net/pipermail/buildroot/2013-April/070573.html.
It is certainly not impossible to do, but quite a huge patch set, with a lot of implications. Basically, my stuff was working in the general case, but there were some issues here and there that remained to be sorted out.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

Dear Thomas

Maybe I did not explain it well, I did not mean to build out of the tree, but the local package_xxx_tar.bz2 (in the case of tarred bz2)
is already on our local system, so I tought there was no need to copy the archive to the dl directory.

Johan

-----Oorspronkelijk bericht-----
Van: buildroot-bounces at busybox.net [mailto:buildroot-bounces at busybox.net] Namens Thomas Petazzoni
Verzonden: woensdag 9 oktober 2013 0:24
Aan: buildroot at busybox.net
Onderwerp: Re: [Buildroot] using a local package file : why copy it to the dl directory ?

Dear Sagaert Johan,

Quoted 2 lines · Sagaert Johan

I noticed when using SITE_METHOD = file, the package is copied to the download directory. Is this needed, since the package is already on our local filesystem ?

Yes it is needed, because:

(1) Buildroot do not want to make changes outside of its output directory. We clearly do not want Buildroot to mess up with your source directory, and create its stamp files, and the result of the compilation there.

(2) Buildroot does not use out of tree build for packages. If it was using out of tree build, then we could avoid that copy by using your local directory as the source tree, and the output/build/<pkgname>-<pkgversion> directory as the build tree. A while ago, I started working on out-of-tree build for packages, precisely to improve this situation. See
http://lists.busybox.net/pipermail/buildroot/2013-April/070573.html.
It is certainly not impossible to do, but quite a huge patch set, with a lot of implications. Basically, my stuff was working in the general case, but there were some issues here and there that remained to be sorted out.

Best regards,

Thomas
--
Thomas Petazzoni, Free Electrons
Embedded Linux, Kernel and Android engineering http://free-electrons.com _______________________________________________ buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#3 lore raw

Sagaert,

Sagaert Johan <[email protected]> wrote on
10/08/2013 06:12:20 PM:

Quoted 7 lines

Dear Thomas

Maybe I did not explain it well, I did not mean to build out of the tree, but the local package_xxx_tar.bz2 (in the case of tarred bz2)
is already on our local system, so I tought there was no need to copy the archive to the dl directory.

I believe you need to utilize the feature of specifying the DL directory out-of-tree (outside of the buildroot source). Please see the manual:

http://buildroot.uclibc.org/downloads/manual/manual.html#_location_of_downloaded_packages

Finally when you specify the DL directory, copy or move the package_xx_tar.bz2
to the BR2_DL_DIR location. The reason the your tar file get copied to this location
is because buildroot's goal is to have every external file it depends on in one
location. This is an important feature because it makes it easy for us to have
all the packages in one location when we redistribute/release a system put together
using buildroot.

Quoted 1 line

Johan

Thanks,
-Ryan

------------------------------------------------------------------------------------------
Ryan J Barnett / Software Engineer / Platform SW MS 137-157, 855 35th St NE, Cedar Rapids, IA, 52498-3161, US rjbarnet at rockwellcollins.com www.rockwellcollins.com

#4 lore raw
In reply to Sagaert Johan
Quoted 5 lines · Sagaert Johan

Hi

I noticed when using SITE_METHOD = file, the package is copied to the download directory. Is this needed, since the package is already on our local filesystem ?

It seems the other two repliers missed your point :-)

There is no fundamental need to copy it. However, it makes buildroot a
lot simpler. In many places there are direct references to DL_DIR (just grep for that variable); in case of a file SITE_METHOD, you'd have to use $(PKG)_SITE instead of DL_DIR.

It is possible to use hardlinking or symlinking instead of copying.
Buildroot provides the BR2_LOCALFILES config option for that (in Build options -> Commands). Just set that to "ln" for hard linking or "ln -s" for symlinking.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F