aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/bsp/substrate/target/arch/qemu/conf/machine/{{=machine}}.conf
blob: d7e53bd55129edd92478c0e23b5936431da776ea (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#@TYPE: Machine
#@NAME: {{=machine}}

#@DESCRIPTION: Machine configuration for {{=machine}} systems

{{ if kernel_choice == "custom": preferred_kernel = "linux-yocto-custom" }}
{{ if kernel_choice == "linux-yocto-dev": preferred_kernel = "linux-yocto-dev" }}
{{ if kernel_choice == "custom" or kernel_choice == "linux-yocto-dev" : }}
PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"

{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel = kernel_choice.split('_')[0] }}
{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": preferred_kernel_version = kernel_choice.split('_')[1] }}
{{ if kernel_choice != "custom" and kernel_choice != "linux-yocto-dev": }}
PREFERRED_PROVIDER_virtual/kernel ?= "{{=preferred_kernel}}"
PREFERRED_VERSION_{{=preferred_kernel}} ?= "{{=preferred_kernel_version}}%"

{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
PREFERRED_PROVIDER_virtual/libgles2 ?= "mesa"

{{ input type:"choicelist" name:"qemuarch" prio:"5" msg:"Which qemu architecture would you like to use?" default:"i386" }}
{{ input type:"choice" val:"i386" msg:"i386    (32-bit)" }}
{{ input type:"choice" val:"x86_64" msg:"x86_64  (64-bit)" }}
{{ input type:"choice" val:"arm" msg:"ARM     (32-bit)" }}
{{ input type:"choice" val:"powerpc" msg:"PowerPC (32-bit)" }}
{{ input type:"choice" val:"mips" msg:"MIPS    (32-bit)" }}
{{ if qemuarch == "i386": }}
require conf/machine/include/qemu.inc
require conf/machine/include/tune-i586.inc
{{ if qemuarch == "x86_64": }}
require conf/machine/include/qemu.inc
require conf/machine/include/tune-x86_64.inc
{{ if qemuarch == "arm": }}
require conf/machine/include/qemu.inc
require conf/machine/include/tune-arm926ejs.inc
{{ if qemuarch == "powerpc": }}
require conf/machine/include/qemu.inc
require conf/machine/include/tune-ppc7400.inc
{{ if qemuarch == "mips": }}
require conf/machine/include/qemu.inc
require conf/machine/include/tune-mips32.inc

{{ if qemuarch == "i386" or qemuarch == "x86_64": }}
MACHINE_FEATURES += "x86"
KERNEL_IMAGETYPE = "bzImage"
SERIAL_CONSOLE = "115200 ttyS0"
XSERVER = "xserver-xorg \
           ${@base_contains('DISTRO_FEATURES', 'opengl', 'mesa-driver-swrast', '', d)} \
           xf86-input-vmmouse \
           xf86-input-keyboard \
           xf86-input-evdev \
           xf86-video-vmware"

{{ if qemuarch == "arm": }}
KERNEL_IMAGETYPE = "zImage"
SERIAL_CONSOLE = "115200 ttyAMA0"

{{ if qemuarch == "powerpc": }}
KERNEL_IMAGETYPE = "vmlinux"
SERIAL_CONSOLE = "115200 ttyS0"

{{ if qemuarch == "mips": }}
KERNEL_IMAGETYPE = "vmlinux"
KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
SERIAL_CONSOLE = "115200 ttyS0"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"