summaryrefslogtreecommitdiff
path: root/doc/source/image/elements/image-x86_64.bst
blob: f2af428c30d20c7dc305afdd1c76b63322e7c102 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# elements/image-x86_64.bst

# Specify the plugin reference - we want to import the x86image plugin
# from buildstream-external
kind: x86image
description: Create a deployment of a Linux system
depends:
  - filename: image/system.bst
    type: build
  - filename: base.bst
    type: build

# Boot image settings; the defaults can work, but you almost certainly
# want to customize them to match your image requirements.
#
# These settings are tailored to this specific project, don't just
# blindly copy.
variables:
  # Size of the disk to create
  #
  # Should be able to calculate this based on the space
  # used, however it must be a multiple of (63 * 512) bytes
  # as mtools wants a size that is divisible by sectors (512 bytes)
  # per track (63).
  boot-size: 16M
  rootfs-size: 69M
  sector-size: 512
  swap-size: 40K
  kernel-args: root=/dev/sda2 rootfstype=ext4 init=/sbin/init console=ttyS0
  kernel-name: vmlinuz-4.14.3

config:
  # The element that should be staged into "/". It must contain
  # all the tools required to generate the image
  base: base.bst

  # The element that should be staged into %{build-root}. It is expected
  # to be the system that you're planning to turn into an image.
  input: image/system.bst

  # This is technically not necessary, but convenient for trying
  # things out :)
  final-commands:
    (>):
    - |
      cat > %{install-root}/run-in-qemu.sh << EOF
      #!/bin/sh
      qemu-system-x86_64 -drive file=sda.img,format=raw -nographic
      EOF
      chmod +x %{install-root}/run-in-qemu.sh