From: Gaurav K. <Gau...@no...> - 2005-03-01 11:15:32
|
Hi Brian, Why are you copying the entire kernel to RAM ? You need to copy a few sections of it. This feature is implemented in uClinux for sh (SH7751). You can search the uClinux mailing lists for "Boot from ROM". Before copying the rootfs check if it is loaded at 0x800F0000. The address of the rootfs (initrd) is stored in initrd_start. Check its value, if it correctly points to 0x88360000. The kernel tries to locate the type of filesystem (and then loads it) by checking its contents. Also check a first few bytes at initrd_start matches to your rootfs (initrd). Regards, Gaurav ---------------------------------------------------- Need help.. We are trying to boot the linux kernel from flash rom.=3D20 But we = always get kernel panic when loading the filesystem. We loaded the following to flash memory and add function in=3D20 sh-ipl code to copy to RAM memory: vmlinux 0x80010000 FLASH --> copy to 0x88210000 RAM rootfs 0x800F0000 FLASH --> copy to 0x88360000 RAM we sucessfully copied the files to RAM [arch/sh/kernel/head.S]=3D20 .section .empty_zero_page, "aw" ENTRY(empty_zero_page) .long 1 /* MOUNT_ROOT_RDONLY */ .long 0 /* RAMDISK_FLAGS */ .long 0x0100 /* ORIG_ROOT_DEV */ <-- we changed to 0x0100 .long 1 /* LOADER_TYPE */ .long 0x00360000 /* INITRD_START */ .long 0x000a0000 /* INITRD_SIZE */ .long 0 .balign 4096,0,4096 .text=3D20 [part of sh-ipl config.h-sh2004] #define CONFIG_ROM_START 0x80000000 #define CONFIG_ROM_LENGTH 0x10000 #define CONFIG_RAM_START 0x88000000 #define CONFIG_RAM_BOOT (CONFIG_RAM_START+0x200000) #define CONFIG_MEMORY_SIZE get_memory_size() [Boot up results] Copying Kernel image from 0x80010000 to 0x88210000.Jumping to address = =3D 0x88210000 . Uncompressing Linux... Ok, booting the kernel. Linux version 2.4.26 (hos...@ds...) (gcc \D!?\?C\c\o =3D 3.2.3) #9 20 04C?P 9?Ei 27Au ?EiIEAu 16:32:39 JST SH-2004 Setup...done On node 0 totalpages: 32768 zone(0): 32768 pages. zone(1): 0 pages. zone(2): 0 pages. Kernel command line: mem=3D3D128M console=3D3DttySC0,115200 Setting GDB = trap vector to 0x80000100 rtc62423_gettimeofday: initializing RTC rtc62423_gettimeofday: RTC not found CPU clock: 240.00MHz Bus clock: 120.00MHz Module clock: 60.00MHz Interval =3D3D 150000 Calibrating delay loop... 239.20 BogoMIPS Memory: 127952k/131072k available (3120k reserved including: 1410k =3D kernel code, 50k data, 160k BSS, 52k init, 1408k page map) Dentry cache hash table entries: 16384 (order: 5, 131072 bytes) Inode cache hash table entries: 8192 (order: 4, 65536 bytes) Mount cache hash table entries: 512 (order: 0, 4096 bytes) Buffer cache hash table entries: 8192 (order: 3, 32768 bytes) Page-cache hash table entries: 32768 (order: 5, 131072 bytes) CPU: SH7750/SH7751 POSIX conformance testing by UNIFIX Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 Initializing RT netlink socket Starting kswapd VFS: Disk quotas vdquot_6.5.1 Journalled Block Device driver loaded pty: 256 Unix98 ptys configured Serial driver version 5.05c (2001-07-08) with no serial options enabled SuperH SCI(F) driver initialized ttySC0 at 0xffe00000 is a SCI ttySC1 at 0xffe80000 is a SCIF Real Time Clock Driver v1.10f RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4 ide: Assuming 50MHz system bus speed for PIO modes; override with =3D idebus=3D3Dxx ide3: ports already in use, skipping probe NET4: Linux TCP/IP 1.0 for NET4.0 IP Protocols: ICMP, UDP, TCP, IGMP IP: routing cache hash table of 1024 buckets, 8Kbytes TCP: Hash tables configured (established 8192 bind 16384) Linux IP multicast router 0.06 plus PIM-SM NET4: Unix domain sockets 1.0/SMP for Linux NET4.0. VFS: Cannot open root device "" or 00:00 Please append a correct "root=3D3D" boot option Kernel panic: VFS: Unable to mount root fs on 00:00 Does anyone had the same problem we encountered???? Is there something wrong or lacking with our method?? Thanks Brian |