Index: head/sysutils/showbeastie/Makefile =================================================================== --- head/sysutils/showbeastie/Makefile (revision 428764) +++ head/sysutils/showbeastie/Makefile (revision 428765) @@ -1,47 +1,49 @@ # Created by: Tobias Kortkamp # $FreeBSD$ PORTNAME= showbeastie -PORTVERSION= 0.2 +PORTVERSION= 0.3 CATEGORIES= sysutils MASTER_SITES= # none DISTFILES= # none MAINTAINER= t@tobik.me COMMENT= Preview FreeBSD loader logos LICENSE= BSD2CLAUSE .if !exists(${SRC_BASE}/sys/Makefile) IGNORE= requires kernel source files in ${SRC_BASE} .endif NO_FETCH= yes ALL_TARGET= testmain PLIST_FILES= bin/${PORTNAME} # Make sure building succeeds on HEAD MAKE_ARGS+= -m ${SRC_BASE}/share/mk BROKEN_FreeBSD_9= builds but expects newer loader environment +WRKSRC_SUBDIR= ficl + pre-patch: @${MKDIR} ${WRKSRC} - @${TAR} -C ${SRC_BASE}/sys/boot/ficl \ + @${TAR} -C ${SRC_BASE}/sys/boot \ --exclude '*.o' --exclude '*.a' --exclude 'testmain' \ - -cf - . | ${TAR} -C ${WRKSRC} -xf - + -cf - . | ${TAR} -C ${WRKSRC}/.. -xf - post-patch: ${REINPLACE_CMD} 's|-I.*/\.\./common|-I${SRC_BASE}/sys/boot/common|g' \ ${WRKSRC}/Makefile # Make sure building on FreeBSD 11.0/i386 works. Calls to biospci_* are not # needed for this program. ${REINPLACE_CMD} 's|ifdef __i386__|if 0|g' ${WRKSRC}/loader.c do-install: ${INSTALL_PROGRAM} ${WRKSRC}/testmain ${STAGEDIR}${PREFIX}/bin/${PORTNAME} .include Index: head/sysutils/showbeastie/files/patch-testmain.c =================================================================== --- head/sysutils/showbeastie/files/patch-testmain.c (revision 428764) +++ head/sysutils/showbeastie/files/patch-testmain.c (revision 428765) @@ -1,71 +1,72 @@ ---- testmain.c.orig 2015-10-11 17:48:47 UTC +--- testmain.c.orig 2016-11-17 00:02:13 UTC +++ testmain.c @@ -296,6 +296,7 @@ void buildTestInterface(FICL_SYSTEM *pSy ficlBuild(pSys, "cd", ficlChDir, FW_DEFAULT); ficlBuild(pSys, "execxt", execxt, FW_DEFAULT); ficlBuild(pSys, "load", ficlLoad, FW_DEFAULT); + ficlBuild(pSys, "include", ficlLoad, FW_DEFAULT); ficlBuild(pSys, "pwd", ficlGetCWD, FW_DEFAULT); ficlBuild(pSys, "system", ficlSystem, FW_DEFAULT); ficlBuild(pSys, "spewhash", spewHash, FW_DEFAULT); -@@ -316,17 +317,58 @@ int main(int argc, char **argv) +@@ -316,17 +317,59 @@ int main(int argc, char **argv) buildTestInterface(pSys); pVM = ficlNewVM(pSys); - ficlEvaluate(pVM, ".ver .( " __DATE__ " ) cr quit"); + ficlEvaluate(pVM, ": loader_color? ( -- ) TRUE ;"); + ficlEvaluate(pVM, "vocabulary support-functions"); + ficlEvaluate(pVM, ": contains? ( -- ) FALSE ;"); + ficlEvaluate(pVM, ": any_conf_read? ( -- ) FALSE ;"); + ficlEvaluate(pVM, ": boot_serial? ( -- ) TRUE ;"); + ficlEvaluate(pVM, ": load_kernel ( -- ) ;"); + ficlEvaluate(pVM, ": load_modules ( -- ) ;"); + ficlEvaluate(pVM, ": delay_execute ( -- ) ;"); + ficlEvaluate(pVM, ": boot ( -- ) ;"); + ficlEvaluate(pVM, ": reboot ( -- ) ;"); + ficlEvaluate(pVM, ": load_xen_throw ( -- ) ;"); + ficlEvaluate(pVM, "variable logoX"); + ficlEvaluate(pVM, "variable logoY"); + ficlEvaluate(pVM, "variable brandX"); + ficlEvaluate(pVM, "variable brandY"); + + sprintf(in, "load %s", "/boot/screen.4th"); + ficlEvaluate(pVM, in); + sprintf(in, "load %s", "/boot/beastie.4th"); + ficlEvaluate(pVM, in); + sprintf(in, "load %s", "/boot/brand.4th"); + ficlEvaluate(pVM, in); + sprintf(in, "load %s", "/boot/frames.4th"); + ficlEvaluate(pVM, in); + sprintf(in, "load %s", "/boot/menu.4th"); + ficlEvaluate(pVM, in); /* ** load file from cmd line... */ if (argc > 1) { - sprintf(in, ".( loading %s ) cr load %s\n cr", argv[1], argv[1]); + char *brand = "/boot/brand-fbsd.4th"; + sprintf(in, "load %s", argv[1]); + ficlEvaluate(pVM, in); + if (argc > 2) { + brand = argv[2]; + } + sprintf(in, "load %s", brand); ficlEvaluate(pVM, in); + } else { + fprintf(stderr, "usage: %s []\n", argv[0]); + return 1; } + system("clear"); + ficlEvaluate(pVM, "draw-beastie"); + ficlEvaluate(pVM, "draw-brand"); + ficlEvaluate(pVM, "menu-init"); -+ printf("\n\n"); ++ fflush(stdout); ++ sleep(3600); // sleep "forever" + return 0; + for (;;) { int ret;