Booting on Raspberry Pi
Robert Kaiser
robert.kaiser at hs-rm.de
Mon Sep 9 09:50:16 CEST 2013
Hi,
thanks for your response.
Am 09/09/13 00:16, schrieb Adam Lackorzynski:
> Hi,
>
> 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
this out.
>> 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
content:
$ 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.
Cheers
Robert
-------------- next part --------------
#
# Automatically generated file; DO NOT EDIT.
# Fiasco configuration
#
#
# Target configuration
#
# CONFIG_IA32 is not set
# CONFIG_AMD64 is not set
CONFIG_ARM=y
# 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_PF_BCM2835=y
CONFIG_BSP_NAME="bcm2835"
CONFIG_ABI_VF=y
CONFIG_CAN_ARM_CPU_1176=y
CONFIG_ARM_1176=y
# CONFIG_ARM_ALIGNMENT_CHECK is not set
CONFIG_ARM_EM_STD=y
# CONFIG_ARM_EM_NS is not set
# CONFIG_ARM_EM_TZ is not set
CONFIG_FPU=y
# CONFIG_ARM_1176_CACHE_ALIAS_FIX is not set
# CONFIG_ARM_CPU_ERRATA is not set
#
# Kernel options
#
CONFIG_CONTEXT_4K=y
CONFIG_FINE_GRAINED_CPUTIME=y
CONFIG_SCHED_FIXED_PRIO=y
# CONFIG_SCHED_WFQ is not set
# CONFIG_SCHED_FP_WFQ is not set
# CONFIG_DISABLE_VIRT_OBJ_SPACE is not set
#
# Debugging
#
CONFIG_INLINE=y
# CONFIG_NDEBUG is not set
CONFIG_NO_FRAME_PTR=y
# CONFIG_STACK_DEPTH is not set
# CONFIG_LIST_ALLOC_SANITY is not set
CONFIG_SERIAL=y
CONFIG_JDB=y
# 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_DEBUG_KERNEL_PAGE_FAULTS=y
# CONFIG_WARN_NONE is not set
# CONFIG_WARN_WARNING is not set
CONFIG_WARN_ANY=y
#
# Compiling
#
CONFIG_CC="gcc"
CONFIG_CXX="g++"
CONFIG_HOST_CC="gcc"
CONFIG_HOST_CXX="g++"
# CONFIG_MAINTAINER_MODE is not set
CONFIG_LABEL=""
CONFIG_EXPERIMENTAL=y
CONFIG_PERF_CNT=y
CONFIG_BIT32=y
CONFIG_ARM_V6=y
CONFIG_ARM_V6PLUS=y
CONFIG_WARN_LEVEL=2
CONFIG_XARCH="arm"
CONFIG_ABI="vf"
More information about the l4-hackers
mailing list