Forum Discussion
Altera_Forum
Honored Contributor
20 years agoFinally some progress (I think)!!
Here is what I did: I converted the microtronix tree and placed it in linux... I then copied the H-i686-pc-linux-gnu/ directory from the Nios II linux CD and set my path to the bin directory in there (with all the elf-* files). I created a filesystem project in Eclipse IDE with very few things, but I have an /bin/init.exe and /etc/inittab in there. I copied the init.exe to /init so it would find it - and my inittab is: # inittab for uClinux# Format:# ttyline:termcap-entry:getty-command# ttyS0:vt100:/bin/agetty 115200 ttyS0# ttyS1:vt100:/bin/agetty 115200 ttyS1 ttyJ0:vt100:/bin/agetty 115200 ttyJ0 I'm guessing I need more things in here? Anyway, some comments: It's still doing dos2unix when I compile in linux using the three make commands you listed.. but I don't get the warning anymore, and it builds successfully. Here's an example: make[1]: `arch/nios2nommu/kernel/asm-offsets.s' is up to date. CHK include/asm-nios2nommu/asm-offsets.h CHK include/linux/compile.h CHK usr/initramfs_list UPD usr/initramfs_list CPIO usr/initramfs_data.cpio GZIP usr/initramfs_data.cpio.gz AS usr/initramfs_data.o dos2unix: converting file usr/.initramfs_data.o.d to UNIX format ... LD usr/built-in.o GEN .version CHK include/linux/compile.h UPD include/linux/compile.h CC init/version.o dos2unix: converting file init/.version.o.d to UNIX format ... LD init/built-in.o LD .tmp_vmlinux1 KSYM .tmp_kallsyms1.S AS .tmp_kallsyms1.o LD .tmp_vmlinux2 KSYM .tmp_kallsyms2.S AS .tmp_kallsyms2.o LD vmlinux SYSMAP System.map SYSMAP .tmp_System.map Building modules, stage 2. MODPOST I'm guessing there are dos2unix's elsewhere in the tree Makefiles? Then, I download the .sof to the board, and using sopc builder in windows/cygwin, I do: nios2-download --go ./vmlinux <-- compiled in linux It downloads and runs, and here is the output: Linux version 2.6.11-uc0 (jdhar@nawattla02.lsil.com) (gcc version 3.4.1 (Altera Nios II 5.0 b86))# 6 Mon Nov 28 14:28:08 EST 2005 uClinux/Nios II Altera Nios II support © 2004 Microtronix Datacom Ltd. 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: 14976k/16384k RAM, 0k/0k ROM (750k kernel code, 484k data) Mount-cache hash table entries: 512 (order: 0, 4096 bytes) Linux NoNET1.0 for Linux 2.6 Serial: JTAG UART driver $Revision: 1.4 $ ttyJ0 at MMIO 0x80801860 (irq = 2) is a jtag_uart io scheduler noop registered io scheduler anticipatory registered io scheduler deadline registered io scheduler cfq registered RAMDISK driver initialized: 16 RAM disks of 8192K size 1024 blocksize Freeing unused kernel memory: 320k freed (0x10da000 - 0x1129000) Warning: unable to open an initial console. So no error on mounting root, which is great.. so I'm not sure about that warning, and I'm going to try and play around with inittab. Is creating the filesystem in Eclipse ok, or is that what buildroot is for in linux? I tried playing aroudn with different filesystems, and it seems that if I have more than just the very minimum (busybox.exe for example), it will fail to mount root altogether (I get a kernel panic/sync error).