From 5416875f5fc0e5da5514bfbf7d217467a7bf2bd5 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 13 Feb 2010 12:14:50 +0100 Subject: [PATCH] busybox: - move start of bootchart to initramfs (enable bootchart loggin with "bootchart" as kernel line option) --- packages/sysutils/busybox-initramfs/scripts/init | 14 +++++++++++--- packages/sysutils/busybox/scripts/init | 6 ------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/sysutils/busybox-initramfs/scripts/init b/packages/sysutils/busybox-initramfs/scripts/init index cc780cccb3..a366976c96 100755 --- a/packages/sysutils/busybox-initramfs/scripts/init +++ b/packages/sysutils/busybox-initramfs/scripts/init @@ -21,6 +21,9 @@ splash) SPLASH=yes ;; + bootchart) + BOOTCHART=yes + ;; esac done @@ -86,9 +89,14 @@ /bin/busybox mount --move /flash /sysroot/flash /bin/busybox mount --move /storage /sysroot/storage -# exec /bin/busybox switch_root /sysroot /sbin/init.system - exec /bin/busybox chroot /sysroot /sbin/init.system -# exec /bin/busybox switch_root /sysroot /sbin/cinit + if [ "$BOOTCHART" = "yes" -a -f "/sysroot/sbin/bootchartd" ] ; then + progress "Starting Bootchart logging" + mkdir -p /sysroot/storage/.bootchart + exec /bin/busybox switch_root /sysroot \ + /sbin/bootchartd -o /storage/.bootchart + else + exec /bin/busybox switch_root /sysroot /sbin/init + fi error "INIT_3" "Error in initramfs. Could not switch to new root" debug_shell diff --git a/packages/sysutils/busybox/scripts/init b/packages/sysutils/busybox/scripts/init index 87bd0cc6da..b0de70bba3 100755 --- a/packages/sysutils/busybox/scripts/init +++ b/packages/sysutils/busybox/scripts/init @@ -1,11 +1,5 @@ #!/bin/sh -# start bootchartd if avaible -if [ -f /sbin/bootchartd ]; then - mkdir -p /storage/bootchart - /sbin/bootchartd -o /storage/bootchart & -fi - # read config . /etc/sysconfig