I'd personally rather see an external framework that can be told how
to build libs and apps on a per lib/app basis and install them into
the akaros kfs via make magic. Something like:
akaros-pkg-builder/
├── pkg/
├── sysroot/
├── .gitignore
├── .config
└── Makefile
Where we use ncurses to select packages we know how to build, and we
have per-package Makefiles in the 'pkg' directory which the top level
Makefile can invoke to build and install a specific package. Packages
would then be installed into the 'sysroot' directory and recursively
copied into $AKAROS_ROOT/kern/kfs once all selected packages were
built. We could also remove them from kfs via the reverse operation.
I wouldn't store the source for any of these packages in this repo
directly, but I would store patches to upstream libs/apps in here
(kind of like we do for busybox in the akaros repo). So per-package
Makefiles would know how to fetch the appropriate source from wherever
it is hosted, apply any relevant patches, build the source, and
install it into 'sysroot'.
As a concrete example, if busybox were moved out into this framework:
akaros-pkg-builder/
├── pkg
│ └── busybox
│ ├── akaros-patches
│ │ └── 1.17.3
│ │ ├── 0001-busybox-perror-with-errstr.patch
│ │ ├── 0002-busybox-create-errstr.patch
│ │ ├── 0003-busybox-rm-rewinddir.patch
│ │ ├── 0004-busybox-shell-resource.patch
│ │ ├── 0005-bb-echo-perror.patch
│ │ ├── 0006-busybox-major-minor-makedev.patch
│ │ └── 0007-echo-buffering.patch
│ ├── busybox-1.17.3-akaros
│ │ ├── ...
│ │ ├── ...
│ │ ├── ...
│ ├── upstream-patches
│ └── 1.17.3
│ ├── busybox-1.17.3-dnsd.patch
│ ├── busybox-1.17.3-iproute.patch
│ ├── busybox-1.17.3-ls.patch
│ ├── busybox-1.17.3-sort.patch
│ └── busybox-1.17.3-unicode.patch
│ ├── .gitignore
│ ├── busybox-1.17.3.tar.bz2
│ ├── defconfig-1.17.3
│ └── Makefile
├── sysroot
├── .config
├── .gitignore
└── Makefile
The only requirement being that any folders under pkg have a Makefile
in them. After that, they can contain their own .gitignore to decide
what should be ignored and what should be kept as part of the repo.
For busybox, the Makefile, all of the patches, and the defconfig would
become part of the repo, while everything else would be ignored.
By convention, the per-pkg Makefile will need to have 'make' 'make
install', and 'make uninstall' targets. Under the hood it will invoke
the actual Makefile of the package (or whatever build system it uses)
to build the package before installing/uninstalling it into 'sysroot'.
Invoking 'make', 'make install', or 'make uninstall' on the top level
Makefile will simply iterate through the directories in pkg that have
been selected in the ncurses config and forward those commands onto
them.
This is actually similar to what we do currently within the Akaros
tree using the top level akaros Makefile. I'm just proposing to move
it to an external repo and start expanding it.
Thoughts?
> --
> You received this message because you are subscribed to the Google Groups
> "Akaros" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
akaros+un...@googlegroups.com.
> To post to this group, send email to
aka...@googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.
--
~Kevin