spatch
can be installed under Debian/Ubuntu with apt install coccinelle
.
What is the aim of creating kernel-backports
folder?
Add note that paths must be absolute and to relatives (Learnt from the video)
Rename [MODEL_NAME]
by [KERNEL_NAME]
, for example for the herolte
device kernel name is universal8890
Give a hint that the Makefile.rej
is probably in ~/halium/kernel/[VENDOR]/[MODEL_NAME/
.
Add a link to https://www.youtube.com/watch?v=RC5e87-8LpU&t=35:27 so people can understand the step to resolve the errors.
I would find this part easier to understand if written:
At the same time, for each one, add a corresponding one beginning with CONFIG_BACKPORT_BT_
, e.g.:
CONFIG_BT=y
becomes
#CONFIG_BT=y
CONFIG_BACKPORT_BT=y
Why the Additionnal BT configs needed for UT
from https://www.youtube.com/watch?v=RC5e87-8LpU?t=59:15 are not in the doc?
Why commenting CONFIG_CRC16=y
and CONFIG_TTY=y
in the files to add? Should be removed if not needed
Step The corresponding source file(s) will have to be migrated from their original location to the corresponding location under [...]
If would help to write this command in order to quickly show the files to move: diff -qr drivers/bluetooth/ backports/drivers/bluetooth/ | grep "Only in drivers"
Step The files Makefile and Kconfig need to be edited to include this missing setting or else they will not be built. => What should be done to Kconfig
file?
The error is
Get original source files from git ...
Applying patches from patches to ~/<PATH_TO_HALIUM>/halium/kernel/samsung/universal8890/backports/ ...
Failed to process SmPL patch collateral-evolutions/network/0027-genl-const/genl-const.cocci
Traceback (most recent call last):
File "./gentree.py", line 1099, in <module>
ret = _main()
File "./gentree.py", line 724, in _main
logwrite=logwrite)
File "./gentree.py", line 905, in process
apply_patches(args, "backport", source_dir, 'patches', bpid.target_dir, logwrite)
File "./gentree.py", line 605, in apply_patches
raise Exception('SmPL patch failed')
Exception: SmPL patch failed
This is caused by a format change in coccinelle
/spatch
, starting with spatch
version >= 1.0.6
(see here). Fix:
- Edit the file
~/backport-scripts/patches/collateral-evolutions/network/0027-genl-const/genl-const.cocci
- Add
name
toattribute __genl_const;
in order to haveattribute name __genl_const;
Or apply this patch, in ~backport-scripts
folder:
diff --git a/patches/collateral-evolutions/network/0027-genl-const/genl-const.cocci b/patches/collateral-evolutions/network/0027-genl-const/genl-const.cocci
index 36c71d62..58824c72 100644
--- a/patches/collateral-evolutions/network/0027-genl-const/genl-const.cocci
+++ b/patches/collateral-evolutions/network/0027-genl-const/genl-const.cocci
@@ -1,5 +1,5 @@
@@
-attribute __genl_const;
+attribute name __genl_const;
@@
(
-const struct genl_multicast_group