Tuesday, February 24, 2009

Beagle board

A week or so ago, I got a Beagle board. So far, I've proved that it is unbrickable (by corrupting the NAND ROM and practically bricking it, then spending a couple of days and using a wide selection of computers and software to nurse it back to health).

Today I just got a self-built linux kernel to boot on it (not doing anything useful yet, though).

Once I'd got a set of working binutils and gcc (built for the arm-elf target), I got a long way, until the kernel was generating the uImage file. There were two problems.

The second, mkimage not found, was simple to fix - it comes with the u-boot code, also available here:
ftp://ftp.koansoftware.com/public/linux/mkimage


The first was heralded by the following error message:

"arm-elf-ld: ERROR: arch/arm/boot/compressed/misc.o uses VFP instructions, whereas arch/arm/boot/compressed/vmlinux does not"

It turned out the problem wasn't with arch/arm/boot/compressed/vmlinux at all (which is not surprising, since it's actually the output file), but with the head.o and piggy.o in the same directory.

The output of this command:

readelf -a arch/arm/boot/compressed/*.o | grep Flags:

included the lines:
Flags: 0x200, GNU EABI, software FP
Flags: 0x600, GNU EABI, software FP, VFP
Flags: 0x200, GNU EABI, software FP

What was needed was to re-assemble the head.S and piggy.S files with the -mfpu=vfp flag. Now, I doubt I've run any floating point code in the kernel since it's only booted up and hasn't really done anything, so it could be that I've compiled everything else wrong and it shouldn't use VFP, but that can wait for now.

Oh, I also edited drivers/video/omap/Makefile, to add the following line:

objs-y$(CONFIG_ARCH_OMAP3) += dispc.o



(I won't be able to work on anything for the next week and a half, but I'm looking forward to getting ROLF working on my TV, it's already worked with OMAP on the Nokia N800, and the VNC code points to a better solution.)

3 Comments:

Anonymous Anonymous said...

Hey, I'm doing some compilation using linux-omap and ran into the same problem that you mentioned in your blog. Can you say exactly how you re-assembled head.S and piggy.S ? Thanks.

11:18 pm, May 15, 2009  
Blogger Simon said...

Sorry, I meant to update that entry. I came up with some temporary solution for generating the files, but the underlying problem was that I wasn't using the arm-linux-gnueabi version of gcc.

I suggest you try with that, and let me know if there are any problems.

11:23 pm, May 16, 2009  
Anonymous Anonymous said...

Thanks!

5:51 pm, May 19, 2009  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home