diff options
author | Mark Hatle <mark.hatle@amd.com> | 2023-01-13 18:20:24 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2023-01-16 07:26:08 -0800 |
commit | 94f89efa051df9b1444f2973db55ceb8cd1cc5fc (patch) | |
tree | 053f1633b16999b157c86e40631a751333191385 /meta-xilinx-standalone-experimental/recipes-core | |
parent | e3e0d0cff038cf9e31e78aaa0944d731078c7546 (diff) | |
download | meta-xilinx-94f89efa051df9b1444f2973db55ceb8cd1cc5fc.tar.gz |
meta-xilinx-setup: Rework dt-processor.sh to generate a machine and configs
lop-microblaze-yocto.dts has been modified to generate the file in a slightly
different format. There is no need for an intermediate representation for
the various microblaze tunings, instead use fixed names for pmc, psm and pmu
configurations.
dt-processor.sh was reworked to generate a machine.conf file and shrink the
amount of information that ends up in the local.conf file.
As part of this work the -m option has been renamed to -t. This option is
rarely used, so should not impact many users.
A new -m option is implemented to allow the user to manually name the
generated machine.conf file. Otherwise, it will discover the name from the
system device tree using the root 'compatible' object.
The tool will also print more useful diagnostics to the screen, this should
help ensure that the correct machine is being targeted by the actions and
improve early system debuggability.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-standalone-experimental/recipes-core')
-rw-r--r-- | meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup | 155 | ||||
-rwxr-xr-x | meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh | 301 |
2 files changed, 291 insertions, 165 deletions
diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup b/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup index 4dc5737f..0a5736d8 100644 --- a/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup +++ b/meta-xilinx-standalone-experimental/recipes-core/meta/files/README-setup | |||
@@ -7,19 +7,6 @@ if the setup script changes. | |||
7 | The steps in this document expect that you have already built the setup | 7 | The steps in this document expect that you have already built the setup |
8 | (meta-xilinx-setup) SDK, and installed it. | 8 | (meta-xilinx-setup) SDK, and installed it. |
9 | 9 | ||
10 | * Configure you local.conf | ||
11 | |||
12 | The following items should be in your conf/local.conf. This ensures that | ||
13 | the correct configurations are available, and the correct firmware version | ||
14 | is selected for this workflow. | ||
15 | |||
16 | # Instruct the system to use the decoupling firmware sources, | ||
17 | # add the following to the conf/local.conf: | ||
18 | PREFERRED_VERSION_fsbl-firmware = "2023.1_sdt_experimental%" | ||
19 | PREFERRED_VERSION_pmu-firmware = "2023.1_sdt_experimental%" | ||
20 | PREFERRED_VERSION_plm-firmware = "2023.1_sdt_experimental%" | ||
21 | PREFERRED_VERSION_psm-firmware = "2023.1_sdt_experimental%" | ||
22 | |||
23 | * Run the setup script | 10 | * Run the setup script |
24 | 11 | ||
25 | The setup environment should be run in a new shell (not the build shell) | 12 | The setup environment should be run in a new shell (not the build shell) |
@@ -28,64 +15,66 @@ to ensure that you do not contaminate the environment for your build. | |||
28 | We will assume below that the directory "prestep" was used for the SDK, | 15 | We will assume below that the directory "prestep" was used for the SDK, |
29 | however you may use any path you wish. | 16 | however you may use any path you wish. |
30 | 17 | ||
31 | # Source the SDK environment file | 18 | Source the SDK environment file |
32 | . <build>/prestep/environment-setup-x86_64-petalinux-linux | 19 | $ . <build>/prestep/environment-setup-x86_64-petalinux-linux |
33 | 20 | ||
34 | # Run the script from the same directory as this README | 21 | Run the script from the same directory as this README |
35 | <build>/prestep/dt-processor.sh -c <conf> -s <dtb> -l conf/local.conf | 22 | $ <build>/prestep/dt-processor.sh -c <conf> -s <dtb> -l conf/local.conf |
36 | 23 | ||
37 | # Note: The -l option will automatically add the necessary parameters to the | 24 | Note: The -l option will automatically add the necessary parameters to the |
38 | # local.conf file. If you need to re-run this comment, you just clear the | 25 | local.conf file. If you need to re-run this comment, you just clear the |
39 | # parameters from the end of the file. Without the -l option the items are | 26 | parameters from the end of the file. Without the -l option the items are |
40 | # printed to the screen and must be manually added to your conf/local.conf | 27 | printed to the screen and must be manually added to your conf/local.conf |
41 | 28 | ||
42 | # For example, zynqmp: | 29 | For example, zynqmp: |
43 | # ./prestep/dt-processor.sh -c conf -s /proj/yocto/zu-sdt/system-top.dts -l conf/local.conf | 30 | $ ./prestep/dt-processor.sh -c conf -s /proj/yocto/zcu102-sdt/system-top.dts -l conf/local.conf |
44 | # | 31 | |
45 | # The following will be written to the end of the conf/local.conf file | 32 | The following will be written to the end of the conf/local.conf file: |
46 | 33 | ||
47 | # Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere | 34 | # Each multiconfig will define it's own TMPDIR, this is the new default based |
48 | BASE_TMPDIR ?= "${TOPDIR}" | 35 | # on BASE_TMPDIR for the Linux build |
49 | require conf/cortexa53-zynqmp-linux.conf | 36 | TMPDIR = "${BASE_TMPDIR}/tmp" |
50 | SYSTEM_DTFILE = "/proj/yocto/zu-sdt/system-top.dts" | 37 | |
51 | BBMULTICONFIG += " cortexa53-0-zynqmp-fsbl-baremetal cortexa53-0-zynqmp-baremetal cortexa53-0-zynqmp-freertos cortexa53-1-zynqmp-baremetal cortexa53-1-zynqmp-freertos cortexa53-2-zynqmp-baremetal cortexa53-2-zynqmp-freertos cortexa53-3-zynqmp-baremetal cortexa53-3-zynqmp-freertos cortexr5-0-zynqmp-fsbl-baremetal cortexr5-0-zynqmp-baremetal cortexr5-0-zynqmp-freertos cortexr5-1-zynqmp-baremetal cortexr5-1-zynqmp-freertos microblaze-0-pmu" | 38 | # Use the newly generated MACHINE |
52 | FSBL_DEPENDS = "" | 39 | MACHINE = "xlnx-zynqmp-zcu102-rev1-0" |
53 | FSBL_MCDEPENDS = "mc::cortexa53-0-zynqmp-fsbl-baremetal:fsbl-firmware:do_deploy" | 40 | |
54 | FSBL_DEPLOY_DIR = "${BASE_TMPDIR}/tmp-cortexa53-0-zynqmp-fsbl-baremetal/deploy/images/${MACHINE}" | 41 | # All of the TMPDIRs must be in a common parent directory. This is defined |
55 | R5FSBL_DEPENDS = "" | 42 | # as BASE_TMPDIR. |
56 | R5FSBL_MCDEPENDS = "mc::cortexr5-0-zynqmp-fsbl-baremetal:fsbl-firmware:do_deploy" | 43 | # Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere, such as /tmp |
57 | R5FSBL_DEPLOY_DIR = "${BASE_TMPDIR}/tmp-cortexr5-0-zynqmp-fsbl-baremetal/deploy/images/${MACHINE}" | 44 | BASE_TMPDIR ?= "${TOPDIR}" |
58 | PMU_DEPENDS = "" | 45 | |
59 | PMU_MCDEPENDS = "mc::microblaze-0-pmu:pmu-firmware:do_deploy" | 46 | # The following is the full set of multiconfigs for this configuration |
60 | PMU_FIRMWARE_DEPLOY_DIR = "${BASE_TMPDIR}/tmp-microblaze-0-pmu/deploy/images/${MACHINE}" | 47 | # A large list can cause a slow parse. |
61 | 48 | BBMULTICONFIG = " cortexa53-0-zynqmp-fsbl-baremetal cortexa53-0-zynqmp-baremetal cortexa53-0-zynqmp-freertos cortexa53-1-zynqmp-baremetal cortexa53-1-zynqmp-freertos cortexa53-2-zynqmp-baremetal cortexa53-2-zynqmp-freertos cortexa53-3-zynqmp-baremetal cortexa53-3-zynqmp-freertos cortexr5-0-zynqmp-fsbl-baremetal cortexr5-0-zynqmp-baremetal cortexr5-0-zynqmp-freertos cortexr5-1-zynqmp-baremetal cortexr5-1-zynqmp-freertos microblaze-0-pmu" | |
62 | # | 49 | # Alternatively trim the list to the minimum |
63 | # OR | 50 | #BBMULTICONFIG = " cortexa53-0-zynqmp-fsbl-baremetal microblaze-0-pmu" |
64 | # | 51 | |
65 | # Versal: | 52 | |
66 | # ./prestep/dt-processor.sh -c conf -s /proj/yocto/versal-sdt/system-top.dts -l conf/local.conf | 53 | For example, versal: |
67 | # | 54 | $ ./prestep/dt-processor.sh -c conf -s /proj/yocto/vmk180-sdt/system-top.dts -l conf/local.conf |
68 | # The following will be written to the end of the conf/local.conf file | 55 | |
69 | 56 | The following will be written to the end of the conf/local.conf file: | |
70 | # Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere | 57 | |
71 | BASE_TMPDIR ?= "${TOPDIR}" | 58 | # Each multiconfig will define it's own TMPDIR, this is the new default based |
72 | require conf/cortexa72-versal-linux.conf | 59 | # on BASE_TMPDIR for the Linux build |
73 | SYSTEM_DTFILE = "/proj/yocto/versal_sdt/system-top.dts" | 60 | TMPDIR = "${BASE_TMPDIR}/tmp" |
74 | BBMULTICONFIG += " cortexa72-0-versal-baremetal cortexa72-0-versal-freertos cortexa72-1-versal-baremetal cortexa72-1-versal-freertos microblaze-0-pmc microblaze-0-psm cortexr5-0-versal-baremetal cortexr5-0-versal-freertos cortexr5-1-versal-baremetal cortexr5-1-versal-freertos" | 61 | |
75 | PLM_DEPENDS = "" | 62 | # Use the newly generated MACHINE |
76 | PLM_MCDEPENDS = "mc::microblaze-0-pmc:plm-firmware:do_deploy" | 63 | MACHINE = "xlnx-versal-vmk180-rev1-1-x-ebm-01-reva" |
77 | PLM_DEPLOY_DIR = "${BASE_TMPDIR}/tmp-microblaze-0-pmc/deploy/images/${MACHINE}" | 64 | |
78 | PSM_DEPENDS = "" | 65 | # All of the TMPDIRs must be in a common parent directory. This is defined |
79 | PSM_MCDEPENDS = "mc::microblaze-0-psm:psm-firmware:do_deploy" | 66 | # as BASE_TMPDIR. |
80 | PSM_FIRMWARE_DEPLOY_DIR = "${BASE_TMPDIR}/tmp-microblaze-0-psm/deploy/images/${MACHINE}" | 67 | # Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere, such as /tmp |
81 | PDI_PATH = "/proj/yocto/versal_sdt/project_1.pdi" | 68 | BASE_TMPDIR ?= "${TOPDIR}" |
82 | 69 | ||
83 | # NOTE: On versal, you MUST specify the PDI file as directed by the instructions. | 70 | # The following is the full set of multiconfigs for this configuration |
84 | # If the file is not found, it will put in a placeholder such as: | 71 | # A large list can cause a slow parse. |
85 | PDI_PATH = "__PATH TO PDI FILE HERE__" | 72 | BBMULTICONFIG = " cortexa72-0-versal-baremetal cortexa72-0-versal-freertos cortexa72-1-versal-baremetal cortexa72-1-versal-freertos microblaze-0-pmc microblaze-0-psm cortexr5-0-versal-baremetal cortexr5-0-versal-freertos cortexr5-1-versal-baremetal cortexr5-1-versal-freertos" |
86 | # This must be set to the path of the PDI file. | 73 | # Alternatively trim the list to the minimum |
87 | 74 | #BBMULTICONFIG = " microblaze-0-pmc microblaze-0-psm" | |
88 | # _EXIT THE NEW SHELL_ return the build environment | 75 | |
76 | |||
77 | You can now EXIT THE NEW SHELL return the build environment for the remaining steps. | ||
89 | 78 | ||
90 | * Bitbake Performance Note | 79 | * Bitbake Performance Note |
91 | 80 | ||
@@ -93,25 +82,21 @@ Each BBMULTICONFIG value requires all of the recipes to be parsed for that | |||
93 | configuration. Thus each multiconfig will add more parsing time. A long list | 82 | configuration. Thus each multiconfig will add more parsing time. A long list |
94 | can lead to a very slow parse (many minutes). To speed up parsing, it is | 83 | can lead to a very slow parse (many minutes). To speed up parsing, it is |
95 | suggested that you trim this down to only the configurations you require. | 84 | suggested that you trim this down to only the configurations you require. |
96 | Below is the minimum BBMULTICONFIG required: | 85 | A minimum configuration is included with the generated configuration. |
97 | |||
98 | zynqmp: | ||
99 | BBMULTICONFIG += " cortexa53-0-zynqmp-fsbl-baremetal microblaze-0-pmu" | ||
100 | |||
101 | versal: | ||
102 | BBMULTICONFIG += " microblaze-0-pmc microblaze-0-psm" | ||
103 | 86 | ||
104 | * Build your project | 87 | * Build your project |
88 | |||
105 | You should now be able to build your project normally. See the Yocto Project | 89 | You should now be able to build your project normally. See the Yocto Project |
106 | documentation if you have questions on how to work with the multiconfig | 90 | documentation if you have questions on how to work with the multiconfig |
107 | recipes. The following is a simple build for testing. | 91 | recipes. The following is a simple build for testing. |
108 | 92 | ||
109 | # In the original build shell | 93 | In the original build shell |
110 | # Build your Linux sytem: | 94 | Build your Linux sytem: |
111 | bitbake petalinux-image-minimal | 95 | $ bitbake petalinux-image-minimal |
96 | |||
97 | The output will be in tmp/deploy/images/... | ||
112 | 98 | ||
113 | # The output will be in tmp/deploy/images/... | 99 | If the system is QEMU capable execute QEMU using: |
100 | $ runqemu nographic slirp core-image-minimal | ||
114 | 101 | ||
115 | # If the system is QEMU capable execute QEMU using: | 102 | To terminate qemu, usually the command is ctrl-a x |
116 | runqemu nographic slirp core-image-minimal | ||
117 | # To terminate qemu, usually the command is ctrl-a x | ||
diff --git a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh b/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh index e51095f6..faaff808 100755 --- a/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh +++ b/meta-xilinx-standalone-experimental/recipes-core/meta/files/dt-processor.sh | |||
@@ -38,7 +38,8 @@ $0 | |||
38 | -d <domain_file> Path to domain file (.yml/.dts) | 38 | -d <domain_file> Path to domain file (.yml/.dts) |
39 | [-o <overlay_dtb>] Generate overlay dts | 39 | [-o <overlay_dtb>] Generate overlay dts |
40 | [-e <external_fpga>] Apply a partial overlay | 40 | [-e <external_fpga>] Apply a partial overlay |
41 | [-m <machine>] zynqmp or versal | 41 | [-m <machine_conf>] The name of the machine .conf to generate |
42 | [-t <machine>] Machine type: zynqmp or versal (usually auto detected) | ||
42 | [-p <psu_init_path>] Path to psu_init files, defaults to system_dtb path | 43 | [-p <psu_init_path>] Path to psu_init files, defaults to system_dtb path |
43 | [-i <pdu_path>] Path to the pdi file | 44 | [-i <pdu_path>] Path to the pdi file |
44 | [-l <config_file>] write local.conf changes to this file | 45 | [-l <config_file>] write local.conf changes to this file |
@@ -58,7 +59,8 @@ parse_args() { | |||
58 | o) overlay_dtb=$OPTARG ;; | 59 | o) overlay_dtb=$OPTARG ;; |
59 | d) domain_file=$OPTARG ;; | 60 | d) domain_file=$OPTARG ;; |
60 | e) external_fpga=$OPTARG ;; | 61 | e) external_fpga=$OPTARG ;; |
61 | m) machine=$OPTARG ;; | 62 | m) mach_conf=$OPTARG ; mach_conf=${mach_conf%%.conf} ;; |
63 | t) machine=$OPTARG ;; | ||
62 | p) psu_init_path=$OPTARG ;; | 64 | p) psu_init_path=$OPTARG ;; |
63 | i) pdi_path=$OPTARG ;; | 65 | i) pdi_path=$OPTARG ;; |
64 | l) localconf=$OPTARG ;; | 66 | l) localconf=$OPTARG ;; |
@@ -103,7 +105,7 @@ detect_machine() { | |||
103 | 105 | ||
104 | # Machine not provided and we cannot identify.. | 106 | # Machine not provided and we cannot identify.. |
105 | [ -z ${machine} ] && \ | 107 | [ -z ${machine} ] && \ |
106 | error "Unable to autodetect machine type, use -m to specify the machine." | 108 | error "Unable to autodetect machine type, use -t to specify the machine." |
107 | 109 | ||
108 | case ${machine} in | 110 | case ${machine} in |
109 | zynqmp | versal) : ;; | 111 | zynqmp | versal) : ;; |
@@ -111,13 +113,29 @@ detect_machine() { | |||
111 | esac | 113 | esac |
112 | } | 114 | } |
113 | 115 | ||
116 | dump_cpus() { | ||
117 | prefix="$1" | ||
118 | while read -r cpu core domain cpu_name os_hint; do | ||
119 | case ${cpu} in | ||
120 | \#*) ;; | ||
121 | \[*) ;; | ||
122 | pmu-microblaze) echo "${prefix}zynqmp-pmu ${cpu_name}" ;; | ||
123 | pmc-microblaze) echo "${prefix}versal-plm ${cpu_name}" ;; | ||
124 | psm-microblaze) echo "${prefix}versal-psm ${cpu_name}" ;; | ||
125 | xlnx,microblaze) echo "${prefix}microblaze ${core} ${cpu_name}";; | ||
126 | arm,*) echo "${prefix}${cpu/,/ } ${core} ${cpu_name}";; | ||
127 | *) echo "${prefix}${cpu} ${core} ${cpu_name}";; | ||
128 | esac | ||
129 | done <${cpulist} | ||
130 | } | ||
131 | |||
114 | cortex_a53_linux() { | 132 | cortex_a53_linux() { |
115 | info "cortex-a53 for Linux [ $1 ]" | 133 | info "cortex-a53 for Linux [ $1 ]" |
116 | 134 | ||
117 | if [ "$1" = "None" ]; then | 135 | if [ "$1" = "None" ]; then |
118 | dtb_file="cortexa53-${machine}-linux.dtb" | 136 | dtb_file="cortexa53-${machine}-linux.dtb" |
119 | dts_file="cortexa53-${machine}-linux.dts" | 137 | dts_file="cortexa53-${machine}-linux.dts" |
120 | system_conf=conf/cortexa53-${machine}-linux.conf | 138 | system_conf=${dtb_file} |
121 | conf_file=cortexa53-${machine}-linux.conf | 139 | conf_file=cortexa53-${machine}-linux.conf |
122 | else | 140 | else |
123 | dtb_file="cortexa53-${machine}-$1-linux.dtb" | 141 | dtb_file="cortexa53-${machine}-$1-linux.dtb" |
@@ -166,19 +184,15 @@ cortex_a53_linux() { | |||
166 | rm -f pl.dtsi lop-a53-imux.dts.dtb lop-domain-linux-a53.dts.dtb | 184 | rm -f pl.dtsi lop-a53-imux.dts.dtb lop-domain-linux-a53.dts.dtb |
167 | ) | 185 | ) |
168 | 186 | ||
187 | if [ "$1" = "None" ]; then | ||
188 | return $? | ||
189 | fi | ||
190 | |||
191 | ## Generate a multiconfig | ||
169 | cat <<EOF >"${conf_file}" | 192 | cat <<EOF >"${conf_file}" |
170 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 193 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
171 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
172 | 194 | ||
173 | MACHINE = "${machine}-generic" | 195 | TMPDIR = "\${BASE_TMPDIR}/tmp-${dtb_file%%.dtb}" |
174 | # We don't want the kernel to build us a device-tree | ||
175 | KERNEL_DEVICETREE:${machine}-generic = "" | ||
176 | # We need u-boot to use the one we passed in | ||
177 | DEVICE_TREE_NAME:pn-u-boot-xlnx-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | ||
178 | # Update bootbin to use proper device tree | ||
179 | BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | ||
180 | # Remap boot files to ensure the right device tree is listed first | ||
181 | IMAGE_BOOT_FILES = "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))} \${@get_default_image_boot_files(d)}" | ||
182 | EOF | 196 | EOF |
183 | } | 197 | } |
184 | 198 | ||
@@ -205,6 +219,7 @@ cortex_a53_baremetal() { | |||
205 | if [ "$1" = "fsbl" ]; then | 219 | if [ "$1" = "fsbl" ]; then |
206 | fsbl_mcdepends="mc::${dtb_file%%.dtb}:fsbl-firmware:do_deploy" | 220 | fsbl_mcdepends="mc::${dtb_file%%.dtb}:fsbl-firmware:do_deploy" |
207 | fsbl_deploy_dir="\${BASE_TMPDIR}/tmp-${dtb_file%%.dtb}/deploy/images/\${MACHINE}" | 221 | fsbl_deploy_dir="\${BASE_TMPDIR}/tmp-${dtb_file%%.dtb}/deploy/images/\${MACHINE}" |
222 | multiconf_min="${multiconf_min} cortexa53-$2-${machine}${suffix}-baremetal" | ||
208 | a53_fsbl_done=1 | 223 | a53_fsbl_done=1 |
209 | fi | 224 | fi |
210 | 225 | ||
@@ -251,7 +266,6 @@ EOF | |||
251 | fi | 266 | fi |
252 | cat <<EOF >>"${conf_file}" | 267 | cat <<EOF >>"${conf_file}" |
253 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 268 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
254 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
255 | 269 | ||
256 | ESW_MACHINE = "$3" | 270 | ESW_MACHINE = "$3" |
257 | DEFAULTTUNE = "cortexa53" | 271 | DEFAULTTUNE = "cortexa53" |
@@ -309,7 +323,6 @@ cortex_a53_freertos() { | |||
309 | 323 | ||
310 | cat <<EOF >"${conf_file}" | 324 | cat <<EOF >"${conf_file}" |
311 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 325 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
312 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
313 | 326 | ||
314 | ESW_MACHINE = "$3" | 327 | ESW_MACHINE = "$3" |
315 | DEFAULTTUNE = "cortexa53" | 328 | DEFAULTTUNE = "cortexa53" |
@@ -333,7 +346,7 @@ cortex_a72_linux() { | |||
333 | # Find the first file ending in .pdi | 346 | # Find the first file ending in .pdi |
334 | full_pdi_path=$(ls ${pdi_path}/*.pdi 2>/dev/null | head -n 1) | 347 | full_pdi_path=$(ls ${pdi_path}/*.pdi 2>/dev/null | head -n 1) |
335 | if [ -z "${full_pdi_path}" ]; then | 348 | if [ -z "${full_pdi_path}" ]; then |
336 | warn "Warning: Unable to find a pdi file in ${pdi_path}" | 349 | error "Unable to find a pdi file in ${pdi_path}, use the -i option to point to the directory containing a .pdi file" |
337 | full_pdi_path="__PATH TO PDI FILE HERE__" | 350 | full_pdi_path="__PATH TO PDI FILE HERE__" |
338 | elif [ "${full_pdi_path}" != "$(ls ${pdi_path}/*.pdi 2>/dev/null)" ]; then | 351 | elif [ "${full_pdi_path}" != "$(ls ${pdi_path}/*.pdi 2>/dev/null)" ]; then |
339 | warn "Warning: multiple PDI files found, using first found $(basename ${full_pdi_path})." | 352 | warn "Warning: multiple PDI files found, using first found $(basename ${full_pdi_path})." |
@@ -342,7 +355,7 @@ cortex_a72_linux() { | |||
342 | if [ "$1" = "None" ]; then | 355 | if [ "$1" = "None" ]; then |
343 | dtb_file="cortexa72-${machine}-linux.dtb" | 356 | dtb_file="cortexa72-${machine}-linux.dtb" |
344 | dts_file="cortexa72-${machine}-linux.dts" | 357 | dts_file="cortexa72-${machine}-linux.dts" |
345 | system_conf=conf/cortexa72-${machine}-linux.conf | 358 | system_conf=${dtb_file} |
346 | conf_file=cortexa72-${machine}-linux.conf | 359 | conf_file=cortexa72-${machine}-linux.conf |
347 | else | 360 | else |
348 | dtb_file="cortexa72-${machine}-$1-linux.dtb" | 361 | dtb_file="cortexa72-${machine}-$1-linux.dtb" |
@@ -392,19 +405,15 @@ cortex_a72_linux() { | |||
392 | rm -f pl.dtsi lop-a72-imux.dts.dtb lop-domain-a72.dts.dtb | 405 | rm -f pl.dtsi lop-a72-imux.dts.dtb lop-domain-a72.dts.dtb |
393 | ) | 406 | ) |
394 | 407 | ||
408 | if [ "$1" = "None" ]; then | ||
409 | return $? | ||
410 | fi | ||
411 | |||
412 | ## Generate a multiconfig | ||
395 | cat <<EOF >"${conf_file}" | 413 | cat <<EOF >"${conf_file}" |
396 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 414 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
397 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
398 | 415 | ||
399 | MACHINE = "${machine}-generic" | 416 | TMPDIR = "\${BASE_TMPDIR}/tmp-${dtb_file%%.dtb}" |
400 | # We don't want the kernel to build us a device-tree | ||
401 | KERNEL_DEVICETREE:${machine}-generic = "" | ||
402 | # We need u-boot to use the one we passed in | ||
403 | DEVICE_TREE_NAME:pn-u-boot-xlnx-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | ||
404 | # Update bootbin to use proper device tree | ||
405 | BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | ||
406 | # Remap boot files to ensure the right device tree is listed first | ||
407 | IMAGE_BOOT_FILES = "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))} \${@get_default_image_boot_files(d)}" | ||
408 | EOF | 417 | EOF |
409 | } | 418 | } |
410 | 419 | ||
@@ -448,7 +457,6 @@ cortex_a72_baremetal() { | |||
448 | 457 | ||
449 | cat <<EOF >"${conf_file}" | 458 | cat <<EOF >"${conf_file}" |
450 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 459 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
451 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
452 | 460 | ||
453 | ESW_MACHINE = "$3" | 461 | ESW_MACHINE = "$3" |
454 | DEFAULTTUNE = "cortexa72" | 462 | DEFAULTTUNE = "cortexa72" |
@@ -506,7 +514,6 @@ cortex_a72_freertos() { | |||
506 | 514 | ||
507 | cat <<EOF >"${conf_file}" | 515 | cat <<EOF >"${conf_file}" |
508 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 516 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
509 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
510 | 517 | ||
511 | ESW_MACHINE = "$3" | 518 | ESW_MACHINE = "$3" |
512 | DEFAULTTUNE = "cortexa72" | 519 | DEFAULTTUNE = "cortexa72" |
@@ -593,7 +600,6 @@ EOF | |||
593 | fi | 600 | fi |
594 | cat <<EOF >>"${conf_file}" | 601 | cat <<EOF >>"${conf_file}" |
595 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 602 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
596 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
597 | 603 | ||
598 | ESW_MACHINE = "$3" | 604 | ESW_MACHINE = "$3" |
599 | DEFAULTTUNE = "cortexr5" | 605 | DEFAULTTUNE = "cortexr5" |
@@ -651,7 +657,6 @@ cortex_r5_freertos() { | |||
651 | 657 | ||
652 | cat <<EOF >"${conf_file}" | 658 | cat <<EOF >"${conf_file}" |
653 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 659 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
654 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
655 | 660 | ||
656 | ESW_MACHINE = "$3" | 661 | ESW_MACHINE = "$3" |
657 | DEFAULTTUNE = "cortexr5" | 662 | DEFAULTTUNE = "cortexr5" |
@@ -676,12 +681,15 @@ process_microblaze() { | |||
676 | 681 | ||
677 | info "Generating microblaze processor tunes" | 682 | info "Generating microblaze processor tunes" |
678 | 683 | ||
684 | mkdir -p machine/include | ||
679 | ( | 685 | ( |
680 | cd dtb || error "Unable to cd to dtb dir" | 686 | cd dtb || error "Unable to cd to dtb dir" |
681 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-microblaze-yocto.dts" "${system_dtb}" \ | 687 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-microblaze-yocto.dts" "${system_dtb}" \ |
682 | || error "lopper failed" | 688 | || error "lopper failed" |
683 | rm -f lop-microblaze-yocto.dts.dtb | 689 | rm -f lop-microblaze-yocto.dts.dtb |
684 | ) >microblaze.conf | 690 | ) >machine/include/${mach_conf}-microblaze.inc |
691 | |||
692 | echo "require conf/machine/include/xilinx-microblaze.inc" >> machine/include/${mach_conf}-microblaze.inc | ||
685 | 693 | ||
686 | microblaze_done=1 | 694 | microblaze_done=1 |
687 | } | 695 | } |
@@ -694,6 +702,7 @@ pmu-microblaze() { | |||
694 | 702 | ||
695 | dtb_file="microblaze-0-pmu.dtb" | 703 | dtb_file="microblaze-0-pmu.dtb" |
696 | multiconf="${multiconf} microblaze-0-pmu" | 704 | multiconf="${multiconf} microblaze-0-pmu" |
705 | multiconf_min="${multiconf_min} microblaze-0-pmu" | ||
697 | conf_file="multiconfig/microblaze-0-pmu.conf" | 706 | conf_file="multiconfig/microblaze-0-pmu.conf" |
698 | libxil="multiconfig/includes/microblaze-pmu-libxil.conf" | 707 | libxil="multiconfig/includes/microblaze-pmu-libxil.conf" |
699 | distro="multiconfig/includes/microblaze-pmu-distro.conf" | 708 | distro="multiconfig/includes/microblaze-pmu-distro.conf" |
@@ -721,13 +730,10 @@ pmu-microblaze() { | |||
721 | 730 | ||
722 | cat <<EOF >"${conf_file}" | 731 | cat <<EOF >"${conf_file}" |
723 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 732 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
724 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
725 | 733 | ||
726 | ESW_MACHINE = "$1" | 734 | ESW_MACHINE = "$1" |
727 | 735 | ||
728 | require conf/microblaze.conf | 736 | DEFAULTTUNE = "microblaze-pmu" |
729 | DEFAULTTUNE = "microblaze" | ||
730 | TUNE_FEATURES:tune-microblaze:forcevariable = "\${TUNE_FEATURES:tune-pmu-microblaze}" | ||
731 | 737 | ||
732 | TARGET_CFLAGS += "-DPSU_PMU=1U" | 738 | TARGET_CFLAGS += "-DPSU_PMU=1U" |
733 | 739 | ||
@@ -752,6 +758,7 @@ pmc-microblaze() { | |||
752 | 758 | ||
753 | dtb_file="microblaze-0-pmc.dtb" | 759 | dtb_file="microblaze-0-pmc.dtb" |
754 | multiconf="${multiconf} microblaze-0-pmc" | 760 | multiconf="${multiconf} microblaze-0-pmc" |
761 | multiconf_min="${multiconf_min} microblaze-0-pmc" | ||
755 | conf_file="multiconfig/microblaze-0-pmc.conf" | 762 | conf_file="multiconfig/microblaze-0-pmc.conf" |
756 | libxil="multiconfig/includes/microblaze-pmc-libxil.conf" | 763 | libxil="multiconfig/includes/microblaze-pmc-libxil.conf" |
757 | distro="multiconfig/includes/microblaze-pmc-distro.conf" | 764 | distro="multiconfig/includes/microblaze-pmc-distro.conf" |
@@ -779,13 +786,10 @@ pmc-microblaze() { | |||
779 | 786 | ||
780 | cat <<EOF >"${conf_file}" | 787 | cat <<EOF >"${conf_file}" |
781 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 788 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
782 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
783 | 789 | ||
784 | ESW_MACHINE = "$1" | 790 | ESW_MACHINE = "$1" |
785 | 791 | ||
786 | require conf/microblaze.conf | 792 | DEFAULTTUNE = "microblaze-pmc" |
787 | DEFAULTTUNE = "microblaze" | ||
788 | TUNE_FEATURES:tune-microblaze:forcevariable = "\${TUNE_FEATURES:tune-pmc-microblaze}" | ||
789 | 793 | ||
790 | TARGET_CFLAGS += "-DVERSAL_PLM=1" | 794 | TARGET_CFLAGS += "-DVERSAL_PLM=1" |
791 | 795 | ||
@@ -810,6 +814,7 @@ psm-microblaze() { | |||
810 | 814 | ||
811 | dtb_file="microblaze-0-psm.dtb" | 815 | dtb_file="microblaze-0-psm.dtb" |
812 | multiconf="${multiconf} microblaze-0-psm" | 816 | multiconf="${multiconf} microblaze-0-psm" |
817 | multiconf_min="${multiconf_min} microblaze-0-psm" | ||
813 | conf_file="multiconfig/microblaze-0-psm.conf" | 818 | conf_file="multiconfig/microblaze-0-psm.conf" |
814 | libxil="multiconfig/includes/microblaze-psm-libxil.conf" | 819 | libxil="multiconfig/includes/microblaze-psm-libxil.conf" |
815 | distro="multiconfig/includes/microblaze-psm-distro.conf" | 820 | distro="multiconfig/includes/microblaze-psm-distro.conf" |
@@ -837,13 +842,10 @@ psm-microblaze() { | |||
837 | 842 | ||
838 | cat <<EOF >"${conf_file}" | 843 | cat <<EOF >"${conf_file}" |
839 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" | 844 | CONFIG_DTFILE = "\${TOPDIR}/conf/dtb/${dtb_file}" |
840 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
841 | 845 | ||
842 | ESW_MACHINE = "$1" | 846 | ESW_MACHINE = "$1" |
843 | 847 | ||
844 | require conf/microblaze.conf | 848 | DEFAULTTUNE = "microblaze-psm" |
845 | DEFAULTTUNE = "microblaze" | ||
846 | TUNE_FEATURES:tune-microblaze:forcevariable = "\${TUNE_FEATURES:tune-psm-microblaze}" | ||
847 | 849 | ||
848 | TARGET_CFLAGS += "-DVERSAL_psm=1" | 850 | TARGET_CFLAGS += "-DVERSAL_psm=1" |
849 | 851 | ||
@@ -860,9 +862,137 @@ SKIP_META_TPM_SANITY_CHECK = "1" | |||
860 | EOF | 862 | EOF |
861 | } | 863 | } |
862 | 864 | ||
863 | parse_cpus() { | 865 | generate_machine() { |
864 | info "Generating configuration..." | 866 | info "Generating machine conf file" |
867 | conf_file="machine/${mach_conf}.conf" | ||
868 | mkdir -p machine | ||
869 | # Generate header | ||
870 | cat <<EOF >"${conf_file}" | ||
871 | #@TYPE: Machine | ||
872 | #@NAME: ${mach_conf} | ||
873 | #@DESCRIPTION: ${model} | ||
874 | |||
875 | #### Preamble | ||
876 | MACHINEOVERRIDES =. "\${@['', '${mach_conf}:']['${mach_conf}' != '\${MACHINE}']}" | ||
877 | #### Regular settings follow | ||
878 | |||
879 | EOF | ||
880 | |||
881 | if [ "${machine}" == "zynqmp" ]; then | ||
882 | cat <<EOF >>"${conf_file}" | ||
883 | TUNEFILE[microblaze-pmu] = "conf/machine/include/${mach_conf}-microblaze.inc" | ||
884 | EOF | ||
885 | elif [ "${machine}" == "versal" ]; then | ||
886 | cat <<EOF >>"${conf_file}" | ||
887 | TUNEFILE[microblaze-pmc] = "conf/machine/include/${mach_conf}-microblaze.inc" | ||
888 | TUNEFILE[microblaze-psm] = "conf/machine/include/${mach_conf}-microblaze.inc" | ||
889 | EOF | ||
890 | fi | ||
891 | |||
892 | sysdt_path=$(dirname ${system_dtb}) | ||
893 | sysdt_base=$(basename ${system_dtb}) | ||
894 | cat <<EOF >>"${conf_file}" | ||
895 | |||
896 | # Set the default (linux) domain device tree | ||
897 | CONFIG_DTFILE ?= "\${TOPDIR}/conf/dtb/${system_conf}" | ||
898 | CONFIG_DTFILE[vardepsexclude] += "TOPDIR" | ||
899 | |||
900 | require conf/machine/${machine}-generic.conf | ||
901 | |||
902 | # System Device Tree does not use HDF_MACHINE | ||
903 | HDF_MACHINE = "" | ||
904 | |||
905 | # Set the system device trees | ||
906 | SYSTEM_DTFILE_DIR = "${sysdt_path}" | ||
907 | SYSTEM_DTFILE = "\${SYSTEM_DTFILE_DIR}/${sysdt_base}" | ||
908 | SYSTEM_DTFILE[vardepsexclude] += "SYSTEM_DTFILE_DIR" | ||
865 | 909 | ||
910 | EOF | ||
911 | |||
912 | if [ -n "${fsbl_mcdepends}" ]; then | ||
913 | cat <<EOF >>"${conf_file}" | ||
914 | # First Stage Boot Loader | ||
915 | FSBL_DEPENDS = "" | ||
916 | FSBL_MCDEPENDS = "${fsbl_mcdepends}" | ||
917 | FSBL_DEPLOY_DIR = "${fsbl_deploy_dir}" | ||
918 | |||
919 | EOF | ||
920 | fi | ||
921 | if [ -n "${r5fsbl_mcdepends}" ]; then | ||
922 | cat <<EOF >>"${conf_file}" | ||
923 | # Cortex-R5 First Stage Boot Loader | ||
924 | R5FSBL_DEPENDS = "" | ||
925 | R5FSBL_MCDEPENDS = "${r5fsbl_mcdepends}" | ||
926 | R5FSBL_DEPLOY_DIR = "${r5fsbl_deploy_dir}" | ||
927 | |||
928 | EOF | ||
929 | fi | ||
930 | if [ -n "${pmu_mcdepends}" ]; then | ||
931 | cat <<EOF >>"${conf_file}" | ||
932 | # PMU Firware | ||
933 | PMU_DEPENDS = "" | ||
934 | PMU_MCDEPENDS = "${pmu_mcdepends}" | ||
935 | PMU_FIRMWARE_DEPLOY_DIR = "${pmu_firmware_deploy_dir}" | ||
936 | |||
937 | EOF | ||
938 | fi | ||
939 | if [ -n "${plm_mcdepends}" ]; then | ||
940 | cat <<EOF >>"${conf_file}" | ||
941 | # Platform Loader and Manager | ||
942 | PLM_DEPENDS = "" | ||
943 | PLM_MCDEPENDS = "${plm_mcdepends}" | ||
944 | PLM_DEPLOY_DIR = "${plm_deploy_dir}" | ||
945 | |||
946 | EOF | ||
947 | fi | ||
948 | if [ -n "${psm_mcdepends}" ]; then | ||
949 | cat <<EOF >>"${conf_file}" | ||
950 | # PSM Firmware | ||
951 | PSM_DEPENDS = "" | ||
952 | PSM_MCDEPENDS = "${psm_mcdepends}" | ||
953 | PSM_FIRMWARE_DEPLOY_DIR = "${psm_firmware_deploy_dir}" | ||
954 | |||
955 | EOF | ||
956 | fi | ||
957 | |||
958 | if [ -n "${full_pdi_path}" ]; then | ||
959 | pdi_path_dir=$(dirname ${full_pdi_path}) | ||
960 | pdi_path_base=$(basename ${full_pdi_path}) | ||
961 | cat <<EOF >>"${conf_file}" | ||
962 | # Versal PDI | ||
963 | PDI_PATH_DIR = "${pdi_path_dir}" | ||
964 | PDI_PATH = "\${PDI_PATH_DIR}/${pdi_path_base}" | ||
965 | PDI_PATH[vardepsexclude] += "PDI_PATH_DIR" | ||
966 | |||
967 | EOF | ||
968 | fi | ||
969 | |||
970 | cat <<EOF >>"${conf_file}" | ||
971 | # Enable the correct version of the firmware components | ||
972 | PREFERRED_VERSION_fsbl-firmware = "2023.1_sdt_experimental%" | ||
973 | PREFERRED_VERSION_pmu-firmware = "2023.1_sdt_experimental%" | ||
974 | PREFERRED_VERSION_plm-firmware = "2023.1_sdt_experimental%" | ||
975 | PREFERRED_VERSION_psm-firmware = "2023.1_sdt_experimental%" | ||
976 | |||
977 | # Exclude BASE_TMPDIR from hash calculations | ||
978 | BB_HASHEXCLUDE_COMMON:append = " BASE_TMPDIR" | ||
979 | |||
980 | # We don't want the kernel to build us a device-tree | ||
981 | KERNEL_DEVICETREE:example-sdt = "" | ||
982 | # We need u-boot to use the one we passed in | ||
983 | DEVICE_TREE_NAME:pn-u-boot-xlnx-scr = "\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | ||
984 | # Update bootbin to use proper device tree | ||
985 | BIF_PARTITION_IMAGE[device-tree] = "\${RECIPE_SYSROOT}/boot/devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | ||
986 | # Remap boot files to ensure the right device tree is listed first | ||
987 | IMAGE_BOOT_FILES =+ "devicetree/\${@os.path.basename(d.getVar('CONFIG_DTFILE'))}" | ||
988 | |||
989 | #### No additional settings should be after the Postamble | ||
990 | #### Postamble | ||
991 | PACKAGE_EXTRA_ARCHS:append = "\${@['', ' ${mach_conf//-/_}']['${mach_conf}' != "\${MACHINE}"]}" | ||
992 | EOF | ||
993 | } | ||
994 | |||
995 | parse_cpus() { | ||
866 | gen_linux_dtb="None" | 996 | gen_linux_dtb="None" |
867 | while read -r cpu core domain cpu_name os_hint; do | 997 | while read -r cpu core domain cpu_name os_hint; do |
868 | # Skip commented lines and WARNINGs | 998 | # Skip commented lines and WARNINGs |
@@ -976,38 +1106,26 @@ parse_cpus() { | |||
976 | } | 1106 | } |
977 | 1107 | ||
978 | gen_local_conf() { | 1108 | gen_local_conf() { |
979 | echo "# Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere" >> $1 | 1109 | cat << EOF >> $1 |
980 | echo "BASE_TMPDIR ?= \"\${TOPDIR}\"" >> $1 | 1110 | |
981 | [ -n "${system_conf}" ] && echo "require ${system_conf}" >> $1 | 1111 | # Each multiconfig will define it's own TMPDIR, this is the new default based |
982 | echo "SYSTEM_DTFILE = \"${system_dtb}\"" >> $1 | 1112 | # on BASE_TMPDIR for the Linux build |
983 | echo "BBMULTICONFIG += \"${multiconf}\"" >> $1 | 1113 | TMPDIR = "\${BASE_TMPDIR}/tmp" |
984 | if [ -n "${fsbl_mcdepends}" ]; then | 1114 | |
985 | echo "FSBL_DEPENDS = \"\"" >> $1 | 1115 | # Use the newly generated MACHINE |
986 | echo "FSBL_MCDEPENDS = \"${fsbl_mcdepends}\"" >> $1 | 1116 | MACHINE = "${mach_conf}" |
987 | echo "FSBL_DEPLOY_DIR = \"${fsbl_deploy_dir}\"" >> $1 | 1117 | |
988 | fi | 1118 | # All of the TMPDIRs must be in a common parent directory. This is defined |
989 | if [ -n "${r5fsbl_mcdepends}" ]; then | 1119 | # as BASE_TMPDIR. |
990 | echo "R5FSBL_DEPENDS = \"\"" >> $1 | 1120 | # Adjust BASE_TMPDIR if you want to move the tmpdirs elsewhere, such as /tmp |
991 | echo "R5FSBL_MCDEPENDS = \"${r5fsbl_mcdepends}\"" >> $1 | 1121 | BASE_TMPDIR ?= "\${TOPDIR}" |
992 | echo "R5FSBL_DEPLOY_DIR = \"${r5fsbl_deploy_dir}\"" >> $1 | 1122 | |
993 | fi | 1123 | # The following is the full set of multiconfigs for this configuration |
994 | if [ -n "${pmu_mcdepends}" ]; then | 1124 | # A large list can cause a slow parse. |
995 | echo "PMU_DEPENDS = \"\"" >> $1 | 1125 | BBMULTICONFIG = "${multiconf}" |
996 | echo "PMU_MCDEPENDS = \"${pmu_mcdepends}\"" >> $1 | 1126 | # Alternatively trim the list to the minimum |
997 | echo "PMU_FIRMWARE_DEPLOY_DIR = \"${pmu_firmware_deploy_dir}\"" >> $1 | 1127 | #BBMULTICONFIG = "${multiconf_min}" |
998 | fi | 1128 | EOF |
999 | if [ -n "${plm_mcdepends}" ]; then | ||
1000 | echo "PLM_DEPENDS = \"\"" >> $1 | ||
1001 | echo "PLM_MCDEPENDS = \"${plm_mcdepends}\"" >> $1 | ||
1002 | echo "PLM_DEPLOY_DIR = \"${plm_deploy_dir}\"" >> $1 | ||
1003 | fi | ||
1004 | if [ -n "${psm_mcdepends}" ]; then | ||
1005 | echo "PSM_DEPENDS = \"\"" >> $1 | ||
1006 | echo "PSM_MCDEPENDS = \"${psm_mcdepends}\"" >> $1 | ||
1007 | echo "PSM_FIRMWARE_DEPLOY_DIR = \"${psm_firmware_deploy_dir}\"" >> $1 | ||
1008 | fi | ||
1009 | [ "${machine}" = "versal" ] && echo "PDI_PATH = \"${full_pdi_path}\"" >> $1 | ||
1010 | echo | ||
1011 | } | 1129 | } |
1012 | 1130 | ||
1013 | gen_petalinux_conf() { | 1131 | gen_petalinux_conf() { |
@@ -1036,9 +1154,21 @@ multiconf="" | |||
1036 | cpulist=$(mktemp) | 1154 | cpulist=$(mktemp) |
1037 | 1155 | ||
1038 | priordir=$(pwd) | 1156 | priordir=$(pwd) |
1039 | # Generate CPU list | ||
1040 | cd "${config_dir}" || exit | 1157 | cd "${config_dir}" || exit |
1041 | mkdir -p dtb multiconfig/includes | 1158 | mkdir -p dtb multiconfig/includes |
1159 | # Get mach_conf name and model name | ||
1160 | ( | ||
1161 | cd dtb || error "Unable to cd to dtb dir" | ||
1162 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-machine-name.dts" "${system_dtb}" \ | ||
1163 | /dev/null > ${cpulist} || error "lopper failed" | ||
1164 | rm -f "lop-machine-name.dts.dtb" | ||
1165 | ) | ||
1166 | read local_mach_conf model < ${cpulist} | ||
1167 | if [ -z "${mach_conf}" ]; then | ||
1168 | mach_conf=${local_mach_conf} | ||
1169 | fi | ||
1170 | |||
1171 | # Generate CPU list | ||
1042 | ( | 1172 | ( |
1043 | cd dtb || error "Unable to cd to dtb dir" | 1173 | cd dtb || error "Unable to cd to dtb dir" |
1044 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-xilinx-id-cpus.dts" "${system_dtb}" \ | 1174 | LOPPER_DTC_FLAGS="-b 0 -@" ${lopper} -f --enhanced -i "${lops_dir}/lop-xilinx-id-cpus.dts" "${system_dtb}" \ |
@@ -1048,8 +1178,19 @@ mkdir -p dtb multiconfig/includes | |||
1048 | 1178 | ||
1049 | detect_machine | 1179 | detect_machine |
1050 | 1180 | ||
1181 | echo "System Configuration:" | ||
1182 | echo "MODEL = \"${model}\"" | ||
1183 | echo "MACHINE = \"${mach_conf}\"" | ||
1184 | echo "SOC_FAMILY = \"${machine}\"" | ||
1185 | echo "CPUs:" | ||
1186 | dump_cpus " = " | ||
1187 | echo | ||
1188 | |||
1189 | info "Generating configuration..." | ||
1051 | parse_cpus | 1190 | parse_cpus |
1052 | 1191 | ||
1192 | generate_machine | ||
1193 | |||
1053 | cd ${priordir} | 1194 | cd ${priordir} |
1054 | if [ -z "${localconf}" ]; then | 1195 | if [ -z "${localconf}" ]; then |
1055 | echo | 1196 | echo |