From 50c8f5c73ea5776abb10ee694893a738152fb615 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Wed, 4 Jul 2018 11:55:10 -0400 Subject: [PATCH] Add serial-and-milk guide --- serial/serial-and-milk.txt | 73 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 serial/serial-and-milk.txt diff --git a/serial/serial-and-milk.txt b/serial/serial-and-milk.txt new file mode 100644 index 0000000..1530938 --- /dev/null +++ b/serial/serial-and-milk.txt @@ -0,0 +1,73 @@ +# Patching coreboot+SeaBIOS+PXE+Linux for input over serial + +Instructions here are specifically tailored to the KGPE-D16, but should work +for other boards with minor modifications, particularly to the PCI ID of the +Ethernet controller used when building and installing iPXE. + +---- + +Get the base ROM (no need to recompile most of it, but you can if you want). Consider making a backup. + + # flashrom -p internal -r coreboot.rom + +Enable the VGA<->serial console, sercon, in SeaBIOS. 1016 is the decimal +encoding of `0x3f8`, the port number for serial on traditional PC +architectures. + + # ./cbfstool coreboot.rom add-int -i 1016 -n etc/sercon-port + +Deduplicate duplicated character duplicates. + + # ./cbfstool coreboot.rom add-int -i 0 -n etc/screen-and-debug + +---- + +Get IPXE source code: + + $ git clone git://git.ipxe.org/ipxe.git + +Patching IPXE to output purely over serial, bypassing weird VGA emulation, as per https://pelican.craoc.fr/coreboot.html#ipxe + + diff --git a/src/config/console.h b/src/config/console.h + index 9f770d09..1f181177 100644 + --- a/src/config/console.h + +++ b/src/config/console.h + @@ -22,9 +22,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + * + */ + + -//#undef CONSOLE_PCBIOS /* Default BIOS console */ + -//#undef CONSOLE_EFI /* Default EFI console */ + -//#undef CONSOLE_LINUX /* Default Linux console */ + +#undef CONSOLE_PCBIOS /* Default BIOS console */ + +#undef CONSOLE_EFI /* Default EFI console */ + +#undef CONSOLE_LINUX /* Default Linux console */ + + /* + * Additional console types + @@ -34,7 +34,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + * + */ + + -//#define CONSOLE_SERIAL /* Serial port console */ + +#define CONSOLE_SERIAL /* Serial port console */ + //#define CONSOLE_FRAMEBUFFER /* Graphical framebuffer console */ + //#define CONSOLE_SYSLOG /* Syslog console */ + //#define CONSOLE_SYSLOGS /* Encrypted syslog console */ + +Build IPXE: + + $ make bin/808610d3.rom + +------------------ + +Remove the existing IPXE rom and replace it with our patched one, 808610d3.rom. Name/build target corresponds to the vendor/device ID in PCI + + # cbfstool coreboot.rom remove -n pci8086,10d3.rom + # cbfstool coreboot.rom add -f bin/808610d3.rom -n pci8086,10d3.rom -t raw + +------------------ + +Flash it back: + + # flashrom -p internal -w coreboot.rom -- 2.25.1