Move to ## SECTION=initramfs
Signed-off-by: Jon Ringle <[email protected]>
---
rules/klibc-user-spec.make | 96 ++++++++++++++++++++++++++
rules/klibc.in | 15 ++++-
rules/klibc.make | 164 ++++++++++++++++++++-----------------------
3 files changed, 186 insertions(+), 89 deletions(-)
create mode 100644 rules/klibc-user-spec.make
diff --git a/rules/klibc-user-spec.make b/rules/klibc-user-spec.make
new file mode 100644
index 0000000..b7ec4fa
--- /dev/null
+++ b/rules/klibc-user-spec.make
@@ -0,0 +1,96 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2009 by Jon Ringle
+#
+# 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_KLIBC_USER_SPEC) += klibc-user-spec
+
+#
+# Dummy to keep ipkg happy
+#
+KLIBC_USER_SPEC_VERSION := $(KLIBC_VERSION)
+KLIBC_USER_SPEC_DIR := $(BUILDDIR)/$(KLIBC)
+
+ifdef PTXCONF_KLIBC_USER_SPEC
+$(STATEDIR)/kernel.compile: $(STATEDIR)/klibc-user-spec.install
+endif
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/klibc-user-spec.get:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/klibc-user-spec.extract:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/klibc-user-spec.prepare:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/klibc-user-spec.compile:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+#
+
+$(STATEDIR)/klibc-user-spec.install:
+ @$(call targetinfo)
+#
+# adding user specific files to the list last
+# Note: files without a leading '/' get a prefix path of
$(PTXDIST_WORKSPACE)/initramfs
+#
+ifdef PTXCONF_KLIBC_USER_SPEC
+ cat $(PTXDIST_WORKSPACE)/initramfs_spec | while read type target source
rest; do \
+ if [ "$$type" == "file" ]; then
\
+ if [ "$$(echo "$$source" | grep "^/")" == "" ]; then
\
+ source=$(PTXDIST_WORKSPACE)/initramfs/$$source;
\
+ fi;
\
+ fi;
\
+ echo "$$type $$target $$source $$rest" >> $(KLIBC_CONTROL);
\
+ done
+endif
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/klibc-user-spec.targetinstall:
+ @$(call targetinfo)
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+klibc-user-spec_clean:
+ rm -rf $(STATEDIR)/klibc-user-spec.*
+
+# vim: syntax=make
diff --git a/rules/klibc.in b/rules/klibc.in
index 1d07446..dcede4f 100644
--- a/rules/klibc.in
+++ b/rules/klibc.in
@@ -1,4 +1,4 @@
-## SECTION=core
+## SECTION=initramfs
#
# rules/klibc.in
@@ -247,6 +247,17 @@ if KLIBC_DYNAMIC_LIB
#comment "Select shared linked commands to install"
######
+comment "Static dash shell is selected!"
+ depends on KLIBC_STATIC_DASH
+
+config KLIBC_SHARED_DASH
+ depends on !KLIBC_STATIC_DASH
+ bool
+ prompt "dash"
+ help
+ install a minimum shared shell (dash) under /bin/sh
+
+######
comment "Static cat command is selected!"
depends on KLIBC_STATIC_CAT
@@ -478,6 +489,7 @@ comment "Static reboot command is selected!"
depends on KLIBC_STATIC_REBOOT
config KLIBC_SHARED_REBOOT
+ depends on !KLIBC_STATIC_REBOOT
bool
prompt "reboot"
help
@@ -488,6 +500,7 @@ comment "Static resume command is selected!"
depends on KLIBC_STATIC_RESUME
config KLIBC_SHARED_RESUME
+ depends on !KLIBC_STATIC_REBOOT
bool
prompt "resume"
help
diff --git a/rules/klibc.make b/rules/klibc.make
index 9bb5e60..6f7ce4d 100644
--- a/rules/klibc.make
+++ b/rules/klibc.make
@@ -27,7 +27,7 @@ KLIBC_SOURCE := $(SRCDIR)/$(KLIBC).$(KLIBC_SUFFIX)
KLIBC_DIR := $(BUILDDIR)/$(KLIBC)
ifdef PTXCONF_KLIBC
-$(STATEDIR)/kernel.compile: $(STATEDIR)/klibc.install
+$(STATEDIR)/kernel.compile: $(STATEDIR)/klibc.targetinstall
endif
# ----------------------------------------------------------------------------
@@ -42,9 +42,6 @@ $(KLIBC_SOURCE):
# Prepare
# ----------------------------------------------------------------------------
-KLIBC_PATH := PATH=$(CROSS_PATH)
-KLIBC_ENV := $(CROSS_ENV)
-
$(STATEDIR)/klibc.prepare: $(STATEDIR)/kernel.prepare
@$(call targetinfo)
@echo > $(KLIBC_DIR)/defconfig
@@ -73,6 +70,7 @@ KLIBC_MAKEVARS := \
$(PARALLELMFLAGS) \
KLIBCARCH=$(PTXCONF_ARCH_STRING) \
CROSS_COMPILE=$(COMPILER_PREFIX) \
+ INSTALLDIR=$(SYSROOT)/usr/lib/klibc \
INSTALLROOT=$(SYSROOT)
$(STATEDIR)/klibc.compile:
@@ -105,226 +103,216 @@ KLIBC_CONTROL := $(KLIBC_DIR)/initramfs_spec
$(STATEDIR)/klibc.install:
@$(call targetinfo)
- @echo "dir /dev/ 755 0 0" > $(KLIBC_CONTROL)
- @echo "dir /proc/ 755 0 0" >> $(KLIBC_CONTROL)
- @echo "dir /sys/ 755 0 0" >> $(KLIBC_CONTROL)
- @echo "dir /bin/ 755 0 0" >> $(KLIBC_CONTROL)
- @echo "nod /dev/console 644 0 0 c 5 1" >> $(KLIBC_CONTROL)
- @echo "nod /dev/loop0 644 0 0 b 7 0" >> $(KLIBC_CONTROL)
+ @echo "# Generated initramfs" > $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755, /dev)
+ @$(call install_initramfs, klibc, 0, 0, 0755, /proc)
+ @$(call install_initramfs, klibc, 0, 0, 0755, /sys)
+ @$(call install_initramfs, klibc, 0, 0, 0755, /bin)
+ @$(call install_initramfs_node, klibc, 0, 0, 0600, c, 5, 1,
/dev/console)
#
# select the static parts first
#
ifdef PTXCONF_KLIBC_STATIC_CAT
- @echo "file /bin/cat $(KLIBC_BINSRC)/utils/static/cat 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/cat, /bin/cat)
endif
ifdef PTXCONF_KLIBC_STATIC_CHROOT
- @echo "file /bin/chroot $(KLIBC_BINSRC)/utils/static/chroot 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/chroot, /bin/chroot)
endif
ifdef PTXCONF_KLIBC_STATIC_CPIO
- @echo "file /bin/cpio $(KLIBC_BINSRC)/utils/static/cpio 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/cpio, /bin/cpio)
endif
ifdef PTXCONF_KLIBC_STATIC_DD
- @echo "file /bin/dd $(KLIBC_BINSRC)/utils/static/dd 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/dd, /bin/dd)
endif
ifdef PTXCONF_KLIBC_STATIC_DMESG
- @echo "file /bin/dmesg $(KLIBC_BINSRC)/utils/static/dmesg 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/dmesg, /bin/dmesg)
endif
ifdef PTXCONF_KLIBC_STATIC_FALSE
- @echo "file /bin/false $(KLIBC_BINSRC)/utils/static/false 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/false, /bin/false)
endif
ifdef PTXCONF_KLIBC_STATIC_FSTYPE
- @echo "file /bin/fstype $(KLIBC_BINSRC)/kinit/fstype/static/fstype 755
0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/fstype, /bin/fstype)
endif
ifdef PTXCONF_KLIBC_STATIC_HALT
- @echo "file /bin/halt $(KLIBC_BINSRC)/utils/static/halt 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/halt, /bin/halt)
endif
ifdef PTXCONF_KLIBC_STATIC_IPCONIFG
- @echo "file /bin/ipconfig
$(KLIBC_BINSRC)/kinit/ipconfig/static/ipconfig 755 0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/ipconfig, /bin/ipconfig)
endif
ifdef PTXCONF_KLIBC_STATIC_KILL
- @echo "file /bin/kill $(KLIBC_BINSRC)/utils/static/kill 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/kill, /bin/kill)
endif
ifdef PTXCONF_KLIBC_STATIC_LN
- @echo "file /bin/ln $(KLIBC_BINSRC)/utils/static/ln 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/ln, /bin/ln)
endif
ifdef PTXCONF_KLIBC_STATIC_MINIPS
- @echo "file /bin/minips $(KLIBC_BINSRC)/utils/static/minips 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/minips, /bin/minips)
endif
ifdef PTXCONF_KLIBC_STATIC_MKDIR
- @echo "file /bin/mkdir $(KLIBC_BINSRC)/utils/static/mkdir 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/mkdir, /bin/mkdir)
endif
ifdef PTXCONF_KLIBC_STATIC_MKFIFO
- @echo "file /bin/mkfifo $(KLIBC_BINSRC)/utils/static/mkfifo 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/mkfifo, /bin/mkfifo)
endif
ifdef PTXCONF_KLIBC_STATIC_MKNOD
- @echo "file /bin/mknod $(KLIBC_BINSRC)/utils/static/mknod 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/mknod, /bin/mknod)
endif
ifdef PTXCONF_KLIBC_STATIC_MOUNT
- @echo "file /bin/mount $(KLIBC_BINSRC)/utils/static/mount 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/mount, /bin/mount)
endif
ifdef PTXCONF_KLIBC_STATIC_NFSMOUNT
- @echo "file /bin/nfsmount
$(KLIBC_BINSRC)/kinit/nfsmount/static/nfsmount 755 0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/nfsmount, /bin/nfsmount)
endif
ifdef PTXCONF_KLIBC_STATIC_NUKE
- @echo "file /bin/nuke $(KLIBC_BINSRC)/utils/static/nuke 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/nuke, /bin/nuke)
endif
ifdef PTXCONF_KLIBC_STATIC_PIVOT_ROOT
- @echo "file /bin/pivot_root $(KLIBC_BINSRC)/utils/static/pivot_root 755
0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/pivot_root, /bin/pivot_root)
endif
ifdef PTXCONF_KLIBC_STATIC_POWEROFF
- @echo "file /bin/poweroff $(KLIBC_BINSRC)/utils/static/poweroff 755 0
0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/poweroff, /bin/poweroff)
endif
ifdef PTXCONF_KLIBC_STATIC_READLINK
- @echo "file /bin/readlink $(KLIBC_BINSRC)/utils/static/readlink 755 0
0">> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/readlink, /bin/readlink)
endif
ifdef PTXCONF_KLIBC_STATIC_REBOOT
- @echo "file /bin/reboot $(KLIBC_BINSRC)/utils/static/reboot 755 0 0" >>
$(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/reboot, /bin/reboot)
endif
ifdef PTXCONF_KLIBC_STATIC_RESUME
- @echo "file /bin/resume $(KLIBC_BINSRC)/kinit/resume/static/resume 755
0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/resume, /bin/resume)
endif
ifdef PTXCONF_KLIBC_STATIC_RUN_INIT
- @echo "file /bin/run-init
$(KLIBC_BINSRC)/kinit/run-init/static/run-init 755 0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/run-init, /bin/run-init)
endif
ifdef PTXCONF_KLIBC_STATIC_SLEEP
- @echo "file /bin/sleep $(KLIBC_BINSRC)/utils/static/sleep 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/sleep, /bin/sleep)
endif
ifdef PTXCONF_KLIBC_STATIC_SYNC
- @echo "file /bin/sync $(KLIBC_BINSRC)/utils/static/sync 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/sync, /bin/sync)
endif
ifdef PTXCONF_KLIBC_STATIC_TRUE
- @echo "file /bin/true $(KLIBC_BINSRC)/utils/static/true 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/true, /bin/true)
endif
ifdef PTXCONF_KLIBC_STATIC_UMOUNT
- @echo "file /bin/umount $(KLIBC_BINSRC)/utils/static/umount 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/umount, /bin/umount)
endif
ifdef PTXCONF_KLIBC_STATIC_UNAME
- @echo "file /bin/uname $(KLIBC_BINSRC)/utils/static/uname 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/static/uname, /bin/uname)
endif
ifdef PTXCONF_KLIBC_STATIC_DASH
- @echo "file /bin/sh $(KLIBC_BINSRC)/dash/sh 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755, $(KLIBC_BINSRC)/dash/sh,
/bin/sh)
+endif
+ifdef PTXCONF_KLIBC_SHARED_DASH
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/dash/sh.shared, /bin/sh)
endif
ifdef PTXCONF_KLIBC_KINIT
- @echo "file /kinit $(KLIBC_BINSRC)/kinit/kinit 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/kinit/kinit, /kinit)
endif
#
# select the dynamics
-# FIXME: Untested and not fully supported yet!
#
ifdef PTXCONF_KLIBC_DYNAMIC_LIB
- @echo "dir /lib/ 755 0 0" >> $(KLIBC_CONTROL)
- @echo "file /lib/klibc.so $(KLIBC_BINSRC)/utils/klibc/klibc.so 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755, /lib)
+ @for f in `ls $(KLIBC_BINSRC)/klibc/klibc-*.so`; do \
+ $(call install_initramfs, klibc, 0, 0, 0755, $$f,
/lib/$$(basename $$f)) \
+ done
endif
ifdef PTXCONF_KLIBC_SHARED_CAT
- @echo "file /bin/cat $(KLIBC_BINSRC)/utils/shared/cat 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/cat, /bin/cat)
endif
ifdef PTXCONF_KLIBC_SHARED_CHROOT
- @echo "file /bin/chroot $(KLIBC_BINSRC)/utils/shared/chroot 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/chroot, /bin/chroot)
endif
ifdef PTXCONF_KLIBC_SHARED_CPIO
- @echo "file /bin/cpio $(KLIBC_BINSRC)/utils/shared/cpio 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/cpio, /bin/cpio)
endif
ifdef PTXCONF_KLIBC_SHARED_DD
- @echo "file /bin/dd $(KLIBC_BINSRC)/utils/shared/dd 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/dd, /bin/dd)
endif
ifdef PTXCONF_KLIBC_SHARED_DMESG
- @echo "file /bin/dmesg $(KLIBC_BINSRC)/utils/shared/dmesg 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/dmesg, /bin/dmesg)
endif
ifdef PTXCONF_KLIBC_SHARED_FALSE
- @echo "file /bin/false $(KLIBC_BINSRC)/utils/shared/false 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/false, /bin/false)
endif
ifdef PTXCONF_KLIBC_SHARED_FSTYPE
- @echo "file /bin/fstype $(KLIBC_BINSRC)/kinit/fstype/shared/fstype 755
0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/kinit/fstype/shared/fstype, /bin/fstype)
endif
ifdef PTXCONF_KLIBC_SHARED_HALT
- @echo "file /bin/halt $(KLIBC_BINSRC)/utils/shared/halt 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/halt, /bin/halt)
endif
ifdef PTXCONF_KLIBC_SHARED_IPCONIFG
- @echo "file /bin/ipconfig
$(KLIBC_BINSRC)/kinit/ipconfig/shared/ipconfig 755 0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/kinit/ipconfig/shared/ipconfig, /bin/ipconfig)
endif
ifdef PTXCONF_KLIBC_SHARED_KILL
- @echo "file /bin/kill $(KLIBC_BINSRC)/utils/shared/kill 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/kill, /bin/kill)
endif
ifdef PTXCONF_KLIBC_SHARED_LN
- @echo "file /bin/ln $(KLIBC_BINSRC)/utils/shared/ln 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/ln, /bin/ln)
endif
ifdef PTXCONF_KLIBC_SHARED_MINIPS
- @echo "file /bin/minips $(KLIBC_BINSRC)/utils/shared/minips 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/minips, /bin/minips)
endif
ifdef PTXCONF_KLIBC_SHARED_MKDIR
- @echo "file /bin/mkdir $(KLIBC_BINSRC)/utils/shared/mkdir 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/mkdir, /bin/mkdir)
endif
ifdef PTXCONF_KLIBC_SHARED_MKFIFO
- @echo "file /bin/mkfifo $(KLIBC_BINSRC)/utils/shared/mkfifo 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/mkfifo, /bin/mkfifo)
endif
ifdef PTXCONF_KLIBC_SHARED_MKNOD
- @echo "file /bin/mknod $(KLIBC_BINSRC)/utils/shared/mknod 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/mknod, /bin/mknod)
endif
ifdef PTXCONF_KLIBC_SHARED_MOUNT
- @echo "file /bin/mount $(KLIBC_BINSRC)/utils/shared/mount 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/mount, /bin/mount)
endif
ifdef PTXCONF_KLIBC_SHARED_NFSMOUNT
- @echo "file /bin/nfsmount
$(KLIBC_BINSRC)/kinit/nfsmount/shared/nfsmount 755 0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/kinit/nfsmount/shared/nfsmount, /bin/nfsmount)
endif
ifdef PTXCONF_KLIBC_SHARED_NUKE
- @echo "file /bin/nuke $(KLIBC_BINSRC)/utils/shared/nuke 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/nuke, /bin/nuke)
endif
ifdef PTXCONF_KLIBC_SHARED_PIVOT_ROOT
- @echo "file /bin/pivot_root $(KLIBC_BINSRC)/utils/shared/pivot_root 755
0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/pivot_root, /bin/pivot_root)
endif
ifdef PTXCONF_KLIBC_SHARED_POWEROFF
- @echo "file /bin/poweroff $(KLIBC_BINSRC)/utils/shared/poweroff 755 0
0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/poweroff, /bin/poweroff)
endif
ifdef PTXCONF_KLIBC_SHARED_READLINK
- @echo "file /bin/readlink $(KLIBC_BINSRC)/utils/shared/readlink 755 0
0">> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/readlink, /bin/readlink)
endif
ifdef PTXCONF_KLIBC_SHARED_REBOOT
- @echo "file /bin/reboot $(KLIBC_BINSRC)/utils/shared/reboot 755 0 0" >>
$(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/reboot, /bin/reboot)
endif
ifdef PTXCONF_KLIBC_SHARED_RESUME
- @echo "file /bin/resume $(KLIBC_BINSRC)/kinit/resume/shared/resume 755
0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/kinit/resume/shared/resume, /bin/resume)
endif
ifdef PTXCONF_KLIBC_SHARED_RUN_INIT
- @echo "file /bin/run-init
$(KLIBC_BINSRC)/kinit/run-init/shared/run-init 755 0 0" >> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/kinit/run-init/shared/run-init, /bin/run-init)
endif
ifdef PTXCONF_KLIBC_SHARED_SLEEP
- @echo "file /bin/sleep $(KLIBC_BINSRC)/utils/shared/sleep 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/sleep, /bin/sleep)
endif
ifdef PTXCONF_KLIBC_SHARED_SYNC
- @echo "file /bin/sync $(KLIBC_BINSRC)/utils/shared/sync 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/sync, /bin/sync)
endif
ifdef PTXCONF_KLIBC_SHARED_TRUE
- @echo "file /bin/true $(KLIBC_BINSRC)/utils/shared/true 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/true, /bin/true)
endif
ifdef PTXCONF_KLIBC_SHARED_UMOUNT
- @echo "file /bin/umount $(KLIBC_BINSRC)/utils/shared/umount 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/umount, /bin/umount)
endif
ifdef PTXCONF_KLIBC_SHARED_UNAME
- @echo "file /bin/uname $(KLIBC_BINSRC)/utils/shared/uname 755 0 0"
>> $(KLIBC_CONTROL)
+ @$(call install_initramfs, klibc, 0, 0, 0755,
$(KLIBC_BINSRC)/utils/shared/uname, /bin/uname)
endif
#
# add the link when enabled
#
ifneq ($(call remove_quotes,$(PTXCONF_KLIBC_INIT)),)
- @echo "slink /init $(PTXCONF_KLIBC_INIT) 755 0 0" >> $(KLIBC_CONTROL)
-endif
-#
-# adding user specific files to the list
-# Note: files without a leading '/' get a prefix path of the current project
-#
-ifdef PTXCONF_KLIBC_USER_SPEC
- cat $(PTXDIST_WORKSPACE)/initramfs_spec | while read type target source
rest; do \
- if [ "$$type" == "file" ]; then
\
- if [ "$$(echo "$$source" | grep "^/")" == "" ]; then
\
- source=$(PTXDIST_WORKSPACE)/$$source;
\
- fi;
\
- fi;
\
- echo "$$type $$target $$source $$rest" >> $(KLIBC_CONTROL);
\
- done
+ @$(call install_initramfs_link, klibc, /init, $(PTXCONF_KLIBC_INIT))
endif
#
# install the compiler wrapper to be used to link programs against klibc
--
1.6.3.3.334.g916e1
--
ptxdist mailing list
[email protected]