Re: [uClinux-dev] No response after the message Freeing init memory on IXP425
Hi Greg, Yes, I have simpleinit enabled and kernel command line is console=ttyS0. My board has only one serial port connecting with the host pc. Firsly, I use arm-elf-gcc 3.4.3 and got error: /*--*/ Load /sbin/init: TEXT=2a0040-2a97e0 DATA=2a97e4-2ab394 BSS=2ab394-2bcde4 BINFMT_FLAT: reloc outside program 0x554e47 (0 - 0x1cda4/0x97a0), killing init /*--*/ After I switch to the toolchain with arm-linux-gcc 3.4.4, reloc error is solved, but console no response at all from userland applications. /*--kernel output---*/ BINFMT_FLAT: Loading file: /sbin/init Mapping is 2a, Entry point is 44, data_start is 96a0 Load /sbin/init: TEXT=2a0040-2a96a0 DATA=2a96a4-2ab254 BSS=2ab254-2bcca4 start_thread(regs=0x1b3f24, entry=0x2a0044, start_stack=0x2bffb0) BINFMT_FLAT: Loading file: /bin/sh Mapping is 2e, Entry point is 44, data_start is ee80 Load /bin/sh: TEXT=2e0040-2eee80 DATA=2eee84-2f1964 BSS=2f1964-2f2ec4 start_thread(regs=0x29ffb0, entry=0x2e0044, start_stack=0x2fff98) BINFMT_FLAT: Loading file: /bin/sh Mapping is 2e, Entry point is 44, data_start is ee80 Load /bin/sh: TEXT=2e0040-2eee80 DATA=2eee84-2f1964 BSS=2f1964-2f2ec4 start_thread(regs=0x313fb0, entry=0x2e0044, start_stack=0x2fff90) BINFMT_FLAT: Loading file: /bin/sh Mapping is 2e, Entry point is 44, data_start is ee80 Load /bin/sh: TEXT=2e0040-2eee80 DATA=2eee84-2f1964 BSS=2f1964-2f2ec4 start_thread(regs=0x313fb0, entry=0x2e0044, start_stack=0x2fff98) BINFMT_FLAT: Loading file: /bin/sh Mapping is 32, Entry point is 44, data_start is ee80 Load /bin/sh: TEXT=320040-32ee80 DATA=32ee84-331964 BSS=331964-332ec4 start_thread(regs=0x307fb0, entry=0x320044, start_stack=0x33ff98) /*-*/ I suspect that my kernel/uClib setting may be wrong; or I didn't create the stable userland application like init and sh; Thanks, Shuanglin Greg Ungerer wrote: Hi Shuanglin, Shuanglin Wang wrote: I think I meet the similar problem on my ARM946E-S board. My toolchain is gcc 3.4.4 and uClinux is the uClinux-dist-20070130 from uclinux official website. My question is about console setup. What should I do to make console work for userland applications? I prefer using core applications-enable console shell . That is ok. Do you have simpleinit enabled too? In any case what is the kernel command line? Do you have a console= option on it? Regards Greg Thanks in advance. Shuanglin Greg Ungerer wrote: Hi Srikanth, Srikanth Chavali wrote: Hi Greg, Just figured out that ADI Engineering is using uClinux-dist. What version? I looks like a console setup problem... Regards Greg srikanth chavali On 5/10/07, *Greg Ungerer* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi Srikanthn Srikanth Chavali wrote: I compiled ( 2.6.x kernel) and loaded the zImage and ramdisk.gz on my board with IXP425. The board seems to be in the process of loading the kernel when it stops after the messages shown below. Are you using the uClinux-dist, or something else? If yes, what version? Regards Greg I googled and found people facing similar issues. I ensured that i had CONFIG_FPE_NWFPE=y and CONFIG_FPE_FASTFPE is not set in my kernel configs. Any help would be greatly appreciated. Regards, srikanth chavali Attached are the messages: Intel/Sharp Extended Query Table at 0x010A Intel/Sharp Extended Query Table at 0x010A Intel/Sharp Extended Query Table at 0x010A Intel/Sharp Extended Query Table at 0x010A Using buffer write method cfi_cmdset_0001: Erase suspend on write enabled Searching for RedBoot partition table in IXP4XX-Flash.0 at offset 0xfe 3 RedBoot partitions found on MTD device IXP4XX-Flash.0 Creating 3 MTD partitions on IXP4XX-Flash.0: 0x-0x0006 : RedBoot 0x00fe-0x00fff000 : FIS directory mtd: partition FIS directory doesn't end on an erase block -- force read-only 0x00fff000-0x0100 : RedBoot config mtd: partition RedBoot config doesn't start on an erase block boundary -- forc e read-only mice: PS/2 mouse device common for all mice i2c /dev entries driver TCP bic registered NET: Registered protocol family 1 NET: Registered protocol family 17 RAMDISK: Compressed image found at block 0 VFS: Mounted root (ext2 filesystem) readonly. Freeing init memory: 96K -- Nothing seems to happen after this although it does'nt look like the system is frozen
Re: [uClinux-dev] add ROMfs in RAM at the end of kernel (_ebss)
Hi Lance, I'm doing similar things. I patched the kernel with your code, but i got an kernel panic. The boot log is: /-/ Kernel command line: root=/dev/ram0 ... io scheduler noop registered (default) atmel_usart.0: ttyS0 at MMIO 0xf800f000 (irq = 11) is a ATMEL_SERIAL RAMDISK driver initialized: 1 RAM disks of 1024K size 1024 blocksize uclinux[mtd]: RAM probe address=0xf02f0 size=0x1e000 Creating 1 MTD partitions on RAM: 0x-0x0001e000 : ROMfs mtd: Giving out device 0 to ROMfs uclinux[mtd]: set ROMfs to be root filesystem Generic platform RAM MTD, (c) 2004 Simtec Electronics VFS: Can't find a romfs filesystem on dev ram0. No filesystem could mount root, tried: romfs Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0) /-/ I made further test on it. And it seems it get an empty super inode from romfs. Did I miss something in kernel configuration or kernel command line? Thansk a lot. Shuanglin Lance Spaulding wrote: Mickael Sergent wrote: Hello, I'm trying to port uclinux 2.6.x on dev. board based on ARM946-E-S. (I use uClinux-dist 20070130) I would like to have kernel and ROMfs entirely in RAM but it seems to be impossible on ARM architecture. On uclinux 2.4 version a switch (CONFIG_RAM_ATTACHED_ROMFS) can be used to do this. Does an equivalent exist in 2.6 version ? I tried to use CONFIG_MTD_UCLINUX_EBSS (after having defined _ebss symbol in the end of kernel) but it doesn't solve problem (because RAM where is stored ROMfs is used by uclinux), so a patch is needed to reserve ROMfs memory Do you know another solution to put ROMfs at the end of kernel ? Thanks a lot ! Best regards, Mickael. ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev Hi Mickael, We use a ram based rom filesystem on our ARM products (including ones using an arm946). I've attached a small patch of the changes I made to get this to work. Note that we use little-endian exclusively so if you are using big-endian you will need to change the code slightly. Thanks, Lance diff -Naur uClinux-dist.orig/linux-2.6.x/arch/arm/kernel/head-common.S uClinux-dist/linux-2.6.x/arch/arm/kernel/head-common.S --- uClinux-dist.orig/linux-2.6.x/arch/arm/kernel/head-common.S 2006-06-28 01:22:16.0 -0600 +++ uClinux-dist/linux-2.6.x/arch/arm/kernel/head-common.S 2007-04-18 17:57:48.0 -0600 @@ -10,7 +10,6 @@ * published by the Free Software Foundation. * */ - .type __switch_data, %object __switch_data: .long __mmap_switched @@ -41,7 +40,6 @@ ldrne fp, [r4], #4 strne fp, [r5], #4 bne 1b - mov fp, #0 @ Clear BSS (and zero fp) 1: cmp r6, r7 strcc fp, [r6],#4 @@ -215,3 +213,41 @@ bl __lookup_machine_type mov r0, r5 ldmfd sp!, {r4 - r6, pc} + +#ifdef CONFIG_MTD_UCLINUX + .type __relocate_romfs, %function +__relocate_romfs: + adr r4, romfsinfo + ldmia r4!, {r6, r7} + bic r6, r6, #0xc000 + bic r7, r7, #0xc000 + + /* move the ram based rom filesystem to its correct final location... */ + /* the value is stored big-endian */ + mov fp, #0 + add r4,r6,#8 + ldrb r4,[r4] + orr fp, fp, r4, LSL #24 + add r4,r6,#9 + ldrb r4,[r4] + orr fp, fp, r4, LSL #16 + add r4,r6,#10 + ldrb r4,[r4] + orr fp, fp, r4, LSL #8 + add r4,r6,#11 + ldrb r4,[r4] + orr fp, fp, r4, LSL #0 + add r4, r6, fp + add fp, r7, fp + sub r6, r6, #4 +1: ldr r5, [r4] + str r5, [fp] + sub r4, r4, #4 + sub fp, fp, #4 + cmp r4, r6 + bne 1b + mov pc, lr +romfsinfo: + .long __bss_start @ r6 + .long _end@ r7 +#endif diff -Naur uClinux-dist.orig/linux-2.6.x/arch/arm/kernel/head-nommu.S uClinux-dist/linux-2.6.x/arch/arm/kernel/head-nommu.S --- uClinux-dist.orig/linux-2.6.x/arch/arm/kernel/head-nommu.S 2007-01-29 18:55:08.0 -0700 +++ uClinux-dist/linux-2.6.x/arch/arm/kernel/head-nommu.S 2007-04-19 08:25:58.0 -0600 @@ -16,7 +16,6 @@ #include asm/assembler.h #include asm/mach-types.h -#include asm/procinfo.h #include asm/ptrace.h #include asm/asm-offsets.h #include asm/thread_info.h @@ -41,6 +40,9 @@ ldr r1, =machine_arch_type @ find the machine type msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
[uClinux-dev] when and where to call init_machine?
Hi All, I'm working on porting linux kernel 2.6.19 to an arm-based customized board. But, I can't find where and who call init_machine. I just found in ~/arch/arm/kernel/setup.c init_machine is called by customiz_machine(). And I can't find who calls customiz_machine() too. Can anybody help me to clean this calling issue? Thanks a lot. WSL ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev
[uClinux-dev] How to start uClinux with a simple bootloader?
Hi, All, I'm porting uClinux to our board based on ARM946E-S. Now, I generated an uncompressed uClinux kernel image and romfs (txt+data+romfs) with command like: cat image.txt image.data romfs image.bin And objdumping results like: === arm-elf-objdump -h linux-2.6.x/linux linux-2.6.x/linux: file format elf32-littlearm Sections: Idx Name Size VMA LMA File off Algn 0 .init c000 8000 8000 8000 2**5 CONTENTS, ALLOC, LOAD, CODE 1 .text 000a5384 00014000 00014000 00014000 2**5 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .pci_fixup 000ba000 000ba000 000d7500 2**0 CONTENTS 3 .rio_route 000ba000 000ba000 000d7500 2**0 CONTENTS 4 __ksymtab 000ba000 000ba000 000d7500 2**0 CONTENTS 5 __ksymtab_gpl 000ba000 000ba000 000d7500 2**0 CONTENTS 6 __ksymtab_unused 000ba000 000ba000 000d7500 2**0 CONTENTS 7 __ksymtab_unused_gpl 000ba000 000ba000 000d7500 2**0 CONTENTS 8 __ksymtab_gpl_future 000ba000 000ba000 000d7500 2**0 CONTENTS 9 __kcrctab 000ba000 000ba000 000d7500 2**0 CONTENTS 10 __kcrctab_gpl 000ba000 000ba000 000d7500 2**0 CONTENTS 11 __kcrctab_unused 000ba000 000ba000 000d7500 2**0 CONTENTS 12 __kcrctab_unused_gpl 000ba000 000ba000 000d7500 2**0 CONTENTS 13 __kcrctab_gpl_future 000ba000 000ba000 000d7500 2**0 CONTENTS 14 __param 0050 000ba000 000ba000 000ba000 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 15 .data 0001b500 000bc000 000bc000 000bc000 2**5 CONTENTS, ALLOC, LOAD, DATA 16 .bss a2a0 000d7500 000d7500 000d7500 2**5 ALLOC 17 .comment 10f2 000d7500 2**0 CONTENTS, READONLY Instead of a standard Linux bootloader. Our board has a simple bootloader, which can 1. Copy image to some place in main memory; 2. Transfer the control to kernel. My questions are: Where should I put the uClinux kernel at 0x8000 in the main memory? Do I need to make some changes on our bootloader for booting uClinux? Thanks a lot. WSL ___ uClinux-dev mailing list uClinux-dev@uclinux.org http://mailman.uclinux.org/mailman/listinfo/uclinux-dev This message was resent by uclinux-dev@uclinux.org To unsubscribe see: http://mailman.uclinux.org/mailman/options/uclinux-dev