From owner-freebsd-arm@FreeBSD.ORG Tue Jun 5 00:37:27 2012 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F2B5106566B for ; Tue, 5 Jun 2012 00:37:27 +0000 (UTC) (envelope-from bakul@bitblocks.com) Received: from mail.bitblocks.com (ns1.bitblocks.com [173.228.5.8]) by mx1.freebsd.org (Postfix) with ESMTP id EFA248FC08 for ; Tue, 5 Jun 2012 00:37:26 +0000 (UTC) Received: from bitblocks.com (localhost [127.0.0.1]) by mail.bitblocks.com (Postfix) with ESMTP id 7AC04B827; Mon, 4 Jun 2012 17:37:26 -0700 (PDT) To: Torfinn Ingolfsen In-reply-to: Your message of "Mon, 04 Jun 2012 22:51:32 +0200." <20120604225132.cff152c4.torfinn.ingolfsen@getmail.no> References: <4F533E46.1070105@freebsd.org> <20120603201229.3fd31c98.torfinn.ingolfsen@getmail.no> <4FCBC564.3060404@freebsd.org> <20120604172053.D4674B827@mail.bitblocks.com> <4FCCFFD8.9020800@gmail.com> <20120604185718.A7C8EB827@mail.bitblocks.com> <20120604225132.cff152c4.torfinn.ingolfsen@getmail.no> Comments: In-reply-to Torfinn Ingolfsen message dated "Mon, 04 Jun 2012 22:51:32 +0200." Date: Mon, 04 Jun 2012 17:37:26 -0700 From: Bakul Shah Message-Id: <20120605003726.7AC04B827@mail.bitblocks.com> Cc: freebsd-arm@FreeBSD.org Subject: Re: Support for Raspberry-PI X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jun 2012 00:37:27 -0000 On Mon, 04 Jun 2012 22:51:32 +0200 Torfinn Ingolfsen wrote: > On Mon, 04 Jun 2012 11:57:18 -0700 > Bakul Shah wrote: > > > Because no bsd runs on the raspi as yet but linux does! There > > is no u-boot or netboot on it either. The GPU loads a file > > called kernel.bin from a FAT partition. So the idea is you > > FWIW, these are the files on said FAT partition (from the Debian 6.0.4 image > for the Pi): > root@kg-v7# ls /mnt > arm128_start.elf boot_enable_ssh.rc issue.txt loader.bin > arm192_start.elf bootcode.bin kernel.img start.elf > arm224_start.elf cmdline.txt kernel_emergency.img > > I don't know if start.elf, bootcode.bin or loader.bin is the actual "first st > age" loader. > start.elf is just a copy of one of the armXXX_start.elf files; this sets up h > ow much > memory (of the 256 MB) for the CPU and how much for the GPU. There is a Raspi forum thread on config.txt that lays out the boot sequence but not in one place and it is evolving. Basically: 1. Stage 1 boot is in the on-chip ROM. Loads stage2 in the L2 cache! 2. Stage 2 is bootcode.bin. Enables SDRAM and loads stage3 3. Stage 3 is loader.bin. Knows about elf format and load start.elf 4. start.elf loads kernel.img (+ it is the main gpu code). It reads config.txt, cmdline.txt and bcm2835.dtb If the dtb file exists, it is loaded at 0x100 & kernel @ 0x8000 Else if disable_commandline_tags is set load kernel @ 0x0 Else if load kernel @ 0x8000 and put ATAGS at 0x100 See Issue 16 in https://github.com/raspberrypi/linux/issues 5. kernel.img, is the *first* thing that runs on the ARM processor. So this is simpler -- you don't really need u-boot to load the kernel. Some sort of loader would be handy to be able to net boot or local boot one of multiple OSes but for kernel development you need not wait for that.