arm architecture support example

Luca Capra luca.capra at gmail.com
Fri Jan 22 09:01:32 UTC 2016


Thank you,
this example is the "next step" after the environment setup

Interesting either how you handle the arch in the structure and the startup
script in the repo, will follow it for guidance!

Best
Luca

2016-01-22 9:49 GMT+01:00 Woodrow Shen <woodrow.shen at canonical.com>:

> The another approach is still using cross compile to build any package
> (with nodejs ?) what you want.
> Then you need to follow snap format to put all necessary files (binary,
> configs, or db) into fake-like rootfs.
> For example, the structure can be as follows:
>
> ├── conf
> │   └── defaults.ini
> ├── magic-bin
> │   ├── arm-linux-gnueabihf
> │   ├── grafana
> │   ├── start-service.sh
> │   └── x86_64-linux-gnu
> ├── meta
> │   ├── grafana.apparmor
> │   ├── grafana.seccomp
> │   ├── icon.png
> │   ├── package.yaml
> │   └── readme.md
> ├── usr
> │   └── share
> └── var
>     └── log
>
> Make sure your package.yaml to contain all the snap information, and use
> `snappy build </path-to-your-top-dir>` to generate a snap.
>
> Here is my snap for reference:
> https://github.com/woodrow-shen/grafana-multi-snap
>
> Have snap fun!
>
> On Fri, Jan 22, 2016 at 4:32 PM, Luca Capra <luca.capra at gmail.com> wrote:
>
>> Ok, got it! I will try this way.
>>
>> Thank you,
>> Luca
>>
>>
>> 2016-01-22 9:22 GMT+01:00 Aiken Qi <aiken.qi at canonical.com>:
>>
>>> Steps
>>> 1. install Snappy Ubuntu Core on RPi 2
>>> https://developer.ubuntu.com/en/snappy/start/raspberry-pi-2/
>>> 2. Install Docker app within your Snappy OS on RPi2
>>> 3. Import docker image from docker hub, I was using this
>>> https://hub.docker.com/r/ioft/armhf-ubuntu/
>>> 4. Run Ubuntu Core as container, and you will have the arm ubuntu for
>>> snappy development.
>>>
>>>
>>> Regards,
>>> Aiken Qi |Director Alliances PRC | Canonical Ltd | Beijing| China | +86
>>> 13683072422
>>>
>>> On Fri, Jan 22, 2016 at 4:15 PM, Luca Capra <luca.capra at gmail.com>
>>> wrote:
>>>
>>>> Thank you Aiken
>>>> I'm not sure I've understood what you suggest, sorry :)
>>>>
>>>> Install ubuntu core on RPi and install docker on it to run an ubuntu
>>>> arm where to run my build?
>>>>
>>>> Best
>>>> Luca
>>>>
>>>> 2016-01-22 2:08 GMT+01:00 Aiken Qi <aiken.qi at canonical.com>:
>>>>
>>>>> Luca,
>>>>>
>>>>> Suggest you use docker on RPi snappy, and use Ubuntu core docker image
>>>>> for armhf. It's quite straight forward for native compile.
>>>>>
>>>>> Regards
>>>>> Aiken Qi
>>>>> 13683072422
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Jan 21, 2016 at 8:41 AM -0800, "Luca Capra" <
>>>>> luca.capra at gmail.com> wrote:
>>>>>
>>>>> Thank you Alexander,
>>>>>> I will try to setup a qemu instance over armv7.. if feasibile.. and
>>>>>> try to build from there.
>>>>>>
>>>>>> Best, Luca
>>>>>>
>>>>>> 2016-01-21 12:19 GMT+01:00 Alexander Sack <asac at canonical.com>:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> cross compilation of nodejs with snapcraft is tricky. If you manually
>>>>>>> build/assemble your stuff you can try the instructions on cross
>>>>>>> compiling you can find on the web, but for snapcraft the best way is
>>>>>>> to go for native building on your pi2...
>>>>>>>
>>>>>>> For snappy 15.04 you can get a developer ubuntu experience by using
>>>>>>> lxd. For snappy 16.04 you can "sudo snappy enable-classic" mode and
>>>>>>> then switch into a convenient ubuntu shell where you can apt-get
>>>>>>> install etc. with "sudo snappy shell classic"
>>>>>>>
>>>>>>> My etherpad-lite snap builds nicely that way. See
>>>>>>> https://github.com/asac/etherpad-lite/tree/snap-support/bin/snappy.
>>>>>>> ..
>>>>>>>
>>>>>>>  - Alexander
>>>>>>>
>>>>>>> On Thu, Jan 21, 2016 at 12:07 PM, Luca Capra <luca.capra at gmail.com>
>>>>>>> wrote:
>>>>>>> > Hello,
>>>>>>> >
>>>>>>> > I've built a service snap out of a nodejs module and would like to
>>>>>>> cross
>>>>>>> > compile it to armv7 for RPi2
>>>>>>> >
>>>>>>> > At this page [1] there is a sample for go but it's unclear to me
>>>>>>> what's the
>>>>>>> > point of it (compile snappy for arm?)
>>>>>>> >
>>>>>>> > Do you have a suggestion/example on how to cross compile snap for
>>>>>>> nodejs and
>>>>>>> > handle compiled dependencies (like with node-gyp)?
>>>>>>> >
>>>>>>> > Thanks, Luca
>>>>>>> >
>>>>>>> > [1] https://developer.ubuntu.com/en/snappy/guides/cross-building/
>>>>>>> >
>>>>>>> > --
>>>>>>> > snappy-app-devel mailing list
>>>>>>> > snappy-app-devel at lists.ubuntu.com
>>>>>>> > Modify settings or unsubscribe at:
>>>>>>> > https://lists.ubuntu.com/mailman/listinfo/snappy-app-devel
>>>>>>> >
>>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>
>> --
>> snappy-app-devel mailing list
>> snappy-app-devel at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/snappy-app-devel
>>
>>
>
>
> --
> Regards,
> Woodrow
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20160122/c88c36e7/attachment.html>


More information about the snappy-app-devel mailing list