[okl4-developer] Hello world tutorial : an other way to do it.

48 views
Skip to first unread message

Paul Chavent

unread,
May 12, 2011, 4:13:31 AM5/12/11
to deve...@okl4.org
Hi.

It's my first post. So let me introduce myself.

My name is Paul, i'm working on realtime/embedded systems at ONERA a french
aeronautic research institute. I'm trying to be more familiar with
microkernels, hypervisor, and those kind of technologies for evaluating the
pertinence of integrating them in our systems. Beside this official aspect,
I'm personally curious and interested by systems architectures.

So i decided to begin to make some experiments with the okl4 tutorials. I
had some problems to complete the hello world tutorial. So i did it an other
way.

If someone is interested, see my procedure below.

So, hello the okl4 community.

Paul.


First, prepare the working dir.

<code>
# mkdir work
# cd work
</code>


Download a tool chain (for example
http://wiki.ok-labs.com/downloads/release-3.0/arm-linux-gnueabi-4.2.4.tar.gz)
<code>
# tar -xvf arm-linux-gnueabi-4.2.4.tar.gz
# export PATH=${PWD}/arm-unknown-linux-gnueabi/bin:$PATH
</code>


Download uboot. At this day, the last release that works with the versatile
is the 2010.09 (laters seems to not implement relocation for versatile). So,
for example, ftp://ftp.denx.de/pub/u-boot/u-boot-2010.09.tar.bz2 . Extract
and compile.
<code>
# tar -xvf u-boot-2010.09.tar.bz2
# cd u-boot-2010.09
# make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi- versatile_config
# make ARCH=arm CROSS_COMPILE=arm-unknown-linux-gnueabi- all
# cd -
</code>


Download the okl4 sdk (for example
http://wiki.ok-labs.com/downloads/release-3.0/sdk-arm926ejs-3.0.tar.gz).
<code>
# tar -xvf sdk-arm926ejs-3.0.tar.gz
# export OKL4_SDK_ROOT=${PWD}/sdk
</code>


Make a local copy of an example. Build it. Make an image.
<code>
# cp -a sdk/okl4/arm926ejs/examples/singlecell ./
# cd singlecell
# make KERNEL=nano BUILD=production
# arm-unknown-linux-gnueabi-objcopy -O binary
build.nano-production/images/image.elf
build.nano-production/images/image.bin
# cd -
</code>


Note : readelf give some information on where to load the image (PhysAddr).
<code>
# arm-unknown-linux-gnueabi-readelf -Dlh
singlecell/build.nano-production/images/image.elf
[...]
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x008000 0xffff0000 0x04100000 0x02040 0x02040 RWE 0x8000
[...]
</code>


Make an image with uboot + the cell. In this example image.bin will be at
0x42000. Dd tells us that image.bin makes 63K (~0xFC00).
<code>
# dd if=/dev/zero of=flash.bin bs=1 count=500K
# dd if=u-boot-2010.09/u-boot.bin of=flash.bin bs=1 conv=notrunc
# dd if=singlecell/build.nano-production/images/image.bin of=flash.bin bs=1
conv=notrunc seek=200K
</code>

Launch qemu then, the cell.
<code>
# qemu-system-arm -M versatilepb -nographic -kernel flash.bin
# cp 42000 4100000 FC00
# go 4100000
</code>

--
View this message in context: http://okl4-community-forum.9692.n2.nabble.com/Hello-world-tutorial-an-other-way-to-do-it-tp6354893p6354893.html
Sent from the OKL4 Community Forum mailing list archive at Nabble.com.

_______________________________________________
Developer mailing list
Deve...@okl4.org
https://lists.okl4.org/mailman/listinfo/developer

Julia

unread,
Apr 14, 2013, 11:15:56 PM4/14/13
to deve...@okl4.org
Hi,

I am tring do some research on OKL4( develop some applications on OKL4).I
had made the OKL4 hello world example run on qemu versatile board follow
the way(Hello world tutorial : an other way to do it.). Now, I try to run
the OKL4 hello world on OMAPL138, but I faild .So, Is this way just suitable
for versatile board? Would some one give me some suggest? Thanks!



-------------------------------------------------------------------------------------------------------------------------------------------------------------

"Hello world tutorial : an other way to do it"
View this message in context: http://okl4-community-forum.9692.n2.nabble.com/Hello-world-tutorial-an-other-way-to-do-it-tp6354893p7577407.html
Reply all
Reply to author
Forward
0 new messages