mirror of
https://git.busybox.net/buildroot.git
synced 2024-12-04 02:43:30 +08:00
package/skeleton: also handle merged /usr in the staging
When the target uses a merged /usr setup, gdbserver will only report paths in /lib to the remote gdb, which in turn will only look for libraries in staging/lib and never in staging/usr/lib. So. the merged (or non-merged) /usr setup must be replicated in the staging. The best solution where to do so is in the skeleton package, since it is guaranteed to come before any package that installs things in the staging, and even before the (internal or external) toolchain as well. Reported-by: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Pieterjan Camerlynck <pieterjan.camerlynck@gmail.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Peter Korsgaard <jacmet@uclibc.org> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
d60d6ac037
commit
cb34ea5d6a
9
Makefile
9
Makefile
@ -456,14 +456,9 @@ else
|
||||
LIB_SYMLINK = lib32
|
||||
endif
|
||||
|
||||
# Populating the staging with the base directories is handled by the skeleton package
|
||||
$(STAGING_DIR):
|
||||
@mkdir -p $(STAGING_DIR)/bin
|
||||
@mkdir -p $(STAGING_DIR)/lib
|
||||
@ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK)
|
||||
@mkdir -p $(STAGING_DIR)/usr/lib
|
||||
@ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK)
|
||||
@mkdir -p $(STAGING_DIR)/usr/include
|
||||
@mkdir -p $(STAGING_DIR)/usr/bin
|
||||
@mkdir -p $(STAGING_DIR)
|
||||
@ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
|
||||
|
||||
RSYNC_VCS_EXCLUSIONS = \
|
||||
|
@ -13,6 +13,9 @@ SKELETON_SOURCE =
|
||||
# on skeleton.
|
||||
SKELETON_ADD_TOOLCHAIN_DEPENDENCY = NO
|
||||
|
||||
# The skeleton also handles the merged /usr case in the sysroot
|
||||
SKELETON_INSTALL_STAGING = YES
|
||||
|
||||
ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
|
||||
|
||||
SKELETON_PATH = $(call qstrip,$(BR2_ROOTFS_SKELETON_CUSTOM_PATH))
|
||||
@ -85,6 +88,21 @@ define SKELETON_INSTALL_TARGET_CMDS
|
||||
$(TARGET_DIR_WARNING_FILE)
|
||||
endef
|
||||
|
||||
# For the staging dir, we don't really care about /bin and /sbin.
|
||||
# But for consistency with the target dir, and to simplify the code,
|
||||
# we still handle them for the merged or non-merged /usr cases.
|
||||
# Since the toolchain is not yet available, the staging is not yet
|
||||
# populated, so we need to create the directories in /usr
|
||||
define SKELETON_INSTALL_STAGING_CMDS
|
||||
$(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/lib
|
||||
$(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/bin
|
||||
$(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/sbin
|
||||
$(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include
|
||||
$(call SKELETON_USR_SYMLINKS_OR_DIRS,$(STAGING_DIR))
|
||||
ln -snf lib $(STAGING_DIR)/$(LIB_SYMLINK)
|
||||
ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK)
|
||||
endef
|
||||
|
||||
SKELETON_TARGET_GENERIC_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
|
||||
SKELETON_TARGET_GENERIC_ISSUE = $(call qstrip,$(BR2_TARGET_GENERIC_ISSUE))
|
||||
SKELETON_TARGET_GENERIC_ROOT_PASSWD = $(call qstrip,$(BR2_TARGET_GENERIC_ROOT_PASSWD))
|
||||
|
Loading…
Reference in New Issue
Block a user