User:Fchmmr: Difference between revisions

From coreboot
Jump to navigation Jump to search
No edit summary
No edit summary
 
(89 intermediate revisions by the same user not shown)
Line 1: Line 1:
For X60
I am the maintainer for the [http://libreboot.org/ libreboot project]


Compile GNUtoo's fork of coreboot with:
You can contact me on freenode IRC, with my handle 'francis7'.
- GRUB2 payload
(previously 'fchmmr')
- native graphics (replacement for VGA option ROM / Video BIOS / VBIOS)
 
This version also removes the nonfree microcode.
I have tested this on an X60s 170237G.
GNUtoo uses this on an X60.
I hope to test it on more machines also.
 
git clone git://gitorious.org/gnutoo-for-coreboot/build-makefiles.git
(get the grub config, etc)
that is where i got the grub.cfg from.
rename it to coreboot.cfg and put it in the root of the grub source code directory
(see below)
note: i'm not using this. i adapted my own.
 
git clone git://gitorious.org/gnutoo-for-coreboot/coreboot.git
cd coreboot
git checkout 6ec9b1637b4e75de0ae4e2de258f72a7811aafbf
(the checkout gets gnutoo's patches to remove microcode, etc)
 
the .config (included in this post), put it in the coreboot directory.
I got it from here, which GNUtoo uploaded:
http://paste.debian.net/68794
 
Now coreboot is there, with the right config.
 
Now need to compile grub2
use this guide:
http://www.coreboot.org/index.php?title=GRUB2&oldid=11812
(note to self: include a backup of this)
 
come out of coreboot:
cd ..
 
do that:
git clone git://git.savannah.gnu.org/grub.git
cd grub
./autogen.sh
./configure --with-platform=coreboot
make
 
Now we need to create a grub elf file as the payload:
note: in grub source root directory, make a coreboot.cfg with your grub config text inside
 
do that command:
./grub-mkstandalone --grub-mkimage=./grub-mkimage -O i386-coreboot -o grub2-X60.elf --modules='ahci pata ehci uhci ohci usb_keyboard usbms part_msdos xfs ext2 fat at_keyboard part_gpt usbserial_usbdebug cbfs' --install-modules='ls linux search configfile normal cbtime cbls memrw iorw minicmd lsmmap lspci halt reboot hexdump pcidump regexp setpci lsacpi chain test' --fonts= --themes= --locales= -d grub-core/ /boot/grub/grub.cfg=coreboot.cfg
 
 
test qemu.elf in a coreboot.rom compiled for qemu first (not covered in this guide).
assuming that it works, continue on...
 
ok,
just put grub2-X60.elf (it will be in the root of the grub source directory) in coreboot directory.
in make menuconfig, change the path to say grub2-X60.elf
then:
make
 
and now a coreboot.rom is in ./build/
 
if you are flashing this for the first time on a machine that has the factory bios, then using the coreboot.rom just follow the wiki insturctions, especially with regards to the dd commands and the bucts commands
 
most important:
cd build
dd if=coreboot.rom of=top64k.bin bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x10000] count=64k
dd if=coreboot.rom bs=1 skip=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k | hexdump
dd if=top64k.bin of=coreboot.rom bs=1 seek=$[$(stat -c %s coreboot.rom) - 0x20000] count=64k conv=notrunc
 
flash the resulting coreboot.com like you normally would.
(with the dd commands you should also be able to use the flashing procedure from factory BIOS, but I haven't tested that. yet)
 
see below:
 
---
 
phcoder sasy to remove memdisk.tar and rebuild grub2.elf, if you want to change something
 
boot from grub cli, eg:
grub> linux  (ahci0,1)/vmlinuz root=/dev/sda1
grub> initrd  (ahci0,1)/initrd.img
grub> boot
(on grub command line. this can boot a kernel)
 
---
 
.config (put it in root coreboot source directory) is like this:
# This image was built using git revision 6ec9b1637b4e75de0ae4e2de258f72a7811aafbf
CONFIG_LOCALVERSION="7BETC7WW (2.08 )"
CONFIG_CBFS_PREFIX="fallback"
CONFIG_COMPILER_GCC=y
CONFIG_USE_OPTION_TABLE=y
CONFIG_COMPRESS_RAMSTAGE=y
CONFIG_INCLUDE_CONFIG_FILE=y
CONFIG_EARLY_CBMEM_INIT=y
CONFIG_VENDOR_LENOVO=y
CONFIG_BOARD_SPECIFIC_OPTIONS=y
CONFIG_MAINBOARD_DIR="lenovo/x60"
CONFIG_MAINBOARD_PART_NUMBER="ThinkPad X60 / X60s"
CONFIG_IRQ_SLOT_COUNT=18
CONFIG_MAINBOARD_VENDOR="Lenovo"
CONFIG_MAX_CPUS=2
CONFIG_RAMTOP=0x200000
CONFIG_HEAP_SIZE=0x4000
CONFIG_RAMBASE=0x100000
CONFIG_VGA_BIOS_ID="8086,27a2"
CONFIG_DRIVERS_PS2_KEYBOARD=y
CONFIG_DCACHE_RAM_BASE=0xffdf8000
CONFIG_DCACHE_RAM_SIZE=0x8000
CONFIG_SERIAL_CPU_INIT=y
CONFIG_ACPI_SSDTX_NUM=0
CONFIG_MMCONF_BASE_ADDRESS=0xf0000000
CONFIG_ID_SECTION_OFFSET=0x80
CONFIG_XIP_ROM_SIZE=0x10000
CONFIG_MMCONF_SUPPORT_DEFAULT=y
CONFIG_BOARD_LENOVO_X60=y
CONFIG_MAX_REBOOT_CNT=1
CONFIG_MAINBOARD_SMBIOS_MANUFACTURER="LENOVO"
CONFIG_SEABIOS_PS2_TIMEOUT=3000
CONFIG_LOGICAL_CPUS=y
CONFIG_IOAPIC=y
CONFIG_SMP=y
CONFIG_TTYS0_BAUD=115200
CONFIG_TTYS0_BASE=0x3f8
CONFIG_TTYS0_LCS=3
CONFIG_DEFAULT_CONSOLE_LOGLEVEL=8
CONFIG_CONSOLE_SERIAL8250=y
CONFIG_USBDEBUG=y
CONFIG_MAXIMUM_SUPPORTED_FREQUENCY=0
CONFIG_CPU_ADDR_BITS=32
CONFIG_BOARD_ROMSIZE_KB_2048=y
CONFIG_COREBOOT_ROMSIZE_KB_2048=y
CONFIG_COREBOOT_ROMSIZE_KB=2048
CONFIG_ROM_SIZE=0x200000
CONFIG_MAINBOARD_SERIAL_NUMBER="L3BY949"
CONFIG_MAINBOARD_VERSION="ThinkPad X60"
CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME="ThinkPad X60 / X60s"
CONFIG_ARCH_X86=y
CONFIG_X86_ARCH_OPTIONS=y
CONFIG_MARK_GRAPHICS_MEM_WRCOMB=y
CONFIG_AP_IN_SIPI_WAIT=y
CONFIG_STACK_SIZE=0x1000
CONFIG_NUM_IPI_STARTS=2
CONFIG_X86_BOOTBLOCK_SIMPLE=y
CONFIG_BOOTBLOCK_SOURCE="bootblock_simple.c"
CONFIG_PC80_SYSTEM=y
CONFIG_BOOTBLOCK_NORTHBRIDGE_INIT="northbridge/intel/i945/bootblock.c"
CONFIG_HAVE_CMOS_DEFAULT=y
CONFIG_CMOS_DEFAULT_FILE="src/mainboard/$(MAINBOARDDIR)/cmos.default"
CONFIG_BOOTBLOCK_SOUTHBRIDGE_INIT="southbridge/intel/i82801gx/bootblock.c"
CONFIG_IOAPIC_INTERRUPTS_ON_FSB=y
CONFIG_HPET_ADDRESS=0xfed00000
CONFIG_HAVE_ARCH_MEMSET=y
CONFIG_HAVE_ARCH_MEMCPY=y
CONFIG_HAVE_ARCH_MEMMOVE=y
CONFIG_SOCKET_SPECIFIC_OPTIONS=y
CONFIG_HAVE_INIT_TIMER=y
CONFIG_HIGH_SCRATCH_MEMORY_SIZE=0x0
CONFIG_CPU_INTEL_MODEL_6EX=y
CONFIG_CPU_INTEL_MODEL_6FX=y
CONFIG_SMM_TSEG_SIZE=0
CONFIG_CPU_INTEL_SOCKET_MFCPGA478=y
CONFIG_SSE2=y
CONFIG_UDELAY_LAPIC=y
CONFIG_LAPIC_MONOTONIC_TIMER=y
CONFIG_TSC_SYNC_MFENCE=y
CONFIG_CACHE_ROM=y
CONFIG_CACHE_AS_RAM=y
CONFIG_AP_SIPI_VECTOR=0xfffff000
CONFIG_MMX=y
CONFIG_SSE=y
CONFIG_CPU_MICROCODE_CBFS_NONE=y
CONFIG_VIDEO_MB=0
CONFIG_NORTHBRIDGE_SPECIFIC_OPTIONS=y
CONFIG_NORTHBRIDGE_INTEL_I945=y
CONFIG_NORTHBRIDGE_INTEL_SUBTYPE_I945GM=y
CONFIG_CHANNEL_XOR_RANDOMIZATION=y
CONFIG_CBFS_SIZE=0x200000
CONFIG_HPET_MIN_TICKS=0x80
CONFIG_MAX_PIRQ_LINKS=4
CONFIG_EHCI_BAR=0xfef00000
CONFIG_EHCI_DEBUG_OFFSET=0xa0
CONFIG_AMD_SB_SPI_TX_LEN=4
CONFIG_SOUTHBRIDGE_INTEL_COMMON=y
CONFIG_SOUTHBRIDGE_INTEL_I82801GX=y
CONFIG_SOUTHBRIDGE_RICOH_RL5C476=y
CONFIG_SUPERIO_NSC_PC87382=y
CONFIG_SUPERIO_NSC_PC87392=y
CONFIG_EC_ACPI=y
CONFIG_EC_LENOVO_H8=y
CONFIG_EC_LENOVO_PMH7=y
CONFIG_MAINBOARD_HAS_NATIVE_VGA_INIT=y
CONFIG_MAINBOARD_DO_EDID=y
CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT=y
CONFIG_PCI=y
CONFIG_PCIX_PLUGIN_SUPPORT=y
CONFIG_PCIEXP_PLUGIN_SUPPORT=y
CONFIG_AGP_PLUGIN_SUPPORT=y
CONFIG_CARDBUS_PLUGIN_SUPPORT=y
CONFIG_PCIEXP_COMMON_CLOCK=y
CONFIG_PCIEXP_ASPM=y
CONFIG_PCI_BUS_SEGN_BITS=0
CONFIG_FRAMEBUFFER_VESA_MODE_117=y
CONFIG_FRAMEBUFFER_VESA_MODE=0x117
CONFIG_DRIVERS_ICS_954309=y
CONFIG_MMCONF_SUPPORT=y
CONFIG_EARLY_CONSOLE=y
CONFIG_SQUELCH_EARLY_SMP=y
CONFIG_CONSOLE_SERIAL=y
CONFIG_CONSOLE_SERIAL_COM1=y
CONFIG_CONSOLE_SERIAL_115200=y
CONFIG_HAVE_USBDEBUG=y
CONFIG_USBDEBUG_IN_ROMSTAGE=y
CONFIG_USBDEBUG_HCD_INDEX=0
CONFIG_USBDEBUG_DEFAULT_PORT=1
CONFIG_USBDEBUG_DONGLE_STD=y
CONFIG_USBDEBUG_OPTIONAL_HUB_PORT=0
CONFIG_CONSOLE_CBMEM=y
CONFIG_CONSOLE_CBMEM_BUFFER_SIZE=0x10000
CONFIG_CONSOLE_CAR_BUFFER_SIZE=0xc00
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8=y
CONFIG_NO_POST=y
CONFIG_HAVE_UART_IO_MAPPED=y
CONFIG_HAVE_ACPI_RESUME=y
CONFIG_HAVE_HARD_RESET=y
CONFIG_HAVE_MONOTONIC_TIMER=y
CONFIG_HAVE_OPTION_TABLE=y
CONFIG_HAVE_SMI_HANDLER=y
CONFIG_CACHE_ROM_SIZE=0x200000
CONFIG_USE_WATCHDOG_ON_BOOT=y
CONFIG_GFXUMA=y
CONFIG_RELOCATABLE_MODULES=y
CONFIG_HAVE_ACPI_TABLES=y
CONFIG_HAVE_MP_TABLE=y
CONFIG_HAVE_PIRQ_TABLE=y
CONFIG_MULTIBOOT=y
CONFIG_GENERATE_ACPI_TABLES=y
CONFIG_GENERATE_MP_TABLE=y
CONFIG_GENERATE_PIRQ_TABLE=y
CONFIG_GENERATE_SMBIOS_TABLES=y
CONFIG_PAYLOAD_ELF=y
CONFIG_PAYLOAD_FILE="../config/grub2-x60.elf"
CONFIG_COMPRESSED_PAYLOAD_LZMA=y
CONFIG_HAVE_DEBUG_RAM_SETUP=y
CONFIG_WARNINGS_ARE_ERRORS=y

Latest revision as of 23:45, 17 August 2015

I am the maintainer for the libreboot project

You can contact me on freenode IRC, with my handle 'francis7'. (previously 'fchmmr')