All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] disable downloaded source cache
@ 2013-02-13 16:14 Lionel Orry
  2013-02-13 22:42 ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: Lionel Orry @ 2013-02-13 16:14 UTC (permalink / raw)
  To: buildroot

Hi list,

I am experimenting with the BR2_ROOTFS_OVERLAY feature which works
great for me to add my overlay before image creation.

My overlay is versioned with git, and I would like however to allow
automatic synchronisation (pull or even clone, the repository is very
small) with my remote each time I simply do 'make'. The overlay
feature only copies a folder content, but does not allow updating the
source folder content from a site (I perfectly understand it is not
its purpose and the feature must be kept simple).

For now, here is how I did this:
- I set up BR2_ROOTFS_OVERLAY="$(XXX_OVERLAY_DIR)"
- I created a package 'xxx_overlay' with the following content:

package/xxx_overlay/xxx_overlay.mk:

#############################################################
#
# xxx_overlay
#
#############################################################
XXX_OVERLAY_VERSION = master
XXX_OVERLAY_SITE = git at myserver:filesystem_overlay.git
XXX_OVERLAY_SITE_METHOD = git
XXX_OVERLAY_INSTALL_STAGING = NO
XXX_OVERLAY_REDISTRIBUTE = NO

# erase the .tar.gz and all visible stamps at that time
define XXX_OVERLAY_BUILD_CMDS
    rm -f $(DL_DIR)/$(XXX_OVERLAY_SOURCE) $(wildcard $(@D)/.stamp_*)
endef

# erase the .stamp_built stamp to force the build step to happen next time
define XXX_OVERLAY_INSTALL_TARGET_CMDS
    rm -f $(@D)/.stamp_built
endef

$(eval $(generic-package))
#################### END OF FILE ##############################

Yes I know it is horrible. but it actually works, i.e. it processes
dependencies correctly to force the whole dependency chain: download,
extract, patch, build and install_target.

Is there a simple method to avoid the caching of the source code in
$(DL_DIR)/xxx_overlay-master.tar.gz and force the download and
extraction each time?

Thank for any hints,
Lionel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] disable downloaded source cache
  2013-02-13 16:14 [Buildroot] disable downloaded source cache Lionel Orry
@ 2013-02-13 22:42 ` Arnout Vandecappelle
  2013-02-14  8:11   ` Lionel Orry
  0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2013-02-13 22:42 UTC (permalink / raw)
  To: buildroot

On 13/02/13 17:14, Lionel Orry wrote:
> I am experimenting with the BR2_ROOTFS_OVERLAY feature which works
> great for me to add my overlay before image creation.
>
> My overlay is versioned with git, and I would like however to allow
> automatic synchronisation (pull or even clone, the repository is very
> small) with my remote each time I simply do 'make'. The overlay
> feature only copies a folder content, but does not allow updating the
> source folder content from a site (I perfectly understand it is not
> its purpose and the feature must be kept simple).

  Like so often, my answer to this kind of thing is: wrap the call to 
buildroot in a script. I.e., write a script that updates the overlay (and 
any other custom package), regenerates the config from a defconfig, does 
whatever other required magic, then calls make, and maybe does some 
post-processing on the resulting images as well.

  This makes it much easier to understand what happens than a totally 
hacked together xxx-overlay package.


  Regards,
  Arnout

-- 
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] disable downloaded source cache
  2013-02-13 22:42 ` Arnout Vandecappelle
@ 2013-02-14  8:11   ` Lionel Orry
  2013-02-14  8:32     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Lionel Orry @ 2013-02-14  8:11 UTC (permalink / raw)
  To: buildroot

Hi Arnout and others,

On Wed, Feb 13, 2013 at 11:42 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 13/02/13 17:14, Lionel Orry wrote:
>>
>> I am experimenting with the BR2_ROOTFS_OVERLAY feature which works
>> great for me to add my overlay before image creation.
>>
>> My overlay is versioned with git, and I would like however to allow
>> automatic synchronisation (pull or even clone, the repository is very
>> small) with my remote each time I simply do 'make'. The overlay
>> feature only copies a folder content, but does not allow updating the
>> source folder content from a site (I perfectly understand it is not
>> its purpose and the feature must be kept simple).
>
>
>  Like so often, my answer to this kind of thing is: wrap the call to
> buildroot in a script. I.e., write a script that updates the overlay (and
> any other custom package), regenerates the config from a defconfig, does
> whatever other required magic, then calls make, and maybe does some
> post-processing on the resulting images as well.
>
>  This makes it much easier to understand what happens than a totally hacked
> together xxx-overlay package.

Well I have a cleaner way actually that I used previously, which is to
use a ROOTFS_POST_BUILD build script that clones the repository and
'rsync' it on the target rootfs, I was mainly wondering if I could
achieve the same using the ROOTFS_OVERLAY feature. It seems it's not
enough for my needs, so I will actually stick to my previous
ROOTFS_POST_BUILD script and forget about ROOTFS_OVERLAY.

Thanks for your hints anyway, and keep up the good work everybody.

>
>
>  Regards,
>  Arnout
>
> --
> 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

Best regards,
Lionel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] disable downloaded source cache
  2013-02-14  8:11   ` Lionel Orry
@ 2013-02-14  8:32     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2013-02-14  8:32 UTC (permalink / raw)
  To: buildroot

Dear Lionel Orry,

On Thu, 14 Feb 2013 09:11:30 +0100, Lionel Orry wrote:

> Well I have a cleaner way actually that I used previously, which is to
> use a ROOTFS_POST_BUILD build script that clones the repository and
> 'rsync' it on the target rootfs, I was mainly wondering if I could
> achieve the same using the ROOTFS_OVERLAY feature. It seems it's not
> enough for my needs, so I will actually stick to my previous
> ROOTFS_POST_BUILD script and forget about ROOTFS_OVERLAY.

Yes, I think you're right. The ROOTFS_OVERLAY feature was added to help
people that are in the simple case of a rootfs overlay stored in
board/<something>/<foobar>/, and make the possibility of using a rootfs
overlay more practical to use for newcomers.

However, for more complicated/specific cases, using the post-build
script remains the right option.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-14  8:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-13 16:14 [Buildroot] disable downloaded source cache Lionel Orry
2013-02-13 22:42 ` Arnout Vandecappelle
2013-02-14  8:11   ` Lionel Orry
2013-02-14  8:32     ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.