Tint: Difference between revisions

From coreboot
Jump to navigation Jump to search
(→‎tint: As new Tint versions entered Debian the URL is invalid. Use the stable URL from snapshot.debian.org.)
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Image:Coreboot libpayload tint.png|thumb|right|The [[tint]] payload.]]
[[Image:Coreboot libpayload tint.png|thumb|right|The [[tint]] payload.]]


'''[http://oasis.frogfoot.net/code/tint/download/0.03b/ tint]''' is a small curses-based game.
'''[http://oasis.frogfoot.net/code/tint/ tint]''' is a small curses-based game.


We have ported this game to [[libpayload]] so it can now be used as a coreboot [[Payloads|payload]].
We have ported this game to [[libpayload]] so it can now be used as a coreboot [[Payloads|payload]].
Line 7: Line 7:
== Building  ==
== Building  ==


=== libpayload ===
=== tint ===
 
First, get tint itself and patch it:
 
$ git clone http://review.coreboot.org/p/coreboot.git
$ cd coreboot/payloads/external/tint
$ wget http://snapshot.debian.org/archive/debian-archive/20110127T084257Z/debian/pool/main/t/tint/tint_0.03b.tar.gz
$ tar xfvz tint_0.03b.tar.gz
$ cd tint-0.03b
$ patch -p1 < ../libpayload_tint.patch


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


$ mkdir foo
  $ cd ../../../libpayload
  $ cd foo
$ svn co svn://coreboot.org/repos/trunk/payloads/libpayload
$ cd libpayload
  $ make menuconfig
  $ make menuconfig
  $ make
  $ make
$ make install
The '''libpayload''' directory has to be in the '''tint-0.03b''' directory:


=== tint ===
$ cd ../external/tint/tint-0.03b
$ ln -s ../../../libpayload/install/libpayload libpayload


You can then get tint itself, patch it, and build it:
Finally, build tint itself:


  $ cd ..
  $ cd ..
$ wget http://ftp.debian.org/debian/pool/main/t/tint/tint_0.03b.tar.gz
$ tar xfvz tint_0.03b.tar.gz
$ cd tint-0.03b
$ wget http://www.coreboot.org/pipermail/coreboot/attachments/20080409/ab66eaa8/attachment.bin
$ patch -p1 < attachment.bin
  $ make
  $ make


The file '''tint.elf''' is your final payload which you can use with coreboot (v2 or v3), either on real hardware or in a QEMU image.
The ELF file '''tint''' is your final 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 tint as payload:
Finally, you have to build coreboot with tint as payload:


  $ cd ..
  $ cd ../../../..
$ svn co svn://coreboot.org/repository/coreboot-v3
  $ cp ../tint/tint-0.03b/tint payload.elf
  $ cp tint_0.03b/tint.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 tint payload.
The file '''build/coreboot.rom''' is your final coreboot image, which also contains the tint payload.


== Running tint in QEMU ==
== Running tint in QEMU ==


For running the coreboot+libpayload+tint image in QEMU, but you need a patched version of '''vgabios-cirrus.bin''' in your '''build''' directory first:
For running the coreboot+libpayload+tint image in [[QEMU]], you need a patched version of '''vgabios-cirrus.bin''' in your '''build''' directory first, and you also need to rename or copy '''coreboot.rom''' to '''bios.bin''':


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


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


  $ qemu -L build -hda /dev/zero -serial stdio
  $ qemu -L build -hda /dev/zero -serial stdio
Line 63: Line 67:
== Ready-made QEMU image ==
== Ready-made QEMU image ==


Please follow [http://www.coreboot.org/QEMU#coreboot_v3_.2B_libpayload_.2B_tint these instructions] if you want to try out coreboot and tint in [[QEMU]].
Please follow [[QEMU#coreboot_v3_.2B_libpayload_.2B_tint these instructions]] if you want to try out coreboot and tint in [[QEMU]].


{{PD-self}}
{{PD-self}}

Revision as of 21:25, 5 October 2012

The tint payload.

tint is a small curses-based game.

We have ported this game to libpayload so it can now be used as a coreboot payload.

Building

tint

First, get tint itself and patch it:

$ git clone http://review.coreboot.org/p/coreboot.git
$ cd coreboot/payloads/external/tint
$ wget http://snapshot.debian.org/archive/debian-archive/20110127T084257Z/debian/pool/main/t/tint/tint_0.03b.tar.gz
$ tar xfvz tint_0.03b.tar.gz
$ cd tint-0.03b
$ patch -p1 < ../libpayload_tint.patch

Then, build libpayload:

$ cd ../../../libpayload
$ make menuconfig
$ make
$ make install

The libpayload directory has to be in the tint-0.03b directory:

$ cd ../external/tint/tint-0.03b
$ ln -s ../../../libpayload/install/libpayload libpayload

Finally, build tint itself:

$ cd ..
$ make

The ELF file tint is your final payload which you can use with coreboot, either on real hardware or in a QEMU image.

coreboot

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

$ cd ../../../..
$ cp ../tint/tint-0.03b/tint payload.elf
$ 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 tint payload.

Running tint in QEMU

For running the coreboot+libpayload+tint image in QEMU, you need a patched version of vgabios-cirrus.bin in your build directory first, and you also need to rename or copy coreboot.rom to bios.bin:

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

You can now run tint in QEMU:

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

Ready-made QEMU image

Please follow QEMU#coreboot_v3_.2B_libpayload_.2B_tint these instructions if you want to try out coreboot and tint in QEMU.

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.