hardknott: fsl-eula-unpack: sync with meta-imx hardknott-5.10.72-2.2.0 branch

This .bbclass is outdated and no longer used in any of NXP's recipes, so remove
it

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
This commit is contained in:
Gabriel Valcazar 2021-12-21 12:16:41 +01:00
parent 046ed3f1f2
commit 8d51d35236
1 changed files with 0 additions and 68 deletions

View File

@ -1,68 +0,0 @@
# fsl-eula-unpack.bbclass provides the mechanism used for unpacking
# the .bin file downloaded by HTTP and handle the EULA acceptance.
#
# To use it, the 'fsl-eula' parameter needs to be added to the
# SRC_URI entry, e.g:
#
# SRC_URI = "${FSL_MIRROR}/firmware-imx-${PV};fsl-eula=true"
LIC_FILES_CHKSUM_append = " file://${FSL_EULA_FILE};md5=fd4b227530cd88a82af6a5982cfb724d"
LIC_FILES_CHKSUM[vardepsexclude] += "FSL_EULA_FILE"
python fsl_bin_do_unpack() {
src_uri = (d.getVar('SRC_URI', True) or "").split()
if len(src_uri) == 0:
return
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
rootdir = localdata.getVar('WORKDIR', True)
fetcher = bb.fetch2.Fetch(src_uri, localdata)
for url in fetcher.ud.values():
save_cwd = os.getcwd()
# Check for supported fetchers
if url.type in ['http', 'https', 'ftp', 'file']:
if url.parm.get('fsl-eula', False):
# If download has failed, do nothing
if not os.path.exists(url.localpath):
bb.debug(1, "Exiting as '%s' cannot be found" % url.basename)
return
# Change to the working directory
bb.note("Handling file '%s' as a Freescale's EULA binary." % url.basename)
save_cwd = os.getcwd()
os.chdir(rootdir)
cmd = "sh %s --auto-accept --force" % (url.localpath)
bb.fetch2.runfetchcmd(cmd, d, quiet=True)
# Return to the previous directory
os.chdir(save_cwd)
}
python do_unpack() {
eula = d.getVar('ACCEPT_FSL_EULA', True)
eula_file = d.getVar('FSL_EULA_FILE', True)
pkg = d.getVar('PN', True)
if eula == None:
bb.fatal("To use '%s' you need to accept the Freescale EULA at '%s'. "
"Please read it and in case you accept it, write: "
"ACCEPT_FSL_EULA = \"1\" in your local.conf." % (pkg, eula_file))
elif eula == '0':
bb.fatal("To use '%s' you need to accept the Freescale EULA." % pkg)
else:
bb.note("Freescale EULA has been accepted for '%s'" % pkg)
# The binary unpack needs to be done first so 'S' is valid
bb.build.exec_func('fsl_bin_do_unpack', d)
try:
bb.build.exec_func('base_do_unpack', d)
except:
raise
}
do_unpack[vardepsexclude] += "FSL_EULA_FILE"