JFFS2 FS is read-only (not what I want)
Did you check to see if your flash banks are unlocked? Chetan Anantharaman Motorola Labs -Original Message- From: [EMAIL PROTECTED] [mailto:linuxppc-embedded-bounces+w16155=email.mot.com at ozlabs.org] On Behalf Of Ben Warren Sent: Saturday, July 01, 2006 4:14 PM To: linuxppc-embedded at ozlabs.org Subject: JFFS2 FS is read-only (not what I want) Hello, When I boot from a JFFS2 file system on my eval board, the file system is effectively read-only, and I can't figure out why. I'm pretty sure the kernel's configured for R/W MTD block access. Any help is greatly appreciated. The hardware in use is: Freescale MPC8349EMDS eval board. 8MB Q-flash with 64 uniform 128k sectors Here are the symptoms: # du -s 265492 .-- only 265k of data # df Filesystem 1k-blocks Used Available Use% Mounted on /dev/mtdblock42048 2048 0 100% / # mount /dev/mtdblock4 on / type jffs2 (rw) /proc on /proc type proc (rw) Here's what the kernel spits out at boot-up: *** physmap flash device: 80 at fe00 phys_mapped_flash: Found 1 x16 devices at 0x0 in 16-bit bank Command set type 1 Intel/Sharp Extended Query Table at 0x0031 Using buffer write method cfi_cmdset_0001: Erase suspend on write enabled cmdlinepart partition parsing not available RedBoot partition parsing not available Using physmap partition definition Creating 6 MTD partitions on phys_mapped_flash: 0x-0x0004 : u-boot 0x0004-0x0008 : env 0x0008-0x0028 : kernel -- kernel boots from here 0x0028-0x0048 : initrd -- no initrd, this is empty 0x0048-0x0068 : jffs2 -- 2MB partition 0x0068-0x0080 : user -- empty *** I created the MTD partitions in a u-boot image that was pulled from the GIT tree about a week ago, and my kernel is 2.6.17-based. I wrote some board init code that sets the MTD physical mappings. Here are the MTD and JFFS2 parts of my .config file: *** # Memory Technology Devices (MTD) # CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set # CONFIG_MTD_CONCAT is not set CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set # CONFIG_MTD_CMDLINE_PARTS is not set # # User Modules And Translation Layers # CONFIG_MTD_CHAR=y CONFIG_MTD_BLOCK=y # CONFIG_FTL is not set # CONFIG_NFTL is not set # CONFIG_INFTL is not set # CONFIG_RFD_FTL is not set # # RAM/ROM/Flash chip drivers # CONFIG_MTD_CFI=y # CONFIG_MTD_JEDECPROBE is not set CONFIG_MTD_GEN_PROBE=y # CONFIG_MTD_CFI_ADV_OPTIONS is not set CONFIG_MTD_MAP_BANK_WIDTH_1=y CONFIG_MTD_MAP_BANK_WIDTH_2=y CONFIG_MTD_MAP_BANK_WIDTH_4=y # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set CONFIG_MTD_CFI_I1=y CONFIG_MTD_CFI_I2=y # CONFIG_MTD_CFI_I4 is not set # CONFIG_MTD_CFI_I8 is not set CONFIG_MTD_CFI_INTELEXT=y # CONFIG_MTD_CFI_AMDSTD is not set CONFIG_MTD_CFI_STAA=y CONFIG_MTD_CFI_UTIL=y # CONFIG_MTD_RAM is not set # CONFIG_MTD_ROM is not set # CONFIG_MTD_ABSENT is not set # CONFIG_MTD_OBSOLETE_CHIPS is not set # # Mapping drivers for chip access # # CONFIG_MTD_COMPLEX_MAPPINGS is not set CONFIG_MTD_PHYSMAP=y CONFIG_MTD_PHYSMAP_START=0xFE00 CONFIG_MTD_PHYSMAP_LEN=0x80 CONFIG_MTD_PHYSMAP_BANKWIDTH=2 # CONFIG_MTD_PLATRAM is not set # CONFIG_JFFS_FS is not set CONFIG_JFFS2_FS=y CONFIG_JFFS2_FS_DEBUG=0 # CONFIG_JFFS2_FS_WRITEBUFFER is not set # CONFIG_JFFS2_SUMMARY is not set # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set CONFIG_JFFS2_ZLIB=y CONFIG_JFFS2_RTIME=y # CONFIG_JFFS2_RUBIN is not set *** The file system is the SELF that is included with DENX's ELDK, and built as at: http://www.denx.de/wiki/view/DULG/RootFileSystemDesignAndBuilding I used the following command to create the file system image, that was then loaded at address 0xfe48 via U-boot: mkfs.jffs2 -U -d rootfs -D rootfs_device.tab -b -e 0x2 -o jffs2.img I modified the table to name my serial devices /dev/ttyS0 and /dev/ttyS1 thanks for the help. Sorry if this is too verbose or includes the wrong information. regards, Ben ___ Linuxppc-embedded mailing list Linuxppc-embedded at ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded
JFFS2 FS is read-only (not what I want)
Also as a side note, I think even if you unlock your banks/sectors in U-Boot, when the Linux kernel is launched I am not sure if the sectors/banks remain unlocked. You can also use the MTD Utils to unlock the device, erase the device, etc. in the shell. Chetan From: Ben Warren [mailto:[EMAIL PROTECTED] Sent: Monday, July 03, 2006 9:36 AM To: Anantharaman Chetan-W16155 Cc: linuxppc-embedded at ozlabs.org Subject: RE: JFFS2 FS is read-only (not what I want) Chetan, On Mon, 2006-07-03 at 10:18 -0400, Anantharaman Chetan-W16155 wrote: Did you check to see if your flash banks are unlocked? According to U-Boot, only the first four sectors are locked. My JFFS2 partition is in sectors 37-52 (1-based). I'll definitely look more deeply into this, though. thanks, Ben -- next part -- An HTML attachment was scrubbed... URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060703/ee6cdc5e/attachment.htm
help with inittab
I've tried what you've mentioned below, i.e removing the /sbin/init and just having the /bin/sh in the init/main.c file and I don't get a standalone shell. I am having a Linux 2.4 Kernel (Montavista 3.1) running on a PPC405 in a Xilinx Virtex4 FX100 FPGA. You mentioned it could be a hardware problem. Are there any errata which could explain the h/w bug? Thanks, Chetan Anantharaman -- Message: 1 Date: Sun, 11 Jun 2006 22:02:02 -0400 From: David H. Lynch Jr. [EMAIL PROTECTED] Subject: Re: help with inittab Cc: Chris Dumoulin cdumoulin at ics-ltd.com, linuxppc-embedded at ozlabs.org Message-ID: 448CCB1A.409 at dlasys.net Content-Type: text/plain; charset=ISO-8859-1 For debugging or single user purposes you do not need to run init or have an inittab. There have been several sugestions that there may be a hardware problem - there are a number that are possible. I was stalled here for some time because my UartDriver was accidentally using the physical IO address instead of the virtual one and I had created a temporary phys=virtual entry in the tbl that was conveniently getting blow away just here. You can try to isolate your problem by changing your boot ramdisk (inramfs or initrd) Eliminate or rename /init /sbin/init /linuxrc and any of the other permutations that linux tries to execute in init/main.c they are all listed very near where you stopped. make sure you have /bin/sh reboot on that ramdisk if you have an init related problem then you should get a standalone shell. If you have a hardware problem you will likely still stop at the same place. -- Dave Lynch DLA Systems Software Development:Embedded Linux 717.627.3770 dhlii at dlasys.nethttp://www.dlasys.net fax: 1.253.369.9244Cell: 1.717.587.7774 Over 25 years' experience in platforms, languages, and technologies too numerous to list. Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction. Albert Einstein
Linux 2.4 Kernel on Xilinx Virtex4 FX100's PPC
Has anyone successfully ported a Linux 2.4 Kernel on a Xilinx Virtex-4 FX series FPGA's, PPC405 processor? More specifically, the FX100 FPGA? Thanks, Chetan -- next part -- An HTML attachment was scrubbed... URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060531/9dc601f7/attachment.htm
Linux 2.4 Kernel on Xilinx Virtex4 FX100's PPC
Was the port done on a FX100 FPGA? Also, what PVR number does the PPC405 indicate? Thanks, Chetan -Original Message- From: glikely at gmail.com [mailto:[EMAIL PROTECTED] On Behalf Of Grant Likely Sent: Wednesday, May 31, 2006 2:35 PM To: Anantharaman Chetan-W16155 Cc: linuxppc-embedded at ozlabs.org Subject: Re: Linux 2.4 Kernel on Xilinx Virtex4 FX100's PPC On 5/31/06, Anantharaman Chetan-W16155 Chetan.S.Anantharaman at motorola.com wrote: Has anyone successfully ported a Linux 2.4 Kernel on a Xilinx Virtex-4 FX series FPGA's, PPC405 processor? Linux on the V4-FX is well supported. Xilinx has an app node describing how to modify the linuxppc-2.4 tree to work on the V4-FX. You can find out how to get the tree here: http://www.penguinppc.org/kernel/ I've got both 2.4 2.6 happily running on my ML403 board here. Cheers, g. -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. grant.likely at secretlab.ca (403) 399-0195
Linux 2.4 Kernel on Xilinx Virtex4 FX100's PPC
Grant, Can you please provide a link or perhaps point me to the app node that Xilinx has to modify linuxppc-2.4 tree for V4-FX. Thanks, Chetan -Original Message- From: glikely at gmail.com [mailto:[EMAIL PROTECTED] On Behalf Of Grant Likely Sent: Wednesday, May 31, 2006 2:35 PM To: Anantharaman Chetan-W16155 Cc: linuxppc-embedded at ozlabs.org Subject: Re: Linux 2.4 Kernel on Xilinx Virtex4 FX100's PPC On 5/31/06, Anantharaman Chetan-W16155 Chetan.S.Anantharaman at motorola.com wrote: Has anyone successfully ported a Linux 2.4 Kernel on a Xilinx Virtex-4 FX series FPGA's, PPC405 processor? Linux on the V4-FX is well supported. Xilinx has an app node describing how to modify the linuxppc-2.4 tree to work on the V4-FX. You can find out how to get the tree here: http://www.penguinppc.org/kernel/ I've got both 2.4 2.6 happily running on my ML403 board here. Cheers, g. -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. grant.likely at secretlab.ca (403) 399-0195
execve of /sbin/init fails
Hi, I am trying to bring up a custom board with a PPC405 processor running Linux 2.4.20 (MontaVista Release) and am having problems with the call to execve(/sbin/init, argv_init, envp_init) not returning in the file main.c. The processor just hangs and there is no output on the terminal. I have tried to see if I can run bin/sh and even this execve call does not return. Some things about the board are, the networking option has been disabled in the Linux .config file. I am running U-Boot 1.1.1 as the bootloader and am downloading the uImage (compressed kernel) and the initrd.boot (filesystem) into RAM and accessing the filesystem in RAM. Any help as to what could be causing this to happen or how to debug this issue would be appreciated. Also, I've tried to capture the return value of the execve call but since the call does not return, this has not helped any. Thanks, Chetan Anantharaman -- next part -- An HTML attachment was scrubbed... URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060530/09c64124/attachment.htm
execve of /sbin/init fails
Thanks for your reply. Yes, the file /sbin/init is in the ramdisk file system with execute permissions on it. I am running Busybox (how can I check the version?), but my /sbin/init is not Busybox's init. One thing I'd like to mention is, I have used the same ramdisk filesystem and the same version of Linux 2.4 kernel and U-Boot bootloader and have been able to successfully execute the /sbin/init. This board has a Xilinx Virtex 2 Pro FPGA with a PPC405. On my new board, with a Xilinx Virtex 4 FX100 FPGA, with the kernel running on a PPC405 and the same filesystem, the execve of /sbin/init hangs. By hangs, I mean there is no output on the console after the below output and it does not return (which indicates that it has not encountered an error of some sort, since execve returns on error only). So, I am not sure where it is stuck and is there any way to tell where it's stuck at? Hope this above info and below screen capture provide a bit more background to the issue. Below is a capture of the screen output: Linux NET4.0 for Linux 2.4 Based upon Swansea University Computer Society NET3.039 OCP uart ver 1.6.2 init complete LSP Revision 42 ikconfig 0.5 with /proc/ikconfig Starting kswapd Disabling the Out Of Memory Killer Journalled Block Device driver loaded devfs: v1.12c (20020818) Richard Gooch (rgooch at atnf.csiro.au) devfs: boot_options: 0x1 pty: 256 Unix98 ptys configured Serial driver version 5.05c (2001-07-08) with no serial options enabled ttyS00 at 0xfdfff003 (irq = 22) is a 16550A xgpio #0 at 0x5000 mapped to 0xC500 RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize loop: loaded (max 8 devices) Tracer: Initialization complete RAMDISK: Compressed image found at block 0 Freeing initrd memory: 5104k freed EXT2-fs warning: mounting unchecked fs, running e2fsck is recommended VFS: Mounted root (ext2 filesystem). Mounted devfs on /dev Freeing unused kernel memory: 40k init -Original Message- From: Jeff.Fellin at rflelect.com [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 30, 2006 3:55 PM To: Anantharaman Chetan-W16155 Cc: linuxppc-embedded at ozlabs.org; linuxppc-embedded-bounces+jeff.fellin=rflelect.com at ozlabs.org Subject: Re: execve of /sbin/init fails Anantharaman Chetan-W16155 Chetan.S.Anantharaman at motorola.com To: linuxppc-embedded at ozlabs.org Sent by: cc: linuxppc-embedded-bounces+jeff.fellin=rflelect.com Subject: execve of /sbin/init fails @ozlabs.org 05/30/2006 15:59 Hi, I am trying to bring up a custom board with a PPC405 processor running Linux 2.4.20 (MontaVista Release) and am having problems with the call to execve(/sbin/init, argv_init, envp_init) not returning in the file main.c. The processor just hangs and there is no output on the terminal. I have tried to see if I can run bin/sh and even this execve call does not return. Some things about the board are, the networking option has been disabled in the Linux .config file. I am running U-Boot 1.1.1 as the bootloader and am downloading the uImage (compressed kernel) and the initrd.boot (filesystem) into RAM and accessing the filesystem in RAM. Chetan, I would check the contents of the initrd filesystem you created to verify the files are in the image. If they are monitor the console output to verfiy the ramdisk filesystem is found and installed into ram. Jeff Fellin Any help as to what could be causing this to happen or how to debug this issue would be appreciated. Also, I've tried to capture the return value of the execve call but since the call does not return, this has not helped any. Thanks, Chetan Anantharaman ___ Linuxppc-embedded mailing list Linuxppc-embedded at ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded