* [Buildroot] Advice needed on package/customize
@ 2009-11-12 0:23 Gordon Smith
2009-11-12 7:41 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Gordon Smith @ 2009-11-12 0:23 UTC (permalink / raw)
To: buildroot
Hello -
I've recently used package/customize to successfully overlay files
into an initramfs kernel image.
However, for two from-scratch buildroot builds in a row,
package/customize has copied ZERO files to the kernel image.
A simple case:
In .config:
BR2_PACKAGE_CUSTOMIZE=y
In package/customize/source:
$ ls -lA package/customize/source
total 4
-rw-r--r-- 1 gsmith gsmith 0 2009-09-01 02:44 .empty
-rw-r--r-- 1 gsmith gsmith 7 2009-11-11 16:57 hello.txt
After "make", there is no hello.txt in the kernel image or in
rootfs.i686.initramfs_list.
buildroot version is 2009.08
I'm fairly new to buildroot so any suggestions are welcome.
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread* [Buildroot] Advice needed on package/customize
2009-11-12 0:23 [Buildroot] Advice needed on package/customize Gordon Smith
@ 2009-11-12 7:41 ` Thomas Petazzoni
2009-11-12 18:44 ` Gordon Smith
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2009-11-12 7:41 UTC (permalink / raw)
To: buildroot
Le Wed, 11 Nov 2009 17:23:46 -0700,
Gordon Smith <spider.karma+busybox.net@gmail.com> a ?crit :
> A simple case:
>
> In .config:
> BR2_PACKAGE_CUSTOMIZE=y
>
> In package/customize/source:
> $ ls -lA package/customize/source
> total 4
> -rw-r--r-- 1 gsmith gsmith 0 2009-09-01 02:44 .empty
> -rw-r--r-- 1 gsmith gsmith 7 2009-11-11 16:57 hello.txt
>
> After "make", there is no hello.txt in the kernel image or in
> rootfs.i686.initramfs_list.
After changing the contents of package/customize/source, did you make a
full rebuild (i.e clean everything and restart the build) ?
If not, then the stamp file $(BUILD_DIR)/.customize already existed, so
the contents of package/customize/source are not copied to the target
directory. If you want to force the reinstallation of customized files
without rebuilding everything, then do 'make customize-clean' and
restart make.
Sincerly,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Advice needed on package/customize
2009-11-12 7:41 ` Thomas Petazzoni
@ 2009-11-12 18:44 ` Gordon Smith
0 siblings, 0 replies; 3+ messages in thread
From: Gordon Smith @ 2009-11-12 18:44 UTC (permalink / raw)
To: buildroot
On Thu, Nov 12, 2009 at 12:41 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Le Wed, 11 Nov 2009 17:23:46 -0700,
> Gordon Smith <spider.karma+busybox.net@gmail.com> a ?crit :
>
>> A simple case:
>>
>> In .config:
>> ? ? BR2_PACKAGE_CUSTOMIZE=y
>>
>> In package/customize/source:
>> ? ? $ ls -lA package/customize/source
>> ? ? total 4
>> ? ? -rw-r--r-- 1 gsmith gsmith 0 2009-09-01 02:44 .empty
>> ? ? -rw-r--r-- 1 gsmith gsmith 7 2009-11-11 16:57 hello.txt
>>
>> After "make", there is no hello.txt in the kernel image or in
>> rootfs.i686.initramfs_list.
>
> After changing the contents of package/customize/source, did you make a
> full rebuild (i.e clean everything and restart the build) ?
>
> If not, then the stamp file $(BUILD_DIR)/.customize already existed, so
> the contents of package/customize/source are not copied to the target
> directory. If you want to force the reinstallation of customized files
> without rebuilding everything, then do 'make customize-clean' and
> restart make.
>
> Sincerly,
>
> Thomas
> --
Merci bien for the complete answer.
I found a curiosity in the customize package - root directories are
recursively copies inside existing target directories.
Notice that "etc/hello.txt" in customize becomes "etc/etc/hello.txt"
in initramfs:
$ find package/customize -name hello.txt
package/customize/source/etc/hello.txt
package/customize/source/hello.txt
$ grep hello.txt binaries/lsdtm/rootfs.i686.initramfs_list
file /etc/etc/hello.txt
/home/gsmith/source/buildroot-2009.08-linux-2.6.27/project_build_i686/lsdtm/root/etc/etc/hello.txt
644 0 0
file /hello.txt
/home/gsmith/source/buildroot-2009.08-linux-2.6.27/project_build_i686/lsdtm/root/hello.txt
644 0 0
I modified package/customize/customize.mk as best I could to get it to
handle this:
$ diff customize-0.mk customize.mk
14c14,18
< cp -af $(CUST_DIR)/$$f $(TARGET_DIR)/$$f; \
---
> if [ -d $(TARGET_DIR)/$$f ]; then \
> cp -af $(CUST_DIR)/$$f/* $(TARGET_DIR)/$$f/; \
> else \
> cp -af $(CUST_DIR)/$$f $(TARGET_DIR)/$$f; \
> fi \
> Thomas Petazzoni, Free Electrons
> Kernel, drivers and embedded Linux development,
> consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-11-12 18:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-12 0:23 [Buildroot] Advice needed on package/customize Gordon Smith
2009-11-12 7:41 ` Thomas Petazzoni
2009-11-12 18:44 ` Gordon Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox