tsntool does not work in ubuntu_mate of LSDK19.09 on ls1028ardb

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

tsntool does not work in ubuntu_mate of LSDK19.09 on ls1028ardb

Jump to solution
1,126 Views
yyu2
Contributor III

Hi all,

I used the command of "flex-builder -m ls1028ardb -r ubuntu:mate" to generate three files:

"

bootpartition_LS_arm64_lts_4.19_201912101224.tgz

firmware_ls1028ardb_uboot_sdboot.img

rootfs_lsdk1909_LS_arm64_mate_201912101227.tgz

"

Then deploy the image to SD card by cmd:

"

flex-installer -b bootpartition_LS_arm64_lts_4.19_201912101224.tgz -r rootfs_lsdk1909_LS_arm64_mate_201912101227.tgz -f firmware_ls1028ardb_uboot_sdboot.img -d /dev/sdb

"

After start ls1028ardb from SD card, I can not run tsntool, with error of:

"tsntool: error while loading shared libraries: libcjson.so.1: cannot open shared object file: No such file or directory"

However if I deploy the rootfs of "rootfs_lsdk1909_LS_arm64_main", the tsntool works normally.

Could you help to verify this problem?

Best,

   Yi

P.S. I noticed there are statements about mate user land in chapter 4.3 of LSDK19.09 user guide. It looks like only part of NXP packages are included in default build process. what's the reason behind this? (for saving build size?). And how can I build libcjson.so for ubuntu:mate?

pastedImage_1.png

By trying "flex-builder -c cjson -r ubuntu:mate", it does nothing and return. How can I make cjson against ubuntu:mate?

pastedImage_1.png

Tags (1)
0 Kudos
1 Solution
982 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Yi Yu,

By default tsntool and cjson are only included in main rootfs, not in mate rootfs. If you need to enable cjson in ubuntu mate, please modify packages/apps/Makefile as the following.

 

+++ b/packages/apps/Makefile

@@ -623,7 +623,7 @@ endif

 cjson:

 ifeq ($(CONFIG_APP_CJSON), y)

 ifeq ($(DESTARCH),arm64)

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

+       @[ $(DISTROTYPE) != ubuntu -a $(DISTROTYPE) != yocto ] && exit || \

Then run command

flex-builder -c cjson -r ubuntu:mate

Please refer to the following procedure to build tsntool in ubuntu:mate.
0. Please modify packages/apps/Makefile as the following.
ifeq ($(CONFIG_APP_TSNTOOL), y)
ifeq ($(DESTARCH),arm64)
- @[ $(DISTROTYPE) != ubuntu -a $(DISTROTYPE) != yocto -o $(DISTROSCALE) = mate -o $(DISTROSCALE) = tiny ] && exit || \
+ @[ $(DISTROTYPE) != ubuntu -a $(DISTROTYPE) != yocto -o $(DISTROSCALE) = tiny ] && exit || \

1. sudo chroot build/rfs/rootfs_lsdk1909_LS_arm64_mate
2. apt install libnl-3-dev libreadline-dev libtinfo-dev
3. cd /usr/lib/aarch64-linux-gnu && ln -sf ../../../lib/aarch64-linux-gnu/libtinfo.so.5 libtinfo.so
4. exit
5. flex-builder -c tsntool -r ubuntu:mate
6. flex-builder -i merge-component -r ubuntu:mate

Thanks,

Yiping

View solution in original post

0 Kudos
3 Replies
982 Views
c_t_yen
Contributor I

Hi  yipingwang

 

How should I build tsntool on buildroot_devel of LSDK19.09 

 

Thanks

===============================================================================

for cjson:

 ifeq ($(CONFIG_APP_CJSON), y)

 ifeq ($(DESTARCH),arm64)

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

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

 

Then run command

flex-builder -c cjson -r buildroot:devel

 

=========================================================================================

How should I do for building tsntool on buildroot_devel ?

Thanks

0 Kudos
982 Views
c_t_yen
Contributor I

Hi  yipingwang

 

How should I build tsntool on buildroot_devel of LSDK19.09 

 

Thanks

===============================================================================

for cjson:

 ifeq ($(CONFIG_APP_CJSON), y)

 ifeq ($(DESTARCH),arm64)

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

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

 

Then run command

flex-builder -c cjson -r buildroot:devel

 

=========================================================================================

How should I do for building tsntool on buildroot_devel ?

Thanks

0 Kudos
983 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Yi Yu,

By default tsntool and cjson are only included in main rootfs, not in mate rootfs. If you need to enable cjson in ubuntu mate, please modify packages/apps/Makefile as the following.

 

+++ b/packages/apps/Makefile

@@ -623,7 +623,7 @@ endif

 cjson:

 ifeq ($(CONFIG_APP_CJSON), y)

 ifeq ($(DESTARCH),arm64)

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

+       @[ $(DISTROTYPE) != ubuntu -a $(DISTROTYPE) != yocto ] && exit || \

Then run command

flex-builder -c cjson -r ubuntu:mate

Please refer to the following procedure to build tsntool in ubuntu:mate.
0. Please modify packages/apps/Makefile as the following.
ifeq ($(CONFIG_APP_TSNTOOL), y)
ifeq ($(DESTARCH),arm64)
- @[ $(DISTROTYPE) != ubuntu -a $(DISTROTYPE) != yocto -o $(DISTROSCALE) = mate -o $(DISTROSCALE) = tiny ] && exit || \
+ @[ $(DISTROTYPE) != ubuntu -a $(DISTROTYPE) != yocto -o $(DISTROSCALE) = tiny ] && exit || \

1. sudo chroot build/rfs/rootfs_lsdk1909_LS_arm64_mate
2. apt install libnl-3-dev libreadline-dev libtinfo-dev
3. cd /usr/lib/aarch64-linux-gnu && ln -sf ../../../lib/aarch64-linux-gnu/libtinfo.so.5 libtinfo.so
4. exit
5. flex-builder -c tsntool -r ubuntu:mate
6. flex-builder -i merge-component -r ubuntu:mate

Thanks,

Yiping

0 Kudos