有一个新的patch操作总结:(完整版)
(1)验证patch;在driver上打patch,build driver后,拷贝新生成的库到文件系统rootfs里,在板子上跑case,case跑成功,说明这个patch可用;
打patch:patch -p1 < 0001-IMX-1177-BUG-20608-CL180084-NXP-OpenVX-SoftISP-have-.patch//(有时候打patch会失败,patch打不上)
(2)在远端创建一个自己的branch:在MGS ticket网页上creat branch 和在Bitbucket creat branch 一样
在bitbucket create branch,branch type:选bugfix;branch from:fsl6.2.4.p4; branch name :bugfix/mgs4520,即在远端创建了一个branch;
(3)在branch下面生成自己的commit并push到远端
本地git pull一下,然后git checkout bugfix/mgs4520,则在本地存在一个和远端一样的branch:bugfix/mgs4520。
git commit -a "添加commit信息"//产生自己的commit
git push origin bugfix/mgs4520//push 成功即可在远端branch上有新的commit,有时候push失败,有可能没有按照commit的信息模块来写commit
或者
git checkout -b mgs origin/bugfix/MGS-4238-8qm-openvx-sdk-softisp-test-failed//在本地建一个branch mgs和远端关联
git commit -a "添加commit信息"//产生自己的commit
git push origin mgs:bugfix/MGS-4238-8qm-openvx-sdk-softisp-test-failed//在远端的branch下面有自己的commit
(4)commit信息模板:
MGS-4520[i.MX8/iAuto Shanghai] OpenGL asin/acos functions takes a long time to initialize
glLinkProgram take the little time to run "acos" in simple-egl-sin-cos-shader and simple-egl-without-sin-cos-shader
Date: 13th May ,2019
Signed-off-by Ya Zhou <ya.zhou@nxp.com>
(5)如果需要修改commit信息:git commit --amend ,然后需要强制push到远端:git push origin bugfix/mgs4520 -f
(6)测试bamboo,在bamboo creat plan branch,run,所有的板子开始test,在atuotmation test 下查看还有哪些板子没有运行结束,查看failed ,和error log
(7)将远端的自己的branch merge到主branch上:在Bitbucket creat pull request ,添加review,merge;
(8)如果出现不能merge的情况,例如,fsl_6.2.4.p2(远端主branch)的top commit比mgs(本地branch)top commit 多了一个commit:
解决方法:把新增加的commit,rebase到mgs上,然后再push到远端,发现远端的branch:bugfix/MGS-4238-8qm-openvx-sdk-softisp-test-failed多了这个commit,和fsl_6.2.4.p2branch一样,在进行merge;
git checkout mgs
git rebase fsl_6.2.4.p2
git log
git push -f origin mgs:bugfix/MGS-4238-8qm-openvx-sdk-softisp-test-failed//mgs和fsl_6.2.4.p2commit一样