socsvn commit: r269516 - in soc2014/seiya/bootsplash: etc sys/dev/fb
seiya at FreeBSD.org
seiya at FreeBSD.org
Fri Jun 13 10:23:02 UTC 2014
Author: seiya
Date: Fri Jun 13 10:23:00 2014
New Revision: 269516
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=269516
Log:
terminate bootsplash just before the end of userland initialization
Modified:
soc2014/seiya/bootsplash/etc/rc
soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c
Modified: soc2014/seiya/bootsplash/etc/rc
==============================================================================
--- soc2014/seiya/bootsplash/etc/rc Fri Jun 13 08:53:49 2014 (r269515)
+++ soc2014/seiya/bootsplash/etc/rc Fri Jun 13 10:23:00 2014 (r269516)
@@ -141,6 +141,9 @@
fi
fi
+# terminate boot splash
+kenv BOOT_PROGRESS=100 > /dev/null
+
echo ''
date
exit 0
Modified: soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c
==============================================================================
--- soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Fri Jun 13 08:53:49 2014 (r269515)
+++ soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Fri Jun 13 10:23:00 2014 (r269516)
@@ -57,7 +57,7 @@
}
static int
-bsplash_early_init2(void)
+bsplash_init(void)
{
caddr_t image = NULL;
void *p;
@@ -102,6 +102,8 @@
{
static int count = 0;
static int y = 0;
+ char *s;
+ int progress = 0;
for (;;){
if (draw_bmp(adp, &bmp_info, y, 1024, 768) == 0){
@@ -112,14 +114,20 @@
y += 768;
}
- /* FIXME */
- if (count > 50){
+ s = getenv("BOOT_PROGRESS");
+ if (s != NULL){
+ progress = strtol(s, NULL, 10);
+ freeenv(s);
+ }
+
+ if (progress >= 100 || count > 50 /* FXIME */){
+ /* terminate boot splash */
vidd_set_mode(adp, M_TEXT_80x25);
kthread_exit();
}
count++;
- pause("bsplash", 15);
+ pause("bsplash", 3*hz /* FIXME: this is because draw_bmp() takes too long time */);
}
}
@@ -158,7 +166,7 @@
{
switch ((modeventtype_t)type) {
case MOD_LOAD:
- bsplash_early_init2();
+ bsplash_init();
break;
case MOD_UNLOAD:
bsplash_uninit();
More information about the svn-soc-all
mailing list