Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Buildroot selection AT91SAM9G45/AT91SAM9M10
PostPosted: Mon Jun 25, 2012 6:04 pm 
Offline

Joined: Tue Apr 17, 2012 9:55 am
Posts: 3
Dear together,
we actually plan to use the AT91SAM9G45. This is why we bought the AT91SAM9M10-G45-EK for a first contact and tests to this ARM device.

We've been also able to build the bootstrap, u-boot and the kernel separately as required. (booting via NFS, ...)

Now I'm actually new to the buildroot environment and this is where I might need an advice. I'd be happy if anybody could give me a helping hand.

I figured out that there are several buildroot versions and patches available/used to build the jffs2 rootfs for this device, e.g.:
buildroot-2010.2
buildroot-v23434 (from the linux4sam page)
or even newer ones.

Actually I'm working with an 12.04 Ubuntu VirtualBox image. I also managed to build my jffs2 rootfs with buildroot-200.2, qt/e and run it via nfs.

Due to I don't have the complete overview to see all the differences done in the past with buildroot, patches, and so on, can anybody tell me if it makes sense to use the latest version of buildroot or to keep on using the 2010.2 build?
Are there any AT91SAM9G45 patches for the processor and the board available for the latest buildroot directory structure?

Thank you in advance!


Top
 Profile  
 
 Post subject: Re: Buildroot selection AT91SAM9G45/AT91SAM9M10
PostPosted: Tue Jun 26, 2012 1:32 pm 
Offline

Joined: Sun Sep 20, 2009 9:38 pm
Posts: 64
Hi

I am trying to use the AT91SAM9M10-G45_EK board. I have managed to compile and to run Uboot and 2.6.35 kernel for NAND separately. I havent used any Buildroot. I flashed the demo File System in NAND. If I use the demo kernel it works fine but if I use my own kernel the system crash with:

Failed to execute /init. Attempting defaults...
Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[<c0034cc0>] (unwind_backtrace+0x0/0xec) from [<c03834f0>] (panic+0x6c/0xec)
[<c03834f0>] (panic+0x6c/0xec) from [<c002e5f4>] (init_post+0xac/0xd4)
[<c002e5f4>] (init_post+0xac/0xd4) from [<c0008488>] (kernel_init+0x124/0x168)
[<c0008488>] (kernel_init+0x124/0x168) from [<c002ff38>] (kernel_thread_exit+0x0/0x8)

Do you have any clue on what it may be happening ?

Thanks


Top
 Profile  
 
 Post subject: Re: Buildroot selection AT91SAM9G45/AT91SAM9M10
PostPosted: Tue Jun 26, 2012 4:54 pm 
Offline

Joined: Tue Apr 17, 2012 9:55 am
Posts: 3
Dear Marcio,
I'm working with the 2.6.30 Kernel and the given patches from the website. it works fine for me.

What boot-arguments do you pass to the kernel?

As cross-compiler I'm using: arm-none-linux-gnueabi-

For NFS booting I added the following configuration to the kernel:
add CONFIG_IP_PNP=y
add CONFIG_ROOT_NFS=y


...

Coming back to my original question, I tried to build my rootfs with the latest buildroot (buildroot-2012.05) but always get the following error message:

Code:
>>> host-gmp 5.0.4 Configuring
(cd /home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/build/host-gmp-5.0.4/ && rm -rf config.cache; PATH=/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/bin:/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/bin:/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2010.02/output/staging/usr/bin:/home/stefan/AT91SAM9G45/02_uboot/u-boot-1.3.4/tools:/opt/tool_chains/arm-2007q1/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games AR="/usr/bin/ar" AS="/usr/bin/as" LD="/usr/bin/ld" NM="/usr/bin/nm" CC="/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/bin/ccache /usr/bin/gcc" GCC="/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/bin/ccache /usr/bin/gcc" CXX="/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/bin/ccache /usr/bin/g++" CPP="/usr/bin/cpp" CFLAGS="-O2 -I/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/include -I/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/include" CXXFLAGS="-I/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/include -I/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/include" LDFLAGS="-L/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/lib -L/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/lib -Wl,-rpath,/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/lib" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG="/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/lib/pkgconfig:/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/share/pkgconfig" PERLLIB="/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/lib/perl" LD_LIBRARY_PATH="/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/lib:" CFLAGS="-O2 -I/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/include -I/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/include" LDFLAGS="-L/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/lib -L/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/lib -Wl,-rpath,/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr/lib"  ./configure --prefix="/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/usr" --sysconfdir="/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/host/etc" --enable-shared --disable-static  )
checking build system type... Invalid configuration `i686-pc-linux-': machine `i686-pc-linux' not recognized
configure: error: /bin/bash ./config.sub i686-pc-linux- failed
make: *** [/home/stefan/AT91SAM9G45/04_rootfs/buildroot-2012.05/output/build/host-gmp-5.0.4/.stamp_configured] Error 1


Can anybody tell me where I have to start digging into?

Thank you in advance!

S.G.


Top
 Profile  
 
 Post subject: Re: Buildroot selection AT91SAM9G45/AT91SAM9M10
PostPosted: Tue Jun 26, 2012 5:14 pm 
Offline

Joined: Tue Apr 17, 2012 9:55 am
Posts: 3
Dear Marcio,
here's actually the stuff I 'feed' my u-boot to boot the kernel and rootfs via nfs for testing. It might not be perfect in detail but still works. Maybe this helps you further.


Quote:
setenv ethaddr 3e:36:65:ba:6f:be
setenv ipaddr 192.168.1.2
setenv serverip 192.168.1.1
setenv gateway 192.168.1.1
setenv netmask 255.255.255.0
setenv ip ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off

setenv nfsroot nfsroot=192.168.1.1:/var/lib/tftpboot/rootfs,tcp
## setenv nfsroot ${nfsroot},nfsvers=2,rsize=4096,wsize=8192,tcp

setenv nwhwconf nwhwconf=device:eth0,hwaddr:${ethaddr}


setenv bootargs console=ttyS0,115200,8n1 mem=128M init=/sbin/init
setenv bootargs ${bootargs} ${ip} ${nwhwconf}
setenv bootargs ${bootargs} rw root=/dev/nfs ${nfsroot}

setenv bootcmd 'tftp 0x72000000 uImage; bootm 0x72000000'

setenv bootfile uImage

saveenv



BR
S.G.


Top
 Profile  
 
 Post subject: Re: Buildroot selection AT91SAM9G45/AT91SAM9M10
PostPosted: Tue Jun 26, 2012 5:54 pm 
Offline

Joined: Sun Sep 20, 2009 9:38 pm
Posts: 64
Hi
The boot-arguments I pass to the kernel is:

bootargs mem=128M console=ttyS0,115200 mtdparts=nand0:5M(Bootstrap),95M(system),92M(userdata) ubi.mtd=1 ubi.mtd=2 rw root=ubi0:system rootfstype=ubifs init=/init androidboot.console=ttyS0 debug

It works for the 2.6.35 demo kernel. The board loads the kernel and the Android file system.

When I try to use the kernel I compiled I get:
Failed to execute init. Attempting defaults...
mmc1: req done (CMD0): 0: 00000000 00000000 00000000 00000000
mmc1: clock 260417Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
Kernel panic - not syncing: No init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[<c0034cc0>] (unwind_backtrace+0x0/0xec) from [<c03834f0>] (panic+0x6c/0xec)
[<c03834f0>] (panic+0x6c/0xec) from [<c002e5f4>] (init_post+0xac/0xd4)
[<c002e5f4>] (init_post+0xac/0xd4) from [<c0008488>] (kernel_init+0x124/0x168)
[<c0008488>] (kernel_init+0x124/0x168) from [<c002ff38>] (kernel_thread_exit+0x0/0x8)

Actually the kernel is not finding the init program initramfs.

The system never try to get the file system recorded in the flash.

I have been using this development environment (cross-compiler) for a while building kernels for a dozen boards with no problem.

Regarding your question I just quit to try to buildroot because it gives me a lot of error.

I will stick on my development environment and try to solve this problem. Meanwhile we moved the project to a Samsung development kit.

Thank you very much for your kindness


Top
 Profile  
 
 Post subject: Re: Buildroot selection AT91SAM9G45/AT91SAM9M10
PostPosted: Thu Jun 28, 2012 9:07 pm 
Offline

Joined: Sun Sep 20, 2009 9:38 pm
Posts: 64
Hi

Did you managed to generate the kernel with buildroot-2012.05 ?
I am getting the error below.

LD .tmp_vmlinux1
/home/CameraKit/buildroot-2012.05/output/host/usr/bin/arm-unknown-linux-uclibcgnueabi-ld: no machine record defined
make[1]: *** [.tmp_vmlinux1] Error 1


if I move to the kernel directory and type
make uImage ARCH=arm CROSS_COMPILE=/opt/Boardcon/4.3.3/bin/arm-linux- , it works !


B.R.
Marcio


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: