aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/conf/machine/zynq-generic.conf
blob: 3dea20129a61e3f283161fdd2c398dd48561aad2 (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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#@TYPE: Machine
#@NAME: zynq-generic
#@DESCRIPTION: Machine configuration for the zynq-generic devices

#### Preamble
MACHINEOVERRIDES =. "${@['', 'zynq-generic:']['zynq-generic' != '${MACHINE}']}"
#### Regular settings follow

# Variables that changes based on hw design or board specific requirement must be
# defined before calling the required inclusion file else pre-expansion value
# defined in local.conf without machine override will not be reflected.

# Yocto Zynq-7000 device-tree variables
YAML_CONSOLE_DEVICE_CONFIG:pn-device-tree ?= "ps7_uart_1"
YAML_MAIN_MEMORY_CONFIG:pn-device-tree ?= "PS7_DDR_0"
DT_PADDING_SIZE:pn-device-tree ?= "0x1000"
DTC_FLAGS:pn-device-tree = "-@"
YAML_DT_BOARD_FLAGS ?= "{BOARD zc702}"

# Yocto Zynq-7000 u-boot-xlnx variables
UBOOT_MACHINE ?= "xilinx_zynq_virt_defconfig"
BOOTMODE ?= "generic.root"

# Yocto Zynq-7000 FSBL variables
YAML_SERIAL_CONSOLE_STDIN:pn-fsbl-firmware ?= "ps7_uart_1"
YAML_SERIAL_CONSOLE_STDOUT:pn-fsbl-firmware ?= "ps7_uart_1"

# Yocto KERNEL Variables
UBOOT_ENTRYPOINT  ?= "0x200000"
UBOOT_LOADADDRESS ?= "0x200000"
KERNEL_EXTRA_ARGS += "UIMAGE_LOADADDR=${UBOOT_ENTRYPOINT}"

# Zynq-7000 Serial Console settings
SERIAL_CONSOLES ?= "115200;ttyPS0"
YAML_SERIAL_CONSOLE_BAUDRATE ?= "115200"

require conf/machine/include/soc-zynq.inc
require conf/machine/include/machine-xilinx-default.inc
require conf/machine/include/machine-xilinx-qemu.inc

# zynq-generic.conf uses zc702-zynq7 xsa as reference input.
# User can override with custom xsa using HDF_BASE and HDF_PATH variables from
# local.conf.
HDF_MACHINE = "zc702-zynq7"

MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget"

MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "${PREFERRED_PROVIDER_virtual/dtb}"

EXTRA_IMAGEDEPENDS += " \
    libyaml-native \
    python3-cython-native \
    python3-pyyaml-native \
    virtual/fsbl \
    virtual/boot-bin \
    virtual/bootloader \
    u-boot-xlnx-scr \
    "

IMAGE_BOOT_FILES += " \
    boot.bin \
    ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/dtb', 'device-tree', 'system.dtb', '', d)} \
    boot.scr \
    uImage \
    "

IMAGE_CLASSES += "image-types-xilinx-qemu"
# Add wic.qemu-sd only if initramfs_image not set due to circular dependecies
IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' else 'cpio.gz'}"

# Zynq-7000 QEMU Configurations
# This machine has a QEMU model, runqemu setup:
QB_MEM = "-m 1024"
QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@"

QB_KERNEL_ROOT = "/dev/mmcblk0p2"

# Side effect of not-enabled serial port is we have to lock
# the second (console) to mon:stdio.
#
# Two total serial ports defined in this model (according to the generated dts)
#
# hw uart0 xuartps (e0000000) -
# hw uart1 xuartps (e0001000) - linux serial0 (ttyPS0)
QB_XILINX_SERIAL = "-serial null -serial mon:stdio"

# Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW)
QB_OPT_APPEND += " \
	-device loader,addr=0xf8000008,data=0xDF0D,data-len=4 \
	-device loader,addr=0xf8000140,data=0x00500801,data-len=4 \
	-device loader,addr=0xf800012c,data=0x1ed044d,data-len=4 \
	-device loader,addr=0xf8000108,data=0x0001e008,data-len=4 \
	-device loader,addr=0xF8000910,data=0xF,data-len=0x4 \
	-machine linux=on \
	"

#### No additional settings should be after the Postamble
#### Postamble
PACKAGE_EXTRA_ARCHS:append = "${@['', ' zynq_generic']['zynq-generic' != "${MACHINE}"]}"