for a while i've been wanting to be able to use my local.conf to point to 
different .xsa files for quick testing without having to make changes to the 
meta-xilinx-tools external-hdf.bbappend i have in my board bsp layer....   
problem is specifying the SRC_URI checksums (the files are kept in artifactory, 
http:// wget fetcher).
basically i've created a .bbappend to be able to specify the pathname on the 
server to fetch the .xsa file, part of the path includes the date, so i 
construct the pathname and the downloaded image as:
HDF_DATE ?= "<the current version that is good>"
PV = "${HDF_DATE}"
HDF_BASE = "http://";
HDF_NAME ?= "<the filename>"
HDF_PATH ?= "<the server>/<the path>/${PV}/${HDF_NAME}.<the extension>
SRC_URI = "${HDF_BASE}${HDF_PATH};downloadfilename=${HDF_NAME}_${PV}.<the 
extension>

this fetches the file to the DL_DIR with a unique name (they all have the same 
basename on the server), and the WORKDIR is uniquely named by PV.  in my 
local.conf i can specify the HDF_DATE to pick a particular design.

the issue is that SRC_URI[md5sum/sha256sum] needs to be provided.   what i 
thought should have worked is specifying a weak assignment for the checksums in 
the recipe for the default weak assignment (HDF_DATE) of the current design:
SRC_URI[md5sum] ?= "<the sum>"
SRC_URI[sha256sum] ?= "<the longer sum>"

and then in the local.conf file override the checksums:
HDF_DATE = "2020.11.18"
SRC_URI_pn-external-hdf[md5sum] = "<md5sum for 2020.11.18 design>"
SRC_URI_pn-external-hdf[sha256sum] = "<long sum for 2020.11.18>"

this doesn't seem to work correctly..... 'bitbake virtual/hdf' evaluates the 
checksums set weakly in the recipe bbappend as the sums when fetching rather 
than using the package name override in the conf file.....  i can't remove the 
SRC_URI checksums in the recipe because they apparently need to be set during 
the recipe parsing to start with vs being set at variable evaluation 
time....(not sure if i'm using the correct terminology)...

i was finally able to solve it with a bit of kludgery, but wondered if there 
was perhaps a better way that i'm missing.  the way i solved it was to specify 
in the recipe bbappend:
SRC_URI[md5sum] ?= "<something>"
SRC_URI[sha256sum] ?= "<something longer>"
HDF_MD5 ?= "<something>"
HDF_256 ?= "<something longer>"
python () {
d.setVarFlag('SRC_URI','md5sum',d.getVar("HDF_MD5"))
d.setVarFlag('SRC_URI','sha256sum',d.getVar("HDF_256"))
}

now in local.conf:
HDF_DATE = "<some date>"
HDF_MD5 = "<checksum>"
HDF_256 = "<longsum>"

and everything works.  default design is pulled from server in the absence of 
the variables in the local.conf, and the local.conf variables are correctly 
used as the 'current' version when desired.

is there some other mechanism that should work?  it seems kinda kludgy this 
way.  took me the day to figure out, i'm satisfied for now because it removes 
some manual processing when a new design is dropped on me for testing but was 
looking for something more elegant (seeming).
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#4784): 
https://lists.yoctoproject.org/g/meta-xilinx/message/4784
Mute This Topic: https://lists.yoctoproject.org/mt/78632911/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to