layerconf: changes to let the layer build on dora and master
* removes the components for dizzy, we will skip it * simplify the mapping from DISTRO_NUMBER to DISTRO_NAME * remove watchdog.bbappend for master
This commit is contained in:
parent
1f660fd4b0
commit
1f87162b0b
|
@ -20,8 +20,14 @@ def get_bb_inc(d):
|
||||||
bbdir = os.path.dirname(bbfile)
|
bbdir = os.path.dirname(bbfile)
|
||||||
script_logs = os.path.join(work_dir,'script-logs')
|
script_logs = os.path.join(work_dir,'script-logs')
|
||||||
bb_inc = os.path.join(script_logs,'bb_inc')
|
bb_inc = os.path.join(script_logs,'bb_inc')
|
||||||
bb.mkdirhier(script_logs)
|
try:
|
||||||
bb.mkdirhier(bb_inc)
|
bb.mkdirhier(script_logs)
|
||||||
|
except:
|
||||||
|
bb.utils.mkdirhier(script_logs)
|
||||||
|
try:
|
||||||
|
bb.mkdirhier(bb_inc)
|
||||||
|
except:
|
||||||
|
bb.utils.mkdirhier(bb_inc)
|
||||||
|
|
||||||
def find_file(dir,file):
|
def find_file(dir,file):
|
||||||
for root, dirs, files in os.walk(dir):
|
for root, dirs, files in os.walk(dir):
|
||||||
|
@ -49,7 +55,10 @@ def get_bb_inc(d):
|
||||||
shutil.copy(bbincfile,bb_inc)
|
shutil.copy(bbincfile,bb_inc)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
bb.mkdirhier(os.path.join(script_logs,'temp'))
|
try:
|
||||||
|
bb.mkdirhier(os.path.join(script_logs,'temp'))
|
||||||
|
except:
|
||||||
|
bb.utils.mkdirhier(os.path.join(script_logs,'temp'))
|
||||||
oe.path.copytree(os.path.join(work_dir,'temp'), os.path.join(script_logs,'temp'))
|
oe.path.copytree(os.path.join(work_dir,'temp'), os.path.join(script_logs,'temp'))
|
||||||
except (IOError,AttributeError):
|
except (IOError,AttributeError):
|
||||||
pass
|
pass
|
||||||
|
@ -65,8 +74,10 @@ def get_series(d):
|
||||||
s = d.getVar('S',True)
|
s = d.getVar('S',True)
|
||||||
dest = os.path.join(work_dir, pf + '-series')
|
dest = os.path.join(work_dir, pf + '-series')
|
||||||
shutil.rmtree(dest, ignore_errors=True)
|
shutil.rmtree(dest, ignore_errors=True)
|
||||||
bb.mkdirhier(dest)
|
try:
|
||||||
|
bb.mkdirhier(dest)
|
||||||
|
except:
|
||||||
|
bb.utils.mkdirhier(dest)
|
||||||
src_uri = d.getVar('SRC_URI', True).split()
|
src_uri = d.getVar('SRC_URI', True).split()
|
||||||
fetch = bb.fetch2.Fetch(src_uri, d)
|
fetch = bb.fetch2.Fetch(src_uri, d)
|
||||||
locals = (fetch.localpath(url) for url in fetch.urls)
|
locals = (fetch.localpath(url) for url in fetch.urls)
|
||||||
|
@ -82,7 +93,10 @@ def get_series(d):
|
||||||
shutil.copy(patch,dest)
|
shutil.copy(patch,dest)
|
||||||
except IOError:
|
except IOError:
|
||||||
if os.path.isdir(patch):
|
if os.path.isdir(patch):
|
||||||
bb.mkdirhier(os.path.join(dest,patch))
|
try:
|
||||||
|
bb.mkdirhier(os.path.join(dest,patch))
|
||||||
|
except:
|
||||||
|
bb.utils.mkdirhier(os.path.join(dest,patch))
|
||||||
oe.path.copytree(patch, os.path.join(dest,patch))
|
oe.path.copytree(patch, os.path.join(dest,patch))
|
||||||
return dest
|
return dest
|
||||||
|
|
||||||
|
@ -96,8 +110,10 @@ def get_applying_patches(d):
|
||||||
work_dir = d.getVar('WORKDIR', True)
|
work_dir = d.getVar('WORKDIR', True)
|
||||||
dest = os.path.join(work_dir, pf + '-patches')
|
dest = os.path.join(work_dir, pf + '-patches')
|
||||||
shutil.rmtree(dest, ignore_errors=True)
|
shutil.rmtree(dest, ignore_errors=True)
|
||||||
bb.mkdirhier(dest)
|
try:
|
||||||
|
bb.mkdirhier(dest)
|
||||||
|
except:
|
||||||
|
bb.utils.mkdirhier(dest)
|
||||||
|
|
||||||
patches = src_patches(d)
|
patches = src_patches(d)
|
||||||
for patch in patches:
|
for patch in patches:
|
||||||
|
@ -248,7 +264,10 @@ def move_tarball_deploy(d,tarball_list):
|
||||||
work_dir = d.getVar('WORKDIR',True)
|
work_dir = d.getVar('WORKDIR',True)
|
||||||
tar_sources = d.getVar('DEPLOY_DIR', True) + '/sources/' + target_sys + '/' + licenses + '/' + pf
|
tar_sources = d.getVar('DEPLOY_DIR', True) + '/sources/' + target_sys + '/' + licenses + '/' + pf
|
||||||
if not os.path.exists(tar_sources):
|
if not os.path.exists(tar_sources):
|
||||||
bb.mkdirhier(tar_sources)
|
try:
|
||||||
|
bb.mkdirhier(tar_sources)
|
||||||
|
except:
|
||||||
|
bb.utils.mkdirhier(tar_sources)
|
||||||
for source in tarball_list:
|
for source in tarball_list:
|
||||||
if source:
|
if source:
|
||||||
if os.path.exists(os.path.join(tar_sources, source)):
|
if os.path.exists(os.path.join(tar_sources, source)):
|
||||||
|
@ -345,7 +364,10 @@ def dumpdata(d):
|
||||||
licenses = get_licenses(d)
|
licenses = get_licenses(d)
|
||||||
dumpdir = d.getVar('DEPLOY_DIR', True) + '/sources/' + target_sys + '/' + licenses + '/' + pf
|
dumpdir = d.getVar('DEPLOY_DIR', True) + '/sources/' + target_sys + '/' + licenses + '/' + pf
|
||||||
if not os.path.exists(dumpdir):
|
if not os.path.exists(dumpdir):
|
||||||
bb.mkdirhier(dumpdir)
|
try:
|
||||||
|
bb.mkdirhier(dumpdir)
|
||||||
|
except:
|
||||||
|
bb.utils.mkdirhier(dumpdir)
|
||||||
|
|
||||||
dumpfile = os.path.join(dumpdir, bb.data.expand("${P}-${PR}.showdata.dump",d))
|
dumpfile = os.path.join(dumpdir, bb.data.expand("${P}-${PR}.showdata.dump",d))
|
||||||
|
|
||||||
|
@ -381,7 +403,10 @@ def create_diff_gz(d):
|
||||||
distro = d.getVar('DISTRO',True)
|
distro = d.getVar('DISTRO',True)
|
||||||
dest = s + '/' + distro + '/files'
|
dest = s + '/' + distro + '/files'
|
||||||
if not os.path.exists(dest):
|
if not os.path.exists(dest):
|
||||||
bb.mkdirhier(dest)
|
try:
|
||||||
|
bb.mkdirhier(dest)
|
||||||
|
except:
|
||||||
|
bb.utils.mkdirhier(dest)
|
||||||
for i in os.listdir(os.getcwd()):
|
for i in os.listdir(os.getcwd()):
|
||||||
if os.path.isfile(i):
|
if os.path.isfile(i):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -9,7 +9,7 @@ BBFILES += "${LAYERDIR}/yocto-shared/*.bbappend"
|
||||||
BBFILES += "${BBFILES_SYSMOCOM_BSP}"
|
BBFILES += "${BBFILES_SYSMOCOM_BSP}"
|
||||||
|
|
||||||
# selects specific distro or master when DISTRO_VERSION contains snapshot
|
# selects specific distro or master when DISTRO_VERSION contains snapshot
|
||||||
BBFILES_SYSMOCOM_BSP = "${LAYERDIR}/yocto-${@ [dict([('1.5', 'dora'), ('1.7', 'dizzy')])[d.getVar('DISTRO_VERSION', True)[0:3]], 'master']['snapshot' in d.getVar('DISTRO_VERSION', True)]}/*.bbappend"
|
BBFILES_SYSMOCOM_BSP = "${LAYERDIR}/yocto-${@dict([('1.5', 'dora')]).get(d.getVar('DISTRO_VERSION', True)[0:3],'master')}/*.bbappend"
|
||||||
|
|
||||||
BBFILE_COLLECTIONS += "sysmocom-bsp"
|
BBFILE_COLLECTIONS += "sysmocom-bsp"
|
||||||
BBFILE_PATTERN_sysmocom-bsp := "^${LAYERDIR}/"
|
BBFILE_PATTERN_sysmocom-bsp := "^${LAYERDIR}/"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
TARGET_ARCH = "arm"
|
TARGET_ARCH = "arm"
|
||||||
|
|
||||||
PREFERRED_PROVIDER_virtual/kernel = "linux-sysmocom"
|
PREFERRED_PROVIDER_virtual/kernel = "linux-sysmocom"
|
||||||
PREFERRED_VERSION_linux-sysmocom = "${@ dict([('1.7', '3.10.50+git%'), ('1.5','3.10.50+git%'), ('1.1.2','')])[d.getVar('DISTRO_VERSION', True)[0:3]]}"
|
PREFERRED_VERSION_linux-sysmocom = "3.10.50+git%"
|
||||||
PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
|
PREFERRED_PROVIDERS += "virtual/${TARGET_PREFIX}depmod:module-init-tools-cross"
|
||||||
|
|
||||||
PREFERRED_VERSION_u-boot = "git"
|
PREFERRED_VERSION_u-boot = "git"
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
require recipes-bsp/netbase/${PN}_sysmocom.inc
|
|
|
@ -1 +0,0 @@
|
||||||
require recipes-fixes/${PN}/${PN}_sysmocom.inc
|
|
|
@ -1 +0,0 @@
|
||||||
require recipes-fixes/${PN}/${PN}_sysmocom.inc
|
|
|
@ -1 +0,0 @@
|
||||||
require recipes-fixes/${PN}/${PN}_angstrom.inc
|
|
|
@ -1 +0,0 @@
|
||||||
require recipes-bsp/watchdog/${PN}_sysmocom.inc
|
|
|
@ -1,4 +0,0 @@
|
||||||
# PN/PV are wrong inside the .inc file with 1.19.1
|
|
||||||
SYSMOCOM_ORIG_PV := "${PV}"
|
|
||||||
require recipes-core/busybox/${PN}_sysmocom.inc
|
|
||||||
require recipes-core/busybox/${PN}_sysmocom_systemd.inc
|
|
|
@ -1 +0,0 @@
|
||||||
require recipes-fixes/${PN}/${PN}_sysmocom_systemd.inc
|
|
|
@ -1 +0,0 @@
|
||||||
require recipes-fixes/dropbear/${PN}_sysmocom.inc
|
|
|
@ -1 +1 @@
|
||||||
require recipes-bsp/netbase/${PN}_sysmocom.inc
|
require recipes-bsp/init-ifupdown/${PN}_sysmocom.inc
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
require recipes-fixes/${PN}/${PN}_sysmocom.inc
|
|
|
@ -1 +0,0 @@
|
||||||
require recipes-bsp/watchdog/${PN}_sysmocom.inc
|
|
Loading…
Reference in New Issue