On Mon, Nov 7, 2011 at 5:49 AM, Michael Olbrich <m.olbrich@pengutronix.de> wrote:
On Mon, Nov 07, 2011 at 11:15:23AM +0100, Erwin Rol wrote:
> On 6-11-2011 20:10, Jon Ringle wrote:
> >Something that I'd like to see is a way to have a kernel+initramfs image
> >to be created as a package. As it stands now, I create a kernel platform
> >image and a rootfs platform image, and because the rootfs image contains
> >kernel modules not contained within the initramfs image, I end up having
> >the kernel built twice with two separate kernel source trees that are
> >basically the same.
>
> I have that with one project too. But that also boils down to
> multiple images I guess, one hardisk rootfs and one ram rootfs.

What are the requirements for these images?

What we currently do to create images is:
- take some ipkgs (currently all selected)
- extract them to a tmpdir
- create all selected images from this tmpdir

If we expand this to do this multiple times for different sets of ipkgs and
different images, would that cover your use-case?


In the case of kernel+initramfs, it would not be as simple as that, since in my case the initramfs image is built using uclibc toolchain and rootfs image is built with glibc toolchain. So, I may have busybox for initramfs using uclibc and busybox for rootfs using glibc.

I was envisioning something along the lines of a "nested" ptx project for the kernel+initramfs where kernel and packages for initramfs are built using PTXCONF_COMPILER_PREFIX_KERNEL as the toolchain.

Menu to select packages for kernel+initramfs "nested" ptx project:
$ ptxdist initramfs menuconfig

The following would build all selected packages and if kernel+initramfs package is selected then to build it, it would recurse into calling a nested ptxdist to build the kernel+initramfs and set the nested PTXCONF_COMPILER_PREFIX to the parent's PTXCONF_COMPILER_PREFIX_KERNEL as the toolchain:
$ ptxdist go
$ ptxdist images

Jon