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: AT91SAM9G45-EKES: Problems to boot own kernel
PostPosted: Fri Mar 05, 2010 5:40 pm 
Offline

Joined: Fri Mar 05, 2010 4:53 pm
Posts: 8
Hello everybody,

this is what I did:

- Installed cross toolchain arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 to /opt/arm-2007q1/

- Downloaded and patched 2.6.30 vanilla sources as shown here: http://www.at91.com/linux4sam/bin/view/ ... rted_table

- changed to sources dir and did the following:

make mrproper

cp ../at91sam9g45ekes_defconfig .config

make ARCH=arm oldconfig

make ARCH=arm CROSS_COMPILE= /opt/arm-2007q1/bin/arm-none-linux-gnueabi-

mkimage -A arm -O linux -C none -T kernel -a 70008000 -e 70008000 -n linux-2.6 -d arch/arm/boot/Image uImage


Image Name: linux-2.6
Created: Fri Mar 5 16:15:51 2010
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3532416 Bytes = 3449.62 kB = 3.37 MB
Load Address: 0x70008000
Entry Point: 0x70008000


- downloaded u-boot image from ftp://www.at91.com/pub/uboot/u-boot-1.3.4-exp.3/u-boot-1.3.4-exp.3-at91sam9g45ekes-nandflash.bin and wrote it to nand flash address 0x20000 with sam-ba

- used sam-ba to write uImage to the following address in nand flash: 0x200000

my u-boot environment looks like this:


bootdelay=3
baudrate=115200
stdin=serial
stdout=serial
stderr=serial
bootargs=mem=128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2
bootcmd=nand read 0x72200000 0x00200000 0x00180034; bootm 0x72200000
ethact=macb0



- This is what I get:


NAND read: device 0 offset 0x200000, size 0x180034
1572916 bytes read: OK
## Booting kernel from Legacy Image at 72200000 ...
Image Name: linux-2.6
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3532416 Bytes = 3.4 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... Bad Data CRC
ERROR: can't get kernel image!



What am I doing wrong?

With best regards

Arthur D.


Top
 Profile  
 
 Post subject: Re: AT91SAM9G45-EKES: Problems to boot own kernel
PostPosted: Thu Mar 11, 2010 4:09 pm 
Offline

Joined: Fri Mar 05, 2010 4:53 pm
Posts: 8
OK, the problem was a wrong u-boot bootcmd. I passed the size of the original kernel, not the size of the new one.


Top
 Profile  
 
 Post subject: Re: AT91SAM9G45-EKES: Problems to boot own kernel
PostPosted: Fri Mar 12, 2010 4:48 pm 
Offline

Joined: Fri Mar 05, 2010 4:53 pm
Posts: 8
OK, next problem:

u-boot starts the new kernel, but the kernel crashes:

Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
[<c002a5cc>] (unwind_backtrace+0x0/0xe0) from [<c0039f38>] (panic+0x44/0x11c)
[<c0039f38>] (panic+0x44/0x11c) from [<c00244ec>] (init_post+0xcc/0xfc)
[<c00244ec>] (init_post+0xcc/0xfc) from [<c0008724>] (kernel_init+0xb8/0xe4)
[<c0008724>] (kernel_init+0xb8/0xe4) from [<c003ca20>] (do_exit+0x0/0x598)
[<c003ca20>] (do_exit+0x0/0x598) from [<00000003>] (0x3)


Here is my u-boot environment:

bootdelay=3
baudrate=115200
stdin=serial
stdout=serial
stderr=serial
ethact=macb0
bootargs=mem=128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2
bootcmd=nand read 0x72200000 0x00200000 0x1ae738; bootm 0x72200000


The kernel log:

NAND read: device 0 offset 0x200000, size 0x1ae738
1763128 bytes read: OK
## Booting kernel from Legacy Image at 72200000 ...
Image Name: Linux-2.6.30
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1763064 Bytes = 1.7 MB
Load Address: 70008000
Entry Point: 70008000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux............................................................................................................... done, booting the kernel.
Linux version 2.6.30 (hmi@pc551-Ubuntu) (gcc version 4.2.2) #1 Fri Mar 12 14:58:48 CET 2010
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91SAM9G45-EKES
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 400 MHz, master 133 MHz, main 12.000 MHz
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 32512
Kernel command line: mem=128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2
NR_IRQS:192
AT91: 160 gpio irqs in 5 banks
PID hash table entries: 512 (order: 9, 2048 bytes)
Console: colour dummy device 80x30
console [ttyS0] enabled
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 126208KB available (3084K code, 235K data, 112K init, 0K highmem)
Calibrating delay loop... 199.47 BogoMIPS (lpj=997376)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
net_namespace: 296 bytes
NET: Registered protocol family 16
atmel_tcb: probe of atmel_tcb.0 failed with error -22
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Calling CRDA to update world regulatory domain
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
NetWinder Floating Point Emulator V0.97 (double precision)
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 246
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_lcdfb atmel_lcdfb.0: 1500KiB frame buffer at 77a00000 (mapped at ffa00000)
atmel_lcdfb atmel_lcdfb.0: fb0: Atmel LCDC at 0x00500000 (mapped at c8858000), irq 23
atmel_usart.0: ttyS0 at MMIO 0xfeffee00 (irq = 1) is a ATMEL_SERIAL
atmel_usart.2: ttyS2 at MMIO 0xfff90000 (irq = 8) is a ATMEL_SERIAL
brd: module loaded
loop: module loaded
Driver 'sd' needs updating - please use bus_type methods
MACB_mii_bus: probed
eth0: Atmel MACB at 0xfffbc000 irq 25 (3a:1f:34:08:54:54)
eth0: attached PHY driver [Davicom DM9161A] (mii_bus:phy_addr=ffffffff:00, irq=-1)
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xaa (Micron NAND 256MiB 1,8V 8-bit)
AT91 NAND: 8-bit, Software ECC
Scanning device for bad blocks
Bad eraseblock 179 at 0x000001660000
Bad eraseblock 456 at 0x000003900000
Bad eraseblock 1017 at 0x000007f20000
Bad eraseblock 1500 at 0x00000bb80000
Bad eraseblock 1619 at 0x00000ca60000
Bad eraseblock 1805 at 0x00000e1a0000
Bad eraseblock 1813 at 0x00000e2a0000
Bad eraseblock 2021 at 0x00000fca0000
Creating 2 MTD partitions on "atmel_nand":
0x000000000000-0x000004000000 : "Partition 1"
0x000004000000-0x000010000000 : "Partition 2"
atmel_spi atmel_spi.0: Atmel SPI Controller at 0xfffa4000 (irq 14)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
atmel-ehci atmel-ehci: Atmel EHCI UHP HS
atmel-ehci atmel-ehci: new USB bus registered, assigned bus number 1
atmel-ehci atmel-ehci: irq 22, io mem 0x00800000
atmel-ehci atmel-ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: Atmel EHCI UHP HS
usb usb1: Manufacturer: Linux 2.6.30 ehci_hcd
usb usb1: SerialNumber: atmel-ehci
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 2
at91_ohci at91_ohci: irq 22, io mem 0x00700000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: AT91 OHCI
usb usb2: Manufacturer: Linux 2.6.30 ohci_hcd
usb usb2: SerialNumber: at91
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
atmel_usba_udc atmel_usba_udc: MMIO registers at 0xfff78000 mapped at c885c000
atmel_usba_udc atmel_usba_udc: FIFO at 0x00600000 mapped at c8900000
mice: PS/2 mouse device common for all mice
input: gpio-keys as /class/input/input0
atmel_tsadcc atmel_tsadcc: Master clock is set at: 133333333 Hz
atmel_tsadcc atmel_tsadcc: Prescaler is set at: 221
input: atmel touch screen controller as /class/input/input1
rtc-at91sam9 at91_rtt.0: rtc core: registered at91_rtt as rtc0
IRQ 1/rtc0: IRQF_DISABLED is not guaranteed on shared IRQs
rtc-at91sam9 at91_rtt.0: rtc0: SET TIME!
i2c-gpio i2c-gpio.0: using pins 52 (SDA) and 53 (SCL)
Registered led device: d8
Registered led device: d6
Registered led device: d7
at_hdmac at_hdmac: Atmel AHB DMA Controller ( cpy slave ), 8 channels
Advanced Linux Sound Architecture Driver Version 1.0.20.
atmel_ac97c atmel_ac97c.0: Atmel AC97 controller at 0xc8880000, irq = 24
ALSA device list:
#0: Atmel AC97 controller
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
lib80211: common routines for IEEE802.11 drivers
rtc-at91sam9 at91_rtt.0: hctosys: unable to read the hardware clock
atmel_mci atmel_mci.0: Using dma0chan0 for DMA transfers
atmel_mci atmel_mci.0: Atmel MCI controller at 0xfff80000 irq 11, 1 slots
atmel_mci atmel_mci.1: Using dma0chan1 for DMA transfers
atmel_mci atmel_mci.1: Atmel MCI controller at 0xfffd0000 irq 29, 1 slots
VFS: Mounted root (jffs2 filesystem) on device 31:1.
Freeing init memory: 112K
Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init= option to kernel.
[<c002a5cc>] (unwind_backtrace+0x0/0xe0) from [<c0039f38>] (panic+0x44/0x11c)
[<c0039f38>] (panic+0x44/0x11c) from [<c00244ec>] (init_post+0xcc/0xfc)
[<c00244ec>] (init_post+0xcc/0xfc) from [<c0008724>] (kernel_init+0xb8/0xe4)
[<c0008724>] (kernel_init+0xb8/0xe4) from [<c003ca20>] (do_exit+0x0/0x598)
[<c003ca20>] (do_exit+0x0/0x598) from [<00000003>] (0x3)


I would really appreciate if someone could helop.

Best regards


Top
 Profile  
 
 Post subject: Re: AT91SAM9G45-EKES: Problems to boot own kernel
PostPosted: Mon Mar 22, 2010 10:23 am 
Offline

Joined: Thu Oct 01, 2009 4:13 am
Posts: 2
bootargs=mem=128M console=ttyS0,115200 mtdparts=atmel_nand:4M(bootstrap/uboot/kernel)ro,60M(rootfs),-(data) root=/dev/mtdblock1 rw rootfstype=jffs2


Top
 Profile  
 
 Post subject: Re: AT91SAM9G45-EKES: Problems to boot own kernel
PostPosted: Mon Mar 22, 2010 2:56 pm 
Offline

Joined: Fri Mar 05, 2010 4:53 pm
Posts: 8
Thank you very much, zruiff!


Top
 Profile  
 
 Post subject: Re: AT91SAM9G45-EKES: Problems to boot own kernel
PostPosted: Tue Aug 31, 2010 10:02 pm 
Offline

Joined: Tue Aug 31, 2010 9:57 pm
Posts: 3
Hello All,
- I am quite new to ARM dev. and facing the same problem (second one) how do I set the u-boot environment variables?

thanks ahead,
Guy


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: No registered users and 6 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: