From owner-svn-soc-all@FreeBSD.ORG Fri Jun 13 10:23:02 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FAE6273 for ; Fri, 13 Jun 2014 10:23:02 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F045C29E4 for ; Fri, 13 Jun 2014 10:23:01 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5DAN154060306 for ; Fri, 13 Jun 2014 10:23:01 GMT (envelope-from seiya@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s5DAN1Zm060135 for svn-soc-all@FreeBSD.org; Fri, 13 Jun 2014 10:23:01 GMT (envelope-from seiya@FreeBSD.org) Date: Fri, 13 Jun 2014 10:23:01 GMT Message-Id: <201406131023.s5DAN1Zm060135@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to seiya@FreeBSD.org using -f From: seiya@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r269516 - in soc2014/seiya/bootsplash: etc sys/dev/fb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jun 2014 10:23:02 -0000 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();