Thank you for your answer.
I tried your suggestion to add LICENSE_PATH += "${LAYERDIR}/custom-licenses" which contains file "commercial".
- Firstly, I run "bitbake core-image-my" which contains my recipe "myrecipe".This warning is still there.
- Secondly, I run "bitbake -c clean myrecipe && bitbake -c cleansstate myrecipe", and then "bitbake core-image-my".This warning is gone.
So, I feel that, although adding LICENSE_PATH += "${LAYERDIR}/custom-licenses" , we should clean recipes firstly.
After that, the effect of LICENSE_PATH += "${LAYERDIR}/custom-licenses" will work.
Thank you again, nice answer :smileyhappy: