Date   

Re: do_kernel_configme - Could not generate configuration queue

Rudolf J Streif
 



On Fri, Oct 14, 2022, 18:53 Bruce Ashfield <bruce.ashfield@...> wrote:


On Fri, Oct 14, 2022 at 10:11 PM Jose Quaresma <quaresma.jose@...> wrote:
Hi Rudolf,

I have reported this issue and together with a path [1] to fix it.
Anyway Bruce has fixed the issue in another way in [2] and this works for me as well.

[1] https://lists.yoctoproject.org/g/linux-yocto/message/11746
[2] https://git.yoctoproject.org/yocto-kernel-tools/commit/?id=6a4752ebbe7d242c02b3c74a5772926edd243626


Yes indeed. This has also passed my other regression testing, but I was traveling today and couldn't send my pull request.

I'll send it over the weekend, so hopefully it'll be merged shortly!

Thank you, Jose and Bruce. Much appreciated.

Rudi

Bruce

 
Jose

Rudolf J Streif <rudolf.streif@...> escreveu no dia sábado, 15/10/2022 à(s) 01:45:
I am running into a bizarre problem with kernel configuration.

I have an existing build environment that builds for an i.MX6ul machine.
That works fine and the linux-fslc kernel 5.18 builds without any
problems. Now within the that build environment I changed the machine to
imx6ullevk and then the kernel configuration fails with this error message:

| DEBUG: Executing shell function do_kernel_configme
| NOTE: do_kernel_metadata: for summary/debug, set KCONF_AUDIT_LEVEL > 0
| [ERROR]: processing of file /tmp/tmp.owmBptYrba failed
| /develop/projects/altec/tcu/build/tmp/hosttools/dirname: missing operand
| Try '/develop/projects/altec/tcu/build/tmp/hosttools/dirname --help'
for more information.
| ERROR: Could not generate configuration queue for imx6ullevk.
| WARNING:
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395:209
exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
|     #1: bbfatal_log,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 209
|     #2: do_kernel_metadata,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 382
|     #3: do_kernel_configme,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 150
|     #4: main,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 484
ERROR: Task
(/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc_5.18.bb:do_kernel_configme)
failed with exit code '1'

I tried to debug do_kernel_configme. The issue seems in the scc script
more specifically, I think, in the kconf command that is called by scc
when parsing the temporary configuration queue file in /tmp: tmp.owmBptYrba

#
# spp v0.8
# processed: Fri Oct 14 09:49:02 PM UTC 2022
#
# This is a preprocessor output file, do not edit
#
#
prefix
/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig
kconf non-hardware
/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig
# run time: 0 seconds
# processed files:
# _cfg
/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig

Apparently a call to dirname is missing the argument. However, I do not
understand why.

I wiped out build/tmp directory entirely, ran a cleanall on
virtual/kernel but to no avail. The problem remains the same.

Has anybody seen this issue before?


Rudi







--
Best regards,

José Quaresma





--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


Re: do_kernel_configme - Could not generate configuration queue

Bruce Ashfield
 



On Fri, Oct 14, 2022 at 10:11 PM Jose Quaresma <quaresma.jose@...> wrote:
Hi Rudolf,

I have reported this issue and together with a path [1] to fix it.
Anyway Bruce has fixed the issue in another way in [2] and this works for me as well.

[1] https://lists.yoctoproject.org/g/linux-yocto/message/11746
[2] https://git.yoctoproject.org/yocto-kernel-tools/commit/?id=6a4752ebbe7d242c02b3c74a5772926edd243626


Yes indeed. This has also passed my other regression testing, but I was traveling today and couldn't send my pull request.

I'll send it over the weekend, so hopefully it'll be merged shortly!

Bruce

 
Jose

Rudolf J Streif <rudolf.streif@...> escreveu no dia sábado, 15/10/2022 à(s) 01:45:
I am running into a bizarre problem with kernel configuration.

I have an existing build environment that builds for an i.MX6ul machine.
That works fine and the linux-fslc kernel 5.18 builds without any
problems. Now within the that build environment I changed the machine to
imx6ullevk and then the kernel configuration fails with this error message:

| DEBUG: Executing shell function do_kernel_configme
| NOTE: do_kernel_metadata: for summary/debug, set KCONF_AUDIT_LEVEL > 0
| [ERROR]: processing of file /tmp/tmp.owmBptYrba failed
| /develop/projects/altec/tcu/build/tmp/hosttools/dirname: missing operand
| Try '/develop/projects/altec/tcu/build/tmp/hosttools/dirname --help'
for more information.
| ERROR: Could not generate configuration queue for imx6ullevk.
| WARNING:
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395:209
exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
|     #1: bbfatal_log,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 209
|     #2: do_kernel_metadata,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 382
|     #3: do_kernel_configme,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 150
|     #4: main,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 484
ERROR: Task
(/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc_5.18.bb:do_kernel_configme)
failed with exit code '1'

I tried to debug do_kernel_configme. The issue seems in the scc script
more specifically, I think, in the kconf command that is called by scc
when parsing the temporary configuration queue file in /tmp: tmp.owmBptYrba

#
# spp v0.8
# processed: Fri Oct 14 09:49:02 PM UTC 2022
#
# This is a preprocessor output file, do not edit
#
#
prefix
/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig
kconf non-hardware
/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig
# run time: 0 seconds
# processed files:
# _cfg
/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig

Apparently a call to dirname is missing the argument. However, I do not
understand why.

I wiped out build/tmp directory entirely, ran a cleanall on
virtual/kernel but to no avail. The problem remains the same.

Has anybody seen this issue before?


Rudi







--
Best regards,

José Quaresma





--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


Re: do_kernel_configme - Could not generate configuration queue

Jose Quaresma
 

Hi Rudolf,

I have reported this issue and together with a path [1] to fix it.
Anyway Bruce has fixed the issue in another way in [2] and this works for me as well.

[1] https://lists.yoctoproject.org/g/linux-yocto/message/11746
[2] https://git.yoctoproject.org/yocto-kernel-tools/commit/?id=6a4752ebbe7d242c02b3c74a5772926edd243626

Jose

Rudolf J Streif <rudolf.streif@...> escreveu no dia sábado, 15/10/2022 à(s) 01:45:

I am running into a bizarre problem with kernel configuration.

I have an existing build environment that builds for an i.MX6ul machine.
That works fine and the linux-fslc kernel 5.18 builds without any
problems. Now within the that build environment I changed the machine to
imx6ullevk and then the kernel configuration fails with this error message:

| DEBUG: Executing shell function do_kernel_configme
| NOTE: do_kernel_metadata: for summary/debug, set KCONF_AUDIT_LEVEL > 0
| [ERROR]: processing of file /tmp/tmp.owmBptYrba failed
| /develop/projects/altec/tcu/build/tmp/hosttools/dirname: missing operand
| Try '/develop/projects/altec/tcu/build/tmp/hosttools/dirname --help'
for more information.
| ERROR: Could not generate configuration queue for imx6ullevk.
| WARNING:
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395:209
exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
|     #1: bbfatal_log,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 209
|     #2: do_kernel_metadata,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 382
|     #3: do_kernel_configme,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 150
|     #4: main,
/develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395,
line 484
ERROR: Task
(/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc_5.18.bb:do_kernel_configme)
failed with exit code '1'

I tried to debug do_kernel_configme. The issue seems in the scc script
more specifically, I think, in the kconf command that is called by scc
when parsing the temporary configuration queue file in /tmp: tmp.owmBptYrba

#
# spp v0.8
# processed: Fri Oct 14 09:49:02 PM UTC 2022
#
# This is a preprocessor output file, do not edit
#
#
prefix
/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig
kconf non-hardware
/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig
# run time: 0 seconds
# processed files:
# _cfg
/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig

Apparently a call to dirname is missing the argument. However, I do not
understand why.

I wiped out build/tmp directory entirely, ran a cleanall on
virtual/kernel but to no avail. The problem remains the same.

Has anybody seen this issue before?


Rudi







--
Best regards,

José Quaresma


do_kernel_configme - Could not generate configuration queue

Rudolf J Streif
 

I am running into a bizarre problem with kernel configuration.

I have an existing build environment that builds for an i.MX6ul machine. That works fine and the linux-fslc kernel 5.18 builds without any problems. Now within the that build environment I changed the machine to imx6ullevk and then the kernel configuration fails with this error message:

| DEBUG: Executing shell function do_kernel_configme
| NOTE: do_kernel_metadata: for summary/debug, set KCONF_AUDIT_LEVEL > 0
| [ERROR]: processing of file /tmp/tmp.owmBptYrba failed
| /develop/projects/altec/tcu/build/tmp/hosttools/dirname: missing operand
| Try '/develop/projects/altec/tcu/build/tmp/hosttools/dirname --help' for more information.
| ERROR: Could not generate configuration queue for imx6ullevk.
| WARNING: /develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395:209 exit 1 from 'exit 1'
| WARNING: Backtrace (BB generated script):
|     #1: bbfatal_log, /develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395, line 209
|     #2: do_kernel_metadata, /develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395, line 382
|     #3: do_kernel_configme, /develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395, line 150
|     #4: main, /develop/projects/altec/tcu/build/tmp/work/imx6ullevk-altec-linux-gnueabi/linux-fslc/5.18.5+gitAUTOINC+1d6b3055ae-r0/temp/run.do_kernel_configme.287395, line 484
ERROR: Task (/develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc_5.18.bb:do_kernel_configme) failed with exit code '1'

I tried to debug do_kernel_configme. The issue seems in the scc script more specifically, I think, in the kconf command that is called by scc when parsing the temporary configuration queue file in /tmp: tmp.owmBptYrba

#
# spp v0.8
# processed: Fri Oct 14 09:49:02 PM UTC 2022
#
# This is a preprocessor output file, do not edit
#
#
prefix /develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig
kconf non-hardware /develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig
# run time: 0 seconds
# processed files:
# _cfg /develop/projects/altec/tcu/build/../meta-freescale/recipes-kernel/linux/linux-fslc/defconfig

Apparently a call to dirname is missing the argument. However, I do not understand why.

I wiped out build/tmp directory entirely, ran a cleanall on virtual/kernel but to no avail. The problem remains the same.

Has anybody seen this issue before?


Rudi


Re: Apply Rt-Patch in raspberry yocto image #patch #rpi #yocto #bitbake #dunfell

Federico Pellegrin
 


Hi,
After applying the patch to the source, I suppose you built the kernel (and is just missing in your email) ? If not that is a quite important step missing ;)

Besides that:
1) preempt-rt patch is often very kernel version specific, while I see your two version don't exactly match: didn't it report any error? (would be lucky, but possible)
2) You would need also to configure the kernel to enable then the PREEMPT-RT and so on (this of course between applying the patch and rebuilding the kernel)
3) And of course then install the new generated image instead of the old one in a fashion of your choice

Cheers,
Federico


Il giorno ven 14 ott 2022 alle ore 07:41 Nikita Gupta <nikitagupta2509@...> ha scritto:
Hello All

I want to apply similar kernel version rt-patch in my rpi-basic-image for my raspberrypi4-64 machine. So, I tried to apply rt-patch for a standard rasbian image (5.15.61-v8+) but not got success. i did the following things.

      1. I downloaded required kernel sources from the kernel building instructions (Raspberry Pi Documentation - The Linux kernel)
      2. I downloaded https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patch-5.15.65-rt49.patch.gz
       cd linux
      3. zcat patch-5.15.65-rt49.patch.gz | patch -p1 
       But after rebooting my pi i am not able to see the patched kernel. I was about to do the same process with my rpi-basic-image. Can anyone tell me what things I am doing wrong?
Or please tell me the standard way of rt-patching the kernel through yocto .

Any reply would be highly appreicated. Thanks in Advance.






Apply Rt-Patch in raspberry yocto image #patch #rpi #yocto #bitbake #dunfell

Nikita Gupta <nikitagupta2509@...>
 

Hello All

I want to apply similar kernel version rt-patch in my rpi-basic-image for my raspberrypi4-64 machine. So, I tried to apply rt-patch for a standard rasbian image (5.15.61-v8+) but not got success. i did the following things.

      1. I downloaded required kernel sources from the kernel building instructions (Raspberry Pi Documentation - The Linux kernel)
      2. I downloaded https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patch-5.15.65-rt49.patch.gz
       cd linux
      3. zcat patch-5.15.65-rt49.patch.gz | patch -p1 
       But after rebooting my pi i am not able to see the patched kernel. I was about to do the same process with my rpi-basic-image. Can anyone tell me what things I am doing wrong?
Or please tell me the standard way of rt-patching the kernel through yocto .

Any reply would be highly appreicated. Thanks in Advance.



Re: [qa-build-notification] QA notification for completed autobuilder build (yocto-3.1.20.rc2)

Jing Hui Tham
 

Hi All,

QA for yocto- 3.1.20.rc2 is completed. This is the full report for this release:
https://git.yoctoproject.org/cgit/cgit.cgi/yocto-testresults-contrib/tree/?h=intel-yocto-testresults

======= Summary ========
No high milestone defects.

No new issue found.

Thanks,
Jing Hui

-----Original Message-----
From: qa-build-notification@... <qa-build-
notification@...> On Behalf Of Pokybuild User
Sent: Tuesday, 11 October, 2022 1:53 AM
To: yocto@...
Cc: qa-build-notification@...
Subject: [qa-build-notification] QA notification for completed autobuilder
build (yocto-3.1.20.rc2)


A build flagged for QA (yocto-3.1.20.rc2) was completed on the autobuilder
and is available at:


https://autobuilder.yocto.io/pub/releases/yocto-3.1.20.rc2


Build hash information:

bitbake: 048d682b031644fb9f0d41a489bacb873aa27bd7
meta-agl: da4775d226b2a231e27e8c8995c20fdd3c73f08a
meta-arm: 08c44df351ae1913f41de8388981b03e21235f09
meta-aws: 052c9a5f8532ed96487df37bae2f598c129d7d01
meta-gplv2: 60b251c25ba87e946a0ca4cdc8d17b1cb09292ac
meta-intel: ed616c50ea329ba6fe68642cfc8bf8c6b8b61beb
meta-mingw: 524de686205b5d6736661d4532f5f98fee8589b7
meta-openembedded: 6792ebdd966aa0fb662989529193a0940fbfee00
meta-virtualization: beea119eb529b4a11f266004aee8b548427aea39
oecore: dbad46a0079843b380cf3dda6008b12ab9526688
poky: 7f9b7f912e13451a4cd03b10a8090a5def68dc39



This is an automated message from the Yocto Project Autobuilder
Git: git://git.yoctoproject.org/yocto-autobuilder2
Email: richard.purdie@...







Re: Disabling SSH by default (but keeping the service)

Josef Holzmayr
 

Hi Maik,

this is a number of things being mixed up.
1) a recipe cannot affect another recipe. the image is a recipe, sshd is a recipe. so you either can set this in a bbappend to thesshd recipe, or in a config file (distro, machine, local) - but not in the image.
2) the override separator is : these days (since dunfell), not _, and you are targetting a specific recipe. so in a config file, it would be SYSTEMD_AUTO_ENABLE:pn-openssh-sshd
[3] 7.6p1 suggests that you are on some release made in 2017, or comparable, and the first thing you should do is upgrade, or otherwise you will be shipping outdated and vulnerable software right from day 1.

Greetz

On Thu, Oct 13, 2022 at 3:34 PM Leon Woestenberg <leon@...> wrote:
Hello Maik,

On Thu, Oct 13, 2022 at 3:17 PM Maik Vermeulen
<maik.vermeulen@...> wrote:
> We tried two things to disable SSH by default in our image recipe:
> However, both methods don't seem to work.

Hmm, something else might override it elsewhere? I don't know.

Seems like a similar question came up in stackoverflow, where some
potential solutions are given that you might want to give a try:

https://stackoverflow.com/questions/50651371/disable-a-standard-systemd-service-in-yocto-build

Regards,

Leon.




Re: Dealing with go dependencies in recipes - native docker-compose

Konstantin Kletschke
 

On Tue, Oct 11, 2022 at 11:23:31PM -0300, Bruce Ashfield wrote:

Adding the missing setuptools does get things working.
Oh my, I was still looking for python3-distutils (deprecated, not
available) and did not realize I now need setuptools. Thanks for
clarifying, however, I investigated the gao approach then...


I actually have a prototype recipe for this that I was working on before
ELCe, but I didn't get it into meta-virtualization yet, as it had a few
rough edges.
I suppose, those go recipes look extremly difficult to do.

If you give me a few days, I can post it to the meta-virtualization list,
but I'm on the road right now and don't have access to all my build
machines.
Of course I have patience and I am very curious to test this out!
Currently I have no urge but in future it will be extremely handy to
have the native docker compose approach available. It is a bit smaller
then the python approach (if python is only used by this docker-compose,
a third disk space is used by native approach).

I also did a presentation at the yocto summit about "modern languages".
Opps, interesting. No need to summarize here, I agree. I will dig this
up in the internet. Interesting...

You can see the approach that I take for this in the k3s and nerdctl recipes
in meta-virtualization. My new docker-compose recipe is of similar format.
As I vaguely mentioned above, those recipes look far more complex than I
would have imagined when starting to dig into the go world...
astonishing!

If we just bypass the fetcher, offline builds, some of licensing and SBOM
and reproducible builds .. you can have a simple recipe like that as well :)
Yea, and I already learned to lovae this reproducibility approach.

--
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

konstantin.kletschke@...
http://www.inside-m2m.de

Geschäftsführung: Michael Emmert, Ingo Haase, Dr. Fred Könemann, Derek Uhlig
HRB: 111204, AG Hannover


Re: Disabling SSH by default (but keeping the service)

Leon Woestenberg
 

Hello Maik,

On Thu, Oct 13, 2022 at 3:17 PM Maik Vermeulen
<maik.vermeulen@...> wrote:
We tried two things to disable SSH by default in our image recipe:
However, both methods don't seem to work.
Hmm, something else might override it elsewhere? I don't know.

Seems like a similar question came up in stackoverflow, where some
potential solutions are given that you might want to give a try:

https://stackoverflow.com/questions/50651371/disable-a-standard-systemd-service-in-yocto-build

Regards,

Leon.


Disabling SSH by default (but keeping the service)

Maik Vermeulen
 

Hi,

We tried two things to disable SSH by default in our image recipe:
inherit systemd
SYSTEMD_AUTO_ENABLE_openssh-sshd = "disable"

pkg_postinst_ontarget_openssh () {
    systemctl disable --now sshd.socket
}

However, both methods don't seem to work. We can still SSH to the device.
Furthermore, this is the unit list:
sshdgenkeys.service            loaded active exited       OpenSSH Key Generation
system-sshd.slice                 loaded active active        system-sshd.slice
sshd.socket                          loaded active listening    sshd.socket

We are on openssh_7.6p1.

Any ideas why this is happening?

Kind regards,

Maik Vermeulen

Embedded Software Engineer — Lightyear






Automotive Campus 70 —5708 JZ Helmond, the Netherlands

This email may contain information which is privileged and/or confidential. If you received this e-mail in error, please notify us immediately by e-mail and delete the email without copying or disclosing its contents to any other person. Lightyear is a trade name of Atlas Technologies B.V. and is registered at the Dutch Chamber of Commerce under number 67264298. 


[PATCH yocto-autobuilder-helper v2] scripts: run-docs-build: make the workdir pristine between tries

Quentin Schulz
 

From: Quentin Schulz <quentin.schulz@...>

It happened that the git repositories were dirty and resulted in
incorrect files being used. Let's use git clean -ffdx to force a
completely clean git repositories before and after checking out a branch
so that nothing is left from or to another branch build. Also git reset
--hard to undo changes to tracked files.

Cc: Quentin Schulz <foss+yocto@...>
Reported-by: Peter Kjellerstedt <peter.kjellerstedt@...> #https://lore.kernel.org/yocto-docs/e50abe3c777e4a23a752a3ec25ad0b2a@axis.com/
Signed-off-by: Quentin Schulz <quentin.schulz@...>
---

v2:
- re-added git reset --hard back,
- added git reset --hard after git checkout too just to be on the safe
side,
- added Reported-by and the link to the discussion,

scripts/run-docs-build | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/run-docs-build b/scripts/run-docs-build
index c6b3965..970d8bc 100755
--- a/scripts/run-docs-build
+++ b/scripts/run-docs-build
@@ -61,6 +61,8 @@ for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --for

echo Building bitbake $branch branch
git checkout $branch
+ git reset --hard
+ git clean -ffdx
git checkout origin/master releases.rst
make clean
SPHINXOPTS="-j auto" make publish
@@ -81,6 +83,7 @@ for branch in 1.46 $(git branch --remote --contains "$first_sphinx_commit" --for

cp -r ./_build/final/* $outputdir/bitbake/$branch
git reset --hard
+ git clean -ffdx
done

if [ "$PUBLISH" -ne 0 ]; then
@@ -101,7 +104,7 @@ git checkout origin/master set_versions.py
#latest_tag=$(git tag --contains "$first_sphinx_commit" --contains "$first_dunfell_sphinx_commit" --sort="version:refname" 'yocto-*' | tail -1 | sed 's/yocto-//')
latest_tag=$(./set_versions.py getlatest)
git reset --hard
-git clean -f
+git clean -ffdx

for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" --format '%(refname:lstrip=3)') $(git tag --contains "$first_sphinx_commit" --contains "$first_dunfell_sphinx_commit" 'yocto-*') transition; do
if [ "$branch" = "HEAD" ]; then
@@ -116,6 +119,8 @@ for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" --

echo Building $branch
git checkout $branch
+ git reset --hard
+ git clean -ffdx

if [ -e "${scriptdir}/docs-build-patches/${branch}/" ]; then
echo Adding patch for $branch
@@ -161,7 +166,7 @@ for branch in dunfell $(git branch --remote --contains "$first_sphinx_commit" --

cp -r ./_build/final/* $outputdir/$branch
git reset --hard
- git clean -f
+ git clean -ffdx
done

# Update bitbake switchers.js with the copy from master ypdocs
--
2.37.3


Re: # honister #systemd attempting to run script on boot... #systemd

Monsees, Steven C (US)
 

 

I have this working now…

 

Thanks Matt for spotting those honister config issues, that led led me to the heart of the problem…

 

Steve

From: yocto@... <yocto@...> On Behalf Of Monsees, Steven C (US) via lists.yoctoproject.org
Sent: Tuesday, October 11, 2022 3:55 PM
To: yocto@...
Subject: [yocto] # honister #systemd attempting to run script on boot...

 

External Email Alert

This email has been sent from an account outside of the BAE Systems network.

Please treat the email with caution, especially if you are requested to click on a link, decrypt/open an attachment, or enable macros.  For further information on how to spot phishing, access “Cybersecurity OneSpace Page” and report phishing by clicking the button “Report Phishing” on the Outlook toolbar.

 

 

I am trying to make use of system to run a test script at boot…

I can exercise my test_script/test_script.service manually using systemctl commands and it appears to work as expects.

 

I created a recipe based on this, it builds clean (no errors/warnings), but it doesn’t appear to set things up correctly.

I have only recently begun working with honister, and new to systemd…

 

Could someone have look at my recipe & service file and see if they can spot anything ?

 

My recipe:

 

#

# This file is the my_test_script recipe.

#

 

SUMMARY = "Simple my_test_script application"

SECTION = "apps"

LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

 

inherit systemd

 

SRC_URI = "file://test_script.sh \

           file://test_script.service"

 

S = "${WORKDIR}"

 

SYSTEMD_PACKAGES = "${PN}"

SYSTEMD_SERVICE_${PN} = "test_script.service"

SYSTEMD_AUTO_ENABLE:${PN} = "enable"

 

do_install() {

             install -d ${D}${bindir}

             install -m 0755 ${S}/test_script.sh ${D}${bindir}

 

             install -d ${D}${systemd_system_unitdir}

             install -m 0644 ${S}/test_script.service ${D}${systemd_system_unitdir}

}

 

FILES_${PN} = "${bindir}"

FILES_${PN} += "${systemd_system_unitdir}"

 

REQUIRED_DISTRO_FEATURES="systemd"

---

My test script service file:

 

[Unit]

Description=Configure test

 

[Service]

Type=oneshot

ExecStart=/usr/bin/test_script.sh start

StandardOutput=journal+console

 

[Install]

WantedBy=multi-user.target

---

My test script:

 

#!/bin/bash

# description: Description comes here....

 

echo "*******************************"

echo "START: Hello PetaLinux World :)"

date +"%m/%d/%Y %H:%M:%S $HOSTNAME"

echo "*******************************"

 

Thanks,

Steve


Re: #kirkstone efivar build failed #kirkstone

Tim Orling
 



On Wed, Oct 12, 2022 at 9:24 AM Ilies CHERGUI <ilies.chergui@...> wrote:
Hello guys, 

I'm trying to use `QT6` and `Boot2QT` meta layer and I noticed that `ld-is-gold` is used in `DISTRO_FEATURES`
This build of efivar failed. Please see the logs below.

gcc -isystem/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/usr/include -O2 -pipe -L. -L/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/usr/lib                         -L/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2  -Wl,--add-needed -Wl,--build-id -Wl,--no-allow-shlib-undefined -Wl,-z,now -Wl,-z,muldefs -Wl,--no-undefined-version    -DLIBEFIVAR_VERSION=38 -D_GNU_SOURCE -I/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/git/src/include/ -DLIBEFIVAR_VERSION=38 -D_GNU_SOURCE -I/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/git/src/include/ -DEFIVAR_BUILD_ENVIRONMENT -march=native -o makeguids makeguids.o util-makeguids.o -ldl 
./makeguids Your linker is not supported guids.txt guid-symbols.c include/efivar/efivar-guids.h guids.lds
makeguids: Too many arguments.

./makeguids Your linker is not supported guids.txt guid-symbols.c include/efivar/efivar-guids.h guids.lds
makeguids: Too many arguments.
ERROR: oe_runmake failed


Any help would be appreciated
Best regards,
Ilies




#kirkstone efivar build failed #kirkstone

Ilies CHERGUI
 

Hello guys, 

I'm trying to use `QT6` and `Boot2QT` meta layer and I noticed that `ld-is-gold` is used in `DISTRO_FEATURES`
This build of efivar failed. Please see the logs below.

gcc -isystem/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/usr/include -O2 -pipe -L. -L/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/usr/lib                         -L/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/lib                         -Wl,--enable-new-dtags                         -Wl,-rpath-link,/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath-link,/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/lib                         -Wl,-rpath,/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/usr/lib                         -Wl,-rpath,/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/recipe-sysroot-native/lib                         -Wl,-O1 -Wl,--allow-shlib-undefined -Wl,--dynamic-linker=/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2  -Wl,--add-needed -Wl,--build-id -Wl,--no-allow-shlib-undefined -Wl,-z,now -Wl,-z,muldefs -Wl,--no-undefined-version    -DLIBEFIVAR_VERSION=38 -D_GNU_SOURCE -I/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/git/src/include/ -DLIBEFIVAR_VERSION=38 -D_GNU_SOURCE -I/home/ichergui/projects/oe4t/tegra-bsp-platform/build-tegrademo/tmp/work/armv8a-oe4t-linux/efivar/38-r0/git/src/include/ -DEFIVAR_BUILD_ENVIRONMENT -march=native -o makeguids makeguids.o util-makeguids.o -ldl 
./makeguids Your linker is not supported guids.txt guid-symbols.c include/efivar/efivar-guids.h guids.lds
makeguids: Too many arguments.

./makeguids Your linker is not supported guids.txt guid-symbols.c include/efivar/efivar-guids.h guids.lds
makeguids: Too many arguments.

ERROR: oe_runmake failed


Any help would be appreciated
Best regards,
Ilies


Re: Dealing with go dependencies in recipes - native docker-compose

Bruce Ashfield
 



On Tue, Oct 11, 2022 at 2:51 PM Konstantin Kletschke <konstantin.kletschke@...> wrote:
Today I realized, that the docker-compose in the meta-virtualization
layer is the old python3 based one and a native solution is available. I
tried to make a recipe for it to get rid of python3 (no other packages
uses it in our setup) and the current python3-docker-compose is broken:

https://lore.kernel.org/yocto-meta-virtualization/49660EA1-CD22-40DB-98C7-C43F38A72CCA@.../

Adding the missing setuptools does get things working.

 


I tried to build the native solution proposed in
https://github.com/docker/compose/tree/v2.11.2.

I actually have a prototype recipe for this that I was working on before ELCe, but I didn't get it into meta-virtualization yet, as it had a few rough edges.

If you give me a few days, I can post it to the meta-virtualization list, but I'm on the road right now and don't have access to all my build machines.

So my current recipe docker-compose_2.11.2.bb looks like this:

LICENSE = "Apache-2.0"

inherit go
inherit go-mod

GO_IMPORT = "github.com/docker/compose"

SRC_URI = "git://${GO_IMPORT};protocol=https;branch=v2"
# v2.11.2
SRCREV = "616777eb4ad4d1101622d6727d9b7adaeb7943bb"

# S = "${WORKDIR}/git"

DEPENDS = "docker-ce"
RDEPENDS:${PN} = "docker-ce-cli"

With this I run into the issue, that go want's to download stuff while
compiling. Which is forbidden and breaks the reliable build proposal.
Totally understandable. Looks similair to this:

dial tcp: lookup proxy.golang.org: Temporary failure in name resolution

I read about a proposal allowing this by adding do_compile[network] =
"1" to meta/classes/go.bb:

https://lore.kernel.org/all/20220228235433.3948994-1-andrei@.../

Of course, if this works, the reliable build thingy is gone, but while

Right, it works, but would never make it into core due to it bypassing many
of the fetcher properties.

 
trying I discovered go loads external stuff, compiles it too.
In my case (I have kirkstone with go-1.17) I run into modules demanding
a go more recent:

ASH[build k8s.io/client-go/applyconfigurations/autoscaling/v2beta2]: "file containerresourcemetricsource.go Mas4-HIX5lGBEQNTIo58\n"
# github.com/docker/compose/v2/pkg/utils
pkg/utils/slices.go:23:6: missing function body
pkg/utils/slices.go:23:14: syntax error: unexpected [, expecting (
note: module requires Go 1.19
HASH[build k8s.io/client-go/applyconfigurations/certificates/v1beta1]
HASH[build k8s.io/client-go/applyconfigurations/certificates/v1beta1]: "go1.17.13"

which could be worked around by moving to landsdale release. Which
bothers me, because I too want to keep my build reliable. And I do not
want to mess around outside our meta layer in the distribution!
How do I do this properly?
I see people pulling in each dependency by individual golang.org-x.bb
recipes, how could such a recipe look like?

There are many different discussions about how to generate go recipes, as well
as similar discussions for ruby/rust, etc, you can find them on the openembedded-core
and openembedded-architectures lists.

I also did a presentation at the yocto summit about "modern languages".

So I won't try and summarize all those discussions here, since they are archived
and do a much better job than I could here.

But to answer the specific question .. you can't really handle the individual
go dependencies as recipes. They are far too sensitive to versions and
individual git hashes.  Plus you'll end up with thousands of recipes of varying
versions.

There have been several proposals about how to generate go recipes to deal with
the dependencies. Some prototypes have been posted, but there hasn't
been a lot of traffic on that topic for several months now.

You can see the approach that I take for this in the k3s and nerdctl recipes
in meta-virtualization. My new docker-compose recipe is of similar format.
 

I read
https://lore.kernel.org/all/8132db85-5881-636e-c091-d84c47efe4fe@.../T/
where Mike is not happy with this appraoch either and comes up with a
working recipe I don't get why this could work at all.

What am I missing here where is the missing link I did not get yet?

Also, I am jealous about the buildroot guys sometimes, how do they do
this in a 22 lines makefile including comments:

https://git.busybox.net/buildroot/tree/package/docker-compose/docker-compose.mk


If we just bypass the fetcher, offline builds, some of licensing and SBOM
and reproducible builds .. you can have a simple recipe like that as well :)

Bruce

 

Regards
Konstantin

--
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

konstantin.kletschke@...
http://www.inside-m2m.de

Geschäftsführung: Michael Emmert, Ingo Haase, Dr. Fred Könemann, Derek Uhlig
HRB: 111204, AG Hannover






--
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end
- "Use the force Harry" - Gandalf, Star Trek II


# honister #systemd attempting to run script on boot... #systemd

Monsees, Steven C (US)
 

 

I am trying to make use of system to run a test script at boot…

I can exercise my test_script/test_script.service manually using systemctl commands and it appears to work as expects.

 

I created a recipe based on this, it builds clean (no errors/warnings), but it doesn’t appear to set things up correctly.

I have only recently begun working with honister, and new to systemd…

 

Could someone have look at my recipe & service file and see if they can spot anything ?

 

My recipe:

 

#

# This file is the my_test_script recipe.

#

 

SUMMARY = "Simple my_test_script application"

SECTION = "apps"

LICENSE = "MIT"

LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

 

inherit systemd

 

SRC_URI = "file://test_script.sh \

           file://test_script.service"

 

S = "${WORKDIR}"

 

SYSTEMD_PACKAGES = "${PN}"

SYSTEMD_SERVICE_${PN} = "test_script.service"

SYSTEMD_AUTO_ENABLE:${PN} = "enable"

 

do_install() {

             install -d ${D}${bindir}

             install -m 0755 ${S}/test_script.sh ${D}${bindir}

 

             install -d ${D}${systemd_system_unitdir}

             install -m 0644 ${S}/test_script.service ${D}${systemd_system_unitdir}

}

 

FILES_${PN} = "${bindir}"

FILES_${PN} += "${systemd_system_unitdir}"

 

REQUIRED_DISTRO_FEATURES="systemd"

---

My test script service file:

 

[Unit]

Description=Configure test

 

[Service]

Type=oneshot

ExecStart=/usr/bin/test_script.sh start

StandardOutput=journal+console

 

[Install]

WantedBy=multi-user.target

---

My test script:

 

#!/bin/bash

# description: Description comes here....

 

echo "*******************************"

echo "START: Hello PetaLinux World :)"

date +"%m/%d/%Y %H:%M:%S $HOSTNAME"

echo "*******************************"

 

Thanks,

Steve


Dealing with go dependencies in recipes - native docker-compose

Konstantin Kletschke
 

Today I realized, that the docker-compose in the meta-virtualization
layer is the old python3 based one and a native solution is available. I
tried to make a recipe for it to get rid of python3 (no other packages
uses it in our setup) and the current python3-docker-compose is broken:

https://lore.kernel.org/yocto-meta-virtualization/49660EA1-CD22-40DB-98C7-C43F38A72CCA@ieee.org/

I tried to build the native solution proposed in
https://github.com/docker/compose/tree/v2.11.2.

So my current recipe docker-compose_2.11.2.bb looks like this:

LICENSE = "Apache-2.0"

inherit go
inherit go-mod

GO_IMPORT = "github.com/docker/compose"

SRC_URI = "git://${GO_IMPORT};protocol=https;branch=v2"
# v2.11.2
SRCREV = "616777eb4ad4d1101622d6727d9b7adaeb7943bb"

# S = "${WORKDIR}/git"

DEPENDS = "docker-ce"
RDEPENDS:${PN} = "docker-ce-cli"

With this I run into the issue, that go want's to download stuff while
compiling. Which is forbidden and breaks the reliable build proposal.
Totally understandable. Looks similair to this:

dial tcp: lookup proxy.golang.org: Temporary failure in name resolution

I read about a proposal allowing this by adding do_compile[network] =
"1" to meta/classes/go.bb:

https://lore.kernel.org/all/20220228235433.3948994-1-andrei@gherzan.com/

Of course, if this works, the reliable build thingy is gone, but while
trying I discovered go loads external stuff, compiles it too.
In my case (I have kirkstone with go-1.17) I run into modules demanding
a go more recent:

ASH[build k8s.io/client-go/applyconfigurations/autoscaling/v2beta2]: "file containerresourcemetricsource.go Mas4-HIX5lGBEQNTIo58\n"
# github.com/docker/compose/v2/pkg/utils
pkg/utils/slices.go:23:6: missing function body
pkg/utils/slices.go:23:14: syntax error: unexpected [, expecting (
note: module requires Go 1.19
HASH[build k8s.io/client-go/applyconfigurations/certificates/v1beta1]
HASH[build k8s.io/client-go/applyconfigurations/certificates/v1beta1]: "go1.17.13"

which could be worked around by moving to landsdale release. Which
bothers me, because I too want to keep my build reliable. And I do not
want to mess around outside our meta layer in the distribution!
How do I do this properly?
I see people pulling in each dependency by individual golang.org-x.bb
recipes, how could such a recipe look like?

I read
https://lore.kernel.org/all/8132db85-5881-636e-c091-d84c47efe4fe@gmail.com/T/
where Mike is not happy with this appraoch either and comes up with a
working recipe I don't get why this could work at all.

What am I missing here where is the missing link I did not get yet?

Also, I am jealous about the buildroot guys sometimes, how do they do
this in a 22 lines makefile including comments:

https://git.busybox.net/buildroot/tree/package/docker-compose/docker-compose.mk


Regards
Konstantin

--
INSIDE M2M GmbH
Konstantin Kletschke
Berenbosteler Straße 76 B
30823 Garbsen

Telefon: +49 (0) 5137 90950136
Mobil: +49 (0) 151 15256238
Fax: +49 (0) 5137 9095010

konstantin.kletschke@...
http://www.inside-m2m.de

Geschäftsführung: Michael Emmert, Ingo Haase, Dr. Fred Könemann, Derek Uhlig
HRB: 111204, AG Hannover


Re: How to create symlink while installing binary in recipe?

Khem Raj
 

On Tue, Oct 11, 2022 at 9:36 AM Sourabh Hegde <hrsourabh011@...> wrote:

Hello All,

I have a simple recipe in which a binary is installed to /usr/bin/. Now, I want to establish a symlink to same binary also. I am using hardknott release

do_install () {
install -d ${D}${bindir}/
install -m 0755 ${WORKDIR}/test.sh ${D}${bindir}/test
lnr ${D}/usr/bin/test ${D}/usr/bin/test-x
}

Is this the correct approach? Or is there any better method?
Looks ok perhaps you want to double check using lnr we have dropped
its usage in master but I am not sure if hardknott needs it or not. I
would simily use

ln -sf test ${D}/usr/bin/test-x

and avoid using the lnr wrapper.



How to create symlink while installing binary in recipe?

Sourabh Hegde
 

Hello All,

I have a simple recipe in which a binary is installed to /usr/bin/. Now, I want to establish a symlink to same binary also. I am using hardknott release

do_install () {
    install -d ${D}${bindir}/
    install -m 0755 ${WORKDIR}/test.sh ${D}${bindir}/test
    lnr ${D}/usr/bin/test ${D}/usr/bin/test-x
}

Is this the correct approach? Or is there any better method?