# Platform Build error for raspiberry pi

**URL:** https://forum.legato.io/t/platform-build-error-for-raspiberry-pi/3342
**Category:** Legato Application Framework
**Created:** [June 15, 2018, 11:59am UTC](https://forum.legato.io/t/platform-build-error-for-raspiberry-pi/3342 "2018-06-15T11:59:53Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![sowvikroy](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@sowvikroy](https://forum.legato.io/u/sowvikroy)
#### Post date: [June 15, 2018, 11:59am UTC](https://forum.legato.io/t/platform-build-error-for-raspiberry-pi/3342/1 "2018-06-15T11:59:53Z")

</div>

1. Installed all the necessary tools mentioned

2. export RASPI\_TOOLCHAIN\_DIR=~/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

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

1. git clone legato framework

2. make raspi

3. The error occurs as follows

---

<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: [June 15, 2018, 5:35pm UTC](https://forum.legato.io/t/platform-build-error-for-raspiberry-pi/3342/2 "2018-06-15T17:35:29Z")

</div>

Hi @sowvikroy,

note that you should clone legato with `repo`, cf [GitHub - legatoproject/legato-af: Legato Application Framework](https://github.com/legatoproject/legato-af#clone-from-github)

Then try to also declare the `RASPI_SYSROOT` env. variable.  
It should be able to detect it by itself but it’s failing to do so.  
I’ll try to solve this for the next release.

BTW, as a warning, the raspi support is quite unmaintained unfortunately.  
It builds but that’s the extend of our testing at the moment.  
Please let us know if you encounter any runtime issue.

Thanks

---

<div class="post-metadata">

### Author: ![sowvikroy](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@sowvikroy](https://forum.legato.io/u/sowvikroy)
#### Post date: [June 18, 2018, 10:28am UTC](https://forum.legato.io/t/platform-build-error-for-raspiberry-pi/3342/3 "2018-06-18T10:28:03Z")

</div>

Hi @CoRfr,  
I think we got a runtime issue as follows. Could you please help me with this

 ![Untitled1](https://us1.discourse-cdn.com/flex019/uploads/legato1/original/1X/ec67ad4e3fb198035768a84173f73dcecbb11706.png)

---

<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: [June 18, 2018, 9:38pm UTC](https://forum.legato.io/t/platform-build-error-for-raspiberry-pi/3342/4 "2018-06-18T21:38:48Z")

</div>

What is the version of your kernel? (`uname -a`) ?

---

<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: [June 18, 2018, 9:53pm UTC](https://forum.legato.io/t/platform-build-error-for-raspiberry-pi/3342/5 "2018-06-18T21:53:52Z")

</div>

Also I tried to make a quick patch that might help with the start-up.  
I’ve not tried it though.

```auto
From effa880a2677202d53360519df07204e31602d77 Mon Sep 17 00:00:00 2001
From: Bertrand Roussel <broussel@sierrawireless.com>
Date: Mon, 18 Jun 2018 14:50:55 -0700
Subject: [PATCH] Skip memory cgroup

Change-Id: I65c24e1801ac2ff8331456fc328164511bf3a958
---
 framework/liblegato/linux/cgroups.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/framework/liblegato/linux/cgroups.c b/framework/liblegato/linux/cgroups.c
index e70058391..bf328525b 100644
--- a/framework/liblegato/linux/cgroups.c
+++ b/framework/liblegato/linux/cgroups.c
@@ -139,7 +139,7 @@ static void MountSubSys
 
         LE_ASSERT(le_dir_Make(dir, S_IRWXU) != LE_FAULT);
 
- LE_FATAL_IF(mount(SubSysName[subSys], dir, "cgroup", 0, SubSysName[subSys]) != 0,
+ LE_ERROR_IF(mount(SubSysName[subSys], dir, "cgroup", 0, SubSysName[subSys]) != 0,
                     "Could not mount cgroup subsystem '%s'. %m.", SubSysName[subSys]);
 
         LE_INFO("Mounted cgroup hierarchy for subsystem '%s'.", SubSysName[subSys]);
@@ -873,7 +873,8 @@ le_result_t cgrp_mem_SetLimit
     // Write the limit to the file.
     if (WriteToFile(CGRP_SUBSYS_MEM, cgroupNamePtr, MEM_LIMIT_FILENAME, limitStr) != LE_OK)
     {
- return LE_FAULT;
+ LE_CRIT("Unable to write memory limit '%s' to '%s'.", limitStr, cgroupNameStr);
+ return LE_OK;
     }
 
     // Read the limit to see if it was set properly.
@@ -885,7 +886,8 @@ le_result_t cgrp_mem_SetLimit
                  readLimitStr,
                  sizeof(readLimitStr)) != LE_OK)
     {
- return LE_FAULT;
+ LE_CRIT("Unable to read memory limit from '%s'.", cgroupNameStr);
+ return LE_OK;
     }
 
     if (strcmp(limitStr, readLimitStr) != 0)
-- 
2.17.1

```

---

<div class="post-metadata">

### Author: ![sowvikroy](https://avatars.discourse-cdn.com/v4/letter/s/8baadc/32.png) [@sowvikroy](https://forum.legato.io/u/sowvikroy)
#### Post date: [June 20, 2018, 5:08am UTC](https://forum.legato.io/t/platform-build-error-for-raspiberry-pi/3342/6 "2018-06-20T05:08:21Z")

</div>

Linux raspberrypi 4.14.49-v7+ #1 SMP Thu Jun 14 17:55:17 IST 2018 armv7l GNU/Linux

---

<div class="post-metadata">

### Author: ![plu](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@plu](https://forum.legato.io/u/plu)
#### Post date: [November 19, 2018, 2:22pm UTC](https://forum.legato.io/t/platform-build-error-for-raspiberry-pi/3342/7 "2018-11-19T14:22:40Z")

</div>

hi @sowvikroy  
for more information please have a look to the following page [Configure Raspberry Pi - Legato Docs](https://docs.legato.io/latest/raspbianMain.html) which describes how Raspi is handled with Legato.  
Unfortunately, we could not add more support on Raspi,  
best regards
