diff options
author | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2017-12-06 16:06:35 -0800 |
---|---|---|
committer | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2017-12-13 16:11:14 -0800 |
commit | a18947c20dba2c0c38db8bde1ad4684995df4bbd (patch) | |
tree | 917bf2abbe439a6f99ede8cfafb25812dca54a9a /meta-xilinx-bsp/conf/machine/include/machine-xilinx-qemu.inc | |
parent | 6ddc5873b0ede30e6542f0ab151a6236acc37944 (diff) | |
download | meta-xilinx-a18947c20dba2c0c38db8bde1ad4684995df4bbd.tar.gz |
meta-xilinx: Restructuring meta-xilinx to support multiple layers
As discussed previously on mailing list, we are proceeding with layer
restructuring. For rocko release we will have the following layers
meta-xilinx
->meta-xilinx-bsp (current meta-xilinx)
->meta-xilinx-contrib
In the subsequent releases we will add other layers from Xilinx
meta-xilinx
->meta-xilinx-bsp (current meta-xilinx)
->meta-petalinux
->meta-xilinx-tools
->meta-xilinx-contrib
This will provide one clone to get all the required meta layers from
Xilinx for a complete solution, and the users can blacklist any layer
which they don't want to use using bblayer.conf.
This will enables us to help our vendors/partners to add their reference
designs, board definitions etc.
Recipe changes :
* Move reference design zybo-linux-bd.bb to meta-xilinx-contrib
* Move kernel patches realted to zybo-linux-bd-zynq7 board to
meta-xilinx-contrib
* Update README
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Diffstat (limited to 'meta-xilinx-bsp/conf/machine/include/machine-xilinx-qemu.inc')
-rw-r--r-- | meta-xilinx-bsp/conf/machine/include/machine-xilinx-qemu.inc | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/meta-xilinx-bsp/conf/machine/include/machine-xilinx-qemu.inc b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-qemu.inc new file mode 100644 index 00000000..dd275f3b --- /dev/null +++ b/meta-xilinx-bsp/conf/machine/include/machine-xilinx-qemu.inc | |||
@@ -0,0 +1,49 @@ | |||
1 | # This include is used to setup default QEMU and qemuboot config for meta-xilinx | ||
2 | # machines. | ||
3 | |||
4 | # depend on qemu-helper-native, which will depend on QEMU | ||
5 | EXTRA_IMAGEDEPENDS += "qemu-helper-native" | ||
6 | |||
7 | def qemu_default_dtb(d): | ||
8 | if d.getVar("IMAGE_BOOT_FILES", True): | ||
9 | dtbs = d.getVar("IMAGE_BOOT_FILES", True).split(" ") | ||
10 | # IMAGE_BOOT_FILES has extra renaming info in the format '<source>;<target>' | ||
11 | dtbs = [f.split(";")[0] for f in dtbs] | ||
12 | dtbs = [f for f in dtbs if f.endswith(".dtb")] | ||
13 | if len(dtbs) != 0: | ||
14 | return dtbs[0] | ||
15 | if d.getVar("KERNEL_DEVICETREE", True): | ||
16 | dtbs = d.getVar("KERNEL_DEVICETREE", True).split(" ") | ||
17 | dtbs = [os.path.basename(d) for d in dtbs] | ||
18 | if len(dtbs) != 0: | ||
19 | return d.getVar("KERNEL_IMAGETYPE", True) + "-" + dtbs[0] | ||
20 | return "" | ||
21 | |||
22 | def qemu_default_serial(d): | ||
23 | if d.getVar("SERIAL_CONSOLE", True): | ||
24 | speed, console = d.getVar("SERIAL_CONSOLE", True).split(" ", 1) | ||
25 | # zynqmp uses earlycon and stdout (in dtb) | ||
26 | if "zynqmp" in d.getVar("MACHINEOVERRIDES", True).split(":"): | ||
27 | return "" | ||
28 | return "console=%s,%s earlyprintk" % (console, speed) | ||
29 | return "" | ||
30 | |||
31 | def qemu_target_binary(d): | ||
32 | ta = d.getVar("TARGET_ARCH", True) | ||
33 | if ta == "microblazeeb": | ||
34 | ta = "microblaze" | ||
35 | elif ta == "arm": | ||
36 | ta = "aarch64" | ||
37 | return "qemu-system-%s" % ta | ||
38 | |||
39 | def qemu_zynqmp_unhalt(d, multiarch): | ||
40 | if multiarch: | ||
41 | return "-global xlnx,zynqmp-boot.cpu-num=0 -global xlnx,zynqmp-boot.use-pmufw=true" | ||
42 | return "-device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4 -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4" | ||
43 | |||
44 | # For qemuboot, default setup across all machines in meta-xilinx | ||
45 | QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" | ||
46 | QB_DEFAULT_FSTYPE ?= "cpio" | ||
47 | QB_DTB ?= "${@qemu_default_dtb(d)}" | ||
48 | QB_KERNEL_CMDLINE_APPEND ?= "${@qemu_default_serial(d)}" | ||
49 | |||