summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rules/initmethod.in1
-rw-r--r--rules/usr-rootfs.in5
-rw-r--r--rules/usr-rootfs.make44
-rw-r--r--scripts/lib/ptxd_make_xpkg_pkg.sh5
4 files changed, 53 insertions, 2 deletions
diff --git a/rules/initmethod.in b/rules/initmethod.in
index aa5160893..0b1c2df25 100644
--- a/rules/initmethod.in
+++ b/rules/initmethod.in
@@ -2,6 +2,7 @@
menuconfig INITMETHOD
bool "init "
+ select USR_ROOTFS
default y
help
Choose the system startup init method here
diff --git a/rules/usr-rootfs.in b/rules/usr-rootfs.in
new file mode 100644
index 000000000..8190c62d1
--- /dev/null
+++ b/rules/usr-rootfs.in
@@ -0,0 +1,5 @@
+## SECTION=rootfs
+
+config USR_ROOTFS
+ tristate
+ select BASE
diff --git a/rules/usr-rootfs.make b/rules/usr-rootfs.make
new file mode 100644
index 000000000..9fc963cff
--- /dev/null
+++ b/rules/usr-rootfs.make
@@ -0,0 +1,44 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Michael Olbrich <m.olbrich@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_USR_ROOTFS) += usr-rootfs
+
+USR_ROOTFS_VERSION := 1.0
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/usr-rootfs.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, usr-rootfs)
+ @$(call install_fixup,usr-rootfs,PRIORITY,optional)
+ @$(call install_fixup,usr-rootfs,SECTION,base)
+ @$(call install_fixup,usr-rootfs,AUTHOR,"Michael Olbrich <m.olbrich@pengutronix.de>")
+ @$(call install_fixup,usr-rootfs,DESCRIPTION,missing)
+
+ @$(call install_copy, usr-rootfs, 0, 0, 0755, /usr)
+ @$(call install_copy, usr-rootfs, 0, 0, 0755, /usr/bin)
+ @$(call install_copy, usr-rootfs, 0, 0, 0755, /usr/sbin)
+ @$(call install_copy, usr-rootfs, 0, 0, 0755, /usr/lib)
+
+ @$(call install_link, usr-rootfs, usr/bin, /bin)
+ @$(call install_link, usr-rootfs, usr/sbin, /sbin)
+ @$(call install_link, usr-rootfs, usr/lib, /lib)
+
+ @$(call install_finish,usr-rootfs)
+
+ @$(call touch)
+
+# vim: syntax=make
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index e874c0a16..37738e1cf 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -97,6 +97,7 @@ ptxd_install_setup() {
local -a nfsroot_dirs
case "${dst}" in
+ /bin/*|/sbin/*|/lib/*) dst="/usr${dst}" ;;
/*|"") ;;
*) ptxd_bailout "'dst' must be an absolute path!" ;;
esac
@@ -156,13 +157,13 @@ ptxd_install_setup_src_list() {
export -f ptxd_install_setup_src_list
ptxd_install_setup_src() {
- ptxd_install_setup || return
+ local -a list
if [ "${src}" = "-" -a -n "${dst}" ]; then
src="${pkg_pkg_dir}${dst}"
fi
- local -a list
+ ptxd_install_setup || return
ptxd_install_setup_src_list "${src}"