All of lore.kernel.org
 help / color / mirror / Atom feed
* 'make' behaviour in BuildRoot
@ 2007-02-14  6:32 Daniel Ng
  2007-02-14  7:01 ` Suzuki Takashi
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Ng @ 2007-02-14  6:32 UTC (permalink / raw)
  To: linuxppc-embedded

Hi,

Currently I have a working build system using BuildRoot, but it needs to be 
more efficient.

In particular, when I run the BuildRoot 'make', I end up with the final cramfs 
image which is great!

However, if I want to add a new file to the Root FS (eg. if I want to add the 
file 'test23' to '/usr') it seems that I have to do a 'make clean' first, and 
then run 'make' ie. a full rebuild.

This is because if I add the 'test23' file 
to 'target/generic/target_skeleton/usr' and then just run 'make' I get the 
output at the bottom of this post [1].

-in other words it seems that the old 'build_powerpc/root' directory is used to 
rebuild the cramfs image. The file 'test23' was never added 
to 'build_powerpc/root'.

-if I remove 'build_powerpc/root' and then run 'make', I get a script error 
that seems completely unrelated to my change. However the 'test23' file does 
appear in 'uild_powerpc/root'. Here is the tail of the output-


# Use fakeroot so mkcramfs believes the previous fakery
/home/dng/linuxppc/gcc-4.0.2_uclibc/usr/bin/fakeroot \
        -i /home/dng/linuxppc/gcc-4.0.2_uclibc/fakeroot.env \
        -s /home/dng/linuxppc/gcc-4.0.2_uclibc/fakeroot.env -- \
        /home/ppcroot/swdev/buildroot-dng/build_powerpc/cramfs-1.1/mkcramfs -q -
b \
        /home/ppcroot/swdev/buildroot-
dng/build_powerpc/root /home/ppcroot/swdev/buildroot-dng/rootfs.powerpc.cramfs
Swapping filesystem endian-ness
mkcramfs: /home/ppcroot/swdev/buildroot-dng/build_powerpc/cramfs-
1.1/mkcramfs:/home/ppcroot/swdev/buildroot-
dng/build_powerpc/root/bin/fw_printenv: Invalid argument
mkcramfs: /home/ppcroot/swdev/buildroot-dng/build_powerpc/cramfs-
1.1/mkcramfs:/home/ppcroot/swdev/buildroot-dng/build_powerpc/root/bin/pppd: 
Invalid argument
mkcramfs: scandir failed: /home/ppcroot/swdev/buildroot-
dng/build_powerpc/root/bin/sethdlc
make: *** [cramfsroot] Error 8


Surely I shouldn't have to do a full BuildRoot rebuild (although it does work) 
just to add a new file to the Root FS?? 

Is there a way in BuildRoot to avoid having to do a full rebuild just for 
adding a single new file to the Root FS? (Maybe deleting 'build_powerpc/root' 
is the wrong thing to do, hence the above errors)



Here is the output as descibed in [1] above-


`/home/ppcroot/swdev/buildroot-dng/build_powerpc/ppp-2.4.1/.unpacked'
package/pppd/pppd.mk:20: warning: ignoring old commands for target 
`/home/ppcroot/swdev/buildroot-dng/build_powerpc/ppp-2.4.1/.configured'
package/pppd/pppd.mk:31: warning: ignoring old commands for target 
`/home/ppcroot/swdev/buildroot-dng/build_powerpc/ppp-2.4.1/.configured'
package/pppd/pppd.mk:52: warning: ignoring old commands for target 
`/home/ppcroot/swdev/buildroot-dng/build_powerpc/ppp-2.4.1/pppd/pppd'
package/pppd/pppd.mk:55: warning: ignoring old commands for target 
`/home/ppcroot/swdev/buildroot-dng/build_powerpc/root/usr/sbin/pppd'
package/pppd/pppd.mk:62: warning: ignoring old commands for target `pppd-clean'
package/pppd/pppd.mk:69: warning: ignoring old commands for target `pppd-
dirclean'
#-@find /home/ppcroot/swdev/buildroot-dng/build_powerpc/root/lib -type f -name 
\*.so\* | xargs /home/dng/linuxppc/gcc-4.0.2_uclibc/bin/powerpc-linux-uclibc-
strip --remove-section=.comment --remove-section=.note --strip-unneeded 
2>/dev/null || true;
/sbin/ldconfig -r /home/ppcroot/swdev/buildroot-dng/build_powerpc/root 
2>/dev/null
# Use fakeroot to pretend all target binaries are owned by root
/home/dng/linuxppc/gcc-4.0.2_uclibc/usr/bin/fakeroot \
        -i /home/dng/linuxppc/gcc-4.0.2_uclibc/fakeroot.env \
        -s /home/dng/linuxppc/gcc-4.0.2_uclibc/fakeroot.env -- \
        chown -R root:root /home/ppcroot/swdev/buildroot-dng/build_powerpc/root
# Use fakeroot to pretend to create all needed device nodes
/home/dng/linuxppc/gcc-4.0.2_uclibc/usr/bin/fakeroot \
        -i /home/dng/linuxppc/gcc-4.0.2_uclibc/fakeroot.env \
        -s /home/dng/linuxppc/gcc-4.0.2_uclibc/fakeroot.env -- \
        /home/dng/linuxppc/gcc-4.0.2_uclibc/bin/makedevs \
        -d target/generic/device_table.txt \
        /home/ppcroot/swdev/buildroot-dng/build_powerpc/root
rootdir=/home/ppcroot/swdev/buildroot-dng/build_powerpc/root
table='target/generic/device_table.txt'
# Use fakeroot so mkcramfs believes the previous fakery
/home/dng/linuxppc/gcc-4.0.2_uclibc/usr/bin/fakeroot \
        -i /home/dng/linuxppc/gcc-4.0.2_uclibc/fakeroot.env \
        -s /home/dng/linuxppc/gcc-4.0.2_uclibc/fakeroot.env -- \
        /home/ppcroot/swdev/buildroot-dng/build_powerpc/cramfs-1.1/mkcramfs -q -
b \
        /home/ppcroot/swdev/buildroot-
dng/build_powerpc/root /home/ppcroot/swdev/buildroot-dng/rootfs.powerpc.cramfs
Swapping filesystem endian-ness


Cheers,
Daniel

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

* Re: 'make' behaviour in BuildRoot
  2007-02-14  6:32 'make' behaviour in BuildRoot Daniel Ng
@ 2007-02-14  7:01 ` Suzuki Takashi
  2007-02-14 23:09   ` Daniel Ng
  0 siblings, 1 reply; 5+ messages in thread
From: Suzuki Takashi @ 2007-02-14  7:01 UTC (permalink / raw)
  To: linuxppc-embedded

Hello,

How about mounting the cramfs image and append 'test23' to '/usr'
inside mounted image, then unmount the image.

If the image is compressed,
  uncompress - mount - append - unmount - compress
procedure is needed, of course.

Thanks,

-- T.Suzuki

On Feb 14, 2007, at 3:32 PM, Daniel Ng wrote:
> In particular, when I run the BuildRoot 'make', I end up with the  
> final cramfs
> image which is great!
>
> However, if I want to add a new file to the Root FS (eg. if I want  
> to add the
> file 'test23' to '/usr') it seems that I have to do a 'make clean'  
> first, and
> then run 'make' ie. a full rebuild.

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

* Re: 'make' behaviour in BuildRoot
  2007-02-14  7:01 ` Suzuki Takashi
@ 2007-02-14 23:09   ` Daniel Ng
  2007-02-15  3:16     ` Andrew May
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Ng @ 2007-02-14 23:09 UTC (permalink / raw)
  To: linuxppc-embedded

> How about mounting the cramfs image and append 'test23' to '/usr'
> inside mounted image, then unmount the image.

Thanks for your comment Suzuki, I realise I can do it the way you suggested but 
what if I start adding several files, or edit some of these files? I would end 
up with a mounted system whose tree structure would be quite different to the 
one in 'build_powerpc/root'. This would just lead to confusion and more of my 
hair falling out. 

Surely I should just be able to type 'make' which would result in the tree 
structure updated in the cramfs image? Any ideas? Where are the BuildRoot 
experts out there? Can someone tell me how to subscribe to the BuildRoot list?

(Sorry I think my original example was a bit too simple).

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

* Re: 'make' behaviour in BuildRoot
  2007-02-14 23:09   ` Daniel Ng
@ 2007-02-15  3:16     ` Andrew May
  2007-02-15  4:10       ` Daniel Ng
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew May @ 2007-02-15  3:16 UTC (permalink / raw)
  To: Daniel Ng; +Cc: linuxppc-embedded

On Wed, 14 Feb 2007 23:09:31 +0000 (UTC)
Daniel Ng <daniel_ng11@lycos.com> wrote:

> Surely I should just be able to type 'make' which would result in the
> tree structure updated in the cramfs image? Any ideas? Where are the
> BuildRoot experts out there? Can someone tell me how to subscribe to
> the BuildRoot list?
> 

The html docs are online, and they should be under buildroot/docs/

http://buildroot.uclibc.org/buildroot.html#custom_targetfs

You may just want option 1, for now. It sounds like you jumped to #2.

Or you can write a new rule for your test23 program.
http://buildroot.uclibc.org/buildroot.html#add_software

Or you can use this rule/config option
http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/package/customize/Config.in?rev=9614&view=auto

And the list info is here.
http://buildroot.uclibc.org/lists.html

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

* Re: 'make' behaviour in BuildRoot
  2007-02-15  3:16     ` Andrew May
@ 2007-02-15  4:10       ` Daniel Ng
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Ng @ 2007-02-15  4:10 UTC (permalink / raw)
  To: linuxppc-embedded

Thanks for your help Andrew. I will follow these up on the BuildRoot list.

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

end of thread, other threads:[~2007-02-15  4:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-14  6:32 'make' behaviour in BuildRoot Daniel Ng
2007-02-14  7:01 ` Suzuki Takashi
2007-02-14 23:09   ` Daniel Ng
2007-02-15  3:16     ` Andrew May
2007-02-15  4:10       ` Daniel Ng

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.