Forum Discussion
Altera_Forum
Honored Contributor
21 years agobasics on jffs2
I would like to use jffs2 with ecos on the cycloneII NIOSII development board. I have included jffs2 into the ecos lib. Now I don't know what to do next - I have looked for some documentati...
Altera_Forum
Honored Contributor
21 years agoThanks Scott,
I have downloaded Microtronix linux uClinux for Nios II 5.0 and compiled mkfs.jffs2 without a problem. I created a few directories and a file and then I used the following command to generated jffs2.img$> mkfs.jffs2 -d jffs2 -e 0x10000 -o jffs2.img -l then $> bin2flash --input=jffs2.img --base=0x0000 0000 --location=0x0060 0000 --verbose I used the base=0x0000 0000 because I am using the Altera NIOS CYCLONE II Development Board. I used the location at 0x0060 0000 because this is in the user region (as per Nios development brd cycloneII Edition Ref. Manual). User region= 0x0000 0000 to 0x00BF FFFF I placed it high in the user region but I am not sure where ecos is placed - do you know where I can find this information? The previous command gives a output of jffs2.flash I then tried to download jffs2.flash to the board with the following command without succuss. $> nios2-flash-programmer --base=0x0000 0000 --input=jffs2.flash --location=0x0060 0000 --verbose --sof=/cygdrive/c/altera/kits/nios2/examples/verilog/niosII_cycloneII_2c35/standard/standard.sof <div class='quotetop'>QUOTE </div> --- Quote Start --- Aug 16, 2005 4:31:49 PM - (FINE) nios2-flash-programmer: nios2-flash-programmer starting Aug 16, 2005 4:31:49 PM - (INFO) nios2-flash-programmer: args = --base=0x00000000 --input=jffs2.flash --verbose --sof=standard.sof Aug 16, 2005 4:31:49 PM - (INFO) nios2-flash-programmer: Attempting to read input-data from c:jffs2.flash Aug 16, 2005 4:31:49 PM - (INFO) nios2-flash-programmer: Launching Quartus Programmer to download: standard.sof Aug 16, 2005 4:31:49 PM - (FINE) nios2-flash-programmer: Quartus Pgm launched Info: ******************************************************************* Info: Running Quartus II Programmer Info: Command: quartus_pgm --no_banner --mode=jtag --operation=p;standard.sof Info: Using programming cable "USB-Blaster [USB-0]" Info: Started Programmer operation at Tue Aug 16 16:31:51 2005 Info: Configuring device index 1 Info: Device 1 contains JTAG ID code 0x020B40DD Info: Configuration succeeded -- 1 device(s) configured Info: Successfully performed operation(s) Info: Ended Programmer operation at Tue Aug 16 16:31:53 2005 Info: Quartus II Programmer was successful. 0 errors, 0 warnings Info: Processing ended: Tue Aug 16 16:31:53 2005 Info: Elapsed time: 00:00:04 Aug 16, 2005 4:31:53 PM - (FINE) nios2-flash-programmer: SOF programming done. exit code = 0x0000 Connecting with target design Attempting to resynch with target Unable to synchronize with target. Aug 16, 2005 4:31:56 PM - (SEVERE) nios2-flash-programmer: Error opening target hardware Aug 16, 2005 4:31:56 PM - (SEVERE) nios2-flash-programmer: In order to program flash, you must first create a purpose-built flash-programming design (i.e. FPGA configuration) and associate it with your particular board. The Nios development kit is delivered with purpose-built flash-programming designs pre-built for several development boards. If you wish to program flash on your own board, you must first create a flash-programming design. The process of creating a flash-programming design for your board is mostly automated. From a bash-shell, execute this script: mk_target_board --help The help-message includes references to other documentation on programming flash and targeting Nios systems to custom board designs. - exiting.[/b] --- Quote End --- I am using a pre-built configuration (cycloneII 2c35) so I am not sure why it wants me to use mk_target_board. Any ideas? Can you explain further about how to make the jffs2 partition you spoke of previously (see below). Is this the jffs2.img (jffs2.flash) or do I have to do something to make the partition? <div class='quotetop'>QUOTE </div> --- Quote Start --- 1. Create a jffs2 filesystem You can create a filesystem image with mkfs.jffs2 and download it to your jffs2 partition. As an alternative, you can simply erase your jffs2 partition.[/b] --- Quote End ---