[haiku-development] testing the ARM port (was Re: [Haiku-commits] r32408 - haiku/trunk/src/system/boot/platform/u-boot)

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 15 Aug 2009 15:46:00 +0200 CEST

Michael Lotz wrote:
> > Author: mmu_man
> > Date: 2009-08-15 04:16:23 +0200 (Sat, 15 Aug 2009)
> > New Revision: 32408
> > ViewCVS: http://svn.berlios.de/viewcvs/haiku?rev=32408&view=rev
> >
> > Modified:
> >    haiku/trunk/src/system/boot/platform/u-boot/start2.c
> > Log:
> > [GSoC] [ARM] Patch by Johannes Wischert.
> > Add assembler code to actually jump to the kernel.
> > The terminal now says:
> >
> > kernel entry at 80048228
> > PANIC: acquire_spinlock: attempt to acquire lock 0x8012a59c with
> > interrupts enabled
> > Welcome to Kernel Debugging Land...
> > Thread 0 "" running on CPU 0
> > kdebug>
> That's pretty cool, congratulations to both of you!

Yeah still a lot of work ahead but it's a milestone :)

> Is there an easy way to currently build/try your work under Haiku?
> What
> build targets would one use and how would you run a resulting binary?

We currently use the verdex board as target since the overo is not
emulated (though there is a fork of qemu that supports omap from maemo)

* get the latest qemu

git clone git://git.savannah.nongnu.org/qemu
cd qemu
./configure --target-list=i386-softmmu,m68k-softmmu,ppc-softmmu,arm-
softmmu --disable-sdl --disable-gcc-check
# --disable-gcc-check might be needed depending on your gcc
# arm-softmmu is the only needed target, it's just my default here
su -c 'make install'
cd ..

# update both buildtools & trunk
svn up trunk buildtools
cd trunk
mkdir generated-arm
cd generated-arm

../configure --build-cross-tools-gcc4 arm ../../buildtools --include-
gpl-addons --include-3rdparty --use-gcc-pipe
# --use-32bit on 64bit platforms

# get the u-boot bin for the card to generate the flash image
wget http://www.gumstix.net/feeds/u-boot/u-boot-verdex-400-r1604.bin
# it's not automated yet
cp u-boot-verdex-400-r1604.bin generated-arm/

# build both flash image and sd card image
(cd generated-arm/ && LANG=C HAIKU_BOOT_BOARD=verdex jam -j1 -q
haiku_flash_image_raw.img haiku.mmc)
# (use linux32 jam on 64bit)

# test it
# I'm not sure the boot from flash still works so just boot from the SD
# else you'd just omit -sd ..
qemu-system-arm -M verdex -serial stdio -vnc :0 -pflash generated-arm/
haiku_flash_image_raw.img -sd generated-arm/haiku.mmc -s

# -s so you can attach gdb...
generated-arm/cross-tools/bin/arm-elf-gdb generated-arm/objects/haiku/
arm/release/system/kernel/kernel_arm -ex 'target remote localhost:1234'

# if you want to see the splash:
vi src/system/boot/platform/u-boot/video.cpp
# comment the return; in platform_switch_to_logo()
# uncomment the call to platform_switch_to_logo(); in
(cd generated-arm/ && LANG=C HAIKU_BOOT_BOARD=verdex jam -j1 -q
haiku_flash_image_raw.img haiku.mmc)


Other related posts:

  • » [haiku-development] testing the ARM port (was Re: [Haiku-commits] r32408 - haiku/trunk/src/system/boot/platform/u-boot) - François Revol