Hi JD, > -----Original Message----- > From: Jean-Francois Dagenais <[email protected]> > Sent: Tuesday, July 9, 2019 8:45 AM > To: [email protected]; git <[email protected]> > Cc: Jean-Francois Dagenais <[email protected]> > Subject: [meta-xilinx-tools][RFC][patch 1/3] xilinx-bootbin: rename > BIF_PARTITION_ATTR to BIF_PARTITIONS for clarity > > Using BIF_PARTITION_ATTR main variable as the list of partitions is a > reuse of the variable which makes the definition and code much harder to > read and understand. Simply renaming the list of partitions as > BIF_PARTITIONS alleviates this completely. > > Signed-off-by: Jean-Francois Dagenais <[email protected]> > --- > README.md | 2 +- > recipes-bsp/bootbin/machine-xilinx-versal.inc | 2 +- > recipes-bsp/bootbin/machine-xilinx-zynq.inc | 4 ++-- > recipes-bsp/bootbin/machine-xilinx-zynqmp.inc | 4 ++-- > recipes-bsp/bootbin/xilinx-bootbin_1.0.bb | 14 +++++++------- > 5 files changed, 13 insertions(+), 13 deletions(-) > > diff --git a/README.md b/README.md > index 65f6623..e4091e5 100644 > --- a/README.md > +++ b/README.md > @@ -83,7 +83,7 @@ Examples for adding dependencies > > See https://github.com/Xilinx/meta-xilinx-tools/blob/master/recipes- > bsp/bootbin/machine-xilinx-zynq.inc > > -BIF_PARTITION_ATTR= "fsbl u-boot" > +BIF_PARTITIONS= "fsbl u-boot" >
The reason to keep the variable name as "BIF partition attributes" is to match with the user guide of bootgen. https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_1/ug1283-bootgen-user-guide.pdf > BIF_PARTITION_ATTR[fsbl]="bootloader" > > diff --git a/recipes-bsp/bootbin/machine-xilinx-versal.inc b/recipes- > bsp/bootbin/machine-xilinx-versal.inc > index 2cdaee7..8304448 100644 > --- a/recipes-bsp/bootbin/machine-xilinx-versal.inc > +++ b/recipes-bsp/bootbin/machine-xilinx-versal.inc > @@ -8,7 +8,7 @@ DEPENDS += "virtual/cdo" > BIF_COMMON_ATTR ?= "" > > # specify BIF partition attributes required for BOOT.bin > -BIF_PARTITION_ATTR ?= "pmc_cdo plm psm dtb u-boot atf" > +BIF_PARTITIONS ?= "pmc_cdo plm psm dtb u-boot atf" > > # specify BIF partition attributes for pmc_cdo > BIF_PARTITION_ATTR[pmc_cdo] ?= "pmcdata,load=0xF2000000" > diff --git a/recipes-bsp/bootbin/machine-xilinx-zynq.inc b/recipes- > bsp/bootbin/machine-xilinx-zynq.inc > index b8d75c4..6ced4c3 100644 > --- a/recipes-bsp/bootbin/machine-xilinx-zynq.inc > +++ b/recipes-bsp/bootbin/machine-xilinx-zynq.inc > @@ -1,5 +1,5 @@ > #specify BIF partition attributes required for BOOT.bin > -BIF_PARTITION_ATTR ?= "fsbl bitstream u-boot" > +BIF_PARTITIONS ?= "fsbl bitstream u-boot" > > #specify BIF partition attributes for FSBL > #bootloader is FSBL. Location where FSBL binary is present and dependency to > build FSBL > @@ -12,6 +12,6 @@ BIF_PARTITION_DEPENDS[fsbl] ?= "virtual/fsbl:do_deploy" > BIF_PARTITION_IMAGE[u-boot] ?= "${DEPLOY_DIR_IMAGE}/u-boot- > ${MACHINE}.elf" > BIF_PARTITION_DEPENDS[u-boot] ?= "virtual/bootloader:do_deploy" > > -# enable bitstream-Note this is not enabled by default (missing in > BIF_PARTITION_ATTR) > +# enable bitstream-Note this is not enabled by default (missing in > BIF_PARTITIONS) > BIF_PARTITION_IMAGE[bitstream] ?= "${DEPLOY_DIR_IMAGE}/download- > ${MACHINE}.bit" > BIF_PARTITION_DEPENDS[bitstream] ?= "virtual/bitstream:do_deploy" > diff --git a/recipes-bsp/bootbin/machine-xilinx-zynqmp.inc b/recipes- > bsp/bootbin/machine-xilinx-zynqmp.inc > index 3cc2f8b..4d70590 100644 > --- a/recipes-bsp/bootbin/machine-xilinx-zynqmp.inc > +++ b/recipes-bsp/bootbin/machine-xilinx-zynqmp.inc > @@ -2,7 +2,7 @@ > BIF_COMMON_ATTR ?= "" > > # specify BIF partition attributes required for BOOT.bin > -BIF_PARTITION_ATTR ?= "fsbl pmu atf u-boot" > +BIF_PARTITIONS ?= "fsbl pmu atf u-boot" > > # specify BIF partition attributes for FSBL > # bootloader is FSBL. Location where FSBL binary is present and dependency to > build FSBL > @@ -28,7 +28,7 @@ BIF_PARTITION_ATTR[u-boot] ?= "destination_cpu=a53- > 0,exception_level=el-2" > BIF_PARTITION_IMAGE[u-boot] ?= "${DEPLOY_DIR_IMAGE}/u-boot- > ${MACHINE}.elf" > BIF_PARTITION_DEPENDS[u-boot] ?= "virtual/bootloader:do_deploy" > > -# enable bitstream-Note this is not enabled by default (missing in > BIF_PARTITION_ATTR) > +# enable bitstream-Note this is not enabled by default (missing in > BIF_PARTITIONS) > BIF_PARTITION_ATTR[bitstream] ?= "destination_device=pl" > BIF_PARTITION_IMAGE[bitstream] ?= "${DEPLOY_DIR_IMAGE}/download- > ${MACHINE}.bit" > BIF_PARTITION_DEPENDS[bitstream] ?= "virtual/bitstream:do_deploy" > diff --git a/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb b/recipes- > bsp/bootbin/xilinx-bootbin_1.0.bb > index 1fb8d99..979c737 100644 > --- a/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb > +++ b/recipes-bsp/bootbin/xilinx-bootbin_1.0.bb > @@ -19,7 +19,7 @@ BIF_FILE_PATH ?= "${B}/bootgen.bif" > > BOOTGEN_EXTRA_ARGS ?= "" > > -BIF_PARTITION_ATTR_zynqmp = "${@'fsbl pmu atf u-boot' if > d.getVar('FPGA_MNGR_RECONFIG_ENABLE') == '1' else 'fsbl bitstream pmu atf > u-boot'}" > +BIF_PARTITIONS_zynqmp = "${@'fsbl pmu atf u-boot' if > d.getVar('FPGA_MNGR_RECONFIG_ENABLE') == '1' else 'fsbl bitstream pmu atf > u-boot'}" > > do_fetch[noexec] = "1" > do_unpack[noexec] = "1" > @@ -27,11 +27,11 @@ do_patch[noexec] = "1" > > def get_bootbin_depends(d): > bootbindeps = "" > - bifpartition = (d.getVar("BIF_PARTITION_ATTR", True) or "").split() > + bifpartitions = (d.getVar("BIF_PARTITIONS", True) or "").split() > attrdepends = d.getVarFlags("BIF_PARTITION_DEPENDS") or {} > - for cfg in bifpartition: > - if cfg in attrdepends: > - bootbindeps = bootbindeps + " " + attrdepends[cfg] > + for partition in bifpartitions: > + if partition in attrdepends: > + bootbindeps = bootbindeps + " " + attrdepends[partition] > Agree, we could use better variable naming here, maybe it should have been "attribute" instead of "cfg" > return bootbindeps > > @@ -74,7 +74,7 @@ python do_configure() { > attrflags = d.getVarFlags("BIF_COMMON_ATTR") or {} > create_bif(bifattr, attrflags,'', 1, biffd, d) > > - bifpartition = (d.getVar("BIF_PARTITION_ATTR", True) or "").split() > + bifpartition = (d.getVar("BIF_PARTITIONS", True) or "").split() > if bifpartition: > attrflags = d.getVarFlags("BIF_PARTITION_ATTR") or {} > attrimage = d.getVarFlags("BIF_PARTITION_IMAGE") or {} > @@ -84,7 +84,7 @@ python do_configure() { > biffd.close() > } > > -do_configure[vardeps] += "BIF_PARTITION_ATTR BIF_PARTITION_IMAGE > BIF_COMMON_ATTR" > +do_configure[vardeps] += "BIF_PARTITIONS BIF_PARTITION_ATTR > BIF_PARTITION_IMAGE BIF_COMMON_ATTR" > Thanks, Manju -- _______________________________________________ meta-xilinx mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-xilinx
