Quoth David van Geest:
> Sort of a follow-up question: is there any advantage to compiling
> your user apps with the kernel rather than compiling them
> separately, transferring the binary, and running it? (and is
> that known as a userland program then?)
Well, you *don't* compile user apps with the kernel, technically -- if you
did they wouldn't be user apps.
The uClinux distribution has a unified makefile to combine multiple tasks
together (specifically: building the kernel, building user libraries,
building user apps, constructing a root filesystem, and creating a
kernel/filesystem composite image). Any of these tasks can be run by
themselves, although they do need to run in that order. You can skip ahead
-- for example if you've made changes to user app code (without changing
kernel or library code) then you can build the apps and recreate the
filesystem by issuing "make user_only romfs image".
Also, if you want to build some user apps out-of-tree, you might want to
build all the standard stuff ("make" or "make linux_only lib_only user_only
romfs"), then do your other out-of-tree activities, manually copy some files
into the romfs directory, and then finally "make image" to create the
composite image.
You could even modify your vendor makefile (which is what is in charge of
creating the kernel/FS image) to create separate images for kernel and root
filesystem, so that the root FS can be updated independently of the kernel
(and vice versa). Or to change the type of the root fs. It's quite likely
that some existing vendor targets already do this.
The main advantage of building the apps within the main distribution is that
they will automatically be given the correct flags for cross-compiling, and
with only minimal effort can copy themselves over to the romfs folder so
they'll actually be copied to the target when the image is uploaded. If you
build out-of-tree then you'll have to worry about those flags yourself.
Also, any files not included in the root fs will disappear whenever the
target is reset (unless it has some separate persistent storage), so that's
one advantage of including them in the fs image, at least.
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev