The unit tests for networking that I grouped in /elkscmd/test should not
be included in the default images (because "test"...), and would be
removed in next commits to make room. But we should also provide a more
convenient way to customize the image, for a developer to be able to
quickly add them back when doing non-regression testing.
Today we have to modify the Makefile to include / exclude a program, 5
different targets for partial / full images, multiplied by the available
image formats. Plus now a build_hd_image script that is not consistent
(and IMHO, poorly designed as it unpacks an existing image to build
another one, in place of building it directly).
Would be far better to follow the Buildroot / Busybox way, and to select
the applets to be installed on the target in a single location. We
already have a quite nice kernel configuration tool, why not using it
for that selection and the choice of the image format ?
MFLD
Le 27/02/2017 à 20:53, Jody Bruchon a écrit :
The recent flare-up of networking development has led to a lot of
additional small programs on the full disk images and that forced me
to eliminate other programs from being installed automatically to
avoid image build failures. I'd like to suggest some things that can
be done to reduce the amount of space these are taking up.
Since all programs are statically linked to C library components, it
would be helpful to condense similar programs into a single binary
where possible, have the Makefile's install section create relative
symlinks, and change the program's behavior based on the name used to
invoke it. The code to do this obviously has its own overhead as well,
so it's only practical if there are enough binaries to justify the
trouble. You can find useful stuff for this in the "busyelks" project
I had been trying out and left in the code.
It may also make sense to condense the new non-standard programs like
the "echo tests" into one binary and choose the specific functionality
with a command parameter instead.
Another thing is the use of write() instead of [vf]printf(). If a
program can completely avoid the use of the printf() family of
functions and use write() instead, it'll make the program
significantly smaller on disk and in memory. If you must use printf()
even once then this isn't going to be helpful. If you can get away
with write() everywhere instead, the program will shrink and we'll be
able to fit more on disk.
I'm sure more suggestions could be made and they would be most welcome.
-Jody
--
To unsubscribe from this list: send the line "unsubscribe linux-8086" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-8086" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html