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++
12747 Discussions

uClinux without Flash (again)

Altera_Forum
Honored Contributor II
5,337 Views

I decided to give uClinux a try on my custom board, but I only have an SD card slot, no CFI. When reading the install guide for uClinux, and when trying it, it won't let me build a kernel project without a CFI device present? Is there any way to get around this? It seems odd that I can't build the kernel and run from DRAM, and then write to the SD Card if I wish to boot...  

 

Thx!
0 Kudos
58 Replies
Altera_Forum
Honored Contributor II
1,613 Views

 

--- Quote Start ---  

originally posted by jdhar@Nov 8 2005, 09:29 AM 

i decided to give uclinux a try on my custom board, but i only have an sd card slot, no cfi. when reading the install guide for uclinux, and when trying it, it won't let me build a kernel project without a cfi device present? is there any way to get around this? it seems odd that i can't build the kernel and run from dram, and then write to the sd card if i wish to boot...  

 

thx! 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=10853) 

--- quote end ---  

 

--- Quote End ---  

 

 

no one knows how to do this?
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

I&#39;m gonna bump this too.. haven&#39;t run into this problem yet, but it would be good to know if there&#39;s a solution

0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

 

--- Quote Start ---  

originally posted by rhaikh@Nov 18 2005, 05:26 PM 

i&#39;m gonna bump this too.. haven&#39;t run into this problem yet, but it would be good to know if there&#39;s a solution 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11053) 

--- quote end ---  

 

--- Quote End ---  

 

 

Well, it&#39;s documented how to run the kernel from RAM (check out one of the uClinux docs), but I don&#39;t know how to make a filesystem from RAM yet...
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

On a related note, is it possible to boot using NFS? As in if I can get the kernel into RAM, and I have no Flash/non-volatile storage, can I mount NFS as root and then boot that way?

0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

UPDATE : This post is out of date. Please follow the new one, 

http://forum.niosforum.com/forum/index.php?showtopic=3174 (http://forum.niosforum.com/forum/index.php?showtopic=3174

 

 

I have build custom board. http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif  

You can use Initramfs.  

It is similar to initrd. 

It built the root file system into the kernel image. 

You can use onchip memory as a boot loader, to read and load vmlinux from SD. 

You can mount your SD later, eg, inittab. 

So you do not need MTD,romfs,nfs root, etc to mount your root. 

 

Just add a dummy CFI interface to your SYSPTF, it is only for hwselect. 

Delete the dummy CFI in your final hardware design. 

The CFI class name in hwselect.pl in arch/nios2nommu/scripts is not consistant with NIOS2 v5.0,v5.1. 

Change it to altera_avalon_cf. 

 

To use initramfs, enable it in menuconfig,  

Device Drivers -> Block Devices -> () Initramfs source files 

for newer kernel, it is moved 

General Setups -> 

Enter the root dir of your root fs, ie old initrd. 

Then setup the user id and group id map, with your user id. 

The old RAM disk support is not reqired. 

The kernel command line is not required, too. 

Be sure to add a sym link /init --> /sbin/init . 

 

The module file format generated by the kernel Makefile is not FLT format, so it can&#39;t load. 

 

 

--- Quote Start ---  

originally posted by jdhar@Nov 8 2005, 10:29 PM 

i decided to give uclinux a try on my custom board, but i only have an sd card slot, no cfi. when reading the install guide for uclinux, and when trying it, it won&#39;t let me build a kernel project without a cfi device present? is there any way to get around this? it seems odd that i can&#39;t build the kernel and run from dram, and then write to the sd card if i wish to boot...  

 

thx! 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=10853) 

--- quote end ---  

 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

 

--- Quote Start ---  

originally posted by hippo@Nov 24 2005, 04:23 AM 

i have build custom board. http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/laugh.gif  

you can use initramfs.  

it is similar to initrd. 

it built the root file system into the kernel image. 

you can use onchip memory as a boot loader, to read and load vmlinux from sd. 

you can mount your sd later, eg, inittab. 

so you do not need mtd,romfs,nfs root, etc to mount your root. 

 

just add a dummy cfi interface to your sysptf, it is only for hwselect. 

delete the dummy cfi in your final hardware design. 

the cfi class name in hwselect.pl in arch/nios2nommu/scripts is not consistant with nios2 v5.0,v5.1. 

change it to altera_avalon_cf. 

 

to use initramfs, enable it in menuconfig,  

  device drivers -> block devices -> () initramfs source files 

for newer kernel, it is moved 

  general setups -> 

enter the root dir of your root fs, ie old initrd. 

then setup the user id and group id map, with your user id. 

the old ram disk support is not reqired. 

the kernel command line is not required, too. 

be sure to add a sym link  /init --> /sbin/init  . 

 

the module file format generated by the kernel makefile is not flt format, so it can&#39;t load. 

 

 

--- quote start ---  

originally posted by jdhar@nov 8 2005, 10:29 pm 

I decided to give uClinux a try on my custom board, but I only have an SD card slot, no CFI. When reading the install guide for uClinux, and when trying it, it won&#39;t let me build a kernel project without a CFI device present? Is there any way to get around this? It seems odd that I can&#39;t build the kernel and run from DRAM, and then write to the SD Card if I wish to boot...  

 

Thx! 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=10853) 

--- Quote End ---  

[/b] 

--- Quote End ---  

 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11123)</div> 

[/b] 

--- Quote End ---  

 

 

 

Wow, thank you, it&#39;s good to know someone out there knows how to do this. Unfortunately, I didn&#39;t understand everything you said. First, i&#39;m not worried about getting the kernel image into RAM; it&#39;s easy enough to write a bootloader that copies from MMC into RAM, so for now, I&#39;m just downloading the kernel image directly to RAM for development. Second, I have a dummy CFI component in there and it works ok; well, as in I can get the kernel booting, but I can&#39;t mount yet (that&#39;s my problem!). 

 

Now, what you said about initrd - you said to use the initramfs() option.. but I don&#39;t understand how I&#39;m supposed to enter "source files". Lets say I make another Nios filesystem project with just the essentials... for the initramfs() option, do I just point to the directory? (ie: "../uclinux_fs/" - for example). 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

The module file format generated by the kernel Makefile is not FLT format, so it can&#39;t load.[/b] 

--- Quote End ---  

 

I don&#39;t quite understand this, could you explain?
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

Did you get the shell prompt? Like this? 

 

Freeing unused kernel memory: 272k freed (0x138000 - 0x17b000) 

init started: BusyBox v1.00-pre8 (2005.10.28-01:02+0000) multi-call binary 

 

Please press Enter to activate this console. 

 

 

BusyBox v1.00-pre8 (2005.10.28-01:02+0000) Built-in shell (msh) 

Enter &#39;help&#39; for a list of built-in commands. 

#  

 

The Linux need two parts to boot, the vmlinux and root fs. 

You already load the vmlinux and boot it. 

At the end of init process, it need the root fs, it can be on the CF (root=/dev/hda) , MTD, or 

initrd image on a ram drive. 

The root fs contain the /, /sbin,/bin,/usr /etc /proc /dev ... 

You can enter the full path for the initramfs build dir, eg (/usr/src/uclinux_fs) 

 

In the kernel build process, it will link the fs into vmilunx. 

CHK usr/initramfs_list 

UPD usr/initramfs_list 

CPIO usr/initramfs_data.cpio 

GZIP usr/initramfs_data.cpio.gz 

AS usr/initramfs_data.o 

LD usr/built-in.o 

GEN .version 

CHK include/linux/compile.h 

UPD include/linux/compile.h 

CC init/version.o 

LD init/built-in.o 

LD vmlinux 

SYSMAP System.map 

Building modules, stage 2. 

MODPOST 

 

Remeber, you must have /init for the user space init program. 

In most case, just ln -s /sbin/init /usr/src/uclinux_fs/sbin/init 

 

 

 

--- Quote Start ---  

originally posted by jdhar+nov 24 2005, 10:17 pm--><div class='quotetop'>quote (jdhar @ nov 24 2005, 10:17 pm)</div> 

--- quote start ---  

<!--quotebegin-hippo@Nov 24 2005, 04:23 AM 

i have build custom board. http://forum.niosforum.com/work2/style_emoticons/<#emo_dir#>/laugh.gif  

you can use initramfs.  

it is similar to initrd. 

it built the root file system into the kernel image. 

you can use onchip memory as a boot loader, to read and load vmlinux from sd. 

you can mount your sd later, eg, inittab. 

so you do not need mtd,romfs,nfs root, etc to mount your root. 

 

just add a dummy cfi interface to your sysptf, it is only for hwselect. 

delete the dummy cfi in your final hardware design. 

the cfi class name in hwselect.pl in arch/nios2nommu/scripts is not consistant with nios2 v5.0,v5.1. 

change it to altera_avalon_cf. 

 

to use initramfs, enable it in menuconfig,  

  device drivers -> block devices -> () initramfs source files 

for newer kernel, it is moved 

  general setups -> 

enter the root dir of your root fs, ie old initrd. 

then setup the user id and group id map, with your user id. 

the old ram disk support is not reqired. 

the kernel command line is not required, too. 

be sure to add a sym link  /init --> /sbin/init  . 

 

the module file format generated by the kernel makefile is not flt format, so it can&#39;t load. 

 

 

--- quote start ---  

originally posted by jdhar@nov 8 2005, 10:29 pm 

I decided to give uClinux a try on my custom board, but I only have an SD card slot, no CFI. When reading the install guide for uClinux, and when trying it, it won&#39;t let me build a kernel project without a CFI device present? Is there any way to get around this? It seems odd that I can&#39;t build the kernel and run from DRAM, and then write to the SD Card if I wish to boot...  

 

Thx! 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=10853) 

--- Quote End ---  

[/b] 

--- Quote End ---  

 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11123)</div> 

[/b] 

--- Quote End ---  

 

 

 

Wow, thank you, it&#39;s good to know someone out there knows how to do this. Unfortunately, I didn&#39;t understand everything you said. First, i&#39;m not worried about getting the kernel image into RAM; it&#39;s easy enough to write a bootloader that copies from MMC into RAM, so for now, I&#39;m just downloading the kernel image directly to RAM for development. Second, I have a dummy CFI component in there and it works ok; well, as in I can get the kernel booting, but I can&#39;t mount yet (that&#39;s my problem!). 

 

Now, what you said about initrd - you said to use the initramfs() option.. but I don&#39;t understand how I&#39;m supposed to enter "source files". Lets say I make another Nios filesystem project with just the essentials... for the initramfs() option, do I just point to the directory? (ie: "../uclinux_fs/" - for example). 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

The module file format generated by the kernel Makefile is not FLT format, so it can&#39;t load.[/b] 

--- Quote End ---  

 

I don&#39;t quite understand this, could you explain? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11136)</div> 

[/b] 

--- Quote End ---  

 

Sorry I was wrong about module. Please just drop it.
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

Thank you so much for your help, I will try this and let you know!

0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

Sorry, the sym link should be, ln -s /sbin/init /usr/src/uclinux_fs/init 

The /sbin/init program, linked to busybox, will read /etc/inittab, which is ,eg 

# Startup the system 

null::sysinit:/bin/mount -t proc proc /proc 

null::sysinit:/bin/mount -t sysfs sysfs /sys 

null::sysinit:/bin/mount -t usbfs none /proc/bus/usb 

# Set up a couple of getty&#39;s 

::askfirst:/bin/sh 

 

You can remove files in /usr/include and /usr/lib to save space. 

 

When we design custom board, most drivers are under construction. 

The Initramfs need only ram, and a serial/jtag console driver is all that needed to start. 

When you have tested your custom mmc driver, you may disable Initramfs, and use 

the MMC/SD as root device, with the kernel command line "root=/dev/mmc0". 

You will need devfs to use mmc block device.
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

 

--- Quote Start ---  

originally posted by hippo@Nov 24 2005, 07:43 PM 

sorry, the sym link should be, ln -s /sbin/init /usr/src/uclinux_fs/init 

the /sbin/init program, linked to busybox, will read /etc/inittab, which is ,eg 

# startup the system 

null::sysinit:/bin/mount -t proc proc /proc 

null::sysinit:/bin/mount -t sysfs sysfs /sys 

null::sysinit:/bin/mount -t usbfs none /proc/bus/usb 

# set up a couple of getty&#39;s 

::askfirst:/bin/sh 

 

you can remove files in /usr/include and /usr/lib to save space. 

 

when we design custom board, most drivers are under construction. 

the initramfs need only ram, and a serial/jtag console driver is all that needed to start. 

when you have tested your custom mmc driver, you may disable initramfs, and use 

the mmc/sd as root device, with the kernel command line "root=/dev/mmc0". 

you will need devfs to use mmc block device. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11146) 

--- quote end ---  

 

--- Quote End ---  

 

 

So I tried, and it didn&#39;t work: this is what I got... 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

uClinux/Nios II 

 

Altera Nios II support 

 

KERNEL -> TEXT=0x01000000-0x01162af0 DATA=0x01162af0-0x0118c000 BSS=0x012ebbd0-0 

x012ebc04 

 

KERNEL -> MEM=0x12ec000-0x2000000 STACK=0x2000000-0x2000000 

 

No Command line passed 

 

 

 

Setting custom MAC address 

 

Setup the hardware addr for ethernet 

 

  00 10 20 30 40 50 

 

Done setup_arch 

 

Built 1 zonelists 

 

Kernel command line:  

 

PID hash table entries: 128 (order: 7, 2048 bytes) 

 

Dentry cache hash table entries: 4096 (order: 2, 16384 bytes) 

 

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes) 

 

Memory available: 13200k/16384k RAM, 0k/0k ROM (1418k kernel code, 1572k data) 

 

Mount-cache hash table entries: 512 (order: 0, 4096 bytes) 

 

Kernel panic - not syncing: broken padding[/b] 

--- Quote End ---  

 

 

I removed the startup command line in the kernel (ie: the root=/dev/mtdblock0), and I pointed Initramfs() source files to the path "/cygdrive/d/hw/ep1c_lwip/software/uclinux_ep1c12_fs/target" . I made a filesytem project in that directory with all the options installed. There is nothing in sbin, only bin.. and they are all exe&#39;s. So in the directory ./target, I did "ln -s bin/init.exe ./init.exe" 

 

Any idea what I did wrong?
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

now it&#39;s giving me this message:  

 

Kernel panic - not syncing: junk in compressed archive 

 

I removed some files from the tree, and that&#39;s what it gavem e... it seems like it&#39;s corrupting the kernel image somehow?
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

 

--- Quote Start ---  

originally posted by jdhar@Nov 24 2005, 09:40 PM 

now it&#39;s giving me this message:  

 

kernel panic - not syncing: junk in compressed archive 

 

i removed some files from the tree, and that&#39;s what it gavem e... it seems like it&#39;s corrupting the kernel image somehow? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11148) 

--- quote end ---  

 

--- Quote End ---  

 

 

Oh, here are some more messages, and a warning that may be a problem? I&#39;m not sure why it&#39;s there tho: 

 

HOSTCC usr/gen_init_cpio 

usr/.gen_init_cpio.d: done. 

CHK usr/initramfs_list 

UPD usr/initramfs_list 

CPIO usr/initramfs_data.cpio 

GZIP usr/initramfs_data.cpio.gz 

AS usr/initramfs_data.o 

/cygdrive/c/altera/kits/nios2_51/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x/usr/initramfs_data.S: Assembler messages: 

/cygdrive/c/altera/kits/nios2_51/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x/usr/initramfs_data.S:29: Warning: truncated file `usr/initramfs_data.cpio.gz&#39;, 387063 of 387069 bytes read 

usr/.initramfs_data.o.d: done.
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

It seems error in building the initramfs data. 

Please try remove more drivers in kernel, more files in the root fs. 

Check the Makefile and link script to find out what wrong. 

Maybe dos2unix cause the problem. 

 

Are you using Windows/Cygwin? I build the tools chains and run under Linux, and Windows/quartus is used for hardware design only. I use a Samba server to share the files. 

 

 

--- Quote Start ---  

originally posted by jdhar+nov 25 2005, 01:37 pm--><div class='quotetop'>quote (jdhar @ nov 25 2005, 01:37 pm)</div> 

--- quote start ---  

<!--quotebegin-jdhar@Nov 24 2005, 09:40 PM 

now it&#39;s giving me this message:  

 

kernel panic - not syncing: junk in compressed archive 

 

i removed some files from the tree, and that&#39;s what it gavem e... it seems like it&#39;s corrupting the kernel image somehow? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11148) 

--- quote end ---  

 

--- Quote End ---  

 

 

Oh, here are some more messages, and a warning that may be a problem? I&#39;m not sure why it&#39;s there tho: 

 

HOSTCC usr/gen_init_cpio 

usr/.gen_init_cpio.d: done. 

CHK usr/initramfs_list 

UPD usr/initramfs_list 

CPIO usr/initramfs_data.cpio 

GZIP usr/initramfs_data.cpio.gz 

AS usr/initramfs_data.o 

/cygdrive/c/altera/kits/nios2_51/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x/usr/initramfs_data.S: Assembler messages: 

/cygdrive/c/altera/kits/nios2_51/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x/usr/initramfs_data.S:29: Warning: truncated file `usr/initramfs_data.cpio.gz&#39;, 387063 of 387069 bytes read 

usr/.initramfs_data.o.d: done. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11150)</div> 

[/b] 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

Add a debug line to init/initramfs.c 

 

static char * __init unpack_to_rootfs(char *buf, unsigned len, int check_only) 

int written; 

+ printk("unpack_to_rootfs %x+%x check %d\n",(unsigned)buf,len,check_only); 

dry_run = check_only; 

 

You will see 

 

uClinux/Nios II 

Altera Nios II support © 2004 Microtronix Datacom Ltd. 

Built 1 zonelists 

Kernel command line: 

PID hash table entries: 512 (order: 9, 8192 bytes) 

Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) 

Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) 

Memory available: 63232k/65536k RAM, 0k/0k ROM (1215k kernel code, 390k data) 

Mount-cache hash table entries: 512 (order: 0, 4096 bytes) 

unpack_to_rootfs 14eaa4+36738 check 0 

 

So it is trying to unzip the initramfs image, but the data is corrupted. 

That is confirmed by the warning in the kernel building.
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

Please try, in the kernel Makefile, remove the dos2unix line. 

# execute the command and also postprocess generated .d dependencies 

# file 

 

 

# cygwhack: when generating dependencies with gcc 2.95.3, lines seem to be 

# terminated with CR/LFs reqardless of how directories are mounted. "newer" gcc versions 

# do not seem to exhibit this anomaly but we are stuck with the current version until 

# Altera upgrades their distribution. hence we dos2unix the .d file for fixdep... 

 

 

 

if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^) 

 

$(filter-out $(cmd_$(1)),$(cmd_$@)) 

 

$(filter-out $(cmd_$@),$(cmd_$(1)))), 

 

$(Q)set -e;  

 

$(if $($(quiet)cmd_$(1)),echo &#39; $(subst &#39;,&#39;\&#39;&#39;,$($(quiet)cmd_$(1)))&#39;;)  

 

$(cmd_$(1));  

 

- dos2unix $(depfile);  

 

scripts/basic/fixdep $(depfile) $@ &#39;$(subst $$,$$$$,$(subst &#39;,&#39;\&#39;&#39;,$(cmd_$(1))))&#39; > $(@D)/.$(@F).tmp;  

 

rm -f $(depfile);  

 

mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

How do you do the build under linux, and what part exactly do you do in linux. I am using cygwin/windows - could that be a reason why it&#39;s bad? I can use a linux machine no problem... just need to know what tool chain to use

0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

I just grabbed the GNUBIN.TGZ file from the NIOS II CD in the linux directory; it seems to have all the binaries needed to build the kernel, however, I have no idea how to setup my environment to run that makefile... I will try messing around with it, but there is no way to get this working in windows I take it? 

 

I also found this site: http://scorpius.homelinux.org/~marc/nios2.html (http://scorpius.homelinux.org/~marc/nios2.html

 

It describes a process for building a linux toolchain - is this something I should follow, because it doesn&#39;t seem to use the microtronix kernel.
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

You can follow the marc&#39;s page.As I did it. 

You can&#39;t use gcc4 to build the tools chain. 

I am using Fedora Core 4, and have to install the gcc32. 

And in /usr/bin, mv gcc gcc4,then ln -s gcc32 gcc. 

 

You are close, and you don&#39;t need to do it right now. You can do it later. 

I think removing the line of dos2unix in the top level kernel Makefile will solve the problem.
0 Kudos
Altera_Forum
Honored Contributor II
1,613 Views

I have MMC/SD sockets on some of my boards. 

And I am going to try out. 

The NIOS SPI is not good for MMC/SD. 

I am using PIO ports instead. 

 

I think using "root=/dev/mmc" is not a good idea. 

After the system boot, the mmc/sd card may be unplug, and another be plug in later. 

So I am going to keep Initramfs as root fs. 

The devfs was obsolete, and will be replaced by udev. 

I am going to mknod mmc with fixed device number. 

I will also check mmc driver from newer kernel.
0 Kudos
Altera_Forum
Honored Contributor II
1,572 Views

 

--- Quote Start ---  

originally posted by hippo@Nov 26 2005, 06:53 AM 

i have mmc/sd sockets on some of my boards. 

and i am going to try out. 

the nios spi is not good for mmc/sd. 

i am using pio ports instead. 

 

i think using "root=/dev/mmc" is not a good idea. 

after the system boot, the mmc/sd card may be unplug, and another be plug in later. 

so i am going to keep initramfs as root fs. 

the devfs was obsolete, and will be replaced by udev. 

i am going to mknod mmc with fixed device number. 

i will also check mmc driver from newer kernel. 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=11174) 

--- quote end ---  

 

--- Quote End ---  

 

 

I&#39;m moving away from SD/MMC, because it doesn&#39;t seem too supported - on a new version of the board, I will use CF instead, and no CFI since I think it&#39;s a waste to have on-board flash. If I can get this initramfs working, then I can just boot from RAM and then mount CF after init.  

 

I will try this with windows, but if not, then linux - I am using slackware, so I am only at GCC 3.3.4 - I need to understand the toolchain better first. 

 

If I remove that dos2unix line altogether, this is what I get: 

 

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

Microtronix Linux Extensions 

Version 1.4, Built June 20, 2005 

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

make: Entering directory `/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x&#39; 

no emulation specific options. 

/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x/Makefile:1265: *** commands commence before first target. Stop. 

make: *** [_all] Error 2 

make: Leaving directory `/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x&#39; 

 

 

if I jsut comment it out with a &#39;#&#39; in front of it, I still get the truncated file warning, and the build fails with: 

 

LD .tmp_vmlinux1 

KSYM .tmp_kallsyms1.S 

/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x/Makefile:703: *** unterminated call to function `if&#39;: missing `)&#39;. Stop. 

make: *** [_all] Error 2 

make: Leaving directory `/cygdrive/c/altera/kits/nios2/bin/eclipse/plugins/com.microtronix.nios2linux.kernel_1.4.0/linux-2.6.x&#39; 

 

 

Have you tried doing this in windows yourself? 

 

Adding the debug statement you told me shows this: 

 

unpack_to_rootfs 118ed98+bd813 check 0 

 

Out of curiosity, are those linux binaries that comes with the NIOS II distribution any good? Aren&#39;t those part of the toolchain? nios2-elf-gcc for xample..
0 Kudos
Reply