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  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: all steps to creat Own linux kernel image.....!!!!!--HELP!!!
PostPosted: Thu Feb 21, 2008 8:53 am 
Offline

Joined: Wed Nov 14, 2007 12:22 pm
Posts: 66
hi everyone,
i m using "at91sam9261ek" and toolchain used is "timesys-armv5l-bsp-9261-pkgs" .
I m not able to create kernel image proper. plz give me detailed distiption of copliation . so that i cud find out where i m wrong.
STEPS i used during kernel building;;;;;;

to build (or rebuild) the kernel:



1. Firstlly extract toolchain named timesys-armv5l-bsp-9261-pkgs.



# tar -xvjf timesys-armv5l-bsp-9261-pkgs



2. Extarct kernel from \timesys-armv5l-bsp-9261-pkgs\target\SRPMS named

kernel-2.6.20-ts.at91sam9261ek.1 and move to \linux2.6.20 and extract it using

command



# tar -jxvf linux-2.6.20.tar.bz2



3. Apply additional patches to the kernel using the patch command



# patch -p1 < patch-2.6.20.11

# patch -p1 < at91-2.6.20.patch



4. # make ARCH=arm CROSS_COMPILE= armv5l-linux- at91sam9261ek_defconfig



5. If needed, update the kernel configuration, using your favorite kernel configuration editor. If you do not need to update the kernel configuration, use the make oldconfig command.



# make ARCH=arm CROSS_COMPILE= armv5l-linux- menuconfig



6. To create the kernel image



# make ARCH=arm CROSS_COMPILE= armv5l-linux- uImage



7. Installing kernel modules



#make Arch=arm CROSS_COMPILE=/opt/timesys/toolchains/armv5l-linux/bin/armv5l-linux- INSTALL_MOD_PATH=/at91ek/images/modules-2.6.20 modules_install



You can copy the resulting kernel image file from the kernel source directory into a /tftpboot.

8 Last is mkimage comman was their in document ,i dont knw which 'mkimage' shoul i use...???

-----And also reply me with the method to Create RFS for the same board.

plz reply ..nd help me out ...!!!!
:(

_________________
vini


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 21, 2008 6:16 pm 
Offline

Joined: Wed Jan 09, 2008 5:09 pm
Posts: 186
Location: Mounds View, MN
I'm not sure it is possible to do anything with the Timesys supplied kernel without paying for access to their tools. If I could get buildroot to successfully complete, I would recommend using it.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 6:42 am 
Offline

Joined: Wed Nov 14, 2007 12:22 pm
Posts: 66
so there is no way except using Timesys package....for building Our Own Kernel......!!!!

Then how cud we add our application over arm kit.......??????

What shud i Do...???

_________________
vini


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 22, 2008 5:20 pm 
Offline

Joined: Wed Jan 09, 2008 5:09 pm
Posts: 186
Location: Mounds View, MN
You could try buildroot. But I have not been successful building a kernel with it.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 23, 2008 6:41 am 
Offline

Joined: Wed Nov 14, 2007 12:22 pm
Posts: 66
ok....!!!when u otsucessfulo pl letmeknw abo this.....meanwhile i m also tryin this...........!!!!!!!!!!!11

tell me ur steps 4 Buildroot....????
thanx 4 ur reply...!!!!!!!

_________________
vini


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 23, 2008 11:03 am 
Offline

Joined: Wed Nov 14, 2007 12:22 pm
Posts: 66
Today i tried to nuild my own Buildroot for at91sam9261ek board ,

,pl give me any ideas ....

wht r the steps for creating Buildroot......


thanx,

_________________
vini


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 26, 2008 12:27 pm 
Offline

Joined: Tue Feb 26, 2008 12:06 pm
Posts: 4
Well to compile the kernel follow these simple steps

first copy the board specific configuration file from
arch/arm/configs/at91sam9261_defconfig to root level of source code

the following command will do it

cp arch/arm/configs/at91sam9261ek_defconfig ./.config

Next export the toolchain path;

say like this

export PATH=$PATH:/opt/timesys/toolchains/bin:

then run menuconfig

say like this

make ARCH=arm menuconfig

then run the final make

say like this

make ARCH=arm CROSS_COMPILE=armv5l-linux- uImage

U will have the u-boot compatible image in arch/arm/boot folder :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 26, 2008 11:23 pm 
Offline

Joined: Mon Aug 20, 2007 1:45 am
Posts: 20
I've my own toolchain, so I'm using that one.

For creating a new kernel:

untar the kernel and patch it with the according patch from maxim.org

than 'make ARCH=arm menuconfig' -> I config the kernel by hand, you may use the supplied config file. Than:

'make ARCH=arm CROSS_COMPILE=${mycrosstool} zImage' where $mycrosstool is the toolchains target, let's say 'arm-unknown-linux-gnu-'

when finished:
'arm-unknown-linux-gnu-objcopy -O binary -R .note -R .comment -S vmlinux linux.bin'

than gzipping it:
'gzip -c -9 linux.bin > linux.bin.gz'

and creating the uboot image (uboot was precomplied before - and maybe patched):
'$HOME/u-boot-1.1.4.patched/tools/mkimage -A arm -O linux -T kernel -C gzip -a 0x20008000 -e 0x20008000 -d linux.bin.gz ecb_at91.img'

Now, the bootable image is ready. Try to boot it with tftp:
- set the server ipaddress in uboot (while booting)
- than type 'tftpboot' (this loads the image from the tftp server
- type 'bootm' to boot the image in the memory

If the image boots correctly, than you may try to write it to the flash/mmc/anything else


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 27, 2008 8:36 am 
Offline

Joined: Wed Nov 14, 2007 12:22 pm
Posts: 66
hi...chilapurec..
even i m using the same procdure but even then i did the same steps again that u have wrritten in ur last reply.
my kernel image is created but i transferrred this to my at91sam9261ek board . But again same error ouccred "'kernel panic"....??? :(

U-Boot> tftp 21100000 uImage
dm9000 i/o: 0x30000000, id: 0x90000a46
MAC: 12:34:56:78:9a:00
operating at 100M full duplex mode
TFTP from server 192.168.10.101; our IP address is 192.168.10.54
Filename 'uImage'.
Load address: 0x21100000
Loading: T T T T T T T T #######################################################
########T #########################################################
###T T ##############################################################
#####T T ####
done
Bytes transferred = 1040472 (fe058 hex)
U-Boot> bootm 21100000
## Booting image at 21100000 ...
Image Name: Linux-2.6.20.11
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1040408 Bytes = 1016 kB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux.............................................................
Linux version 2.6.20.11 (root@PC010) (gcc version 4.1.1) #1 Wed Feb 27 17:16:258
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9261-EK
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists. Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 roow
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 59648KB available (1864K code, 204K data, 92K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like d
Freeing initrd memory: 3072K
NetWinder Floating Point Emulator V0.97 (double precision)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
dm9000 Ethernet Driver
eth0: dm9000 at c480c000,c480e044 IRQ 107 MAC: 12:34:56:78:9a:00
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-b)
Scanning device for bad blocks
Bad eraseblock 455 at 0x038e0000
Bad eraseblock 690 at 0x05640000
Bad eraseblock 1427 at 0x0b260000
Bad eraseblock 1429 at 0x0b2a0000
Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x00000000-0x00040000 : "Partition 1"
0x00040000-0x10000000 : "Partition 2"
usbmon: debugfs is not available
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
at91_i2c at91_i2c: AT91 i2c bus driver.
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Couldn't find valid RAM disk image starting at 0.
No filesystem could mount root, tried: ext2 cramfs vfat
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

how to solve this problem ...!!! wht shud i do to remove
this..error..??

_________________
vini


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 27, 2008 8:57 am 
Offline

Joined: Wed Nov 14, 2007 12:22 pm
Posts: 66
hi viper,,
I tried ur way too...Image is created but when transferrred to board the it's appeared with same ERROR..-->>
U-Boot> bootm 21100000
## Booting image at 21100000 ...
Image Name:
Image Type: ARM Linux Kernel Image (gzip compressed)
Data Size: 1025392 Bytes = 1001.4 kB
Load Address: 20008000
Entry Point: 20008000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.6.20.11 (root@PC010) (gcc version 4.1.1) #1 Wed Feb 27 17:16:258
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
Machine: Atmel AT91SAM9261-EK
Ignoring unrecognised tag 0x54410008
Memory policy: ECC disabled, Data cache writeback
Clocks: CPU 198 MHz, master 99 MHz, main 18.432 MHz
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists. Total pages: 16256
Kernel command line: mem=64M console=ttyS0,115200 initrd=0x21100000,3145728 roow
AT91: 96 gpio irqs in 3 banks
PID hash table entries: 256 (order: 8, 1024 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 64MB = 64MB total
Memory: 59648KB available (1864K code, 204K data, 92K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
checking if image is initramfs...it isn't (bad gzip magic numbers); looks like d
Freeing initrd memory: 3072K
NetWinder Floating Point Emulator V0.97 (double precision)
io scheduler noop registered
io scheduler anticipatory registered (default)
atmel_usart.0: ttyS0 at MMIO 0xfefff200 (irq = 1) is a ATMEL_SERIAL
RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize
dm9000 Ethernet Driver
eth0: dm9000 at c480c000,c480e044 IRQ 107 MAC: 12:34:56:78:9a:00
NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (Samsung NAND 256MiB 3,3V 8-b)
Scanning device for bad blocks
Bad eraseblock 455 at 0x038e0000
Bad eraseblock 690 at 0x05640000
Bad eraseblock 1427 at 0x0b260000
Bad eraseblock 1429 at 0x0b2a0000
Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":
0x00000000-0x00040000 : "Partition 1"
0x00040000-0x10000000 : "Partition 2"
usbmon: debugfs is not available
at91_ohci at91_ohci: AT91 OHCI
at91_ohci at91_ohci: new USB bus registered, assigned bus number 1
at91_ohci at91_ohci: irq 20, io mem 0x00500000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
udc: at91_udc version 3 May 2006
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
at91_i2c at91_i2c: AT91 i2c bus driver.
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
RAMDISK: Couldn't find valid RAM disk image starting at 0.
No filesystem could mount root, tried: ext2 cramfs vfat
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)

plz help me out ...!!! confused..!!! :(

_________________
vini


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 27, 2008 10:36 am 
Offline

Joined: Mon Aug 20, 2007 1:45 am
Posts: 20
vini,

this error is not with the image of your kernel, but with the provided rootFS. So, the kernel does not find the root FS.

There are two possibilities:
- either you've left out the NAND contorller or the MMC controller from the kernel (mostly unlikely, since you're using a standard config, but check it)
- or the provided root FS is bad. Try giving the rootFS placa by hand - it should be something like /dev/mtd040001 for the nandflash.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 28, 2008 6:17 am 
Offline

Joined: Wed Nov 14, 2007 12:22 pm
Posts: 66
yes problem is with my rootfs ...so wht is the solution 4 it...!!!
do u hav build rootfs . . .plz send it to me if u have ..
i m not able to build my own rootfs...for 9261 board!!

thanx 4 ur concern ..!!!

_________________
vini


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 28, 2008 6:18 am 
Offline

Joined: Wed Nov 14, 2007 12:22 pm
Posts: 66
And i m using standard config file i.e. at91sam9261ek_defconfig...for building kernel image....!!!

_________________
vini


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 03, 2008 6:19 am 
Offline

Joined: Wed Nov 14, 2007 12:22 pm
Posts: 66
plz reply...!!! :(

_________________
vini


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 11, 2008 6:44 pm 
Offline

Joined: Mon May 28, 2007 5:02 pm
Posts: 50
Location: Walton-on-Thames, UK
You have no ramdisk image in memory!!!!!

Your bootargs say that the initrd is at 21100000 but that is the same address as you are loading your Linux image to so it will have been overwritten before booting.
You must either load the Linux image to a different address or load the initrd to a different address and change the address in bootargs


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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: