Cherniaev Andrei 261d33eff8 board/mender: sync with board/pc hai 9 meses
..
genimage-bios.cfg 92dc22dd68 board/pc: fix build failure due to new genimage 15 %!s(int64=3) %!d(string=hai) anos
genimage-efi.cfg 025d8ac80d board/*/genimage.cfg: use partition-type-uuid U where relevant %!s(int64=3) %!d(string=hai) anos
grub-bios.cfg 6fab243237 configs/pc: refactor to use genimage and grub.cfg %!s(int64=7) %!d(string=hai) anos
grub-efi.cfg 3468ef16fa configs/pc_x86_64_efi: use genimage GPT partition table support %!s(int64=5) %!d(string=hai) anos
linux.config 7a4e8355e3 board/pc/linux.config: Add framebuffer and pci support %!s(int64=2) %!d(string=hai) anos
post-build.sh 086c96b452 configs/pc_x86_64_bios_defconfig: fix image generation after grub2 rework %!s(int64=3) %!d(string=hai) anos
post-image-efi.sh 3b1d9f74c7 board/pc/post-image-efi.sh: fail on any error %!s(int64=5) %!d(string=hai) anos
readme.txt 261d33eff8 board/mender: sync with board/pc hai 6 meses

readme.txt

Bare PC sample config
=====================

1. Build

First select the appropriate target you want.

For BIOS-based boot strategy:

$ make pc_x86_64_bios_defconfig

For EFI-based boot strategy on a GPT-partitioned disk:

$ make pc_x86_64_efi_defconfig

Add any additional packages required and build:

$ make

2. Write the image

The build process will create a all-in-one image called disk.img in
output/images.

Write the image to a pendrive:

$ dd if=output/images/disk.img of=/dev/sdX; sync

Once it's done insert it into the target PC and boot.

Remember that if said PC has another boot device you might need to
select this alternative for it to boot.

In the case of EFI boot you might need to disable Secure Boot from
the setup as well.

3. Enjoy

Emulation in qemu (BIOS)
========================

1. Edit grub-bios.cfg

Since the driver will show up in the virtual machine as /dev/vda,
change board/pc/grub-bios.cfg to use root=/dev/vda1 instead of
root=/dev/sda1. Then rebuild grub2 and the image:

make grub2-rebuild && make

2. Run the emulation with:

qemu-system-x86_64 \
-M pc \
-drive file=output/images/disk.img,if=virtio,format=raw \
-net nic,model=virtio \
-net user


Emulation in qemu (UEFI)
========================

Run the emulation with:

qemu-system-x86_64 \
-M pc \
-bios \
-drive file=output/images/disk.img,if=virtio,format=raw \
-net nic,model=virtio \
-net user

Note that needs to point to a valid x86_64 UEFI
firmware image for qemu. It may be provided by your distribution as a
edk2 or OVMF package, in path such as
/usr/share/edk2/ovmf/OVMF_CODE.fd .