[haiku-development] Re: Raspberry Pi 2

  • From: LECOQ Vincent <vincent.lecoq@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 18 Oct 2015 15:03:53 +0200

Hello,

Everything compile now, I can start haiku boot process on my Rpi2 and
explore the current status of the port.
U-boot start and after activation of TRACE macro, I can obtain the
following from serial port :

U-Boot 2015.04-rc2-00081-g47d8ae4 (Mar 04 2015 - 17:18:35)

DRAM: 128 MiB
WARNING: Caches not enabled
RPI 2 Model B
MMC: bcm2835_sdhci: 0
reading uboot.env

** Unable to read "uboot.env" from mmc0:1 **
Using default environment

In: serial
Out: lcd
Err: lcd
Net: Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
reading /boot.scr
301 bytes read in 21 ms (13.7 KiB/s)
## Executing script at 00000000
reading rpi2.dtb
7585 bytes read in 40 ms (184.6 KiB/s)
reading haiku-floppyboot.tgz.ub
1629259 bytes read in 2616 ms (607.4 KiB/s)
reading haiku_loader_linux.ub
300984 bytes read in 517 ms (568.4 KiB/s)
## Booting kernel from Legacy Image at 01000000 ...
Image Name: haiku_loader rpi2
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 300920 Bytes = 293.9 KiB
Load Address: 00080000
Entry Point: 00080010
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02100000 ...
Image Name: haiku-floppyboot.tgz rpi2
Image Type: ARM Linux RAMDisk Image (uncompressed)
Data Size: 1629195 Bytes = 1.6 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
Booting using the fdt blob at 0x2000000
Loading Kernel Image ... OK
Loading Ramdisk to 079bc000, end 07b49c0b ... OK
Loading Device Tree to 079b7000, end 079bbda0 ... OK

Starting kernel ...

▒fdt_get_range_offset: range offset: 0x0
fdt_get_device_reg_byname: /axi/mbox found @ 0x3f00b880
Found boot tgz from FDT @ 0x079bc000, 1629195 bytes
argc = 0
os: 2
gd @ 0x00000000
FDT @ 0x079b7000:
fdt_totalsize: 8320
fdt_off_dt_struct: 88
fdt_off_dt_strings: 7232
fdt_off_mem_rsvmap: 40
fdt_version: 17
fdt_last_comp_version: 16
fdt_boot_cpuid_phys: 3840
fdt_size_dt_strings: 646
fdt_size_dt_struct: 7144
fdtSize: 0x2080
checking for memory...
0: base = 0,size = 134217728
total physical memory = 128MB
args.arguments_count = 0
boot(): enter
malloc(256) -> 0x80995008
boot(): heap initialized...
malloc(32) -> 0x80995110

And stay here.

I ve insert more traces for check where the code stop exactly, it is on in
system/boot/platform/u-boot/video.cpp on the call of
gFrameBuffer->Probe(); but doesn't seem to enter into :/
I don't care of the frame buffer initialisation now, I want first have a
MMC driver working. So I ve decide to disable this framebuffer
initialization and see later.
But more far, into system/boot/loader/vfs.cpp, into open_node(), on the
call of node->Open(.....), the same behavior, execution block again here
and seems don't entre into the method.

I feel like C code run well, but when it is CPP code, we have wrong memory
jump or something like that.
Have somebody meet this problem ? what can I fix ?

Thanks.




2015-10-13 15:45 GMT+02:00 Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>:

13 octobre 2015 15:29 "LECOQ Vincent" <vincent.lecoq@xxxxxxxxx> a écrit:
Hello,

have somebody difficulties to build u-boot (for mkimage) on haiku ?

I experiment a double incompatible definition of umode_t like as
following :

/Haiku system/home/Desktop/u-boot-2015.07> export

CROSS_COMPILE=/Haiku-dev/Workspace/haiku/generated.armpi/cross-tools-arm/bin/arm-un

known-haiku-

You probably can't build the complete u-boot this way. However, you can
build only the tools.
There is an haikuports recipe for that:
https://github.com/haikuports/haikuports/tree/master/dev-embedded/u_boot_tools
If you don't want to use haikuports, you can still have a look at the
recipe and patches to see how we solved compilation issues.

Basically, you can use "make tools" and there is no need to have the arm
cross compiler or any environment variable. The patch fixes some issues
with gcc2 (if you use that), conflicting type uint, and conflicting header
name image.h (by renaming u-boot one to uimage.h).

--
Adrien.




--
LECOQ Vincent
vincent.lecoq@xxxxxxxxx

Other related posts: