Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12606 Discussions

Linux, U-Boot, and Root File Systems

Altera_Forum
Honored Contributor II
3,134 Views

I'm working with a Nios II design with an MMU, on a Nios II Development Kit, Cyclone II Edition board (EP2C35). 

 

I'm trying to figure out how to get to a system that boots with some sort of root filesystem stored in flash. 

 

With help from hippo's wiki page (http://www.nioswiki.com/linux) (http://www.nioswiki.com/linux%29), I can now:
  • Build a kernel 

  • Download it with nios2-download 

  • Connect with nios2-terminal 

  • Get a Linux Command Prompt
I have also ported U-Boot (starting from the U-Boot code included in the nios-linux tarball from the above-mentioned wiki page). I can burn a kernel to flash, and have U-Boot boot that kernel. I can TFTP a vmImage file, and boot from that (though the system hangs due to lack of a root filesystem). 

 

The "bootargs" variable isn't passed from U-Boot to the Linux Kernel. To work around this, I compile the kernel command line arguments into the kernel (CONFIG_COMMANDLINE). 

 

By compiling in the kernel command-line arguments, I can boot with root=/dev/nfs. After adding a few devices to uClinux-Dist/romfs/dev, I was able to get a command prompt. 

 

Now, I want to boot without using NFS. 

 

Here are the files in my uClinux-dist/images directory: 

 

-rwxrwxr-x 1 pinta pinta 4442546 2009-09-28 15:21 linux.initramfs.gz 

-rw-rw-r-- 1 pinta pinta 2478080 2009-09-28 15:20 rootfs.initramfs 

-rw-rw-r-- 1 pinta pinta 15997 2009-09-28 15:20 rootfs.initramfs.contents 

-rw-rw-r-- 1 pinta pinta 1059759 2009-09-28 15:20 rootfs.initramfs.gz 

-rw-r--r-- 1 pinta pinta 579226 2009-09-28 15:21 System.map.initramfs.gz 

-rw-r--r-- 1 pinta pinta 1221552 2009-09-28 15:20 vmImage 

-rwxrwxr-x 1 pinta pinta 3383298 2009-09-28 15:20 vmlinux 

-rwxrwxr-x 1 pinta pinta 2296861 2009-09-28 15:21 zImage.initramfs.gz 

 

linux.initramfs.gz is the file I download with nios2-download. 

 

vmImage is the file I use to boot Linux from U-Boot. 

 

According to the nioswiki Linux page, rootfs.initramfs.gz is compressed initramfs to be used as initrd by u-boot. 

 

How do I use rootfs.initramfs.gz? Specifically: 

1) How do I pass it to U-Boot? 

2) What (if any) kernel command-line arguments should I compile into the Linux Kernel? 

 

Pinta
0 Kudos
13 Replies
Altera_Forum
Honored Contributor II
849 Views

Why using u-Boot ?  

 

>>> "images/zImge.initramfs.gz is the compressed elf image with initramfs built-in" 

 

AFAIK, same just needs to be copied into RAM and started, now it will spawn the file system automatically. 

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

There are a few reasons I would like to use U-Boot. 

 

It allows me to switch between kernel builds easily. 

 

It allows me to boot with an nfs filesystem, which is convenient for application development.  

 

I have an I2C-based RTC added to my board, and the Linux RTC driver expects the clock chip to be initialized by pre-Linux code. I'm looking to U-Boot to provide that pre-Linux initialization code. (Getting the I2C working in U-Boot is my next project.) 

 

-- 

 

I downloaded the zImage.initramfs.gz file to the board, with nios2-download. This runs, and gets me to a command prompt, just like linux.initramfs.gz does.  

 

zImage.initramfs.gz does not seem to be an image suitable for U-Boot. I tried downloading it directly to the board via U-Boot tftp, then running it using the U-Boot command "go".  

 

I also tried packing it up with mkimage, then downloading the result to the board with tftp, and booting from it with the U-Boot command "bootm".  

 

I eventually want to burn the filesystem into flash, and boot from U-Boot without a network connection. 

 

-Pinta
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

Please find some example u-boot scripts in this file, 

ftp://ftp.altera.com/outgoing/devkit/altera_niosii_wrlinux_deliverables.zip 

 

You may enable passing command line from u-boot with this kernel config, 

"NiosII Configuration"-->"Passed kernel command line from u-boot" 

 

It will be more flexible to keep compile-in command line empty and pass it from u-boot. So that you are free to boot from nfs or flash. 

 

You may enable jffs2 and mtd in kernel config, (or ubifs etc) so that your can root your fs on it. as stated in the wiki, 

 

"images/rootfs.jffs2 is jffs2 image, eg, cp rootfs.jffs2 /dev/mtd0. This is available when jffs2 is selected in kernel. Please note the flash erase sector size on 3c120 dev board is 128KB, you will have to specify "MKFS_JFFS2_FLAGS = -l -p -e 128" at the beginning of your product Makefile." 

 

I am working with Altera to prepare a user guide, which should be released soon. 

 

- Hippo
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

 

--- Quote Start ---  

It allows me to boot with an nfs filesystem, which is convenient for application development.  

--- Quote End ---  

 

You can mount ntfs within initramfs. It might or might no be sensible to chroot top same. 

 

-Michael
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

Hippo wrote: 

 

--- Quote Start ---  

 

You may enable passing command line from u-boot with this kernel config, 

"NiosII Configuration"-->"Passed kernel command line from u-boot" 

--- Quote End ---  

When I was trying to figure out what was going on, I verified that this was set in the kernel config. Despite this, when the kernel output prints "Kernel command line: ", it shows no bootargs (even when I set bootargs in U-Boot). 

 

I had to do weird things with the addresses in U-Boot, to get it to work with the MMU, as I documented in http://www.nioswiki.com/dasuboot/u-boot_with_mmu

 

It could be that I missed something, and the bootargs are being written to non-existent memory. 

 

Specifically, I prefixed the flash address and all the device addresses with "E". 

 

For example, my custom_fpga.h shows JTAG_UART_BASE is 0x21208B0. My EP2C35.h defines JTAG_UART_BASE as 0xE21208B0. (Getting the UART right is essential.... without it, you get no output to tell you what is wrong.) 

 

I did not move CFG_SDRAM_BASE and CFG_SRAM_BASE. They are still at 0x06000000 and 0x01400000 respectively (the same as in my custom_fpga.h). 

 

I did define TEXT_BASE as 0xC7FC0000, 256k from the end of the RAM, in kernel space. If I didn't do this, nios2-download failed. 

 

Should CFG_SDRAM_BASE be a 0xC6000000 (in kernel space) instead of 0x06000000? 

 

 

--- Quote Start ---  

 

You may enable jffs2 and mtd in kernel config, (or ubifs etc) so that your can root your fs on it. as stated in the wiki, 

 

"images/rootfs.jffs2 is jffs2 image, eg, cp rootfs.jffs2 /dev/mtd0. This is available when jffs2 is selected in kernel. Please note the flash erase sector size on 3c120 dev board is 128KB, you will have to specify "MKFS_JFFS2_FLAGS = -l -p -e 128" at the beginning of your product Makefile." 

 

--- Quote End ---  

The Altera EP2C35 board uses either the AM29LV128M or the S29GL128M10TFIR1, both of which have 64 kB sectors. I assume that means I should switch to "MKFS_JFFS2_FLAGS = -l -p -e 64". 

 

I turned on jffs2 support in the kernel build. The kernel builds, but the tools fail: 

make: Entering directory `/home/nina/projects/micropump/nios_linux/nios2-linux/uClinux-dist/user/mtd-utils' unset CC CFLAGS CPPFLAGS CROSS LDFLAGS; make -C 606f38a2221648ca5c5fa292c9f71d2ddd59fa66/ WITHOUT_XATTR=1 SUBDIRS= BUILDDIR=$PWD/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/ TARGETS=" mkfs.jffs2" make: Entering directory `/home/nina/projects/micropump/nios_linux/nios2-linux/uClinux-dist/user/mtd-utils/606f38a2221648ca5c5fa292c9f71d2ddd59fa66' mkdir -p /home/nina/projects/micropump/nios_linux/nios2-linux/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/ gcc -I./include -DWITHOUT_XATTR -D_FILE_OFFSET_BITS=64 -O2 -g -Wall -Wextra -Wwrite-strings -Wno-sign-compare -c -o /home/nina/projects/micropump/nios_linux/nios2-linux/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.jffs2.o mkfs.jffs2.c -g -Wp,-MD,/home/nina/projects/micropump/nios_linux/nios2-linux/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/.mkfs.jffs2.c.dep mkfs.jffs2.c:73:18: error: zlib.h: No such file or directory mkfs.jffs2.c: In function ‘recursive_populate_directory’: mkfs.jffs2.c:1336: warning: format ‘%9lu’ expects type ‘long unsigned int’, but argument 3 has type ‘__off64_t’ mkfs.jffs2.c:1345: warning: format ‘%9lu’ expects type ‘long unsigned int’, but argument 3 has type ‘__off64_t’ mkfs.jffs2.c:1354: warning: format ‘%9lu’ expects type ‘long unsigned int’, but argument 3 has type ‘__off64_t’ mkfs.jffs2.c:1384: warning: format ‘%9lu’ expects type ‘long unsigned int’, but argument 3 has type ‘__off64_t’ mkfs.jffs2.c:1395: warning: format ‘%9lu’ expects type ‘long unsigned int’, but argument 3 has type ‘__off64_t’ mkfs.jffs2.c: At top level: mkfs.jffs2.c:1519: warning: initialization discards qualifiers from pointer target type mkfs.jffs2.c:1521: warning: initialization discards qualifiers from pointer target type mkfs.jffs2.c: In function ‘main’: mkfs.jffs2.c:1881: warning: passing argument 2 of ‘recursive_add_host_directory’ discards qualifiers from pointer target type make: *** Error 1 make: Leaving directory `/home/nina/projects/micropump/nios_linux/nios2-linux/uClinux-dist/user/mtd-utils/606f38a2221648ca5c5fa292c9f71d2ddd59fa66' make: *** Error 2 make: Leaving directory `/home/nina/projects/micropump/nios_linux/nios2-linux/uClinux-dist/user/mtd-utils' make: *** Error 2 make: Leaving directory `/home/nina/projects/micropump/nios_linux/nios2-linux/uClinux-dist/user' make: *** Error 2 make: Leaving directory `/home/nina/projects/micropump/nios_linux/nios2-linux/uClinux-dist/user' make: *** Error 1 This seems to be due to a lack of a zlib.h. 

 

Recommendations?
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

zlib : please check if you have installed zlib-devel in your Linux desktop. 

 

64KB is the default of mkfs.jffs2, so there is no need to specify the flag in your case. 

 

u-boot: please adapt the 3c120 config, which is for nios2mmu. or you may find the u-boot in the zip file I pointed. 

 

- Hippo
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

zlib: zlib-devel was the problem. lzo-devel is also required. 

 

I also realized I was using the wrong branch of the U-Boot repository. Thats why the bootargs were not being passed. When I switched to the "nios2" branch, bootargs worked. 

 

Now that I can get kernel arguments passed in, my life should be easier. 

 

Next I'm trying to figure out what to do with the rootfs.jffs2 file. 

 

I think I need to:
  • Compile MTDPARTS and JFFS2 support into U-Boot 

  • Define a Partition Table in U-Boot 

  • Define a matching Linux partition table in arch/nios2/kernel/config.c after the line "static struct mtd_partition nios2_partitions
  • Burn rootfs.jffs2 to flash
Anyone see any flaws (or holes) in my plan?
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

You will need to define your mtd parts and flash bus width in config.c. 

 

The u-boot don't really need mtd part and jffs2 support. You can tftp the file and cp.b to the flash address of your filesystem in u-boot. 

 

- Hippo
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

 

--- Quote Start ---  

You will need to define your mtd parts and flash bus width in config.c. 

--- Quote End ---  

You are talking about this section for the bus width, right? 

static struct physmap_flash_data nios2_flash_data = {# if defined(CONFIG_ALTERA_NEEK_C3) || defined(CONFIG_ALTERA_CYCLONE_III) .width = 2, /* 16 bits data bus */# else .width = 1, /* 8 bits data bus */# endif .parts = nios2_partitions, .nr_parts = ARRAY_SIZE(nios2_partitions), }; And this variable for the MTD parts? 

static struct mtd_partition nios2_partitions = { .... } I have a 16 bit wide flash. I am sure I am compiling with ".width = 2" because I dumped a "#warning" macro in the correct code, and an "#error" macro in the alternative. 

 

Despite this, the CFI detection finds 2 x8 devices, instead of 1 x16 device. It correctly recognizes that it is a 16MB device, but thinks there are two of them. As a result, it thinks there are 32 MB of flash. 

 

The flash drivers then generate a lot of errors (I assume resulting from the incorrect detection of flash). 

 

I inserted a "printk" into physmap.c:physmap_flash_probe(), to print the value of physmap_data->width. It outputs "Physmap Width: 2". 

 

I've included the boot log below. I truncated the flash errors, because they seemed endless. 

 

Linux version 2.6.30-00494-g84a224b-dirty (pinta@drake-linux) (gcc version 4.1.2)# 40 Mon Oct 5 18:05:24 EDT 2009 console enabled Early printk initialized Linux/Nios II-MMU init_bootmem_node(?,0x62bd, 0x6000, 0x8000) free_bootmem(0x62bd000, 0x1d43000) reserve_bootmem(0x62bd000, 0x400) Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128 Kernel command line: noinitrd rw root=/dev/mtdblock2 rootfstype=jffs2 NR_IRQS:32 PID hash table entries: 128 (order: 7, 512 bytes) Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) We have 32768 pages of RAM Memory available: 29672k/2800k RAM, 0k/0k ROM (2119k kernel code, 680k data) Calibrating delay loop... 41.98 BogoMIPS (lpj=209920) Mount-cache hash table entries: 512 net_namespace: 492 bytes NET: Registered protocol family 16 init_BSP(): registering device resources bio: create slab <bio-0> at 0 NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 1024 (order: 1, 8192 bytes) TCP bind hash table entries: 1024 (order: 0, 4096 bytes) TCP: Hash tables configured (established 1024 bind 1024) TCP reno registered NET: Registered protocol family 1 JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc. JFFS2: default compression mode: priority msgmni has been set to 57 io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) ttyJ0 at MMIO 0x21208b0 (irq = 1) is a Altera JTAG UART ttyS0 at MMIO 0x2120840 (irq = 4) is a Altera UART console handover: boot -> real ttyS1 at MMIO 0x2120b00 (irq = 8) is a Altera UART smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@cam.org> eth0: SMC91C11xFD (rev 2) at e2110300 IRQ 6 eth0: Ethernet addr: 00:07:ed:0f:0a:53 physmap platform flash device: 01000000 at 00000000 Physmap Width: 2 physmap-flash.0: Found 2 x8 devices at 0x0 in 16-bit bank in cfi_chip_setup NOR chip too large to fit in mapping. Attempting to cope... Amd/Fujitsu Extended Query Table at 0x0040 physmap-flash.0: CFI does not contain boot bank location. Assuming top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. Reducing visibility of 32768KiB chip to 16384KiB cmdlinepart partition parsing not available RedBoot partition parsing not available Using physmap partition information Creating 3 MTD partitions on "physmap-flash.0": 0x000000000000-0x000000060000 : "U-Boot" 0x000000060000-0x000000200000 : "uImage" 0x000000200000-0x000001000000 : "romfs/jffs2" TCP cubic registered NET: Registered protocol family 10 NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. /home/pinta/projects/micropump/nios_linux/nios2-linux/linux-2.6/drivers/rtc/hctosys.c: unable to open rtc device (rtc0) eth0: link down ADDRCONF(NETDEV_UP): eth0: link is not ready IP-Config: Unable to set interface netmask (-22). Empty flash at 0x0000fffc ends at 0x00010000 CLEANMARKER node found at 0x00010000, not first node in block (0x00000000) Empty flash at 0x0002fffc ends at 0x00030000 CLEANMARKER node found at 0x00030000, not first node in block (0x00020000) Empty flash at 0x0004fffc ends at 0x00050000 CLEANMARKER node found at 0x00050000, not first node in block (0x00040000) eth0: link up, 100Mbps, full-duplex, lpa 0x45E1 Empty flash at 0x0006fffc ends at 0x00070000 CLEANMARKER node found at 0x00070000, not first node in block (0x00060000) Empty flash at 0x0008fffc ends at 0x00090000 CLEANMARKER node found at 0x00090000, not first node in block (0x00080000) Empty flash at 0x000afffc ends at 0x000b0000 CLEANMARKER node found at 0x000b0000, not first node in block (0x000a0000) Empty flash at 0x000cffe8 ends at 0x000d0000 CLEANMARKER node found at 0x000d0000, not first node in block (0x000c0000) jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120000: 0x55ff instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00440000: 0x55ff instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00760000: 0x55ff instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00010: 0xd76a instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00014: 0x5000 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00018: 0x6a00 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a0001c: 0x0040 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00020: 0x0068 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00024: 0x40ff instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00028: 0x6880 instead Empty flash at 0x00a0002c ends at 0x00a0004c eth0: link up, 100Mbps, full-duplex, lpa 0x45E1 jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a0004c: 0x0400 instead
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

I think there are problems in the flash configuration. Could you post the hardware design? schematic/pdf and quartus project? (maybe somewhere in the wiki) 

 

- Hippo
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

The hardware is a standard Altera Development Kit, http://www.altera.com/products/devkits/altera/kit-nios-2c35.html 

 

The Quartus design is probably a slightly tweaked version of the standard design that comes with that board. I directed the hardware team to the Linux for Nios II Wiki page, section "Create a Nios II design with MMU", and asked them to modify the design accordingly. 

 

I don't think I will be able to post the FPGA design. I'll check tomorrow. 

 

Is there any more specific information I could provide to help figure this out? 

 

Or, do you have any recommendations on where I should be looking? Or what questions I should be asking the hardware team? 

 

Something that looked weird to me: 

As you had recommended, I copied images/rootfs.jffs2 to the flash, at the start of the area I allocated to jffs2, 0x00200000. I'm concerned that Linux is mucking around with lower addresses (The "CLEANMARKER" references in the output), where I have stored U-Boot and the kernel. Is this ok?
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

It seems I'm not done with silly mistakes. 

 

The flash device is 16 bit, but it is being used in 8-bit mode. 

 

Switching to ".width = 1" solves the problem of detecting two devices and twice as much flash. 

 

It also eliminated the CLEANMARKER error. 

 

Now, I think I am down to flash driver problems. 

 

The Spansion part is slightly different from the original AMD part. Specifically, the erase commands need to be written to specific offsets in the flash. For the original part, it was sufficient to write the commands to the start address of the flash. 

 

The older sector erase sequence (for flash starting at address 0x0, and sector to erase at SA) was: 

Address Data 

--------------------- 

0x0 0xAA 

0x0 0x55 

0x0 0x80 

0x0 0xAA 

0x0 0x55 

SA 0x30 

 

New Sector Erase Sequence: 

Address Data 

--------------------- 

0xAAA 0xAA 

0x555 0x55 

0xAAA 0x80 

0xAAA 0xAA 

0x555 0x55 

SA 0x30 

 

Here is the new boot log output. It does eventually get to a command prompt, but it keeps generating errors about erase and write errors. 

 

Am I on the right track here? 

 

Linux version 2.6.30-00494-g84a224b-dirty (pinta@drake-linux.fw5540.net) (gcc version 4.1.2)# 47 Tue Oct 6 14:08:55 EDT 2009 console enabled Early printk initialized Linux/Nios II-MMU init_bootmem_node(?,0x6391, 0x6000, 0x8000) free_bootmem(0x6391000, 0x1c6f000) reserve_bootmem(0x6391000, 0x400) Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128 Kernel command line: NR_IRQS:32 PID hash table entries: 128 (order: 7, 512 bytes) Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) We have 32768 pages of RAM Memory available: 28824k/3648k RAM, 0k/0k ROM (2119k kernel code, 1528k data) Calibrating delay loop... 41.98 BogoMIPS (lpj=209920) Mount-cache hash table entries: 512 net_namespace: 492 bytes NET: Registered protocol family 16 init_BSP(): registering device resources bio: create slab <bio-0> at 0 NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 1024 (order: 1, 8192 bytes) TCP bind hash table entries: 1024 (order: 0, 4096 bytes) TCP: Hash tables configured (established 1024 bind 1024) TCP reno registered NET: Registered protocol family 1 JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc. JFFS2: default compression mode: priority msgmni has been set to 56 io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered (default) ttyJ0 at MMIO 0x21208b0 (irq = 1) is a Altera JTAG UART ttyS0 at MMIO 0x2120840 (irq = 4) is a Altera UART console handover: boot -> real ttyS1 at MMIO 0x2120b00 (irq = 8) is a Altera UART smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@cam.org> eth0: SMC91C11xFD (rev 2) at e2110300 IRQ 6 eth0: Ethernet addr: 00:07:ed:0f:0a:53 physmap platform flash device: 01000000 at 00000000 Physmap Width: 1 physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank in cfi_chip_setup Amd/Fujitsu Extended Query Table at 0x0040 physmap-flash.0: CFI does not contain boot bank location. Assuming top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. cmdlinepart partition parsing not available RedBoot partition parsing not available Using physmap partition information Creating 3 MTD partitions on "physmap-flash.0": 0x000000000000-0x000000060000 : "U-Boot" 0x000000060000-0x000000200000 : "uImage" 0x000000200000-0x000001000000 : "romfs/jffs2" TCP cubic registered NET: Registered protocol family 10 NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. /home/pinta/projects/micropump/nios_linux/nios2-linux/linux-2.6/drivers/rtc/hctosys.c: unable to open rtc device (rtc0) eth0: link down ADDRCONF(NETDEV_UP): eth0: link is not ready IP-Config: Unable to set interface netmask (-22). eth0: link up, 100Mbps, full-duplex, lpa 0x45E1 jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00120000: 0x55ff instead JFFS2: Erase block at 0x00120000 is not formatted. It will be erased jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x002b0000: 0x55ff instead JFFS2: Erase block at 0x002b0000 is not formatted. It will be erased jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00440000: 0x55ff instead JFFS2: Erase block at 0x00440000 is not formatted. It will be erased jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x005d0000: 0x55ff instead JFFS2: Erase block at 0x005d0000 is not formatted. It will be erased jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00760000: 0x55ff instead JFFS2: Erase block at 0x00760000 is not formatted. It will be erased jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x008f0000: 0x55ff instead JFFS2: Erase block at 0x008f0000 is not formatted. It will be erased jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00010: 0xd76a instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00014: 0x5000 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00018: 0x6a00 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a0001c: 0x0040 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00020: 0x0068 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00024: 0x40ff instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00028: 0x6880 instead Empty flash at 0x00a0002c ends at 0x00a0004c jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a0004c: 0x0400 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00050: 0x0404 instead jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00a00054: 0x0704 instead Further such events for this erase block will not be printed
0 Kudos
Altera_Forum
Honored Contributor II
849 Views

OK.... so those errors were just initialization stuff. They went away once the partition was formatted, I guess. 

 

I accidentally blew away my FPGA image, but I have that back now. And, I think I've adjusted my partitions so that doesn't happen again. 

 

Hippo, you are a genius (or at least very helpful).
0 Kudos
Reply