Bug 687 - Are AT91 patches supplied with Buildroot-2009.08 out of date?
Summary: Are AT91 patches supplied with Buildroot-2009.08 out of date?
Status: RESOLVED FIXED
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: PC Linux
: P3 major
Target Milestone: 2010.05
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-29 12:01 UTC by Steve
Modified: 2010-08-10 17:28 UTC (History)
1 user (show)

See Also:
Host: Fedora 10
Target: AT91SAM9G20-EK
Build: Buildroot-2009.08


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve 2009-10-29 12:01:26 UTC
Hello 
 
We are currently evaluating a AT91SAM9G20-EK board but I have hit a bit of a wall when it comes to building using Buildroot under Linux that I hope you can help me with.
 
I am completely new to cross-compilation so forgive any lack of insight on my part.
 
I have downloaded and installed Buildroot-2009.08 from http://buildroot.net/downloads
 
I think I have successfully configured and built the tool chain, root file system and Linux Kernel (2.6.30) for this board.
 
My problem is when the build process comes to building the UBoot.
 
I have selected to build U-Boot version u-boot-1.2.0-atmel and to add architecture specific patches.
 
Trouble is, when it comes to applying the patches the build system falls over with:
 
    Applying u-boot-2009.01-001-at91rm9200.patch using plaintext: 
    patching file include/asm-arm/arch-at91rm9200/at91_pio.h
    patching file include/asm-arm/arch-at91rm9200/at91_pmc.h
    patching file include/asm-arm/arch-at91rm9200/AT91RM9200.h
    Hunk #1 FAILED at 28.
    1 out of 1 hunk FAILED -- saving rejects to file include/asm-arm/arch-at91rm9200/AT91RM9200.h.rej
    patching file include/asm-arm/arch-at91rm9200/gpio.h
    patching file include/asm-arm/arch-at91rm9200/io.h
    Patch failed!  Please fix u-boot-2009.01-001-at91rm9200.patch!
    make: *** [/home/dez/buildroot-2009.08/project_build_arm/uclibc/u-boot-1.2.0-atmel/.patched] Error 1 
 
The patches are copied during the build process from a directory called:
 
    buildroot-2009.08/target/device/Atmel/arch-arm/u-boot/2009.01
 
In an attempt to skip over the patches that I assume I don't need and just apply the AT91SAM9G20 one I tried to edit and cut away patch text to make each work in turn until I got to the AT91SAM9G20 ones. Trouble is it seems that none of the AT91 patches in this build are correct (including the AT91SAM9G20 one)!
 
If I don't elect to have the patches included I, predictably, get:
 
    *** No rule to make target 'at91sam9g20ek_config' 
 
So I suppose what I am saying is that i think that the AT91 patches supplied with Buildroot-2009.08 are out of date or just wrong or i am doing something stupid that i can't see (i find it hard to believe i am the only person with this issue).
 


Possibly surplus info:

I have been through all the various guides on the AT91 website with varying results, crc check issues at boot, kernel panics and kernels that run but don't allow a user to log in (I assume a problem building busybox).
 
I have, through combining the various guides and using a boot loader build that has no mention of our board, managed to build something that does work (I assume that the boot loader manages to get by because our card is so similar to the at91sam9260) but the process is messy and undesirable, perhaps even unrepeatable for future developers here at our company and using a bootloader for a different card makes me a little nervous, so I am very keen to be able to build from the latest buildroot distribution of files.
 
demo apps from the AT91 website work ok and I am using the Linux version of SAM-BA to flash files.
 
Incidentally I notice that the AT91 website only has patches up to kernel 2.6.27. I have assumed that these mods are built into the 2.6.30 kernel already, is that naive? My 2.6.30 kernel does run on the board but will there be some nasty surprises lurking somewhere?
 
Is there anything you can do to help me build U-Boot for our board? Updated patches or any guidance would be great.

Many thanks in advance
Steve
Comment 1 Peter Korsgaard 2009-10-29 20:01:01 UTC
(In reply to comment #0)

> Trouble is, when it comes to applying the patches the build system falls over
> with:
> 
>     Applying u-boot-2009.01-001-at91rm9200.patch using plaintext: 
>     patching file include/asm-arm/arch-at91rm9200/at91_pio.h
>     patching file include/asm-arm/arch-at91rm9200/at91_pmc.h
>     patching file include/asm-arm/arch-at91rm9200/AT91RM9200.h
>     Hunk #1 FAILED at 28.

It sounds like you have enabled BR2_TARGET_U_BOOT_2009_01_ARCH_AT91 (AT91 patches for u-boot-2009.01). Don't do that if you are not using the 2009.01 version of u-boot. I'll fix up kconfig so you won't be able to do so in the future.

On a related note, you won't find support for the 9g20 in the ancient 1.2.0-atmel release, you better use the 2009.08 release instead.

> So I suppose what I am saying is that i think that the AT91 patches supplied
> with Buildroot-2009.08 are out of date or just wrong or i am doing something
> stupid that i can't see (i find it hard to believe i am the only person with
> this issue).

The AT91 patches we have are indeed fairly old, but most AT91 stuff is in mainline nowadays, so you don't need (many) patches.

Comment 2 Steve 2009-10-30 11:42:24 UTC
Many thanks Peter, changing to the latest uboot option in the config and deselecting 'add patches' option allows the build to complete.

Sadly none of my outputs actually work properly:
 * All atmel demo apps - works fine
 * my uboot (nandflash) + the atmel demo apps - gives me the CRC error
 * my kernel + the atmel demo apps - gives me kernel panic
 * my rootfs + the atmel demo apps - can't login to the kernel

so you can see i still have my work cut out but i think this is all configuration related and so my problem and i will contact atmel for help with it and see if they have any patches.

So thanks again
Steve 
Comment 3 Thomas Petazzoni 2010-08-10 17:28:01 UTC
At the end of the bug report, there isn't really a precise report of a particular issue, except that the Buildroot user is going to contact Atmel for support.

I'm therefore closing this bug, but Steve, if you're still having issues with Buildroot, feel free to reopen it, or to open other bugs with reports of the issues you're facing.