Skip to content

[WIP] Update serial handling in bootloader #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

dkgroot
Copy link
Contributor

@dkgroot dkgroot commented Oct 27, 2018

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-src@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-src@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-src@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

SUBDIR+= dloader32
.endif

SUBDIR+= dloader

# Pick the machine-dependant subdir based on the target architecture.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I needed this change to the make file to be able to compile in place (ie: in /usr/src/sys/boot), does not have a negative effect when running buildworld from /usr/src).

@dkgroot dkgroot force-pushed the update_boot_serial branch 9 times, most recently from 84dd0df to 371ab44 Compare November 2, 2018 00:42
@dkgroot dkgroot force-pushed the update_boot_serial branch 2 times, most recently from 4e53a07 to 234ac8c Compare November 5, 2018 15:25
Diederik de Groot added 12 commits November 21, 2018 18:48
…n May 16, 2015)

Includes:
- Add a serial console capable version of the FreeBSD boot manager.
  (freebsd/freebsd-src@653689474)
- Allow one to specify the com port settings for boot0sio.
  (freebsd/freebsd-src@2a49481bc)
- Change from '#' to "//" comment character to allow CPP preprocessing.
  (freebsd/freebsd-src@0a30683aa)
- 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-src@d9d5c6d6b)
- Remove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS).
  (freebsd/freebsd-src@b87bf48d9)
- A number of small changes to make the 'save choice to disk' safer,
  and re-enable it as default.
  (freebsd/freebsd-src@9b90a7e39)
- 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.
  (freebsd/freebsd-src@2fa7cf8a5)
- Use most of the newer fbsd boot1.S (freebsd/freebsd-src@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.
- Add boot.config.5 man file
- Handle Multiple/Dual console drivers in a nicer way
- Add extra functionality to comconsole
- Add sleep/usleep definitions
- 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
Use stable names/terms in the Makefile ie COMSPEED and BOOT_COMCONSOLE_SPEED
- Synced with fbsd (freebsd/freebsd-src@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).
- Fix nfs/tftp order for pxeboot
- Default to RB_MULTIPLE/RB_DUAL
Fix Loader:
- Handle serial settings when started by pxeldr
- Move/Merge howto_names table to ../sys/boot.h
Fix comc_set_speed
- Sleep function was not working
- Would never stop after changing speed
Update dloader kenv entries
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Jun 29, 2021
Add compat code to adapt NetBSD's kmem_alloc()/kmem_zalloc()/kmem_free().
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Jul 9, 2021
Add compat code to adapt NetBSD's kmem_alloc()/kmem_zalloc()/kmem_free().
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Jul 20, 2021
Add compat code to adapt NetBSD's kmem_alloc()/kmem_zalloc()/kmem_free().
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Oct 19, 2023
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Oct 20, 2023
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Nov 5, 2023
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Nov 10, 2023
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Nov 16, 2023
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Nov 21, 2023
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Dec 29, 2023
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Jan 3, 2024
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Jan 13, 2024
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Jan 15, 2024
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Jan 26, 2024
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Jan 26, 2024
liweitianux added a commit to liweitianux/dragonflybsd that referenced this pull request Feb 8, 2024
servizig pushed a commit to servizig/DragonFlyBSD that referenced this pull request Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants