Coreinfo: Difference between revisions

From coreboot
Jump to navigation Jump to search
(Thanks to https://review.coreboot.org/#/c/12454/, libpayload does not to be linked manually anymore and works across all systems.)
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''coreinfo''' is a small informational [[Payloads|payload]] for coreboot. Currently, it can display CPU information, PCI information, coreboot table information, and show an NVRAM dump.
'''coreinfo''' is a small informational [[Payloads|payload]] for coreboot. Currently, it can display CPU information, PCI information, coreboot table information, show an NVRAM dump, as well as a RAM dump.


== Screenshots ==
== Screenshots ==
Line 12: Line 12:


== Building coreinfo ==
== Building coreinfo ==
libpayload and coreinfo are in the payloads/ directory of the coreboot tree. If you have already checked out the tree, you can skip the svn co steps below.
 
[[libpayload]] and coreinfo are in the '''payloads/''' directory of the coreboot tree. If you have already checked out the tree, you can skip the git clone steps below.
 
$ '''git clone http://review.coreboot.org/p/coreboot'''


=== libpayload ===
=== libpayload ===
The coreinfo payload uses [[libpayload]], thus you need to get that first and build it:
The coreinfo payload uses [[libpayload]], thus you need to get that first and build it:


  $ '''svn co svn://coreboot.org/coreboot/trunk/payloads/libpayload'''
  $ '''cd coreboot/payloads/libpayload'''
$ '''cd libpayload'''
  $ '''make menuconfig'''
  $ '''make menuconfig'''
  $ '''make install'''
  $ '''make install'''
Line 26: Line 29:
You can then get coreinfo itself and build it:
You can then get coreinfo itself and build it:


  $ '''cd ..'''
  $ '''cd coreboot/payloads/coreinfo'''
$ '''svn co svn://coreboot.org/coreboot/trunk/payloads/coreinfo'''
$ '''cd coreinfo'''
  $ '''make menuconfig'''
  $ '''make menuconfig'''
  $ '''make'''
  $ '''make'''


The file '''build/coreinfo.elf''' is your final coreinfo payload which you can use with coreboot (v2 or v3), either on real hardware or in a QEMU image.
If you are fine with coreboot's default configuration, you can also build coreinfo directly without any steps beforehand as libreboot's build system automatically builds libpayload as a dependency:
 
$ '''make -C coreboot/payloads/coreinfo'''
 
The file '''coreboot/payloads/coreinfo/build/coreinfo.elf''' is your final coreinfo payload which you can use with coreboot, either on real hardware or in a [[QEMU]] image.


=== coreboot ===
=== coreboot ===


Finally, you have to build coreboot (v3 in this example) with coreinfo as payload:
Finally, you have to build coreboot with coreinfo as payload:


  $ '''cd ..'''
  $ '''cp coreboot/payloads/coreinfo/build/coreinfo.elf coreboot/payload.elf'''
$ '''svn co svn://coreboot.org/repository/coreboot-v3'''
  $ '''cd coreboot'''
$ '''cp coreinfo/build/coreinfo.elf coreboot-v3/payload.elf'''
  $ '''cd coreboot-v3'''
  $ '''make menuconfig'''
  $ '''make menuconfig'''


Now enter the '''Payload''' menu and select '''Payload type''' and then '''An ELF executable payload file'''. Now exit the menu, save your settings, and build coreboot:
Now enter the '''Payload''' menu and select '''Payload type''' and then '''An ELF executable payload file'''. Then, exit the menu, save your settings, and build coreboot:


  $ '''make'''
  $ '''make'''


The file '''build/coreboot.rom''' (or '''build/bios.bin''') is your final coreboot v3 image, which also contains the coreinfo payload.
The file '''build/coreboot.rom''' is your final coreboot image, which also contains the coreinfo payload.


== Running coreinfo in QEMU ==
== Running coreinfo in QEMU ==


For running coreboot+coreinfo image in QEMU, you need a patched version of '''vgabios-cirrus.bin''' in your '''build''' directory first:
For running coreboot+coreinfo image in [[QEMU]], you need  


  $ cd build
1 Previously described steps (build coreboot image for QEMU)
  $ wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
 
  $ unzip Vgabios-cirrus.zip
2 Patched version of '''vgabios-cirrus.bin''' in your '''build''' directory:
  $ cd ..
 
  $ '''cd build'''
  $ '''wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip'''
  $ '''unzip Vgabios-cirrus.zip'''
  $ '''cd ..'''


You can now run coreinfo in QEMU:
You can now run coreinfo in [[QEMU]]:


  $ qemu -L build -hda /dev/zero -serial stdio
  $ qemu-system-i386 -L build -hda /dev/zero -serial stdio


== Ready-made coreinfo QEMU image ==
== Ready-made coreinfo QEMU image ==

Latest revision as of 07:48, 7 December 2015

coreinfo is a small informational payload for coreboot. Currently, it can display CPU information, PCI information, coreboot table information, show an NVRAM dump, as well as a RAM dump.

Screenshots

Building coreinfo

libpayload and coreinfo are in the payloads/ directory of the coreboot tree. If you have already checked out the tree, you can skip the git clone steps below.

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

libpayload

The coreinfo payload uses libpayload, thus you need to get that first and build it:

$ cd coreboot/payloads/libpayload
$ make menuconfig
$ make install

coreinfo

You can then get coreinfo itself and build it:

$ cd coreboot/payloads/coreinfo
$ make menuconfig
$ make

If you are fine with coreboot's default configuration, you can also build coreinfo directly without any steps beforehand as libreboot's build system automatically builds libpayload as a dependency:

$ make -C coreboot/payloads/coreinfo

The file coreboot/payloads/coreinfo/build/coreinfo.elf is your final coreinfo payload which you can use with coreboot, either on real hardware or in a QEMU image.

coreboot

Finally, you have to build coreboot with coreinfo as payload:

$ cp coreboot/payloads/coreinfo/build/coreinfo.elf coreboot/payload.elf
$ cd coreboot
$ make menuconfig

Now enter the Payload menu and select Payload type and then An ELF executable payload file. Then, exit the menu, save your settings, and build coreboot:

$ make

The file build/coreboot.rom is your final coreboot image, which also contains the coreinfo payload.

Running coreinfo in QEMU

For running coreboot+coreinfo image in QEMU, you need

1 Previously described steps (build coreboot image for QEMU)

2 Patched version of vgabios-cirrus.bin in your build directory:

$ cd build
$ wget http://www.coreboot.org/images/0/0d/Vgabios-cirrus.zip
$ unzip Vgabios-cirrus.zip
$ cd ..

You can now run coreinfo in QEMU:

$ qemu-system-i386 -L build -hda /dev/zero -serial stdio

Ready-made coreinfo QEMU image

If you don't want to build libpayload, coreinfo, and coreboot from source, you can also use the ready-made coreinfo QEMU image by following the instructions on that page.


Public domain I, the copyright holder of this work, hereby release it into the public domain. This applies worldwide.

In case this is not legally possible:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.