Project

General

Profile

Actions

Submit #3154

open

Update serial handling in bootloader

Added by ddegroot over 5 years ago. Updated over 5 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
11/01/2018
Due date:
% Done:

0%

Estimated time:

Description

Allow changing serial baud rate in bootloader during boot1/boot2. The speed will automatically be taken over by the loader.

The patch contains multiple changes to improve serial handling through the bootprocess and
can be found here: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/7

Actions #1

Updated by ddegroot over 5 years ago

Excerpt of changes:
General:
- /usr/src/sys/boot makefile fix
- Set default serial console speed to 115200
- Use stable names/terms in the Makefile ie COMSPEED and BOOT_COMCONSOLE_SPEED

boot0
- Update boot0.S with the newer fbsd version (not sure if this is like/ok)
- If the COMSPEED is set to 0, then don't try to initialize the serial
port and assume that the BIOS has set it up for us. This allows folks
with a serial-aware BIOS to set the BIOS to speeds above 9600 and
allow boot0 to just use the existing settings.
(freebsd/freebsd@d9d5c6d)
- Allow boot0cfg to force a PXE boot via boot0 on the next boot.
- Fix boot0 to check for PXE when using the pre-set setting for the
preferred slice.

boot1
- Use most of the newer fbsd boot1.S (freebsd/freebsd@b730d20)
- Allows you to set the Serial Speed (ie: S115200)
Correct line breaks / nicer commandline output when manually entering commands
- Once the first parameter is entered on the commandline, stop timeout
- Suppress twiddle when autoboot is off
- Show current set of flags when making a change
- Allow setting the serial speed (which will also activate RB_SERIAL)
- D for DUAL makes more sense then -D for Keyboard
Continue to loader/kernel using an empty commandline (\n) instead of timing out
- Error on unknown flags/cmds
- Move/Reorder some functions
- Use unsigned char / uint8_t to reduce size.

loader
- Reuse the speed already set in boot1
- Allow handling of boot_multicons (currently until loader and not in the kernel (yet))
- Reuse isa_inb/isa_outb from comconsole.c (via extern bootstrap.h)
- Add print RB flags which were passed in (used for debugging)
- Use new cons_probe function
- Updated loader.8 to show change functionality

pxeboot
- Synced with fbsd (freebsd/freebsd@433bd38)
- Integrate support for tftp and nfs in one pxeloader
Remove need for loader_tftp and pxeldr_tftp as special versions
Update man pages accordingly
- Use RB_SERIAL and RB_MULTIPLE (aka boot_multicons) from sys/reboot.h
when no keyboard was detected (potential false positive).

comconsole
- Handle Multiple/Dual console drivers in a nicer way
- Add extra functionality to comconsole
- Add sleep/usleep definitions

Actions

Also available in: Atom PDF