# Legato framework porting on imx6ull, board rebooting after 40 seconds

**URL:** <https://forum.legato.io/t/legato-framework-porting-on-imx6ull-board-rebooting-after-40-seconds/3669>\
**Category:** Uncategorized\
**Created:** [September 14, 2018, 7:19am UTC](https://forum.legato.io/t/legato-framework-porting-on-imx6ull-board-rebooting-after-40-seconds/3669 "2018-09-14T07:19:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vijithg](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vijithg](https://forum.legato.io/u/vijithg)\
**Post date:** [September 14, 2018, 7:19am UTC](https://forum.legato.io/t/legato-framework-porting-on-imx6ull-board-rebooting-after-40-seconds/3669/1 "2018-09-14T07:19:04Z")

</div>

I used the Linux OS image fsl-image-validation-imx-x11-imx6ull14evk.sdcard downloaded from NXP imx6ull website. I flashed this Linux OS image on the sdcard. I downloaded kernel source code linux-fslc-4.14-rc8 from git repository for imx6. I merged legatocfg file with configuration of the kernel source code. I used below command for merging legatocfg file.

ARCH=arm make defconfig && ARCH=arm scripts/kconfig/merge\_config.sh -O . .config legatocfg

I added supporting packages in to configuration file of the kernel source code using ARCH=arm make menuconfig.

I built the zImage, dtbs files and modules.

I used below command for building the zImage.

make -j 4 ARCH=arm CROSS\_COMPILE=arm-linux-gnueabihf- zImage modules dtbs

For compiling and building legato for IMX6, I used a gcc tool, gcc-linaro-6.4.1-2018.05-x86\_64\_arm-linux-gnueabihf. I used instruction of raspberry pi legato build for building legato for IMX6.

Commands executed for building legato.squashfs

export RASPI\_TOOLCHAIN\_DIR=~/tools/gcc-linaro-arm-6.4.1-2018.05-x86\_64/bin/

export RASPI\_TOOLCHAIN\_PREFIX=arm-linux-gnueabihf-

make raspi

I built legato.squashfs successfully for IMX6.

I installed those files in to sdcard Linux os image. Successfully Linux OS booted. I mounted the legato.squashfs on imx6ull board OS. After that I attempted to start the legato. Legato frame work started running for less than 40 Seconds. After that imx6ull board restarted.

Imx6ull board showed an error like ‘logread: can’t find syslogd buffer no such file or directory’.

Supervisor also killed.

After rebooting only, the below commands are working

legato status

legato version

legato restart.

I could not execute below raspberry pi instruction on the target

1: editing below mentioned file.

/etc/systemd/system/systemd-journald.service

add “SmackProcessLabel=syslog” in [Service]

- The systemd-journald.service file was not present in imx6ull board OS.

2: edit below mentioned file.

/etc/ssh/sshd\_config

set PermitRootLogin to Yes.

- I have already permission for login as root.

In the first attempt legato status showed an error message as the command not found.

After rebooting and running legato using the command /. /mnt/legato/start only those commands detected as system commands executed successfully.

Legato status command showed as legato installed, good and legato framework is running.

For verification of the target, I executed successfully legato version command. But fwupdate query failed and showed an error ‘fwupdate: error while loading shared libraries: liblegato.so: cannot open shared object file: No such file or directory’

I am using legato version as 18.04.0 and Linux kernel version as 4.14.rc8.

This issue is completely blocking our development. Please help me to resolve this rebooting issue.

---

<div class="post-metadata">

**Author:** ![JonBack](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jonback/32/206_2.png) [@JonBack](https://forum.legato.io/u/JonBack)\
**Post date:** [September 19, 2018, 12:14am UTC](https://forum.legato.io/t/legato-framework-porting-on-imx6ull-board-rebooting-after-40-seconds/3669/2 "2018-09-19T00:14:17Z")

</div>

So, you executed the [fwupdate - Legato Docs](https://docs.legato.io/latest/toolsHost_fwupdate.html) query on a host, and you saw the error on the target that the Service fwupdate had failed to start because it couldn’t load liblegato.so? Can you post your “app status” and some snippets of your logs.

---

<div class="post-metadata">

**Author:** ![zmarkovic](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/zmarkovic/32/314_2.png) [@zmarkovic](https://forum.legato.io/u/zmarkovic)\
**Post date:** [September 20, 2018, 8:56pm UTC](https://forum.legato.io/t/legato-framework-porting-on-imx6ull-board-rebooting-after-40-seconds/3669/3 "2018-09-20T20:56:27Z")

</div>

We are happy to see your progress in bringing up Legato on your system. I am not clear if you are still encountering issues in bringing up your BSP, but for the last issue of fwupdate not being able to find liblegato.so, it seems like you don’t have your ld.so.cache set properly.

When you start Legato on Sierra Wireless systems, you would see the lines:  
root@swi-mdm9x28:~# legato start  
update-ld-cache: Updating ld.so.cache using [/legato/systems/current/lib]…  
update-ld-cache: Updating /etc/ld.so.cache …  
update-ld-cache: Removing stale mount [/etc/ld.so.cache]…

Library liblegato.so happens to be in that library path:  
root@swi-mdm9x28:~# ls /legato/systems/current/lib |grep liblegato  
liblegato.so

One option you may have is to explicitly set LD\_LIBRARY\_PATH before starting legato, e.g.:  
LD\_LIBRARY\_PATH=$LD\_LIBRARY\_PATH:/legato/systems/current/lib legato start

---

<div class="post-metadata">

**Author:** ![vijithg](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vijithg](https://forum.legato.io/u/vijithg)\
**Post date:** [September 21, 2018, 6:55am UTC](https://forum.legato.io/t/legato-framework-porting-on-imx6ull-board-rebooting-after-40-seconds/3669/4 "2018-09-21T06:55:29Z")

</div>

![Screenshot%20from%202018-09-09%2017-02-49](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/9845f7ea6cfced720fbe2f3f8e73f5230e07152a.png) ![Screenshot%20from%202018-09-09%2017-03-13](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/6d7cfccbdd662ed9d6e07d824bf7fbcce619c92c.png) ![Screenshot%20from%202018-09-09%2017-09-48](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/04dc1df47ba591d2c12338eed3f4d8a948a054cb.png) ![Screenshot%20from%202018-09-09%2017-10-21](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/050da8033c88adceab74e41f169b3292e358f10d.png) [strace\_reboot](https://forum.legato.io/uploads/short-url/jHKPXgfikIIdPvhQLil7aHdQKSY) (29.5 KB)  
I uploaded all the files I got , When I tried to up legato on IMX6ull board.

---

<div class="post-metadata">

**Author:** ![vijithg](https://avatars.discourse-cdn.com/v4/letter/v/ce73a5/32.png) [@vijithg](https://forum.legato.io/u/vijithg)\
**Post date:** [September 21, 2018, 7:32am UTC](https://forum.legato.io/t/legato-framework-porting-on-imx6ull-board-rebooting-after-40-seconds/3669/5 "2018-09-21T07:32:29Z")

</div>

As per the legato document, fwupdate query used for verifying the target . For that purpose I used that command.As part of verification only legato version and legato status worked.But fwupdate query command did not work.

When I debugged the source code , I found that IPC are not up . Legato framework is wating for that for 30 Seconds.

---

<div class="post-metadata">

**Author:** ![CoRfr](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/corfr/32/69_2.png) [@CoRfr](https://forum.legato.io/u/CoRfr)\
**Post date:** [October 20, 2018, 1:29am UTC](https://forum.legato.io/t/legato-framework-porting-on-imx6ull-board-rebooting-after-40-seconds/3669/6 "2018-10-20T01:29:14Z")

</div>

There is an issue regarding Legato + SMACK + IPC on kernels \>= 4.4 .

This is a known issue that is being worked on through improvements of the SMACK management, but one way to work around it is to disable the Legato SMACK management altogether, by building it through: `DISABLE_SMACK=1 make <target>`.

The most recent version of Legato (18.09.0) has improvements on this aspect, so it might be worth trying it out for your usage.
