JB?

Soon in the blog close to you :)



Hi,

We compile the StackVM now for RaspberryPi based on a Raspbian os.

In order to do that you have to:
        - get your image
        - prepare your RaspberryPi or your cross compile environment
        - and compile

First step, the VMMaker image:
Here is the link to the source (basically the job just prepare the source and a 
image):
https://ci.inria.fr/pharo-contribution/view/RaspberryPi/job/RaspberryPi-Cog-Git-Tracker/

You will found a preconfigured image in the image folder.
If you want to create your own and not just extend this one, you need to clone 
the pharo-vm git repository:
https://github.com/pharo-project/pharo-vm
all the used source code is in mc use the filetree in montecello.


Second Step Preparing the Raspberry:
I used the linux source (raspbian), 
Then you can recompile using a RaspberryPi (what I do),
but you need to follow Nick instruction for install all the required 
dependencies on the RaspberryPi:
"
On the raspberry PI:
# install build tools
sudo apt-get install gcc g++ cmake

# dependencies for vm plugins
sudo apt-get install libasound2-dev libssl-dev libfreetype6-dev libgl1-mesa-dev

sudo apt-get install build-essential

# to fix:
# /usr/bin/ld: cannot find -lSM
#/usr/bin/ld: cannot find -lICE
# create the following links in: /usr/lib/arm-linux-gnueabihf/

sudo ln -s libSM.so.6 libSM.so
sudo ln -s libICE.so.6 libICE.so

Once the source is installed:

chmod +x platforms/unix/config/version
chmod +x platforms/unix/config/verstamp
"

Then compile:
I have done a configuration to generate VM on raspbian.
StackRaspbianConfig, you need to subclass and add your plugin + configure Cmake 
as you want.
"YourSubclass generate"

and recompile (cmake . & make from a terminal in build folder) on the Raspberry 
Pi, it should work.
My jenkins job actually take the last version of the source VM, and it is able 
to rebuild it on RaspPi.
You can cross-compile but I do not explore that way.

I hope that help you.


========Second mail 

I will explain everything.
First of all the StackVM on rbp now work only on headless mode but soon the 
fast bltbit will be introduce.

The main issue is you cannot develop directly on raspberryPi for now.
You need to develop on another os for prepare the environment and then push it 
on your raspberryPi for compile (I have a job jenkins to  do that).

You need to do newImage.sh, but this will not work on raspberry pi. 
For create your generator image.
In this image load you own source. (with your configuration and plugin).
You can use this image to generate vm, try to do not keep this image for 
keeping your vm up to date.

after that you need to:
        - first generate source in by doing: "YourConfigSubclass new 
generateSources.".
                but this step is really long If you do on raspberry pi, but you 
can do on raspberry pi, you can also do this step before send the source on the 
Rasp (what i do to save time).
        - second you need to generate CMakeFile. That step should be perform on 
RaspPi 
                The process required a working vm, 
                Here is a working vm for RaspberryPi on Raspbian:
                
https://ci.inria.fr/pharo-contribution/view/RaspberryPi/job/RaspberryPi-Compilation/

                As you cannot run the VM with UI
                So, you need to run a script.st

                like this one.
                echo "
                        YourConfigSubclass new  
                                generate.
                                Smalltalk snapshot: false andQuit: true." > 
./script.st

                execute like that in a shell:
                        ./StackVM -vm-display-null generator.image script.st

        - third step: build.
                in build folder do:
                sh build.sh
 
RaspberryPi is slow for recompiling everything.
Maybe a solution for develop faster is to cross-compile but as I say I do not 
explore that way.
 
If you have any problem you can give me feedback





On 17 Jan 2014, at 15:24, Sven Van Caekenberghe <s...@stfx.eu> wrote:

> 
> On 17 Jan 2014, at 15:12, Esteban Lorenzano <esteba...@gmail.com> wrote:
> 
>> On 17 Jan 2014, at 15:06, Sven Van Caekenberghe <s...@stfx.eu> wrote:
>> 
>>> On 17 Jan 2014, at 15:03, Esteban Lorenzano <esteba...@gmail.com> wrote:
>>> 
>>>> is just to compile a NB Stack VM… with should be fairly straightforward…
>>> 
>>> So that means there _is_ a working VM, right ?
>>> Where can we download it for testing ?
>> 
>> no, there isn’t :)
>> there are some (minor) changes to do to a StackVM and they are not done yet.
>> 
>> AFAIK, is just change one or two methods and to add the NB Plugin. 
> 
> I think many people are quite eager for this.
> 
> So how many request does it take ?  Who do we have to ask ?
> 
> In any case, here is my request:
> 
>  Please, please, Dark Lords of the VM, can we please have a Pharo VM for 3.0 
> for the Raspberry Pi, please, please, please ...
> 
> ;-)
> 
> Anyone else ?
> 
> 


Reply via email to