Browse Source

configure: Add --enable-boot-machine in BBL

If --enable-boot-machine is passed, BBL disables VM and runs the payload in machine mode.
This is useful for payloads (e.g. RTOSes or other OSes) that want to run
only in machine mode while still relying on bbl/pk for system calls and emulation
pull/104/head
Hesham Almatary 8 years ago
parent
commit
2d85b4c38e
  1. 5
      bbl/bbl.ac
  2. 3
      config.h.in
  3. 15
      configure

5
bbl/bbl.ac

@ -18,3 +18,8 @@ AC_ARG_WITH([payload], AS_HELP_STRING([--with-payload], [Set ELF payload for bbl
AC_ARG_WITH([logo], AS_HELP_STRING([--with-logo], [Specify a better logo]),
[AC_SUBST([BBL_LOGO_FILE], $with_logo, [Logo for bbl])],
[AC_SUBST([BBL_LOGO_FILE], [riscv_logo.txt], [Logo for bbl])])
AC_ARG_ENABLE([boot-machine], AS_HELP_STRING([--enable-boot-machine], [Run payload in machine mode]))
AS_IF([test "x$enable_boot_machine" == "xyes"], [
AC_DEFINE([BBL_BOOT_MACHINE],,[Define to run payload in machine mode])
])

3
config.h.in

@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to run payload in machine mode */
#undef BBL_BOOT_MACHINE
/* Define if subproject MCPPBS_SPROJ_NORM is enabled */
#undef BBL_ENABLED

15
configure

@ -677,6 +677,7 @@ enable_vm
enable_logo
with_payload
with_logo
enable_boot_machine
enable_fp_emulation
'
ac_precious_vars='build_alias
@ -1325,6 +1326,7 @@ Optional Features:
Enable all optional subprojects
--disable-vm Disable virtual memory
--enable-logo Enable boot logo
--enable-boot-machine Run payload in machine mode
--disable-fp-emulation Disable floating-point emulation
Optional Packages:
@ -4272,6 +4274,19 @@ else
fi
# Check whether --enable-boot-machine was given.
if test "${enable_boot_machine+set}" = set; then :
enableval=$enable_boot_machine;
fi
if test "x$enable_boot_machine" == "xyes"; then :
$as_echo "#define BBL_BOOT_MACHINE /**/" >>confdefs.h
fi

Loading…
Cancel
Save