initscripts: new package
PATCH 1/4 initscripts: new package
The folder init.d is currently installed by default since it's part of our skeleton.
This patch creates a package out of it and make busybox/sysvinit depends on it.
This way, if you chose another init, you don't end up with a useless init.d folder.
---
v4 -> v5:
- Move inittab to their specifi packages (sysvinit and busybox)
- Make BR2_INIT_SYSV and BR2_INIT_BUSYBOX select initscripts
- Initscripts depends on BR2_INIT_SYSV or BR2_INIT_BUSYBOX so it can't be selected by anything else.
v3 -> v4:
- Fix bug with busybox
v2 -> v3:
- Fix rebase issues
v1 -> v2:
- Redo the patch using git format-patch -M
---
package/Config.in | 1 +
package/busybox/busybox.mk | 7 +++++++
{system/skeleton/etc => package/busybox}/inittab | 0
package/initscripts/Config.in | 5 +++++
.../etc => package/initscripts}/init.d/S20urandom | 0
.../etc => package/initscripts}/init.d/S40network | 0
{system/skeleton/etc => package/initscripts}/init.d/rcK | 0
{system/skeleton/etc => package/initscripts}/init.d/rcS | 0
package/initscripts/initscripts.mk | 15 +++++++++++++++
package/sysvinit/sysvinit.mk | 6 ++----
system/Config.in | 2 ++
11 files changed, 32 insertions(+), 4 deletions(-)
rename {system/skeleton/etc => package/busybox}/inittab (100%)
create mode 100644 package/initscripts/Config.in
rename {system/skeleton/etc => package/initscripts}/init.d/S20urandom (100%)
rename {system/skeleton/etc => package/initscripts}/init.d/S40network (100%)
rename {system/skeleton/etc => package/initscripts}/init.d/rcK (100%)
rename {system/skeleton/etc => package/initscripts}/init.d/rcS (100%)
create mode 100644 package/initscripts/initscripts.mkpackage/Config.in +1 -0
@@ -1414,6 +1414,7 @@ endif source "package/ftop/Config.in" source "package/getent/Config.in" source "package/htop/Config.in" + source "package/initscripts/Config.in" source "package/iotop/Config.in" source "package/iprutils/Config.in" source "package/irqbalance/Config.in"
package/busybox/busybox.mk +7 -0
@@ -148,6 +148,12 @@ define BUSYBOX_INSTALL_LOGGING_SCRIPT else rm -f $(TARGET_DIR)/etc/init.d/S01logging; fi endef +ifeq ($(BR2_INIT_BUSYBOX),y) +define BUSYBOX_INSTALL_INITTAB + $(INSTALL) -D -m 0644 package/busybox/inittab $(TARGET_DIR)/etc/inittab +endef +endif + ifeq ($(BR2_PACKAGE_BUSYBOX_WATCHDOG),y) define BUSYBOX_SET_WATCHDOG $(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG,$(BUSYBOX_BUILD_CONFIG))
@@ -205,6 +211,7 @@ endef define BUSYBOX_INSTALL_TARGET_CMDS $(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install + $(BUSYBOX_INSTALL_INITTAB) $(BUSYBOX_INSTALL_UDHCPC_SCRIPT) $(BUSYBOX_INSTALL_MDEV_CONF) endef
package/busybox/inittab renamed from system/skeleton/etc/inittab +0 -0
package/initscripts/Config.in new file +5 -0
@@ -0,0 +1,5 @@ +config BR2_PACKAGE_INITSCRIPTS + bool "initscripts" + depends on BR2_INIT_BUSYBOX || BR2_INIT_SYSV + help + The basics startup scripts for both SysV and Busybox
package/initscripts/init.d/S20urandom renamed from system/skeleton/etc/init.d/S20urandom +0 -0
package/initscripts/init.d/S40network renamed from system/skeleton/etc/init.d/S40network +0 -0
package/initscripts/init.d/rcK renamed from system/skeleton/etc/init.d/rcK +0 -0
package/initscripts/init.d/rcS renamed from system/skeleton/etc/init.d/rcS +0 -0
package/initscripts/initscripts.mk new file +15 -0
@@ -0,0 +1,15 @@ +################################################################################ +# +# initscripts +# +################################################################################ + +# source included in buildroot +INITSCRIPTS_SOURCE = + +define INITSCRIPTS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/etc/init.d + $(INSTALL) -D -m 0755 package/initscripts/init.d/* $(TARGET_DIR)/etc/init.d/ +endef + +$(eval $(generic-package))
package/sysvinit/sysvinit.mk +2 -4
@@ -11,9 +11,9 @@ SYSVINIT_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/ SYSVINIT_LICENSE = GPLv2+ SYSVINIT_LICENSE_FILES = COPYING -# Override BusyBox implementations if BusyBox is enabled. +# Override Busybox implementations if Busybox is enabled. ifeq ($(BR2_PACKAGE_BUSYBOX),y) -SYSVINIT_DEPENDENCIES = busybox +SYSVINIT_DEPENDENCIES += busybox endif define SYSVINIT_DEBIAN_PATCHES
@@ -34,8 +34,6 @@ define SYSVINIT_INSTALL_TARGET_CMDS for x in halt init shutdown killall5; do \ $(INSTALL) -D -m 0755 $(@D)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1; \ done - # Override BusyBox's inittab with an inittab compatible with - # sysvinit $(INSTALL) -D -m 0644 package/sysvinit/inittab $(TARGET_DIR)/etc/inittab ln -sf /sbin/halt $(TARGET_DIR)/sbin/reboot ln -sf /sbin/halt $(TARGET_DIR)/sbin/poweroff
system/Config.in +2 -0
@@ -70,10 +70,12 @@ choice config BR2_INIT_BUSYBOX bool "BusyBox" select BR2_PACKAGE_BUSYBOX + select BR2_PACKAGE_INITSCRIPTS config BR2_INIT_SYSV bool "systemV" select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # sysvinit + select BR2_PACKAGE_INITSCRIPTS select BR2_PACKAGE_SYSVINIT config BR2_INIT_SYSTEMD
Signature · 1 line
2.1.4
PATCH 2/4 pkg-generic: Package can't depends on themselves
So filter out the current package name from the dependencies list.
--- package/pkg-generic.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
package/pkg-generic.mk +2 -2
@@ -415,8 +415,8 @@ endif endif # Eliminate duplicates in dependencies -$(2)_FINAL_DEPENDENCIES = $$(sort $$($(2)_DEPENDENCIES)) -$(2)_FINAL_PATCH_DEPENDENCIES = $$(sort $$($(2)_PATCH_DEPENDENCIES)) +$(2)_FINAL_DEPENDENCIES = $$(filter-out $(1),$$(sort $$($(2)_DEPENDENCIES))) +$(2)_FINAL_PATCH_DEPENDENCIES = $$(filter-out $(1),$$(sort $$($(2)_PATCH_DEPENDENCIES))) $(2)_FINAL_ALL_DEPENDENCIES = $$(sort $$($(2)_FINAL_DEPENDENCIES) $$($(2)_FINAL_PATCH_DEPENDENCIES)) $(2)_INSTALL_STAGING ?= NO
Signature · 1 line
2.1.4
PATCH 3/4 skeleton: New package
In reply to Maxime HadjinlianThis package moves everything from /system/skeleton into a proper package.
The entry Makefile is modified to remove the skeleton support.
The generic, autotools and cmake infra are modified to filter skeleton and host-skeleton. Also, in the pkg-generic we add skeleton as a dependency to every package.
All the TARGET_FINALIZE_HOOKS that were done in system/system.mk are now done in skeleton.
---
Makefile | 32 +------
fs/common.mk | 1 -
package/pkg-autotools.mk | 2 +-
package/pkg-cmake.mk | 3 +-
package/skeleton/Config.in | 6 ++
.../usr/sbin => package/skeleton/data/bin}/.empty | 0
{system/skeleton => package/skeleton/data}/dev/log | 0
.../lib => package/skeleton/data/dev/pts}/.empty | 0
.../skeleton => package/skeleton/data}/etc/fstab | 0
.../skeleton => package/skeleton/data}/etc/group | 0
.../skeleton => package/skeleton/data}/etc/hosts | 0
.../skeleton => package/skeleton/data}/etc/inputrc | 0
.../skeleton => package/skeleton/data}/etc/issue | 0
.../skeleton/data/etc/ld.so.conf.d}/.empty | 0
.../skeleton => package/skeleton/data}/etc/mtab | 0
.../skeleton/data/etc/network/if-down.d}/.empty | 0
.../data/etc/network/if-post-down.d}/.empty | 0
.../skeleton/data/etc/network/if-pre-up.d}/.empty | 0
.../skeleton/data/etc/network/if-up.d}/.empty | 0
.../skeleton => package/skeleton/data}/etc/passwd | 0
.../skeleton => package/skeleton/data}/etc/profile | 0
.../skeleton/data}/etc/protocols | 0
.../skeleton/data}/etc/resolv.conf | 0
.../skeleton/data}/etc/services | 0
.../skeleton => package/skeleton/data}/etc/shadow | 0
.../root => package/skeleton/data/home/ftp}/.empty | 0
.../proc => package/skeleton/data/lib}/.empty | 0
.../opt => package/skeleton/data/media}/.empty | 0
.../skeleton => package/skeleton/data}/mnt/.empty | 0
.../media => package/skeleton/data/opt}/.empty | 0
.../lib => package/skeleton/data/proc}/.empty | 0
.../skeleton/data}/root/.bash_history | 0
.../skeleton/data}/root/.bash_logout | 0
.../skeleton/data}/root/.bash_profile | 0
.../home/ftp => package/skeleton/data/root}/.empty | 0
.../if-up.d => package/skeleton/data/run}/.empty | 0
.../skeleton/data/sbin}/.empty | 0
.../skeleton/data/sys}/.empty | 0
.../if-down.d => package/skeleton/data/tmp}/.empty | 0
.../skeleton/data/usr/bin}/.empty | 0
.../pts => package/skeleton/data/usr/lib}/.empty | 0
.../bin => package/skeleton/data/usr/sbin}/.empty | 0
.../skeleton => package/skeleton/data}/var/cache | 0
.../skeleton/data}/var/lib/misc | 0
.../skeleton => package/skeleton/data}/var/lock | 0
{system/skeleton => package/skeleton/data}/var/log | 0
{system/skeleton => package/skeleton/data}/var/run | 0
.../skeleton => package/skeleton/data}/var/spool | 0
{system/skeleton => package/skeleton/data}/var/tmp | 0
package/skeleton/skeleton.mk | 100 +++++++++++++++++++++
system/Config.in | 1 +
system/system.mk | 66 --------------
52 files changed, 114 insertions(+), 97 deletions(-)
create mode 100644 package/skeleton/Config.in
rename {system/skeleton/usr/sbin => package/skeleton/data/bin}/.empty (100%)
rename {system/skeleton => package/skeleton/data}/dev/log (100%)
rename {system/skeleton/usr/lib => package/skeleton/data/dev/pts}/.empty (100%)
rename {system/skeleton => package/skeleton/data}/etc/fstab (100%)
rename {system/skeleton => package/skeleton/data}/etc/group (100%)
rename {system/skeleton => package/skeleton/data}/etc/hosts (100%)
rename {system/skeleton => package/skeleton/data}/etc/inputrc (100%)
rename {system/skeleton => package/skeleton/data}/etc/issue (100%)
rename {system/skeleton/usr/bin => package/skeleton/data/etc/ld.so.conf.d}/.empty (100%)
rename {system/skeleton => package/skeleton/data}/etc/mtab (100%)
rename {system/skeleton/tmp => package/skeleton/data/etc/network/if-down.d}/.empty (100%)
rename {system/skeleton/sys => package/skeleton/data/etc/network/if-post-down.d}/.empty (100%)
rename {system/skeleton/sbin => package/skeleton/data/etc/network/if-pre-up.d}/.empty (100%)
rename {system/skeleton/run => package/skeleton/data/etc/network/if-up.d}/.empty (100%)
rename {system/skeleton => package/skeleton/data}/etc/passwd (100%)
rename {system/skeleton => package/skeleton/data}/etc/profile (100%)
rename {system/skeleton => package/skeleton/data}/etc/protocols (100%)
rename {system/skeleton => package/skeleton/data}/etc/resolv.conf (100%)
rename {system/skeleton => package/skeleton/data}/etc/services (100%)
rename {system/skeleton => package/skeleton/data}/etc/shadow (100%)
rename {system/skeleton/root => package/skeleton/data/home/ftp}/.empty (100%)
rename {system/skeleton/proc => package/skeleton/data/lib}/.empty (100%)
rename {system/skeleton/opt => package/skeleton/data/media}/.empty (100%)
rename {system/skeleton => package/skeleton/data}/mnt/.empty (100%)
rename {system/skeleton/media => package/skeleton/data/opt}/.empty (100%)
rename {system/skeleton/lib => package/skeleton/data/proc}/.empty (100%)
rename {system/skeleton => package/skeleton/data}/root/.bash_history (100%)
rename {system/skeleton => package/skeleton/data}/root/.bash_logout (100%)
rename {system/skeleton => package/skeleton/data}/root/.bash_profile (100%)
rename {system/skeleton/home/ftp => package/skeleton/data/root}/.empty (100%)
rename {system/skeleton/etc/network/if-up.d => package/skeleton/data/run}/.empty (100%)
rename {system/skeleton/etc/network/if-pre-up.d => package/skeleton/data/sbin}/.empty (100%)
rename {system/skeleton/etc/network/if-post-down.d => package/skeleton/data/sys}/.empty (100%)
rename {system/skeleton/etc/network/if-down.d => package/skeleton/data/tmp}/.empty (100%)
rename {system/skeleton/etc/ld.so.conf.d => package/skeleton/data/usr/bin}/.empty (100%)
rename {system/skeleton/dev/pts => package/skeleton/data/usr/lib}/.empty (100%)
rename {system/skeleton/bin => package/skeleton/data/usr/sbin}/.empty (100%)
rename {system/skeleton => package/skeleton/data}/var/cache (100%)
rename {system/skeleton => package/skeleton/data}/var/lib/misc (100%)
rename {system/skeleton => package/skeleton/data}/var/lock (100%)
rename {system/skeleton => package/skeleton/data}/var/log (100%)
rename {system/skeleton => package/skeleton/data}/var/run (100%)
rename {system/skeleton => package/skeleton/data}/var/spool (100%)
rename {system/skeleton => package/skeleton/data}/var/tmp (100%)
create mode 100644 package/skeleton/skeleton.mkMakefile +4 -28
@@ -361,12 +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 - ifeq ($(BR2_CCACHE),y) CCACHE := $(HOST_DIR)/usr/bin/ccache BR_CACHE_DIR = $(call qstrip,$(BR2_CCACHE_DIR))
@@ -421,8 +415,7 @@ include fs/common.mk include $(BR2_EXTERNAL)/external.mk -dirs: $(BUILD_DIR) $(STAGING_DIR) $(TARGET_DIR) \ - $(HOST_DIR) $(BINARIES_DIR) +dirs: $(BUILD_DIR) $(STAGING_DIR) $(HOST_DIR) $(BINARIES_DIR) $(BUILD_DIR)/buildroot-config/auto.conf: $(BR2_CONFIG) $(MAKE1) $(EXTRAMAKEARGS) HOSTCC="$(HOSTCC_NOCCACHE)" HOSTCXX="$(HOSTCXX_NOCCACHE)" silentoldconfig
@@ -431,9 +424,9 @@ prepare: $(BUILD_DIR)/buildroot-config/auto.conf world: target-post-image -.PHONY: all world toolchain dirs clean distclean source outputmakefile \ - legal-info legal-info-prepare legal-info-clean printvars help \ - list-defconfigs target-finalize target-post-image source-check +.PHONY: all world skeleton toolchain dirs clean distclean source \ + outputmakefile legal-info legal-info-prepare legal-info-clean printvars \ + help list-defconfigs target-finalize target-post-image source-check ################################################################################ #
@@ -462,27 +455,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
fs/common.mk +0 -1
@@ -91,7 +91,6 @@ endif echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT) chmod a+x $$(FAKEROOT_SCRIPT) PATH=$$(BR_PATH) $$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT) - $$(INSTALL) -m 0644 support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE) - at rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE) ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),) PATH=$$(BR_PATH) $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT)
package/pkg-autotools.mk +1 -1
@@ -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
package/pkg-cmake.mk +2 -1
@@ -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
package/skeleton/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_SKELETON + bool + default y + depends on BR2_ROOTFS_SKELETON_DEFAULT + help + The basic skeleton for your rootfs.
package/skeleton/data/bin/.empty renamed from system/skeleton/usr/sbin/.empty +0 -0
package/skeleton/data/dev/log renamed from system/skeleton/dev/log +0 -0
package/skeleton/data/dev/pts/.empty renamed from system/skeleton/usr/lib/.empty +0 -0
package/skeleton/data/etc/fstab renamed from system/skeleton/etc/fstab +0 -0
package/skeleton/data/etc/group renamed from system/skeleton/etc/group +0 -0
package/skeleton/data/etc/hosts renamed from system/skeleton/etc/hosts +0 -0
package/skeleton/data/etc/inputrc renamed from system/skeleton/etc/inputrc +0 -0
package/skeleton/data/etc/issue renamed from system/skeleton/etc/issue +0 -0
package/skeleton/data/etc/ld.so.conf.d/.empty renamed from system/skeleton/usr/bin/.empty +0 -0
package/skeleton/data/etc/mtab renamed from system/skeleton/etc/mtab +0 -0
package/skeleton/data/etc/network/if-down.d/.empty renamed from system/skeleton/tmp/.empty +0 -0
package/skeleton/data/etc/network/if-post-down.d/.empty renamed from system/skeleton/sys/.empty +0 -0
package/skeleton/data/etc/network/if-pre-up.d/.empty renamed from system/skeleton/sbin/.empty +0 -0
package/skeleton/data/etc/network/if-up.d/.empty renamed from system/skeleton/run/.empty +0 -0
package/skeleton/data/etc/passwd renamed from system/skeleton/etc/passwd +0 -0
package/skeleton/data/etc/profile renamed from system/skeleton/etc/profile +0 -0
package/skeleton/data/etc/protocols renamed from system/skeleton/etc/protocols +0 -0
package/skeleton/data/etc/resolv.conf renamed from system/skeleton/etc/resolv.conf +0 -0
package/skeleton/data/etc/services renamed from system/skeleton/etc/services +0 -0
package/skeleton/data/etc/shadow renamed from system/skeleton/etc/shadow +0 -0
package/skeleton/data/home/ftp/.empty renamed from system/skeleton/root/.empty +0 -0
package/skeleton/data/lib/.empty renamed from system/skeleton/proc/.empty +0 -0
package/skeleton/data/media/.empty renamed from system/skeleton/opt/.empty +0 -0
package/skeleton/data/mnt/.empty renamed from system/skeleton/mnt/.empty +0 -0
package/skeleton/data/opt/.empty renamed from system/skeleton/media/.empty +0 -0
package/skeleton/data/proc/.empty renamed from system/skeleton/lib/.empty +0 -0
package/skeleton/data/root/.bash_history renamed from system/skeleton/root/.bash_history +0 -0
package/skeleton/data/root/.bash_logout renamed from system/skeleton/root/.bash_logout +0 -0
package/skeleton/data/root/.bash_profile renamed from system/skeleton/root/.bash_profile +0 -0
package/skeleton/data/root/.empty renamed from system/skeleton/home/ftp/.empty +0 -0
package/skeleton/data/run/.empty renamed from system/skeleton/etc/network/if-up.d/.empty +0 -0
package/skeleton/data/sbin/.empty renamed from system/skeleton/etc/network/if-pre-up.d/.empty +0 -0
package/skeleton/data/sys/.empty renamed from system/skeleton/etc/network/if-post-down.d/.empty +0 -0
package/skeleton/data/tmp/.empty renamed from system/skeleton/etc/network/if-down.d/.empty +0 -0
package/skeleton/data/usr/bin/.empty renamed from system/skeleton/etc/ld.so.conf.d/.empty +0 -0
package/skeleton/data/usr/lib/.empty renamed from system/skeleton/dev/pts/.empty +0 -0
package/skeleton/data/usr/sbin/.empty renamed from system/skeleton/bin/.empty +0 -0
package/skeleton/data/var/cache renamed from system/skeleton/var/cache +0 -0
package/skeleton/data/var/lib/misc renamed from system/skeleton/var/lib/misc +0 -0
package/skeleton/data/var/lock renamed from system/skeleton/var/lock +0 -0
package/skeleton/data/var/log renamed from system/skeleton/var/log +0 -0
package/skeleton/data/var/run renamed from system/skeleton/var/run +0 -0
package/skeleton/data/var/spool renamed from system/skeleton/var/spool +0 -0
package/skeleton/data/var/tmp renamed from system/skeleton/var/tmp +0 -0
package/skeleton/skeleton.mk new file +100 -0
100 lines not on this page · raw message
system/Config.in +1 -0
@@ -158,6 +158,7 @@ choice config BR2_ROOTFS_SKELETON_DEFAULT bool "default target skeleton" + select BR2_PACKAGE_SKELETON help Use default target skeleton
system/system.mk +0 -66
69 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH 3/4 skeleton: New package
Maxime,
Quoted 5 lines · Maxime Hadjinlian
This package moves everything from /system/skeleton into a proper package.
The entry
Makefileis modified to remove the skeleton support.
Quoted 8 lines
The generic, autotools and cmake infra are modified to filter skeleton and host-skeleton. Also, in the pkg-generic we add skeleton as a dependency to every package.
All the
TARGET_FINALIZE_HOOKSthat were done insystem/system.mkare now done in skeleton.Signed-off-by Maxime Hadjinlian <[email protected]>
Is there perhaps some benefit to not moving the default skeleton, to keep it near the default device_table files that cooperate with it? You can still have a skeleton package, and rsync from system ...
Just a thought,
Danomi -
PATCH 3/4 skeleton: New package
In reply to Maxime HadjinlianHi Maxime,
Quoted 3 lines · Maxime Hadjinlian
The generic, autotools and cmake infra are modified to filter skeleton and host-skeleton. Also, in the pkg-generic we add skeleton as a dependency to every package.
[snip]
Quoted 11 lines
package/skeleton/skeleton.mk new file +5
-0@@ -0,0 +1,100 @@ +################################################################################ +# +# skeleton +# +################################################################################
[snip]
Quoted 1 line
+$(eval $(generic-package))
There is no host-generic-package here. What would host-skeleton be used for anyway?
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 3/4 skeleton: New package
Hi Baruch,
Quoted 23 lines · Baruch Siach
Hi Maxime,
Quoted 3 lines · Maxime Hadjinlian
The generic, autotools and cmake infra are modified to filter skeleton and host-skeleton. Also, in the pkg-generic we add skeleton as a dependency to every package.
[snip]
Quoted 11 lines
package/skeleton/skeleton.mk new file +5
-0@@ -0,0 +1,100 @@ +################################################################################ +# +# skeleton +# +################################################################################[snip]
Quoted 5 lines
Quoted 1 line
+$(eval $(generic-package))
There is no host-generic-package here. What would host-skeleton be used for anyway?
We need to filter host-skeleton because the infra derive the host-dependencies from the depencies of the packages and preprend 'host-' to its name
Quoted 6 lines
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
PATCH 4/4 pkg-generic: skeleton: Add dependency to all
In reply to Maxime HadjinlianAll packages must depends on skeleton as it's the one that will create the $(TARGET_DIR)
--- package/pkg-generic.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/pkg-generic.mk +2 -1
@@ -405,10 +405,11 @@ $(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) +$(2)_DEPENDENCIES += skeleton ifeq ($$($(2)_ADD_TOOLCHAIN_DEPENDENCY),YES) $(2)_DEPENDENCIES += toolchain endif
Signature · 1 line
2.1.4
PATCH 1/4 initscripts: new package
In reply to Maxime HadjinlianDear Maxime Hadjinlian,
Quoted 33 lines · Maxime Hadjinlian
The folder init.d is currently installed by default since it's part of our skeleton.
This patch creates a package out of it and make busybox/sysvinit depends on it.This way, if you chose another init, you don't end up with a useless init.d folder.
Signed-off-by Maxime Hadjinlian <[email protected]>---
v4 -> v5:
- Move inittab to their specifi packages (sysvinit and busybox)
- MakeBR2_INIT_SYSVandBR2_INIT_BUSYBOXselect initscripts
- Initscripts depends onBR2_INIT_SYSVorBR2_INIT_BUSYBOXso it can't be selected by anything else.
v3 -> v4:
- Fix bug with busybox
v2 -> v3:
- Fix rebase issues
v1 -> v2:
- Redo the patch using git format-patch -M--- package/Config.in | 1 + package/busybox/busybox.mk | 7 +++++++ {system/skeleton/etc => package/busybox}/inittab | 0 package/initscripts/Config.in | 5 +++++ .../etc => package/initscripts}/init.d/S20urandom | 0 .../etc => package/initscripts}/init.d/S40network | 0 {system/skeleton/etc => package/initscripts}/init.d/rcK | 0 {system/skeleton/etc => package/initscripts}/init.d/rcS | 0 package/initscripts/initscripts.mk | 15 +++++++++++++++ package/sysvinit/sysvinit.mk | 6 ++---- system/Config.in | 2 ++
Quoted 8 lines
11 files changed, 32 insertions(+), 4 deletions(-)
rename {system/skeleton/etc => package/busybox}/inittab (100%)
create mode 100644 package/initscripts/Config.in
rename {system/skeleton/etc => package/initscripts}/init.d/S20urandom (100%)
rename {system/skeleton/etc => package/initscripts}/init.d/S40network (100%)
rename {system/skeleton/etc => package/initscripts}/init.d/rcK (100%)
rename {system/skeleton/etc => package/initscripts}/init.d/rcS (100%)
create mode 100644 package/initscripts/initscripts.mkApplied after some changes:
[Thomas:
- make the initscripts package selectable via a hidden bool
- remove some unneeded changes in sysvinit.mk.]
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com