Thanks Breton,
I got my fat 16 file system code working now. In this code i copy Zimage,
ramdisk and kernel assembly setup code and finally jump to kernel assembly
setup code. But nothing is happing. The kernel is not booting.
On my board i have 64Mb sdram and its connected to sdcs3. I used redboot to
load the kernel and see what all parameters are being passed.
Redboot shows
RAM: 0x00000000-0x04000000, 0x00041f68-0x03fbd000 available
So i copy
#define RAMDISK_LOAD_ADDRESS 0x01000000
#define RAMDISK_LOAD_ADDRESS_END 0x01800000
#define KERNEL_LOAD_ADDRESS 0x03000000
#define KERNEL_LOAD_ADDRESS_END 0x03800000
#define KRNLSTARTUP_LOAD_ADDRESS 0x00010000 //kernel asmbly stup code
So i modified your code to copy the kernel at 0x03000000, Ramdisk remains the
same.
In your atags list you have mentioned set the memory as 4 banks.
I modified that as follows:
---------------------------------------------------------------------
linux_start:
@ copy atags to 0x0000 1000 @ a location where they won't be trashed
mov r1, #0x01
lsl r1, #8 @ target address to r1
adr r2, atags
adr r3, atags_fin @ fetch addresses
1: ldr r0, [r2] @ fetch address from r2
str r0, [r1] @ write word
add r1, #4
add r2, #4
cmp r2, r3
bne 1b
mov r2, #0x01
lsl r2, #8 @ 0x100 to r2 (atags pointer)
mov r1, #0x25
lsl r1, #4
add r1, #0xf @ 607 machine id (25f hex)
mov r0, #0 @ clear r0
mov r3, #03 @ target address in r3
lsl r3, #24 @ 0x0300 0000
bx r3 @ branch to address 0 - start linux
.align 4
atags: .word 5
.word ATAG_CORE
.word 0 @flags
.word 4096 @pagesize
.word 0 @rootdev - unknown...
.word 4 @ size of memory tag
.word ATAG_MEM
.word 0x03F7B098 @ size
.word 0x00041f68 @ start
.word 4
.word ATAG_INITRD2 @ second rev, physical mapped initrd
.word 0x01000000 @ start in second physical page
initrd_size: .word 0x00000000 @ filled in by loader!
cmdln_start: .word (cmdln_fin-cmdln_start)/4
.word ATAG_CMDLINE
.asciz "console=ttyAM0,57600 root=/dev/ram"
.align 4
cmdln_fin: .word 0 @ buggy terminator criterion in setup.h
.word ATAG_NONE
.word 0x00000000
atags_fin: .word 0x00000000
---------------------------------------------------------------------
I compiled this code using thumb mode and used a linker script to link it.
---------------------------------------------------------------------
SECTIONS
{
. = 0x00010000;
rom : {
*(.text)
*(.rodata)
*(.rodata.*)
*(.got)
*(.got.*)
*(.data.rel.ro)
}
ram : {
*(.bss)
*(COMMON)
}
}
---------------------------------------------------------------------
I am new to arm assembly, hence not sure if the address used in linker script
affects the location from where this code is executed once it is copied in the
memory.
I even tried to reading back the data from kernel load address and ramdisk load
address. The data is fine
It will be a great help if you can please share your comments on this.
Thanks
Tama
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|