[Barrelfish-users] requesting for Help

Reto Achermann reto.achermann at inf.ethz.ch
Mon Apr 2 21:14:19 CEST 2018


Dear Ben,

When you like run something on Barrelfish a few things need to be in place

1) You need to write a Hakefile, which contains the target to be built and how 
it is built.

2) Then you need to tell Hake to include this when building the Makefile, This 
is done by re-running hake. After this step you can actually type 'make 
x86_64/sbin/<target>' assuming you want to build it for x86.

2) In order to have it build automatically when you type 'make X86_64_Basic' or 
'make qemu_x86_64' you need to add it to the list of targets in platforms/Hakefile.

3) You need to tell grub or qemu to load your binary. For this you will need to 
add it to the menu.lst used by grub or qemu. In case of qemu, its located in 
$build/platforms/x86/ (again for x86 platforms)

4) then your program will either run directly after Barrelfish has booted or you 
can type <target> in Fish.

-- Reto



On 02/04/18 18:58, ben eslami wrote:
> There is some examples in usr/examples/. As a first step, I want to run xmpl-hello.
> -what I should do is first I should introduce xmpl-hello to Hakefile in 
> platform/Hakefile, but I can see "modules_xmpl" that contains all of examples 
> including xmpl-hello. So I assume there is no need to add xmpl-hello to the 
> Hakefile. Am I right or not?
> - The second thing I should do is to add "module 
> build/x86_64/sbin/examples/xmpl-hello" to build/platform/x86/menu.lst.x86_64, 
> but there is nothing in build/x86_64/sbin/examples. Should I copy examples from 
> usr/examples to build/x86_64/sbin/examples ??
> 
> Could anyone pleeeaase help me ?
> 
> On Mon, Apr 2, 2018 at 4:13 PM, ben eslami <beneslami72 at gmail.com 
> <mailto:beneslami72 at gmail.com>> wrote:
> 
>     Hi
>     Can anyone please help me to run "hello world" in BarrelFish?
>     I think the tutorial is not up to date.
> 
>     Thanks
> 
>     On Sat, Mar 17, 2018 at 6:13 PM, ben eslami <beneslami72 at gmail.com
>     <mailto:beneslami72 at gmail.com>> wrote:
> 
>         -in the file platform/Hakefile, there are some sections. In section of
>         modules_common, I should add the following line
>         "/sbin/examples/xmpl-hello", but in section modules_xmpl, the mentioned
>         line exists. Is this correct or I should add in the sections of
>         "modules_common" and "modules_x86_64"
> 
>         -in the file build/platform/x86/menu.lst.x86_64, I added the following
>         line " module /x86_64/sbin/examples/xmpl-hello in the General user
>         domain section.
> 
>         "../hake/hake.sh -s .. -a x86_64" and "make -j 4 X86_64_Basic" are run
>         without error. But "make qemu_x86_64" encounters this error:
>         Failed to open file 'x86_64/sbin/examples/xmpl-hello
> 
>         what should I do now ?
> 
>         On Sat, Mar 17, 2018 at 3:00 PM, Joel Busch <buschjo at student.ethz.ch
>         <mailto:buschjo at student.ethz.ch>> wrote:
> 
>             Hello Ben
> 
>             This is actually one I can help with I think, because I ran into
>             some of the same roadblocks.
> 
>             symbolic_targets.mk <http://symbolic_targets.mk> does no longer
>             exists, instead you can add modules to the file platforms/Hakefile
>             there are different sections just make sure you use the one that's
>             generic or the one specific to the architecture you want to run on.
> 
>             The menu.lst is now platform specific and you can either change the
>             one generated during hake in build/platforms/<arch>/menu.ls
>             <http://menu.ls>t.<plat> or the one that is read during the hake
>             process in hake/menu.lst.<plat>, in your case <arch> is x86 and
>             <plat> is x86_64.
> 
>             And yes the make target sim doesn't exist anymore and qemu_x86_64 is
>             what you want to use instead.
> 
>             Best Regards,
>             Joel Busch
> 
> 
>             On 17.03.2018 11:10, ben eslami wrote:
>>             Dear folks,
>>             -after booting Barrelfish, I tend to run "hello world". According
>>             to "http://wiki.barrelfish.org/Programming_for_Barrelfish
>>             <http://wiki.barrelfish.org/Programming_for_Barrelfish>", To get
>>             Hake to include a target for the hello world program in the
>>             generated Makefile, we must first add the target to the
>>             symbolic_targets.mk <http://symbolic_targets.mk> file, located in
>>             the build directory. But I don't have this file. should I create
>>             it first?
>>
>>             -Suppose I created "symbolic_targets.mk
>>             <http://symbolic_targets.mk>" in build/ , then I did
>>             "../hake/hake.sh -s .. -a  x86_64" in build/ directory. After
>>             this, i run "make -j 8 X86_64_Basic" to compile Hello World file.
>>             But fir I should append "module /x86_64/sbin/examples/xmpl-hello"
>>             in menu.lst, but I don't see any file named menu.lst either.
>>             Should I create this first also ?
>>
>>             -After all of these, I should run make sim. Does this mean that I
>>             should run "make qemu_x86_64?
>>
>>             Thank you
>>
>>
>>
>>
>>             _______________________________________________
>>             Barrelfish-users mailing list
>>             Barrelfish-users at lists.inf.ethz.ch
>>             <mailto:Barrelfish-users at lists.inf.ethz.ch>
>>             https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>>             <https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users>
> 
> 
>             _______________________________________________
>             Barrelfish-users mailing list
>             Barrelfish-users at lists.inf.ethz.ch
>             <mailto:Barrelfish-users at lists.inf.ethz.ch>
>             https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
>             <https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users>
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Barrelfish-users mailing list
> Barrelfish-users at lists.inf.ethz.ch
> https://lists.inf.ethz.ch/mailman/listinfo/barrelfish-users
> 


More information about the Barrelfish-users mailing list