[Buildroot] [PATCH v2] package/coreutils: allow building individual binaries
thomas.petazzoni at bootlin.com
Thu Apr 11 16:56:58 UTC 2019
On Wed, 10 Apr 2019 13:17:46 -0700
Markus Mayer <mmayer at broadcom.com> wrote:
> We add configuration option BR2_PACKAGE_COREUTILS_INDIVIDUAL_BINARIES
> so that coreutils can be built and installed as individual binaries.
> It can be used if the target file system doesn't support symlinks or
> symlinks are undesirable.
> The approach is modelled after Busybox's similarly named configuration
> Signed-off-by: Markus Mayer <mmayer at broadcom.com>
I tested this, with BR2_ROOTFS_MERGED_USR and got some broken symlinks
in /bin. I believe your patch is not sufficient. Indeed, it doesn't
take care of the following parts of coreutils.mk:
# some things go in /bin rather than /usr/bin
$(foreach f,$(COREUTILS_BIN_PROGS), \
rm -f $(TARGET_DIR)/usr/bin/$(f) && \
ln -sf ../usr/bin/coreutils $(TARGET_DIR)/bin/$(f)
COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN
This probably needs to be changed to move applets from /usr/bin to /bin
rather than changing the symlinks.
# link for archaic shells
ln -fs coreutils $(TARGET_DIR)/usr/bin/[
# gnu thinks chroot is in bin, debian thinks it's in sbin
rm -f $(TARGET_DIR)/usr/bin/chroot
ln -sf ../bin/coreutils $(TARGET_DIR)/usr/sbin/chroot
The symlink logic here also needs to be adjusted I guess.
Could you fix this and retest ?
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
More information about the buildroot