Commit 1a3886b3 authored by Mike Hibler's avatar Mike Hibler

More complete fix for ensuring that the console is "sio1" for FBSD.

parent 730db7aa
...@@ -2070,20 +2070,18 @@ sub vnodePreConfig($$$$$){ ...@@ -2070,20 +2070,18 @@ sub vnodePreConfig($$$$$){
if ($?); if ($?);
# #
# Put out the /boot/loader.conf header we look for in prepare # Fix up loader.conf
# #
if (open(LC, ">>$vnoderoot/boot/loader.conf")) { if (open(LC, ">>$vnoderoot/boot/loader.conf")) {
#
# Put out the /boot/loader.conf header we look for in prepare
# and fix the console as "sio1".
#
print LC "# The remaining lines were added by Emulab slicefix.\n"; print LC "# The remaining lines were added by Emulab slicefix.\n";
print LC "# DO NOT ADD ANYTHING AFTER THIS POINT AS IT WILL GET REMOVED.\n"; print LC "# DO NOT ADD ANYTHING AFTER THIS POINT AS IT WILL GET REMOVED.\n";
close(LC); print LC "console=\"comconsole\"\n";
} print LC "comconsole_speed=\"115200\"\n";
print LC "comconsole_port=\"0x3F8\"\n";
#
# In HVM the emulated RTC is UTC.
# Make sure FreeBSD knows that.
#
if ($vninfo->{'ishvm'}) {
unlink("$vnoderoot/etc/wall_cmos_clock");
# #
# FreeBSD recommends this workaround for stability issues when # FreeBSD recommends this workaround for stability issues when
...@@ -2091,13 +2089,24 @@ sub vnodePreConfig($$$$$){ ...@@ -2091,13 +2089,24 @@ sub vnodePreConfig($$$$$){
# HVM, I am just using $ishvm as it indicates a 10.x FreeBSD which # HVM, I am just using $ishvm as it indicates a 10.x FreeBSD which
# is the only version which lists this problem in the errata. # is the only version which lists this problem in the errata.
# #
mysystem("echo 'vfs.unmapped_buf_allowed=0' ". # XXX we put this out after the magic header above so that it
">> $vnoderoot/boot/loader.conf"); # will get removed by prepare if we make an image.
#
if ($vninfo->{'ishvm'}) {
print LC "\n# when running in a Xen VM\n";
print LC "vfs.unmapped_buf_allowed=0\n";
}
close(LC);
} }
# #
# Make sure console is comconsole # In HVM the emulated RTC is UTC.
# Make sure FreeBSD knows that.
# #
mysystem("echo 'console=comconsole' >> $vnoderoot/boot/loader.conf"); if ($vninfo->{'ishvm'}) {
unlink("$vnoderoot/etc/wall_cmos_clock");
}
} }
# #
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment