Lesson1: Difference between revisions

From coreboot
Jump to navigation Jump to search
No edit summary
Line 16: Line 16:


Build the payload - coreinfo
Build the payload - coreinfo
  $ cd payloads/coreinfo
  $ pushd payloads/coreinfo
  $ make olddefconfig
  $ make olddefconfig
  $ make
  $ make
$ popd


configure mainboard to build coreboot
configure mainboard to build coreboot
Line 25: Line 26:
     select 'Mainboard model'
     select 'Mainboard model'
     choose 'QEMU x86 i440fx/piix4'
     choose 'QEMU x86 i440fx/piix4'
     exit b
     select exit
 
   
     select 'Payload' menu
     select 'Payload' menu
     select 'Add a Payload'
     select 'Add a Payload'
Line 32: Line 33:
     select 'Payload path and filename'
     select 'Payload path and filename'
     enter 'payloads/coreinfo/build/coreinfo.elf'
     enter 'payloads/coreinfo/build/coreinfo.elf'
     exit
     select exit
     exit
     select exit
     yes
     select yes


check your configuration:
check your configuration:

Revision as of 03:28, 18 January 2016

coreboot lesson 1 - Starting from scratch

From a fresh ubuntu 15.10 linux install, here are all the steps required:

Download, configure, and build coreboot

Install tools and libraries needed for coreboot

$ sudo apt-get install git-core libncurses5-dev m4 bison flex

Download coreboot source tree:

$ git clone http://review.coreboot.org/coreboot
$ cd coreboot

build toolchain (This can take a significant amount of time)

$ make crossgcc-i386 CPUS=$(nproc)

Build the payload - coreinfo

$ pushd payloads/coreinfo
$ make olddefconfig
$ make
$ popd

configure mainboard to build coreboot

$ make menuconfig
   select 'Mainboard' menu
   select 'Mainboard model'
   choose 'QEMU x86 i440fx/piix4'
   select exit
   
   select 'Payload' menu
   select 'Add a Payload'
   choose 'An Elf executable payload'
   select 'Payload path and filename'
   enter 'payloads/coreinfo/build/coreinfo.elf'
   select exit
   select exit
   select yes

check your configuration:

$ make savedefconfig
$ cat defconfig

There should only be three lines:

CONFIG_BOARD_EMULATION_QEMU_X86_I440FX=y
CONFIG_PAYLOAD_ELF=y
CONFIG_PAYLOAD_FILE="payloads/coreinfo/build/coreinfo.elf"

build coreboot:

$ make

Test the image using QEMU

Install QEMU

$ sudo apt-get install qemu

Start QEMU:

$ qemu-system-x86_64 -bios build/coreboot.rom -serial stdio

You should see the serial output of coreboot in the original console window, and a new window will appear running the coreinfo payload.