AnsweredAssumed Answered

LSDK 19.09 issues - updated

Question asked by mrybaizine@rdlcom.com on Feb 11, 2020

Updates: 

 After adding important NTP and LinuxPTP projects flex-builder fails to build yocto:Devel.  

ISSUEs : Flex-builder doesn't know how to deal with simlinks it creates. Here is the build output: 

cp: cannot overwrite directory 'yoctobuild/tmp/work/qemuarm64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc' with non-directory

ISSUE  flex-builder says again:

mkdir: cannot create directory ‘/flexbuild_lsdk1909/build/apps/components_LS_arm64_yocto/etc’: File exists

 NXP ! Start hiring skilled coders who can write smart code. Also, Start hiring QA to test that bloody code.

 NXP LSDK is not an open source community project.

The latest updates are mostly about yocto:tiny because I see it as the only candidate for production image.

All other images are huge or have some bugs mentioned below.

If you check my other threads you can see NXP support and development team advise you to do a lot of manual operations to fix problems with the builds and apps. 

They ignore the fact  NXP customers are working on products  for mass-production

Only prebuild version of yocto:tiny  userland  has some tools working properly because NXP fixes it manually.

For instance, important tsntool  is not working if you build yocto:tiny with disabled option to fetch prebuild files.

1. The build will fail if you add tsntool to IMAGE_INSTALL_append.

2. $ flex-builder -c tsntool -r yocto:tiny   or flex-builder -c apps yocto:tiny will not work because the Makefile excludes tsntool for yocto:tiny.

If you still want to fallow NXP support advice trying  $ flex-builder -c tsntool -a arm64 or something like that you will end up with ubuntu:main instead of yocto:tiny ,  flexbuild_usage.txt explains it. 

So, don't get surprised when you check the size of rootfs ...it is 120MB instead of 15MB promised by NXP in 

 4.2 LSDK memory layout and Userland. This is just compressed tgz  file . The deployed image is 400MB.

It is a behemoth with 3 legs and constant constipation. 

 

yocto build fails when you add cryptodev_linux to  to "IMAGE_INSTALL_append" in local_arm64_tiny.conf

It is not working the way LSDK1909 manual says

9.1.1.2 Manual Build of OpenSSL with Cryptodev Engine Support
This chapter is optional since the root filesystem can be configured to include both OpenSSL and cryptodev automatically.

Yet, it is not working as  NXP support advised : $flex-builder -c cryptodev_linux -a arm64

   because 1. The command will build ubuntu:main     2. the Makefile doesn't have cryptodev. 

 

For many important NXP apps/tools,   packages/apps/Makefile   has   $(call build_dependent_rfs)  it is defined  in

file (repo.mk)  here we go :

define build_dependent_rfs
echo building dependent $(DESTARCH) rootfs && flex-builder -i mkrfs -r $(DISTROTYPE):$(DISTROSCALE) -p $(SOCFAMILY) -a $(DESTARCH) -f $(CONFIGLIST)
endef 

Flex-builder script has build_distro_rfs_yocto() function  called by flex-builder -i mkrfs -r command .

build_distro_rfs_yocto() calls  flex-builder -c apps -r yocto:$DISTROSCALE -a ${DESTARCH} -f $CONFIGLIST 

which will call the Makefile , The Makefile calls  (repo.mk)   build_dependent_rfs  which calls 

flex-builder -i mkrfs -r  which calls build_distro_rfs_yocto() .................... Red calls Red  -> infinite recursion

You can see it :

When you try to include tsntool in yocto:tiny build.  It doesn't work  because the Make file has that line (below) for tsntool

Replace the word tiny with any word like tinyYW for instance . Flex-builder will build tsntooll for yocto:tiny and will go in the infinite loop.

@[ $(DISTROTYPE) != ubuntu -a $(DISTROTYPE) != yocto -o $(DISTROSCALE) = mate -o $(DISTROSCALE) = tiny ] && exit || 

-------------------------------

NXP provides NO Distro candidate for production.

Today March 4 2020  NXP support generated file rootfs_lsdk2004_yocto_tiny_arm64

with LSDK2004 which has not been released yet. but, They advise you to use "The Procedure"  with lsdk_1909.

What kind of game is that ?

So, You need a team of Linux build engineers to build you own distro for production.

(see thread :  NXP LSDK has no disto for production )

1. ubuntu:Lite doesn't work.  ( and the patch doesn't work with default flex-builder config) 

2. yocto:tiny  has issues as well.  (you can't add your apps). No openssl  - means no https connection.

3. All Ubuntu distros  have Ethernet eno0 issue  which you can't fix (the way NXP says by bringing eno0 down/up. )

      It needs to unplug/plug Ethernet cable for my LS1028ardb. 

NXP says :  use generic driver !  

Did I choose LS1028ardb to use generic driver so the switch and TSN will not work the way I need ???

4. Buildroot based OpenIL  has very old openssl _1.0 , so, https will not work with any modern web browser. 

5. So far, there is no small size distro for SOCs without GPU like 1027 to use in production.

    Flash memory footprint. Flashing time in production. Updating the image over-the-air  in the field. 

                                             is a problem  because actual memory footprint is huge

6. When NXP says yocto:devel is 370MB  they mean compressed rootfs targz file .  The SD image is 1.2GB

7.  You can't add your own apps to yocto:tiny or ubuntu:lite  (I didn't check other distors ) 

8.  You can't add openssl to  yocto:tiny or ubuntu:lite  (I didn't check other distros without openssl ) 

9. It looks like Flex-builder has bugs but NXP  insists on using "THE PROCEDURE"

 

You can't add your own apps or some other pkgs  as openssl  for yocto:tiny and some other distros simply by

adding "openssl" variable to "IMAGE_INSTALL_append" in configs/yocto/local_arm64_tiny.conf.

Flex-builder is a script , so , in case with your own apps or openssl

it is not working because openssl makefile installs  openssl directory to /usr/local/ssl .

You can see that in source directory :

flexbuild_lsdk_1909/build/apps/components_arm64_yocto/usr/local   

                         but   it will not appear in destination directory :

flexbuild_lsdk_1909/build/rfs/rootfs_yocto_tiny 

        because flex-builder changes paths regardless pkg makefile install paths.

 

 yocto:devel works fine because Flex-builder has a separate branch in build_distro_rfs_yocto()  function which doesn't change any install path for yocto:devel. It will  copy everything as is   from source to destination. 


Lets look  at the functions inside the flex-builder script
1. build_distro_rfs_yocto()  
It says: if [ $DISTROSCALE = tiny ]; then  - all paths are hardcoded for particular apps ONLY,   but

openssl  and  your own apps are not among those !
My apps don't appear in the destination rootfs because my makefile install them to /user/local and usr/local/lib.

So, I had to change my makefile install paths and  hardcode those paths for my app in similar way:
[ -f $DESTDIR/usr/bin/myApp ] && sudo cp -f $DESTDIR/usr/bin/myApp $RFSDIR/usr/bin ....  and..  $RFSDIR/usr/lib

 

2. merge_components() function doesn't have a branch for yocto at all. The default actions ruin proper installation for custom apps if the app install path is not usr/bin  and usr/lib

Outcomes