# New way how to build ME

**URL:** <http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319>\
**Category:** SOO Framework\
**Created:** [April 13, 2022, 3:26pm UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319 "2022-04-13T15:26:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rossierd](http://discourse.heig-vd.ch/user_avatar/discourse.heig-vd.ch/rossierd/32/4_2.png) [@rossierd](http://discourse.heig-vd.ch/u/rossierd)\
**Post date:** [April 13, 2022, 3:26pm UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319/1 "2022-04-13T15:26:35Z")

</div>

Building a ME (in ME/ directory) should now be facilitated by a build.sh script which is under construction

---

<div class="post-metadata">

**Author:** ![rossierd](http://discourse.heig-vd.ch/user_avatar/discourse.heig-vd.ch/rossierd/32/4_2.png) [@rossierd](http://discourse.heig-vd.ch/u/rossierd)\
**Post date:** [April 13, 2022, 3:31pm UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319/2 "2022-04-13T15:31:21Z")

</div>

@mattia.gallacch I’m not sure if build.conf will help in this case. In the agency, it is related to the platform. Maybe giving the ME name in the build.sh command better, no?

---

<div class="post-metadata">

**Author:** ![mattia.gallacch](http://discourse.heig-vd.ch/letter_avatar_proxy/v4/letter/m/b4bc9f/32.png) [@mattia.gallacch](http://discourse.heig-vd.ch/u/mattia.gallacch)\
**Post date:** [April 14, 2022, 6:32am UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319/3 "2022-04-14T06:32:31Z")

</div>

Yes it could be given as argument

---

<div class="post-metadata">

**Author:** ![mattia.gallacch](http://discourse.heig-vd.ch/letter_avatar_proxy/v4/letter/m/b4bc9f/32.png) [@mattia.gallacch](http://discourse.heig-vd.ch/u/mattia.gallacch)\
**Post date:** [April 14, 2022, 6:35am UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319/4 "2022-04-14T06:35:40Z")

</div>

The script is intended to be used for configuration, building and generating the .itb file for all the MEs.  
At the moment this different can be performed separately passing arguments to the script. -t to configure (defconfig), -b to compile and -d to generate the .itb. Since the building process is quite fast we could also remove the the arguments and just perform all the steps each time the script is called.

---

<div class="post-metadata">

**Author:** ![mattia.gallacch](http://discourse.heig-vd.ch/letter_avatar_proxy/v4/letter/m/b4bc9f/32.png) [@mattia.gallacch](http://discourse.heig-vd.ch/u/mattia.gallacch)\
**Post date:** [April 14, 2022, 6:38am UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319/5 "2022-04-14T06:38:30Z")

</div>

The build.sh script is not intended as a replacement for the ME/base/deploy.sh script but it makes use of it. We could merge them and keep just the build.

---

<div class="post-metadata">

**Author:** ![rossierd](http://discourse.heig-vd.ch/user_avatar/discourse.heig-vd.ch/rossierd/32/4_2.png) [@rossierd](http://discourse.heig-vd.ch/u/rossierd)\
**Post date:** [April 14, 2022, 6:57am UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319/6 "2022-04-14T06:57:02Z")

</div>

I guess it’s a good idea to have only one consolidated build script.  
We should always have the possibility to build only one specific ME (not all MEs at each build)

---

<div class="post-metadata">

**Author:** ![mattia.gallacch](http://discourse.heig-vd.ch/letter_avatar_proxy/v4/letter/m/b4bc9f/32.png) [@mattia.gallacch](http://discourse.heig-vd.ch/u/mattia.gallacch)\
**Post date:** [April 14, 2022, 12:00pm UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319/7 "2022-04-14T12:00:38Z")

</div>

New build script version works for all MEs. Takes two arguments. First is either -c (clean) or -m (build) and second is the ME name (ex. SOO.wagoled). Functionality descrpription:

- Check the existence of the corresponding “defconfig”, “.dts” and “.its” files.
- Apply config
- Build
- Create the SOO.\<ME\_NAME\> folder
- Generate an copy the “.itb”

The ME/base/script deploy.sh has been integrated and can be removed.

---

<div class="post-metadata">

**Author:** ![rossierd](http://discourse.heig-vd.ch/user_avatar/discourse.heig-vd.ch/rossierd/32/4_2.png) [@rossierd](http://discourse.heig-vd.ch/u/rossierd)\
**Post date:** [April 14, 2022, 12:06pm UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319/8 "2022-04-14T12:06:30Z")

</div>

Just don’t forget that for a ME (SOO.refso3 for example) there may be several defconfig/its according to the profile.

---

<div class="post-metadata">

**Author:** ![mattia.gallacch](http://discourse.heig-vd.ch/letter_avatar_proxy/v4/letter/m/b4bc9f/32.png) [@mattia.gallacch](http://discourse.heig-vd.ch/u/mattia.gallacch)\
**Post date:** [April 14, 2022, 2:47pm UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319/9 "2022-04-14T14:47:55Z")

</div>

Added optional argument to specify a profile and a argument to build and deploy user space apps.  
-k build kernel only  
-u build user apps only  
-ku build both

---

<div class="post-metadata">

**Author:** ![mattia.gallacch](http://discourse.heig-vd.ch/letter_avatar_proxy/v4/letter/m/b4bc9f/32.png) [@mattia.gallacch](http://discourse.heig-vd.ch/u/mattia.gallacch)\
**Post date:** [April 14, 2022, 2:49pm UTC](http://discourse.heig-vd.ch/t/new-way-how-to-build-me/319/10 "2022-04-14T14:49:49Z")

</div>

And removed creation of a target directory inside SOO.\<ME\_name\>
