Towards an ARM system-building script

Tim Kientzle tim at kientzle.com
Tue Oct 9 06:55:22 UTC 2012


On Oct 8, 2012, at 9:07 PM, Ganbold Tsagaankhuu wrote:

> On Mon, Sep 24, 2012 at 2:55 AM, Tim Kientzle <tim at kientzle.com> wrote:
>> On Sep 4, 2012, at 9:52 PM, Tim Kientzle wrote:
>>> On Sep 4, 2012, at 9:33 PM, Dave Cheney wrote:
>>> 
>>>> Sorry to butt in on this discussion, but how feasible would it be to adapt this build script to the pandaboard. I understand there may be a config in svn similar to the beaglebone which may be applicable.

>> I've made significant progress and would
>> appreciate any feedback:
>> 
>>   github.com/kientzle/freebsd-beaglebone
>> 
>> * PandaBoard:  I have a completely untested
>>    sketch.  Someone with a PandaBoard will need
>>    to work through the U-Boot configuration to make
>>    this work.
> 
> I tried your script on PandaBoard ES.
> Basically it works with some modifications/considerations:

Wonderful!  Thanks for trying it!

Please send me any patches you used; I'll try
to incorporate them.

> 1. PANDABOARD kernel config should be modified to use mmcsd card as root.

Would anyone object to adding this line to FreeBSD SVN?

# Boot device is 2nd slice on MMC/SD card
options 	ROOTDEVNAME=\"ufs:mmcsd0s2\"


> 2. u-boot build complains about the board was configured to support THUMB mode

Hmmm…  Not sure I understand this.

> 3. Maybe there is need some more patches to have correct u-boot.bin,
> since it looks for uImage for instance

There will certainly need to be some U-Boot patches.

Perhaps Oleksandr can point us to the source he
used for that u-boot.bin?  If so, I can help fill in
the options so it can correctly chain ubldr.

> 4. I didn't dig into ubldr/u-boot much, instead modified uEnv.txt to
> load kernel.bin from first partition which is FAT. I tried 8MB of FAT.
> 5. I used MLO, u-boot.bin from http://people.freebsd.org/~gonzo/pandaboard/
> 
> So how does ubldr work? Can it load kernel.bin from second partition
> in case of PandaBoard?

Yes, it can.  At heart, ubldr is the same as the FreeBSD
loader(8) that's used for i386/amd64 booting.  In particular,
it can load the kernel from UFS.

The main difference between ubldr and loader(8)
is in how they access hardware:  loader(8) uses
the PC BIOS and ubldr talks to U-Boot to do low-level
device access.

I think ubldr makes a lot of sense for BeagleBone and
probably PandaBoard.  I'm not sure it makes sense
for Raspberry Pi, though that's a different discussion.

But ubldr requires that U-Boot be built with a few
non-standard options, so again we'll certainly have
to patch U-Boot to enable those options.


Tim



More information about the freebsd-arm mailing list