-
Notifications
You must be signed in to change notification settings - Fork 0
Manual Patch
a. cd ~/ThinkEdge_FW/Hodaka_switch_firmware
b. make target/linux/{clean,prepare} V=sc QUILT=1
c. cd build_dir/target-aarch64_generic_glibc/linux-layerscape_armv8_64b/linux-4.14.336
d. quilt push -a
e. quilt new platform/900-ssrb-01xx-cve-xxxx-xxxx.patch
(Replace with your patch name)
Note: 如果是產生 kernel 的 patch,檔名必須是 platform/xxxx-*.patch,不然不會產生到 kernel 的 patch。
f. quilt edit drivers/i2c/busses/i2c-imx.c
(Replace with the file/code you want to modify)
g. quilt diff
h. quilt refresh
i. cd ../../../../
(Back to the source code path)
j. make target/linux/update V=sc
k. Check patch directory:
ls target/linux/layerscape/patches-4.14/
l. Build and verify:
make target/linux/{clean,compile} -j22
-
If error:
make target/linux/{clean,compile} -j1 V=sc- Troubleshoot
-
If pass:
git statusgit add xxxxx.patchgit commit -m "message for the commit"git push
m. Go to AP to update triage
Example: package/system/ubox
-
make package/system/ubox/{clean,prepare} V=s QUILT=1
⇒ Unpacks the source tarball and prepares existing patches as quilt patch series (if any). -
cd build_dir/target-aarch64_generic_glibc/ubox-2021-08-03-205defb5/
⇒ Change to the prepared source directory. -
quilt push -a
⇒ Apply all existing patches using quilt push, if any. -
quilt new 002-logfile_permissions.patch
⇒ Create a new empty patch file. -
quilt edit log/logread.c
⇒ Edit the file you want to modify. -
quilt diff
⇒ Review the changes using quilt diff. -
quilt refresh
⇒ Update the patch file (e.g., 010-main_code_fix.patch) with the new changes. -
cd ../../..
⇒ Return to the top-level directory of the buildroot. -
make package/system/ubox/update V=sc
⇒ Move the new patch file over to the buildroot and run update. -
make package/system/ubox/{clean,compile} -j1 V=sc
⇒ Rebuild the package to test your changes.