Skip to content

Commit 360b263

Browse files
committed
linux-firmware: move QCM6490 and SA8775P firmware packages away
Patch linux-firmware packages in order to remove the conflict between the files provided by the recipe and the tip versions of the firmware (to be added in the next commits). Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent dbfdc0f commit 360b263

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
REMOVE_SOCS = " \
2+
qcm6490 \
3+
sa8775p \
4+
"
5+
REMOVE_PACKAGES = " \
6+
audio \
7+
compute \
8+
generalpurpose \
9+
"
10+
11+
python() {
12+
pkgs = d.getVar('PACKAGES').split()
13+
newpkgs = []
14+
for soc in d.getVar('REMOVE_SOCS').split():
15+
for pkg in d.getVar('REMOVE_PACKAGES').split():
16+
name = 'linux-firmware-qcom-%s-%s' % (soc, pkg)
17+
x_name = 'x-' + name
18+
if name in pkgs:
19+
pkgs.remove(name)
20+
newpkgs.append(x_name)
21+
files = d.getVar('FILES:%s' % name, False)
22+
d.setVar('FILES:%s' % x_name, files)
23+
files = d.getVar('LICENSE:%s' % name)
24+
d.setVar('LICENSE:%s' % x_name, files)
25+
files = d.getVar('RDEPENDS:%s' % name)
26+
d.setVar('RDEPENDS:%s' % x_name, files)
27+
newpkgs.extend(pkgs)
28+
d.setVar('PACKAGES', ' '.join(newpkgs))
29+
}
30+
31+
python populate_packages:append() {
32+
newpkgs = d.getVar('RRECOMMENDS:linux-firmware').split()
33+
newpkgs = filter(lambda x: not x.startswith('x-'), newpkgs)
34+
d.setVar('RRECOMMENDS:linux-firmware', ' '.join(newpkgs))
35+
}

0 commit comments

Comments
 (0)