[yocto] How to generate a random number for all recipes?

2023-12-28 Thread Jiliang Cai
I define a global variable in config like this: HELLO=${@random_number_function} Then I print HELLO's value in two bbfiles. I found that the value of HELLO is different because the random_number_function was called in every bbfile. How to fix it? -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all mes

[yocto] How to install the initramfs image into rootfs?

2023-09-20 Thread Jiliang Cai
Hi, I want to install the core-image-minimal-initramfs.cpio.gz into the rootfs's /, but the recipe of initramfs does not allow to append install and to modify FILES variables like ordinary recipes. What should I do? Thanks -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this grou

Re: [yocto] How to add a hook or handler for specified task?

2023-09-11 Thread Jiliang Cai
I found a solution that works. If there are other more suitable solutions, please let me know, thank you. Everyone is welcome to discuss. I use the bb.build.TaskFailed event, although it's global, not specific to a recipe. In the handler body, I use e.getTask() to determine whether the specifie

[yocto] How to add a hook or handler for specified task?

2023-09-10 Thread Jiliang Cai
Thanks in advance. I want to add a handler/hook for do_image task, not for all normal tasks. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#60954): https://lists.yoctoproject.org/g/yocto/message/60954 Mute This Topic: https://lists.yoctoproject.org

Re: [yocto] How to build a specified recipe every bitbake

2023-08-12 Thread Jiliang Cai
On Fri, Aug 11, 2023 at 12:47 AM, Ross Burton wrote: > > On 11 Aug 2023, at 03:21, Jiliang Cai via lists.yoctoproject.org > wrote: > >> I have a recipe abc_1.0.bb. It generates a txt contains all layers git >> commit >> ID into /etc. It is installed into image b

[yocto] How to build a specified recipe every bitbake

2023-08-10 Thread Jiliang Cai
I have a recipe abc_1.0.bb. It generates a txt contains all layers git commit ID into /etc. It is installed into image by IMAGE_INSTALL:append = " abc". I want to rebuild abc every time I execute bitbake . So I set nostamp to 1 in abc_1.0.bb. It served my purpose. When I execute bitbake core-imag

[yocto] bb.event.BuildStarted didn't work in a bbappend

2023-05-16 Thread Jiliang Cai
I add these lines in a bbappend file: addhandler cjltest cjltest[eventmask] = "bb.event.BuildStarted" python cjltest () { bb.warn("enter my event code") } But when bitbake this recipe, no warning message appears. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View

Re: [yocto][meta-python2] Kirkstone EXTRANATIVEPATH is not in effect

2023-05-15 Thread Jiliang Cai
thonnative? > > On Mon, May 15, 2023 at 11:38 AM Jiliang Cai wrote: >> >> I added: >> DEPENDS += "python-native python-setuptools-native". >> >> I think it should work just fine, because: >> python-setuptools.bbinherit setuptools

Re: [yocto][meta-python2] Kirkstone EXTRANATIVEPATH is not in effect

2023-05-15 Thread Jiliang Cai
n2'. Martin Jansa 于2023年5月15日周一 16:40写道: > > Did you add "inherit pythonnative" or DEPENDS += "python-native"? > > You need just the inherit line. > > On Mon, May 15, 2023 at 10:23 AM Jiliang Cai wrote: >> >> I have a bb file abc_1.0.bb: >&

[yocto][meta-python2] Kirkstone EXTRANATIVEPATH is not in effect

2023-05-15 Thread Jiliang Cai
I have a bb file abc_1.0.bb: DEPENDS += "python3-native" And EXTRANATIVEPATH contains "python3-native" as expected, so command 'python3' can be searched. Then I add DEPENDS += "python-native", but EXTRANATIVEPATH doesn't contains "python-native", so command 'python' can not be searched. python3na