Raspberry Pi questions
gonzo at bluezbox.com
Tue Dec 25 23:21:26 UTC 2012
On 2012-12-25, at 3:06 PM, Ian Lepore <freebsd at damnhippie.dyndns.org> wrote:
> On Tue, 2012-12-25 at 12:37 -0800, Oleksandr Tymoshenko wrote:
>> On 2012-12-25, at 12:21 PM, Ian Lepore <freebsd at damnhippie.dyndns.org> wrote:
>>> I got my RPi running this morning, more or less. I used the boot
>>> partition from the latest image at http://www.peach.ne.jp/archives/rpi/
>>> but I'm loading my own custom built kernel and world. I have a few
>>> Can I get ubldr to load a kernel using tftp, bootp, etc?
>> Yes. ubldr checks U-Boot devices (SD and net), then tries to locate
>> FFS partition on SD card and if fails - falls back to NFS/bootp. You can fetch
>> my image, boot partition there contains ubldr, FDT blob, config.txt and boot scripts:
> This is so close to working. In u-boot I have an env var "usbethaddr"
> which contains what seems to be the right address (it's an RPi
> foundation oui). But still when booting via ubldr it generates a random
> address every time, apparently because smsc_fdt_find_mac() always
> returns zeroes (I added a printf to the smsc driver). If I hard-code
> the right mac address in the smsc driver I get all the way to multiuser
> Also, when ubldr launches it immediately begins to load the kernel from
> sdcard before I can stop it. I have to wait for that to finish and then
> do "unload" then load the kernel from net0:. Can I create a file that
> contains different defaults or something?
> The amount of ram reported by kernel startup is only 128mb. u-boot says
> 384mb, that's not right either.
All this means that kernel uses built-int dtb (I think at some point we should just
remove built-in DTB), not the one provided by u-boot. In order to make ubldr
aware of external dub you need to pass "fdt addr 0x100" command to it.
Also I don't know about how to set priorities for kernels :( So what I did was:
- Delete /boot/loader.rc and /boot/kernel/kernel on SD card. It makes ubldr
go to NFS server for these files. Or you can just nuke whole partition
- Add "fdt addr 0x100" to /boot/loader.rc in NFS root
- Deploy my experimental kernel to /boot/kernel/kernel in NFS root
Also make sure that DTB is populated by firmware. Issue following commands in U-Boot prompt:
fdt addr 0x100
As a result you should get proper DTS with memory regions, MAC address and board serial.
More information about the freebsd-arm