The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / boot / grub2 / Config.in
1 config BR2_TARGET_GRUB2
2         bool "grub2"
3         depends on BR2_i386 || BR2_x86_64
4         help
5           GNU GRUB is a Multiboot boot loader. It was derived from
6           GRUB, the GRand Unified Bootloader, which was originally
7           designed and implemented by Erich Stefan Boleyn. GRUB 2 has
8           replaced what was formerly known as GRUB (i.e. version
9           0.9x), which has, in turn, become GRUB Legacy.
10
11           Amongst others, GRUB2 offers EFI support, which GRUB Legacy
12           doesn't provide.
13
14           Notes on using Grub2 for BIOS-based platforms
15           =============================================
16
17           1. Create a disk image
18              dd if=/dev/zero of=disk.img bs=1M count=32
19           2. Partition it (either legacy or GPT style partitions work)
20              cfdisk disk.img
21               - Create one partition, type Linux, for the root
22                 filesystem. The only constraint is to make sure there
23                 is enough free space *before* the first partition to
24                 store Grub2. Leaving 1 MB of free space is safe.
25           3. Setup loop device and loop partitions
26              sudo losetup -f disk.img
27              sudo partx -a /dev/loop0
28           4. Prepare the root partition
29              sudo mkfs.ext3 -L root /dev/loop0p1
30              sudo mount /dev/loop0p1 /mnt
31              sudo tar -C /mnt -xf output/images/rootfs.tar
32              sudo umount /mnt
33           5. Install Grub2
34              sudo ./output/host/usr/sbin/grub-bios-setup \
35                         -b ./output/host/usr/lib/grub/i386-pc/boot.img \
36                         -c ./output/images/grub.img -d . /dev/loop0
37           6. Cleanup loop device
38              sudo partx -d /dev/loop0
39              sudo losetup -d /dev/loop0
40           7. Your disk.img is ready!
41
42           Using genimage
43           --------------
44
45           If you use genimage to generate your complete image,
46           installing Grub can be tricky. Here is how to achieve Grub's
47           installation with genimage:
48
49           partition boot {
50               in-partition-table = "no"
51               image = "path_to_boot.img"
52               offset = 0
53               size = 512
54           }
55           partition grub {
56               in-partition-table = "no"
57               image = "path_to_grub.img"
58               offset = 512
59           }
60
61           The result is not byte to byte identical to what
62           grub-bios-setup does but it works anyway.
63
64           To test your BIOS image in Qemu
65           -------------------------------
66
67           qemu-system-{i386,x86-64} -hda disk.img
68
69           Notes on using Grub2 for EFI-based platforms
70           ============================================
71
72           1. Create a disk image
73              dd if=/dev/zero of=disk.img bs=1M count=32
74           2. Partition it with GPT partitions
75              cgdisk disk.img
76               - Create a first partition, type EF00, for the
77                 bootloader and kernel image
78               - Create a second partition, type 8300, for the root
79                 filesystem.
80           3. Setup loop device and loop partitions
81              sudo losetup -f disk.img
82              sudo partx -a /dev/loop0
83           4. Prepare the boot partition
84              sudo mkfs.vfat -n boot /dev/loop0p1
85              sudo mount /dev/loop0p1 /mnt
86              sudo cp -a output/images/efi-part/* /mnt/
87              sudo cp output/images/bzImage /mnt/
88              sudo umount /mnt
89           5. Prepare the root partition
90              sudo mkfs.ext3 -L root /dev/loop0p2
91              sudo mount /dev/loop0p2 /mnt
92              sudo tar -C /mnt -xf output/images/rootfs.tar
93              sudo umount /mnt
94           6  Cleanup loop device
95              sudo partx -d /dev/loop0
96              sudo losetup -d /dev/loop0
97           7. Your disk.img is ready!
98
99           To test your EFI image in Qemu
100           ------------------------------
101
102           1. Download the EFI BIOS for Qemu
103              Version IA32 or X64 depending on the chosen Grub2
104              platform (i386-efi vs. x86-64-efi)
105              http://sourceforge.net/projects/edk2/files/OVMF/
106           2. Extract, and rename OVMF.fd to bios.bin and
107              CirrusLogic5446.rom to vgabios-cirrus.bin.
108           3. qemu-system-{i386,x86-64} -L ovmf-dir/ -hda disk.img
109           4. Make sure to pass pci=nocrs to the kernel command line,
110              to workaround a bug in the EFI BIOS regarding the
111              EFI framebuffer.
112
113           http://www.gnu.org/software/grub/
114
115 if BR2_TARGET_GRUB2
116
117 choice
118         prompt "Platform"
119
120 config BR2_TARGET_GRUB2_I386_PC
121         bool "i386-pc"
122         help
123           Select this option if the platform you're targetting is a
124           x86 or x86-64 legacy BIOS based platform.
125
126 config BR2_TARGET_GRUB2_I386_EFI
127         bool "i386-efi"
128         help
129           Select this option if the platform you're targetting has a
130           32 bits EFI BIOS. Note that some x86-64 platforms use a 32
131           bits EFI BIOS, and this option should be used in this case.
132
133 config BR2_TARGET_GRUB2_X86_64_EFI
134         bool "x86-64-efi"
135         depends on BR2_ARCH_IS_64
136         help
137           Select this option if the platform you're targetting has a
138           64 bits EFI BIOS.
139
140 endchoice
141
142 if BR2_TARGET_GRUB2_I386_PC
143
144 config BR2_TARGET_GRUB2_BOOT_PARTITION
145         string "boot partition"
146         default "hd0,msdos1"
147         help
148           Specify the partition where the /boot/grub/grub.cfg file is
149           located. Use 'hd0,msdos1' for the first partition of the
150           first disk if using a legacy partition table, or 'hd0,gpt1'
151           if using GPT partition table.
152
153 endif # BR2_TARGET_GRUB2_I386_PC
154
155 config BR2_TARGET_GRUB2_BUILTIN_MODULES
156         string "builtin modules"
157         default "boot linux ext2 fat part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC
158         default "boot linux ext2 fat part_msdos part_gpt normal efi_gop" \
159                 if BR2_TARGET_GRUB2_I386_EFI || BR2_TARGET_GRUB2_X86_64_EFI
160
161 config BR2_TARGET_GRUB2_BUILTIN_CONFIG
162         string "builtin config"
163         help
164           Path to a Grub 2 configuration file that will be embedded
165           into the Grub image itself. This allows to set the root
166           device and other configuration parameters, but however menu
167           entries cannot be described in this embedded configuration.
168
169 endif # BR2_TARGET_GRUB2