Skip to content
Snippets Groups Projects
Commit 8069f0b1 authored by Timo Teräs's avatar Timo Teräs
Browse files

initramfs: bootchart integration with init

modifications to makefile and initramfs init that were left out
from previous commit.
parent 52864ab4
No related branches found
No related tags found
No related merge requests found
...@@ -162,6 +162,10 @@ $(INITFS_DIR)/init: initramfs-init $(INITFS_DIRSTAMP) ...@@ -162,6 +162,10 @@ $(INITFS_DIR)/init: initramfs-init $(INITFS_DIRSTAMP)
@echo "==> initramfs: init script" @echo "==> initramfs: init script"
@cp initramfs-init "$(INITFS_DIR)/init" @cp initramfs-init "$(INITFS_DIR)/init"
$(INITFS_DIR)/sbin/bootchartd: bootchartd $(INITFS_DIRSTAMP)
@echo "==> initramfs: bootchartd"
@cp bootchartd "$(INITFS_DIR)/sbin/bootchartd"
ifeq ($(APK_BIN),) ifeq ($(APK_BIN),)
$(INITFS_DIR)/sbin/apk: $(APK_TOOLS_APK) $(INITFS_DIRSTAMP) $(INITFS_DIR)/sbin/apk: $(APK_TOOLS_APK) $(INITFS_DIRSTAMP)
@echo "==> initramfs: $(notdir $(APK_TOOLS_APK))" @echo "==> initramfs: $(notdir $(APK_TOOLS_APK))"
...@@ -190,7 +194,7 @@ $(INITFS_MODDIRSTAMP): $(INITFS_DIRSTAMP) $(INITFS_MODFILES) $(MODLOOP_DIRSTAMP) ...@@ -190,7 +194,7 @@ $(INITFS_MODDIRSTAMP): $(INITFS_DIRSTAMP) $(INITFS_MODFILES) $(MODLOOP_DIRSTAMP)
@depmod $(KERNEL) -b $(INITFS_DIR) @depmod $(KERNEL) -b $(INITFS_DIR)
@touch $(INITFS_MODDIRSTAMP) @touch $(INITFS_MODDIRSTAMP)
$(INITFS): $(INITFS_DIRSTAMP) $(INITFS_DIR)/init $(INITFS_DIR)/sbin/apk $(INITFS_MODDIRSTAMP) $(INITFS_BASEFILES) $(INITFS): $(INITFS_DIRSTAMP) $(INITFS_DIR)/init $(INITFS_DIR)/sbin/bootchartd $(INITFS_DIR)/sbin/apk $(INITFS_MODDIRSTAMP) $(INITFS_BASEFILES)
@echo "==> initramfs: creating $(notdir $(INITFS))" @echo "==> initramfs: creating $(notdir $(INITFS))"
@(cd $(INITFS_DIR) && find . | cpio -o -H newc | gzip -9) > $(INITFS) @(cd $(INITFS_DIR) && find . | cpio -o -H newc | gzip -9) > $(INITFS)
......
...@@ -70,6 +70,13 @@ for i in `cat /proc/cmdline` ; do ...@@ -70,6 +70,13 @@ for i in `cat /proc/cmdline` ; do
esac esac
done done
# start bootcharting if wanted
if [ -n "$KOPT_chart" ]; then
ebegin "Starting bootchart logging"
/sbin/bootchartd init "$NEWROOT"
eend 0
fi
ALPINE_DEV=${KOPT_alpine_dev%%:*} ALPINE_DEV=${KOPT_alpine_dev%%:*}
ALPINE_DEV_FS=${KOPT_alpine_dev##*:} ALPINE_DEV_FS=${KOPT_alpine_dev##*:}
if [ "$ALPINE_DEV_FS" = "$ALPINE_DEV" ]; then if [ "$ALPINE_DEV_FS" = "$ALPINE_DEV" ]; then
...@@ -193,6 +200,12 @@ if ! [ -f $NEWROOT/etc/apk/repositories ]; then ...@@ -193,6 +200,12 @@ if ! [ -f $NEWROOT/etc/apk/repositories ]; then
cp /etc/apk/repositories $NEWROOT/etc/apk/repositories cp /etc/apk/repositories $NEWROOT/etc/apk/repositories
fi fi
# newroot is done, signal bootchartd to relocate there
# if bootcharting is done
if [ -n "$KOPT_chart" ]; then
killall -USR2 bootchartd
fi
# switch over to new root # switch over to new root
cat /proc/mounts | while read DEV DIR TYPE OPTS ; do cat /proc/mounts | while read DEV DIR TYPE OPTS ; do
if [ "$DIR" != "/" -a "$DIR" != "$NEWROOT" -a -d "$DIR" ]; then if [ "$DIR" != "/" -a "$DIR" != "$NEWROOT" -a -d "$DIR" ]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment