socsvn commit: r272374 - in soc2014/pedrosouza/lua_loader/head: share/mk sys/boot sys/boot/amd64/efi sys/boot/arm/uboot sys/boot/i386/loader sys/boot/ia64/efi sys/boot/ia64/ski sys/boot/lua sys/boo...
pedrosouza at FreeBSD.org
pedrosouza at FreeBSD.org
Wed Aug 13 19:31:51 UTC 2014
Author: pedrosouza
Date: Wed Aug 13 19:31:46 2014
New Revision: 272374
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272374
Log:
Updated makefiles with .lua scripts & fix undefined reference
Modified:
soc2014/pedrosouza/lua_loader/head/share/mk/src.opts.mk
soc2014/pedrosouza/lua_loader/head/sys/boot/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/amd64/efi/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/arm/uboot/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/i386/loader/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/ia64/efi/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/ia64/ski/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/lua/menu.lua
soc2014/pedrosouza/lua_loader/head/sys/boot/mips/beri/loader/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/pc98/loader/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/ofw/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/ps3/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/uboot/Makefile
soc2014/pedrosouza/lua_loader/head/sys/boot/sparc64/loader/Makefile
soc2014/pedrosouza/lua_loader/head/sys/lua/src/ldo.c
soc2014/pedrosouza/lua_loader/head/sys/lua/src/lstd.h
Modified: soc2014/pedrosouza/lua_loader/head/share/mk/src.opts.mk
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/share/mk/src.opts.mk Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/share/mk/src.opts.mk Wed Aug 13 19:31:46 2014 (r272374)
@@ -78,7 +78,6 @@
FDT \
FLOPPY \
FMTREE \
- FORTH \
FP_LIBC \
FREEBSD_UPDATE \
GAMES \
@@ -109,6 +108,7 @@
LOCATE \
LPR \
LS_COLORS \
+ LUA \
LZMA_SUPPORT \
MAIL \
MAILWRAPPER \
@@ -160,6 +160,7 @@
CLANG_EXTRAS \
EISA \
FMAKE \
+ FORTH \
HESIOD \
LLDB \
NAND \
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -8,7 +8,9 @@
SUBDIR+= ficl
.endif
+.if ${MK_LUA} != "no"
SUBDIR+= lua
+.endif
# Pick the machine-dependent subdir based on the target architecture.
ADIR= ${MACHINE:S/powerpc64/powerpc/}
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/amd64/efi/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/amd64/efi/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/amd64/efi/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -42,8 +42,10 @@
.endif
#Lua
-CFLAGS+= -DBOOT_LUA -I${.CURDIR}../../../lua/src
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../lua/src
LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.endif
# Include bcache code.
HAVE_BCACHE= yes
@@ -90,8 +92,8 @@
LIBEFI= ${.OBJDIR}/../../efi/libefi/libefi.a
CFLAGS+= -I${.CURDIR}/../../common
-DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} ${LIBLUA}
-LDADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND} ${LIBLUA}
+DPADD= ${LIBFICL} ${LIBLUA} ${LIBEFI} ${LIBSTAND}
+LDADD= ${LIBFICL} ${LIBLUA} ${LIBEFI} ${LIBSTAND}
.endif # ${COMPILER_TYPE} != "gcc"
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/arm/uboot/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/arm/uboot/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/arm/uboot/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -83,8 +83,10 @@
.endif
#Lua
-CFLAGS+= -DBOOT_LUA -I${.CURDIR}../../../lua/src
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../lua/src
LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.endif
# Always add MI sources
.PATH: ${.CURDIR}/../../common
@@ -116,8 +118,8 @@
# clang doesn't understand %D as a specifier to printf
NO_WERROR.clang=
-DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} ${LIBLUA}
-LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBLUA} -lstand
+DPADD= ${LIBFICL} ${LIBLUA} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND}
+LDADD= ${LIBFICL} ${LIBLUA} ${LIBUBOOT} ${LIBFDT} -lstand
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
@@ -139,12 +141,15 @@
fi
.if !defined(LOADER_ONLY)
+
+FILESDIR_loader.conf= /boot/defaults
+
+.if ${MK_FORTH} != "no"
.PATH: ${.CURDIR}/../../forth
FILES+= loader.help loader.4th support.4th loader.conf
-FILES+= screen.4th frames.4th beastie.4th
-FILES+= brand.4th check-password.4th color.4th delay.4th
-FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
-FILESDIR_loader.conf= /boot/defaults
+FILES+= screen.4th frames.4th beastie.4th
+FILES+= brand.4th check-password.4th color.4th delay.4th
+FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
# Put sample loader.rc and menu.rc on disk but don't enable them
# by default.
@@ -154,4 +159,17 @@
FILESNAME_menu.rc= menu.rc.sample
.endif
+.if ${MK_LUA} != "no"
+.PATH: ${.CURDIR}/../../lua
+FILES+= config.lua core.lua drawer.lua
+FILES+= menu.lua password.lua screen.lua
+
+.if !exists(${DESTDIR}/boot/loader.lua)
+FILES+= loader.lua
+.endif
+.endif
+
+
+.endif
+
.include <bsd.prog.mk>
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/i386/loader/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/i386/loader/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/i386/loader/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -51,8 +51,10 @@
.endif
#Lua
-CFLAGS+= -DBOOT_LUA -I${.CURDIR}../../../lua/src
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../lua/src
LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.endif
.if defined(LOADER_BZIP2_SUPPORT)
CFLAGS+= -DLOADER_BZIP2_SUPPORT
@@ -111,12 +113,15 @@
FILESMODE_${LOADER}= ${BINMODE} -b
.if !defined(LOADER_ONLY)
+
+FILESDIR_loader.conf= /boot/defaults
+
+.if ${MK_FORTH} != "no"
.PATH: ${.CURDIR}/../../forth
FILES+= loader.help loader.4th support.4th loader.conf
FILES+= screen.4th frames.4th beastie.4th
FILES+= brand.4th check-password.4th color.4th delay.4th
FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
-FILESDIR_loader.conf= /boot/defaults
.if !exists(${DESTDIR}/boot/loader.rc)
FILES+= loader.rc
@@ -126,11 +131,24 @@
.endif
.endif
+.if ${MK_LUA} != "no"
+.PATH: ${.CURDIR}/../../lua
+FILES+= config.lua core.lua drawer.lua
+FILES+= menu.lua password.lua screen.lua
+
+.if !exists(${DESTDIR}/boot/loader.lua)
+FILES+= loader.lua
+.endif
+.endif
+
+
+.endif
+
# XXX crt0.o needs to be first for pxeboot(8) to work
OBJS= ${BTXCRT}
-DPADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND} ${LIBLUA}
-LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND} ${LIBLUA}
+DPADD= ${LIBFICL} ${LIBLUA} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND}
+LDADD= ${LIBFICL} ${LIBLUA} ${LIBFIREWIRE} ${LIBZFSBOOT} ${LIBI386} ${LIBSTAND}
.include <bsd.prog.mk>
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/ia64/efi/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/ia64/efi/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/ia64/efi/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -52,8 +52,14 @@
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
.endif
-DPADD= ${LIBIA64} ${LIBFICL} ${LIBEFI} ${LIBSTAND}
+#Lua
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../lua/src
+LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.endif
+
+DPADD= ${LIBIA64} ${LIBFICL} ${LIBLUA} ${LIBEFI} ${LIBSTAND}
LDADD= -Wl,--whole-archive ${LIBIA64} -Wl,--no-whole-archive \
- ${LIBFICL} ${LIBEFI} -lstand
+ ${LIBFICL} ${LIBLUA} ${LIBEFI} -lstand
.include <bsd.prog.mk>
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/ia64/ski/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/ia64/ski/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/ia64/ski/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -33,11 +33,13 @@
.endif
#Lua
-CFLAGS+= -DBOOT_LUA -I${.CURDIR}../../../lua/src
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../lua/src
LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.endif
-DPADD= ${LIBIA64} ${LIBFICL} ${LIBSTAND} ${LIBLUA}
+DPADD= ${LIBIA64} ${LIBFICL} ${LIBLUA} ${LIBSTAND}
LDADD= -Wl,--whole-archive ${LIBIA64} -Wl,--no-whole-archive \
- ${LIBFICL} -lstand ${LIBLUA}
+ ${LIBFICL} ${LIBLUA} -lstand
.include <bsd.prog.mk>
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/lua/menu.lua
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/lua/menu.lua Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/lua/menu.lua Wed Aug 13 19:31:46 2014 (r272374)
@@ -107,7 +107,8 @@
time = endtime - loader.time();
screen.setcursor(x, y);
- print("Autoboot in "..time.." seconds, hit [Enter] to boot or any other key to stop ");
+ print("Autoboot in "..time.." seconds, hit [Enter] to boot"
+ .." or any other key to stop ");
screen.defcursor();
if io.ischar() then
local ch = io.getchar();
@@ -118,7 +119,8 @@
loader.perform("set autoboot_delay=NO");
-- erase autoboot msg
screen.setcursor(0, y);
- print(" ");
+ print(" "
+ .." ");
screen.defcursor();
return;
end
@@ -177,7 +179,11 @@
if not v then return; end
- kernels[tostring(i)] = {index = i, name = "Return to menu "..color.highlight("[Backspace]"), func = function() return true; end};
+ kernels[tostring(i)] = {
+ index = i,
+ name = "Return to menu "..color.highlight("[Backspace]"),
+ func = function() return true; end
+ };
kernels.alias = {["\08"] = kernels[tostring(i)]};
i = i + 1;
@@ -258,5 +264,5 @@
["a"] = boot_options["3"],
["m"] = boot_options["4"],
["s"] = boot_options["5"],
- ["v"] = boot_options["6"]
+ ["v"] = boot_options["6"]
};
\ No newline at end of file
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/mips/beri/loader/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/mips/beri/loader/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/mips/beri/loader/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -78,8 +78,10 @@
.endif
#Lua
-CFLAGS+= -DBOOT_LUA -I${.CURDIR}../../../lua/src
-LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../../lua/src
+LIBLUA= ${.OBJDIR}/../../../lua/liblua.a
+.endif
# Common code across BERI boot loader parts
.PATH: ${.CURDIR}/../common
@@ -116,8 +118,8 @@
CFLAGS+= -I${.CURDIR}/../../../../../lib/libstand/
LIBSTAND= ${.OBJDIR}/../../../../../lib/libstand/libstand.a
-DPADD= ${LIBFICL} ${LIBSTAND} ${LIBLUA}
-LDADD= ${LIBFICL} ${LIBSTAND} ${LIBLUA}
+DPADD= ${LIBFICL} ${LIBLUA} ${LIBSTAND}
+LDADD= ${LIBFICL} ${LIBLUA} ${LIBSTAND}
vers.c: ${.CURDIR}/../../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../../common/newvers.sh ${.CURDIR}/version \
@@ -127,20 +129,34 @@
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../../common/merge_help.awk > ${.TARGET}
-.PATH: ${.CURDIR}/../../../forth
-FILES= loader.help loader.4th support.4th loader.conf
-FILES+= screen.4th frames.4th
-FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th
-FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
+
FILESDIR_loader.conf= /boot/defaults
+.if ${MK_FORTH} != "no"
+.PATH: ${.CURDIR}/../../../forth
+FILES+= loader.help loader.4th support.4th loader.conf
+FILES+= screen.4th frames.4th beastie.4th
+FILES+= brand.4th check-password.4th color.4th delay.4th
+FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
+
.if !exists(${DESTDIR}/boot/loader.rc)
-FILES+= loader.rc
+FILES+= loader.rc
.endif
-
.if !exists(${DESTDIR}/boot/menu.rc)
FILES+= menu.rc
.endif
+.endif
+
+.if ${MK_LUA} != "no"
+.PATH: ${.CURDIR}/../../../lua
+FILES+= config.lua core.lua drawer.lua
+FILES+= menu.lua password.lua screen.lua
+
+.if !exists(${DESTDIR}/boot/loader.lua)
+FILES+= loader.lua
+.endif
+.endif
+
.if defined(LOADER_USB_SUPPORT)
# Do garbage collection
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/pc98/loader/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/pc98/loader/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/pc98/loader/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -36,8 +36,10 @@
.endif
#Lua
-CFLAGS+= -DBOOT_LUA -I${.CURDIR}../../../lua/src
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../lua/src
LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.endif
.if defined(LOADER_BZIP2_SUPPORT)
CFLAGS+= -DLOADER_BZIP2_SUPPORT
@@ -90,12 +92,14 @@
# XXX INSTALLFLAGS_loader= -b
FILESMODE_${LOADER}= ${BINMODE} -b
+FILESDIR_loader.conf= /boot/defaults
+
+.if ${MK_FORTH} != "no"
.PATH: ${.CURDIR}/../../forth
FILES+= loader.help loader.4th support.4th loader.conf
FILES+= screen.4th frames.4th beastie.4th
FILES+= brand.4th check-password.4th color.4th delay.4th
FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
-FILESDIR_loader.conf= /boot/defaults
.if !exists(${DESTDIR}/boot/loader.rc)
FILES+= ${.CURDIR}/../../i386/loader/loader.rc
@@ -103,11 +107,22 @@
.if !exists(${DESTDIR}/boot/menu.rc)
FILES+= menu.rc
.endif
+.endif
+
+.if ${MK_LUA} != "no"
+.PATH: ${.CURDIR}/../../lua
+FILES+= config.lua core.lua drawer.lua
+FILES+= menu.lua password.lua screen.lua
+
+.if !exists(${DESTDIR}/boot/loader.lua)
+FILES+= loader.lua
+.endif
+.endif
# XXX crt0.o needs to be first for pxeboot(8) to work
OBJS= ${BTXCRT}
-DPADD= ${LIBFICL} ${LIBPC98} ${LIBSTAND} ${LIBLUA}
-LDADD= ${LIBFICL} ${LIBPC98} ${LIBSTAND} ${LIBLUA}
+DPADD= ${LIBFICL} ${LIBLUA} ${LIBPC98} ${LIBSTAND}
+LDADD= ${LIBFICL} ${LIBLUA} ${LIBPC98} ${LIBSTAND}
.include <bsd.prog.mk>
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/ofw/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/ofw/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/ofw/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -58,8 +58,10 @@
.endif
#Lua
-CFLAGS+= -DBOOT_LUA -I${.CURDIR}../../../lua/src
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../lua/src
LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.endif
# Avoid the open-close-dance for every file access as some firmwares perform
# an auto-negotiation on every open of the network interface and thus causes
@@ -96,8 +98,8 @@
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
-DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} ${LIBLUA}
-LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} ${LIBLUA}
+DPADD= ${LIBFICL} ${LIBLUA} ${LIBOFW} ${LIBSTAND}
+LDADD= ${LIBFICL} ${LIBLUA} ${LIBOFW} ${LIBSTAND}
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
@@ -106,19 +108,31 @@
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
-.PATH: ${.CURDIR}/../../forth
-FILES= loader.help loader.4th support.4th loader.conf
-FILES+= screen.4th frames.4th
-FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th
-FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
FILESDIR_loader.conf= /boot/defaults
+.if ${MK_FORTH} != "no"
+.PATH: ${.CURDIR}/../../forth
+FILES+= loader.help loader.4th support.4th loader.conf
+FILES+= screen.4th frames.4th beastie.4th
+FILES+= brand.4th check-password.4th color.4th delay.4th
+FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
+
.if !exists(${DESTDIR}/boot/loader.rc)
-FILES+= loader.rc
+FILES+= loader.rc
.endif
-
.if !exists(${DESTDIR}/boot/menu.rc)
FILES+= menu.rc
.endif
+.endif
+
+.if ${MK_LUA} != "no"
+.PATH: ${.CURDIR}/../../lua
+FILES+= config.lua core.lua drawer.lua
+FILES+= menu.lua password.lua screen.lua
+
+.if !exists(${DESTDIR}/boot/loader.lua)
+FILES+= loader.lua
+.endif
+.endif
.include <bsd.prog.mk>
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/ps3/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/ps3/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/ps3/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -68,8 +68,10 @@
.endif
#Lua
-CFLAGS+= -DBOOT_LUA -I${.CURDIR}../../../lua/src
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../lua/src
LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.endif
# Avoid the open-close-dance for every file access as some firmwares perform
# an auto-negotiation on every open of the network interface and thus causes
@@ -102,8 +104,8 @@
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
-DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} ${LIBLUA}
-LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} ${LIBLUA}
+DPADD= ${LIBFICL} ${LIBLUA} ${LIBOFW} ${LIBSTAND}
+LDADD= ${LIBFICL} ${LIBLUA} ${LIBOFW} ${LIBSTAND}
SC_DFLT_FONT=cp437
@@ -117,19 +119,31 @@
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
-.PATH: ${.CURDIR}/../../forth
-FILES= loader.help loader.4th support.4th loader.conf
-FILES+= screen.4th frames.4th
-FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th
-FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
FILESDIR_loader.conf= /boot/defaults
+.if ${MK_FORTH} != "no"
+.PATH: ${.CURDIR}/../../forth
+FILES+= loader.help loader.4th support.4th loader.conf
+FILES+= screen.4th frames.4th beastie.4th
+FILES+= brand.4th check-password.4th color.4th delay.4th
+FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
+
.if !exists(${DESTDIR}/boot/loader.rc)
-FILES+= loader.rc
+FILES+= loader.rc
.endif
-
.if !exists(${DESTDIR}/boot/menu.rc)
FILES+= menu.rc
.endif
+.endif
+
+.if ${MK_LUA} != "no"
+.PATH: ${.CURDIR}/../../lua
+FILES+= config.lua core.lua drawer.lua
+FILES+= menu.lua password.lua screen.lua
+
+.if !exists(${DESTDIR}/boot/loader.lua)
+FILES+= loader.lua
+.endif
+.endif
.include <bsd.prog.mk>
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/uboot/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/uboot/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/powerpc/uboot/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -73,8 +73,10 @@
.endif
#Lua
-CFLAGS+= -DBOOT_LUA -I${.CURDIR}../../../lua/src
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../lua/src
LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.endif
# Always add MI sources
.PATH: ${.CURDIR}/../../common ${.CURDIR}/../../../libkern
@@ -102,8 +104,8 @@
LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
-DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} ${LIBLUA}
-LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} ${LIBLUA}
+DPADD= ${LIBFICL} ${LIBLUA} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND}
+LDADD= ${LIBFICL} ${LIBLUA} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND}
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
@@ -115,4 +117,14 @@
.PATH: ${.CURDIR}/../../forth
FILES= loader.help
+.if ${MK_LUA} != "no"
+.PATH: ${.CURDIR}/../../lua
+FILES+= config.lua core.lua drawer.lua
+FILES+= menu.lua password.lua screen.lua
+
+.if !exists(${DESTDIR}/boot/loader.lua)
+FILES+= loader.lua
+.endif
+.endif
+
.include <bsd.prog.mk>
Modified: soc2014/pedrosouza/lua_loader/head/sys/boot/sparc64/loader/Makefile
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/boot/sparc64/loader/Makefile Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/boot/sparc64/loader/Makefile Wed Aug 13 19:31:46 2014 (r272374)
@@ -66,8 +66,10 @@
.endif
#Lua
-CFLAGS+= -DBOOT_LUA -I${.CURDIR}../../../lua/src
+.if ${MK_LUA} != "no"
+CFLAGS+= -DBOOT_LUA -I${.CURDIR}/../../../lua/src
LIBLUA= ${.OBJDIR}/../../lua/liblua.a
+.endif
# Always add MI sources
.PATH: ${.CURDIR}/../../common
@@ -90,8 +92,8 @@
# where to get libstand from
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/
-DPADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND} ${LIBLUA}
-LDADD= ${LIBFICL} ${LIBZFSBOOT} ${LIBOFW} -lstand ${LIBLUA}
+DPADD= ${LIBFICL} ${LIBLUA} ${LIBZFSBOOT} ${LIBOFW} ${LIBSTAND}
+LDADD= ${LIBFICL} ${LIBLUA} ${LIBZFSBOOT} ${LIBOFW} -lstand
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/../loader/version \
@@ -101,19 +103,31 @@
cat ${.ALLSRC} | \
awk -f ${.CURDIR}/../../common/merge_help.awk > ${.TARGET}
-.PATH: ${.CURDIR}/../../forth
-FILES= loader.help loader.4th support.4th loader.conf
-FILES+= screen.4th frames.4th
-FILES+= beastie.4th brand.4th check-password.4th color.4th delay.4th
-FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
FILESDIR_loader.conf= /boot/defaults
+.if ${MK_FORTH} != "no"
+.PATH: ${.CURDIR}/../../forth
+FILES+= loader.help loader.4th support.4th loader.conf
+FILES+= screen.4th frames.4th beastie.4th
+FILES+= brand.4th check-password.4th color.4th delay.4th
+FILES+= menu.4th menu-commands.4th menusets.4th shortcuts.4th version.4th
+
.if !exists(${DESTDIR}/boot/loader.rc)
-FILES+= loader.rc
+FILES+= loader.rc
.endif
-
.if !exists(${DESTDIR}/boot/menu.rc)
FILES+= menu.rc
.endif
+.endif
+
+.if ${MK_LUA} != "no"
+.PATH: ${.CURDIR}/../../lua
+FILES+= config.lua core.lua drawer.lua
+FILES+= menu.lua password.lua screen.lua
+
+.if !exists(${DESTDIR}/boot/loader.lua)
+FILES+= loader.lua
+.endif
+.endif
.include <bsd.prog.mk>
Modified: soc2014/pedrosouza/lua_loader/head/sys/lua/src/ldo.c
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/lua/src/ldo.c Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/lua/src/ldo.c Wed Aug 13 19:31:46 2014 (r272374)
@@ -7,10 +7,10 @@
#ifdef BOOT_LUA
#include <stand.h>
#else
-#include <setjmp.h>
#include <stdlib.h>
#include <string.h>
#endif
+#include <setjmp.h>
#define ldo_c
#define LUA_CORE
Modified: soc2014/pedrosouza/lua_loader/head/sys/lua/src/lstd.h
==============================================================================
--- soc2014/pedrosouza/lua_loader/head/sys/lua/src/lstd.h Wed Aug 13 16:53:12 2014 (r272373)
+++ soc2014/pedrosouza/lua_loader/head/sys/lua/src/lstd.h Wed Aug 13 19:31:46 2014 (r272374)
@@ -39,7 +39,6 @@
#include <string.h>
#include <machine/stdarg.h>
-#include <setjmp.h>
typedef __ptrdiff_t ptrdiff_t;
More information about the svn-soc-all
mailing list