aboutsummaryrefslogtreecommitdiff
path: root/README
blob: ab8a381eb82e9d691748f19dd653d608e4400e50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
A simple x86 firmware that can boot Linux.  Usage:

fw_cfg based example:

$ qemu-kvm -bios bios.bin \
  -kernel /boot/vmlinuz-4.0.3-300.fc22.x86_64 \
  -serial mon:stdio -append 'console=ttyS0,115200,8n1'

cbfs-based example (pflash isn't the definitive interface though):

$ dd if=/dev/zero of=boot.bin bs=4096 count=1
$ cbfstool cbfs.rom create -s 8m -B boot.bin  -m x86 -o 0x1000
$ cbfstool cbfs.rom add -f /boot/vmlinuz-4.0.3-300.fc22.x86_64 -n vmlinuz -t raw
$ echo 'console=ttyS0,115200,8n1' > cmdline
$ cbfstool cbfs.rom add -f cmdline -n cmdline -t raw
$ qemu-kvm -drive if=pflash,file=bios.bin,readonly=on \
    -drive if=pflash,file=cbfs.rom,readonly=on \
    -serial mon:stdio

TODO:
- ACPI tables
- SMBIOS tables
- Multiboot loading

Example: