Commit 7a6b83a2 authored by Maxime Hadjinlian's avatar Maxime Hadjinlian Committed by Thomas Petazzoni
Browse files

skeleton: New package



Create a proper package for the skeleton.

The main Makefile is modified to remove the skeleton support.
The 'dirs' target, will create the $(TARGET_DIR).
The file 'output/target/.root' doesn't exists anymore, as there's no
Make rule to statisfy.

The infrastructure are modified to filter host-skeleton.
It's needed becauses the host-dependencies are derived from the
dependencies of the target package where 'host-' is preprended to the
depedency name.

In the pkg-generic we add skeleton as a dependency to every package.

The whole system/system.mk is now removed at the profit of
package/skeleton/skeleton.mk

[Thomas:
  - rebase on top of master and fix some minor conflicts
  - remove the 'select BR2_PACKAGE_SKELETON' in
    BR2_ROOTFS_SKELETON_DEFAULT and BR2_ROOTFS_SKELETON_CUSTOM, since
    anyway the skeleton package is always enabled.
  - fixup a few mistakes in the getty handling due to misnamed
    variables.]

Signed-off-by: default avatarMaxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent c7ca4e81
Loading
Loading
Loading
Loading
+1 −21
Original line number Diff line number Diff line
@@ -361,8 +361,6 @@ HOST_DIR := $(call qstrip,$(BR2_HOST_DIR))
# Quotes are needed for spaces and all in the original PATH content.
BR_PATH = "$(HOST_DIR)/bin:$(HOST_DIR)/sbin:$(HOST_DIR)/usr/bin:$(HOST_DIR)/usr/sbin:$(PATH)"

TARGET_SKELETON = $(TOPDIR)/system/skeleton

# Location of a file giving a big fat warning that output/target
# should not be used as the root filesystem.
TARGET_DIR_WARNING_FILE = $(TARGET_DIR)/THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
@@ -416,7 +414,6 @@ include $(sort $(wildcard package/*/*.mk))

include boot/common.mk
include linux/linux.mk
include system/system.mk
include fs/common.mk

include $(BR2_EXTERNAL)/external.mk
@@ -441,7 +438,7 @@ world: target-post-image
# dependencies anywhere else
#
################################################################################
$(BUILD_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
$(BUILD_DIR) $(TARGET_DIR) $(HOST_DIR) $(BINARIES_DIR) $(LEGAL_INFO_DIR) $(REDIST_SOURCES_DIR_TARGET) $(REDIST_SOURCES_DIR_HOST):
	@mkdir -p $@

# We make a symlink lib32->lib or lib64->lib as appropriate
@@ -462,27 +459,10 @@ $(STAGING_DIR):
	@mkdir -p $(STAGING_DIR)/usr/bin
	@ln -snf $(STAGING_DIR) $(BASE_DIR)/staging

ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
TARGET_SKELETON = $(BR2_ROOTFS_SKELETON_CUSTOM_PATH)
endif

RSYNC_VCS_EXCLUSIONS = \
	--exclude .svn --exclude .git --exclude .hg --exclude .bzr \
	--exclude CVS

$(BUILD_DIR)/.root:
	mkdir -p $(TARGET_DIR)
	rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
		--chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \
		$(TARGET_SKELETON)/ $(TARGET_DIR)/
	$(INSTALL) -m 0644 support/misc/target-dir-warning.txt $(TARGET_DIR_WARNING_FILE)
	@ln -snf lib $(TARGET_DIR)/$(LIB_SYMLINK)
	@mkdir -p $(TARGET_DIR)/usr
	@ln -snf lib $(TARGET_DIR)/usr/$(LIB_SYMLINK)
	touch $@

$(TARGET_DIR): $(BUILD_DIR)/.root

STRIP_FIND_CMD = find $(TARGET_DIR)
ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS)))
STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ $(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install
# and _GETTEXTIZE away from the non-host rule
ifeq ($(4),host)
$(2)_DEPENDENCIES ?= $$(filter-out host-automake host-autoconf host-libtool \
				host-gettext host-toolchain $(1),\
				host-gettext host-skeleton host-toolchain $(1),\
    $$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES))))
endif

+2 −1
Original line number Diff line number Diff line
@@ -146,7 +146,8 @@ endif
# This must be repeated from inner-generic-package, otherwise we only get
# host-cmake in _DEPENDENCIES because of the following line
ifeq ($(4),host)
$(2)_DEPENDENCIES ?= $$(filter-out host-toolchain $(1),$$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES))))
$(2)_DEPENDENCIES ?= $$(filter-out host-skeleton host-toolchain $(1),\
	$$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES))))
endif

$(2)_DEPENDENCIES += host-cmake
+4 −1
Original line number Diff line number Diff line
@@ -405,10 +405,13 @@ $(2)_REDISTRIBUTE ?= YES
$(2)_ADD_TOOLCHAIN_DEPENDENCY	?= YES

ifeq ($(4),host)
$(2)_DEPENDENCIES ?= $$(filter-out  host-toolchain $(1),\
$(2)_DEPENDENCIES ?= $$(filter-out host-skeleton host-toolchain $(1),\
	$$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES))))
endif
ifeq ($(4),target)
ifneq ($(1),skeleton)
$(2)_DEPENDENCIES += skeleton
endif
ifeq ($$($(2)_ADD_TOOLCHAIN_DEPENDENCY),YES)
$(2)_DEPENDENCIES += toolchain
endif
+1 −1
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ endif
# automatically from the dependencies of the corresponding target
# package.
ifeq ($(4),host)
$(2)_DEPENDENCIES ?= $$(filter-out host-python host-python3 host-python-setuptools host-toolchain $(1),$$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES))))
$(2)_DEPENDENCIES ?= $$(filter-out host-python host-python3 host-python-setuptools host-skeleton host-toolchain $(1),$$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES))))
endif

# Target packages need both the python interpreter on the target (for
Loading