1

I use Yocto Zeus to build an embedded Linux for my board. So far I need to replace the /etc/ssh/sshd_config with my custom one.

Unfortunately I couldn't find any useful information about that. Just found some help on the Internet. I've created a custom layer and add an recipe as following:

sources
  mylayer
    mylayer-recipes
      recipes-connectivity
        openssh
          openssh_%.bbappend
          openssh
            sshd_config

openssh_%.bbappend

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://sshd_config"

after this I've try to rebuild the image

`bitbake core-image-minimal`

But nothing happens. No error and no change of the sshd_config file in the image.

What I do wrong? Actually I only want to replace the system /etc/ssh/sshd_config with the custom one, nothing else.

Guy Avraham
  • 3,482
  • 3
  • 38
  • 50
folibis
  • 12,048
  • 6
  • 54
  • 97

1 Answers1

0

Ok, I've finally solved the issue. It's turned out that I haven't follow the full path to the *.bb but only the top level although the doc says "...This implies that you must have the supporting directory structure set up that will contain any files or patches you will be including from the layer." in the 5.1.5. Using .bbappend Files section. So the final folders structure looks like this:

sources
  mylayer
    mylayer-recipes          
        openssh
          openssh_%.bbappend
          openssh
            sshd_config <----- the file that replaces the original one

  poky
    recipes-connectivity
      openssh
        openssh_8.0p1.bb
        openssh
          sshd_config   <----- the original file
          ....

i.e. I just added folder openssh to mylayer-recipes folder and now that works as expected

folibis
  • 12,048
  • 6
  • 54
  • 97