Booting on Raspberry Pi
robert.kaiser at hs-rm.de
Mon Sep 9 09:50:16 CEST 2013
thanks for your response.
Am 09/09/13 00:16, schrieb Adam Lackorzynski:
> On Fri Sep 06, 2013 at 19:42:12 +0200, Robert Kaiser wrote:
>> i'm currently trying to get Fiasco.OC + L4Re up and running on a
>> Raspberry Pi, but no luck :-(
>> I have gotten as far as building a bootstrap_hello.elf file. According
>> to previous posts here, I should just copy this file to the first
>> partition of a linux-bootable SD card, add an entry like
>> "kernel=bootstrap_hello.elf" to config.txt, and I should see some
>> messages at the serial port as the Pi boots L4. Alas, my Pi stays silent.
>> If I then simply remove the added line from config.txt, leaving
>> everything else the same, Linux boots from the card alright and I can
>> see its messages on the serial port. Thus, I'm confident that my
>> hardware set-up should be OK.
>> I am not absolutely sure wether I got the building of the boot file
>> right. What surprises me is that it is an ELF file: I have previously
>> followed the "Baking Pi" tutorial at
>> http://www.cl.cam.ac.uk/projects/raspberrypi/tutorials/os/. There I used
>> to boot *raw* binaries which expected to be loaded at 0x8000. In
>> contrast, this file here displays as an ELF file with .text starting at
>> 0x01000000. Is that how it should be?
> Using a rawimage also seems more reasonable to me. Where the code starts
> in memory doesn't really matter as long as it stays in RAM. 0x01000000
> is the typical start address of L4 bootstrap.
Just tried a rawimage -> still silence on the serial port :-(. It may be
due a configuration mistake.
I guess I'll have to wade through the code to find out where it goes
wrong -- stay tuned.
> I personally used u-boot all the time instead of the built-in loader as
> this also allows to boot via tftp, however, iirc, the built-in one did
> also work but I can't check myself right now.
Thats a good hint. I didn't know uboot supports network access on the Pi
(I assumed the Pi's network interface is connected through USB, so uboot
would have to incorporate at least a rudimentary USB stack). Will check
>> The building process also creates a file named "bootstrap_hello", but
>> that is simply a copy of bootstrap_hello.elf. What's the point of this?
> Add .elf is just a hint that this is an ELF file.
I was just wondering why to create two files when they have identical
$ cmp -l bootstrap_hello bootstrap_hello.elf
> There's also
> 'make rawimage' generating *.raw and 'make uimage' generating *.uimage
> formats (also see 'make help' for list of targets).
rawimage would be appropriate for the Pi loader and looking at the boot
code I can see that it copies itself from wherever it has been loaded
(e.g. 0x8000) to the address it has been built for (0x1000000).
So it I agree that it *should* work. Unfortunately, it doesn't work for
me. I'll try to figure this out.
In the meantime: is anyone aware of any common pitfalls with the
Raspberry Pi? Does anyone have access to a known-to-work config file?
I'm attaching my globalconfig.out, maybe there is something obviously
wrong with it.
-------------- next part --------------
# Automatically generated file; DO NOT EDIT.
# Fiasco configuration
# Target configuration
# CONFIG_IA32 is not set
# CONFIG_AMD64 is not set
# CONFIG_PF_REALVIEW is not set
# CONFIG_PF_IMX is not set
# CONFIG_PF_S3C2410 is not set
# CONFIG_PF_TEGRA is not set
# CONFIG_PF_OMAP is not set
# CONFIG_PF_XSCALE is not set
# CONFIG_PF_SA1100 is not set
# CONFIG_PF_EXYNOS is not set
# CONFIG_PF_KIRKWOOD is not set
# CONFIG_PF_INTEGRATOR is not set
# CONFIG_ARM_ALIGNMENT_CHECK is not set
# CONFIG_ARM_EM_NS is not set
# CONFIG_ARM_EM_TZ is not set
# CONFIG_ARM_1176_CACHE_ALIAS_FIX is not set
# CONFIG_ARM_CPU_ERRATA is not set
# Kernel options
# CONFIG_SCHED_WFQ is not set
# CONFIG_SCHED_FP_WFQ is not set
# CONFIG_DISABLE_VIRT_OBJ_SPACE is not set
# CONFIG_NDEBUG is not set
# CONFIG_STACK_DEPTH is not set
# CONFIG_LIST_ALLOC_SANITY is not set
# CONFIG_JDB_LOGGING is not set
# CONFIG_JDB_DISASM is not set
# CONFIG_JDB_GZIP is not set
# CONFIG_VMEM_ALLOC_TEST is not set
# CONFIG_WARN_NONE is not set
# CONFIG_WARN_WARNING is not set
# CONFIG_MAINTAINER_MODE is not set
More information about the l4-hackers