Tiny Core Base > Micro Core
timing partial booting from tc-config?
nick65go:
--- Code: ---tc@box:/lib$ cat /etc/init.d/tc-config | tail -n 5
if [ -n "$PAUSE" ]; then
echo -n "${BLUE}Boot time configuration completed. Press <Enter> to continue.${NORMAL}"
read junk
fi
--- End code ---
could you let the user know the time (in seconds) spent booting? something like:
--- Code: ---if [ -n "$PAUSE" ]; then
time=`cat /proc/uptime | cut -d. -f1`
echo -n "${BLUE}Boot time configuration completed in $time seconds. Press <Enter> to continue.${NORMAL}"
read junk
fi
--- End code ---
curaga:
I'm a bit on the fence. printk.time=1 can be used to get more accurate boot time reporting on each step.
nick65go:
anything you wish to add is OK for me. either /proc/uptime or printk.time etc
I am "studing" core.gz booting, for learning purposes and to provide feed-back.
on my real machine (with onboot.lst + small mydata.gz) it boots in min.18 - max.33 seconds.
for now "quick and dirty" i run in qemu, and core.gz boots in 3 seconds!!
--- Code: ---#!/bin/sh
# on host do: sudo modprobe kvm-amd
#
# -machine: pc=Standard PC (i440FX + PIIX, 1996) (default), q35=Standard PC (Q35 + ICH9, 2009)
# -cpu max: Enables all features supported by the accelerator in the current host
#
arch=64
qemu-system-x86_64 -accel kvm -machine q35 -cpu max -m 1G\
-kernel /mnt/sda10/boot/tc11/vmlinuz$arch \
-initrd /mnt/sda10/boot/tc11/modules$arch.gz \
-initrd /tmp/rootfs$arch.gz \
-append pause
--- End code ---
i must overcome a small problem in qemu. (for rootfs.gz is OK, but for rootfs64.gz i manually created the folder 5.4.3-tinycore64 in /lib/modules/ to work; no big deal).
PS: if you would like to attach here your (even unfinished/unpolished) timing script for each step/case of tc-config, it will be great. thanks.
EDIT: changed my script last line, but IMHO it helps only for kernel log (using dmesg).
--- Code: --- -append "pause printk.time=1"
--- End code ---
nick65go:
a possible solution, shameless inspired by /init logic, is to have a "timer" boot parametrer (like multivt)
in /etc/init.d/rcS
--- Code: ---grep -qw timer /proc/cmdline && sed -i s/^#echo timer/echo timer/ /etc/init.d/tc-config
--- End code ---
in /etc/init.d/tc-config
--- Code: ---#echo "timer=`cat /proc/uptime` used sec.
MSSG="${BLUE}Loading extensions...${NORMAL}""
--- End code ---
inserted many times at start code lines, activated only on-demand by "timer" boot parameter?
nick65go:
i need to work a little harder on regular expression for sed, because "space" char [ ] or \s is not OK.
--- Code: ---tc@box:/mnt/sda10/Jail/build$ cat ./test.txt
#echo timer=john
#echo timer=Smith
tc@box:/mnt/sda10/Jail/build$ sed -i s/^#echo\\stimer/echo\ timer/ ./test.txt
tc@box:/mnt/sda10/Jail/build$ cat ./test.txt
echo timer=john
echo timer=Smith
tc@box:/mnt/sda10/Jail/build$
--- End code ---
yes! i got it now: sed -i s/^#echo\\stimer/echo\ timer/
Edit: actually is even easier(space is back-quoted space"\ "): sed -i s/^#echo\ timer/echo\ timer/
Navigation
[0] Message Index
[#] Next page
Go to full version