Cannot update rootfs on rdb ls2085

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cannot update rootfs on rdb ls2085

4,464 Views
elishemesh
Contributor I

Hi

I am working on LS2085A ear5.

I would like to add sftp server to the rootfs. I added the line "vsftpd" to "meta-fsl-networking/images/fsl-image-core.bb". After this I made "bitbake fsl-image-core" and then "bitbake fsl-image-kernelitb". In the deploy folder I opened the rootfs and I could find the sftp under "/usr/sbin/vsftpd". However when I down load the kernel.itb to the target (drb) I could not find the file in "/usr/sbin/vsftpd" and the sftp server did not work.

When I opened the file "tmp/work/ls2085ardb-fsl-linux/fsl-image-kernelitb/1.0-r0/kernel-rdb.its", I did not found the rootfs as part of the kernel.itb.

My question is: How can I update the rootfs and what is the correct way to add the sftp server?

Thanks,

Eli.

Labels (1)
Tags (1)
0 Kudos
Reply
5 Replies

3,862 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Eli,

Probably you didn't use the correct file, I verified your procedure, and test the built image on ls2085 board, it works.

Add vsftpd in the recipe meta-fsl-networking/images/fsl-image-core.bb, then execute "bitbake fsl-image-core" and "bitbake fsl-image-kernelitb", after building please use the file "kernel-ls2085ardb.itb" in build_ls2085ardb_release/tmp/deploy/images/ls2085ardb/kernel-ls2085ardb.itb

IMAGE_INSTALL += " \

    gdbserver \

    packagegroup-fsl-core \

    packagegroup-fsl-dpaa2 \

    vsftpd \

"

Please refer to the following boot log on ls2085 target board.

...

INIT: Entering runlevel: 5

Configuring network interfaces... done.

Starting OpenBSD Secure Shell server: sshd

  generating ssh RSA key...

  generating ssh ECDSA key...

  generating ssh DSA key...

[    4.786138] EXT3-fs (sda1): using internal journal

[    4.790931] EXT3-fs (sda1): mounted filesystem with writeback data mode

  generating ssh ED25519 key...

[    4.914610] NET: Registered protocol family 10

done.

Starting network benchmark server: netserver.

Starting system log daemon...0

Starting kernel log daemon...0

Starting internet superserver: xinetd.

* starting FTP Server: vsftpd... done.

Poky (Yocto Project Reference Distro) 1.8 ls2085aqds /dev/ttyS0


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

3,862 Views
elishemesh
Contributor I

Hello Yiping

Thank you for the quick test.

I tried your suggestion, and even I run the bitbake with the –f option. I copied the file "kernel-ls2085ardb.itb" to the target and I cannot find in target the files:

1. ./etc/init.d/vsftpd

2. ./usr/sbin/vsftpd

However when I opened the file "fsl-image-core-ls2085ardb.tar.gz", that located in deploy, in my x86 linux machine, I found those files.

Please reread what I wrote about the file "tmp/work/ls2085ardb-fsl-linux/fsl-image-kernelitb/1.0-r0/kernel-rdb.its". It looks that it will not work, because the its file do not pack the rootfs to the itb file.

Thanks,

Eli Shemesh

System Architect | Telrad Networks Ltd

T +972.73.246.7602 | M +972.54.542.9638

<http://mkt2.us/TelrdNet> Follow us on <http://www.linkedin.com/company/telrad-networks>

<http://www.prweb.com/releases/2015/10/prweb13026321.htm>

0 Kudos
Reply

3,862 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Eli,

The file tmp/work/ls2085ardb-fsl-linux/fsl-image-kernelitb/1.0-r0/kernel-rdb.its includes the following.

images {
           kernel@1 {
                   description = "ARM64 Linux kernel";
                   data = /incbin/("Image.gz");
                   type = "kernel";
                   arch = "arm64";
                   os = "linux";
                   compression = "gzip";
                   load = <0x80080000>;
                   entry = <0x80080000>;
           };
           fdt@1 {
                   description = "Flattened Device Tree blob";
                   data = /incbin/("Image-fsl-ls2085a-rdb.dtb");
                   type = "flat_dt";
                   arch = "arm64";
                   compression = "none";
                   load = <0x90000000>;
           };
           ramdisk@1 {
                   description = "LS2 Ramdisk";
                   data = /incbin/("fsl-image-core-ls2085ardb.ext2.gz");
                   type = "ramdisk";
                   arch = "arm64";
                   os = "linux";
                   compression = "none";
          

};

$ md5sum tmp/deploy/images/ls2085ardb/fsl-image-core-ls2085ardb.ext2.gz

f0ae4d49cd893bd39bed403f890f65cc  tmp/deploy/images/ls2085ardb/fsl-image-core-ls2085ardb.ext2.gz

$ md5sum tmp/work/ls2085ardb-fsl-linux/fsl-image-kernelitb/1.0-r0/fsl-image-core-ls2085ardb.ext2.gz

f0ae4d49cd893bd39bed403f890f65cc  tmp/work/ls2085ardb-fsl-linux/fsl-image-kernelitb/1.0-r0/fsl-image-core-ls2085ardb.ext2.gz


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

3,862 Views
elishemesh
Contributor I

Hello Yiping

Now I can find the sftp server in the target. The problem was that I have to update the kernel.itb when the bank in the rdb is 4. I have to use the command "qixis_reset altbank", in the target, prior to updating the kernel.itb in the u-boot.

However the sftp server did not work because I have to change the line "Subsystem sftp /usr/lib/openssh/sftp-server" to " Subsystem sftp internal-sftp" in file: " work/ls2085ardb-fsl-linux/fsl-image-core/1.0-r0/rootfs/etc/ssh/sshd_config".

The problem is when I run " bitbake fsl-image-kernelitb", the bitbake remove my changes.

What is the correct way to change files in rootfs and then to build with bitbake?

Thanks,

Eli Shemesh

System Architect | Telrad Networks Ltd

T +972.73.246.7602 | M +972.54.542.9638

<http://mkt2.us/TelrdNet> Follow us on <http://www.linkedin.com/company/telrad-networks>

<http://www.prweb.com/releases/2015/10/prweb13026321.htm>

0 Kudos
Reply

3,862 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Eli,

The file sshd_config is generated when compiling the package openssh, please use the following method to add your modification into rootfs filesystem.

$ bitbake openssh -c cleansstate

$ bitbake openssh -c compile -f

$ cd build_ls2085ardb_release/tmp/work/aarch64-fsl-linux/openssh/6.7p1-r0/openssh-6.7p1/

Modify the file sshd_config as what you require.

$ bitbake openssh

$ bitbake fsl-image-core

$ bitbake fsl-image-kernelitb


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply