From owner-svn-soc-all@FreeBSD.ORG Sun May 25 07:40:32 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85E46F1D for ; Sun, 25 May 2014 07:40:31 +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 C7A302751 for ; Sun, 25 May 2014 07:40:31 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4P7eV60053755 for ; Sun, 25 May 2014 07:40:31 GMT (envelope-from seiya@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s4P7eUk6053543 for svn-soc-all@FreeBSD.org; Sun, 25 May 2014 07:40:30 GMT (envelope-from seiya@FreeBSD.org) Date: Sun, 25 May 2014 07:40:30 GMT Message-Id: <201405250740.s4P7eUk6053543@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: r268576 - in soc2014/seiya/bootsplash/sys: boot/forth dev/fb sys 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: Sun, 25 May 2014 07:40:32 -0000 Author: seiya Date: Sun May 25 07:40:30 2014 New Revision: 268576 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=268576 Log: load splash.conf At first, I planed to integrate with https://wiki.freebsd.org/OliverFromme/BootLoader, but I noticed that my bootsplash and the graphical bootloader can live apart. Therefore my bootsplash loads its own config file. Modified: soc2014/seiya/bootsplash/sys/boot/forth/loader.conf soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c soc2014/seiya/bootsplash/sys/sys/kernel.h Modified: soc2014/seiya/bootsplash/sys/boot/forth/loader.conf ============================================================================== --- soc2014/seiya/bootsplash/sys/boot/forth/loader.conf Sun May 25 06:42:43 2014 (r268575) +++ soc2014/seiya/bootsplash/sys/boot/forth/loader.conf Sun May 25 07:40:30 2014 (r268576) @@ -37,6 +37,10 @@ bitmap_name="splash.bmp" # Set this to the name of the file bitmap_type="splash_image_data" # and place it on the module_path +bsplash_load="NO" # Set this to YES to enable enhanced bootsplash! +bsplash_conf_load="NO" # Set this to YES to enable enhanced bootsplash too! +bsplash_conf_name="/boot/splash/default/splash.conf" # name of configuration file +bsplash_conf_type="bsplash_conf" ############################################################## ### Random number generator configuration ################### Modified: soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c ============================================================================== --- soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Sun May 25 06:42:43 2014 (r268575) +++ soc2014/seiya/bootsplash/sys/dev/fb/bsplash.c Sun May 25 07:40:30 2014 (r268576) @@ -31,6 +31,29 @@ #include #include #include +#include + +static int load_config(void) +{ + caddr_t conf; + char* ptr; + + conf = preload_search_by_type("bsplash_conf"); + if(conf == NULL) + return -1; + + ptr = preload_fetch_addr(conf); + + printf("bsplash conf: "); + /* parse config file */ + while(*ptr){ + printf("%c", *ptr); + ptr++; + } + printf("\n"); + + return 0; +} static int modevent(module_t mod, int type, void *data) { @@ -38,6 +61,7 @@ switch ((modeventtype_t)type) { case MOD_LOAD: + load_config(); break; case MOD_UNLOAD: break; Modified: soc2014/seiya/bootsplash/sys/sys/kernel.h ============================================================================== --- soc2014/seiya/bootsplash/sys/sys/kernel.h Sun May 25 06:42:43 2014 (r268575) +++ soc2014/seiya/bootsplash/sys/sys/kernel.h Sun May 25 07:40:30 2014 (r268576) @@ -89,6 +89,7 @@ SI_SUB_DUMMY = 0x0000000, /* not executed; for linker*/ SI_SUB_DONE = 0x0000001, /* processed*/ SI_SUB_TUNABLES = 0x0700000, /* establish tunable values */ + SI_SUB_BOOTSPLASH = 0x0780000, /* bootsplash */ SI_SUB_COPYRIGHT = 0x0800001, /* first use of console*/ SI_SUB_SETTINGS = 0x0880000, /* check and recheck settings */ SI_SUB_MTX_POOL_STATIC = 0x0900000, /* static mutex pool */