Forum Discussion
Altera_Forum
Honored Contributor
20 years agoProblem dloading vmlinux to 2C35
Hi,
I was trying to download the vmlinux.flash image to the board and received this error Using cable "USB-Blaster [USB-0]", device 1, instance 0x00 Resetting and pausing target processor: FAILED (I get this immediately so it's not the same problem as the one described as happening after 20 seconds for which Altera's put out a fix for) I used the standard.sof and std_2C25.ptf but I'm not sure whether that is the correct design to use for linux or whether we need to create our own sof? Also, I'm wondering why my vmlinux.flash size was so large at about 8.3 mb? Is it supposed to be that size since I saw this in the toolchain setup thread: Memory available: 63744k/65536k RAM, 0k/0k ROM (694k kernel code, 417k data) Lastly, since the flash memory size isn't too big, is it possible to use the RAM instead of the flash for the kernel? Would I need to compile the kernel with different options in that case? Thanks a lot in advance!15 Replies
- Altera_Forum
Honored Contributor
The 8 MB sdram of DEII is very tight for uclinux.
remove unused applets in busybox, keep only init, msh, and some coreutils. remove unused files in ~/rootfs/etc, keep only inittab remove unused dev nodes in ~/download/rootfs_list, keep only console,zero,null.cd ~/buildroot/build_nios2/busybox make menuconfig make cd ~/buildroot make rm -rf ~/rootfs cp -a ~/buildroot/build_nios2/root ~/rootfs cd ~/rootfs# remove include and lib to save space# the dev nodes are generated via ~/download/rootfs_list rm -rf dev usr/include usr/lib etc/*# you may use this instead of the one from buildroot cp ~/download/inittab etc# clean headers for uClinux-dist cd ~/buildroot/build_nios2/staging_dir/include/linux rm config.h autoconf.h touch config.h autoconf.h cd ~/linux-2.6.x# rebuild image for initramfs make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- - Altera_Forum
Honored Contributor
Thanks, hippo! Looks like its working now http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/laugh.gif
By the way, if I had to install the bluez module into the linux kernel as well as the driver for the IP core for USB, would that likely cause any problems with running out of RAM? Also, in the toolchain, the compiler used to compile was nios2-linux-uclibc-gcc hello.c -o hello -elf2flt If I already have a compiled object file (compiled with g++), is there any way of converting the object file with something like elf2flt?uClinux/Nios II Altera Nios II support (C) 2004 Microtronix Datacom Ltd. Built 1 zonelists Kernel command line: PID hash table entries: 64 (order: 6, 1024 bytes) Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory available: 6984k/8192k RAM, 0k/0k ROM (704k kernel code, 385k 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 0x81004000 (irq = 1) is a jtag_uart io scheduler noop registered io scheduler deadline registered Freeing unused kernel memory: 304k freed (0xba000 - 0x105000) init started: BusyBox v1.1.1-pre0 (2006.03.06-00:20+0000) multi-call binary BusyBox v1.1.1-pre0 (2006.03.06-00:20+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands. # - Altera_Forum
Honored Contributor
The kernel is working now.
<div class='quotetop'>QUOTE </div> --- Quote Start --- By the way, if I had to install the bluez module into the linux kernel as well as the driver for the IP core for USB, would that likely cause any problems with running out of RAM?[/b] --- Quote End --- Add them one by one. It is still possible to run out of ram. Check in only what is required. Or if you could, change the sdram chip to a 16Mx16 device, check your PCB if extra MA lines are required. <div class='quotetop'>QUOTE </div> --- Quote Start --- If I already have a compiled object file (compiled with g++), is there any way of converting the object file with something like elf2flt?[/b] --- Quote End --- You can add the elf2flt flags. Note the libstdc++ might still have problems, it compiled and linked with elf2flt, but it crashed when running. I am not a c++ user, and I don't know how to resolve (and I am quite busy now). - Altera_Forum
Honored Contributor
when i nios2-download -g vmlinux!
it appears: SOPC Builder]$ nios2-download -g vmlinux ios2-elf-objcopy: './vmlinux': No such file /vmlinux.srec: Unable to open input file m: cannot remove `./vmlinux.srec': No such file or directory /altera/kits/nios2_51/examples why ? where my 'vmlinux.bin' file shoulde lay? - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by iriver@Apr 13 2006, 08:26 PM when i nios2-download -g vmlinux!it appears:
sopc builder]$ nios2-download -g vmlinux
ios2-elf-objcopy: './vmlinux': no such file
/vmlinux.srec: unable to open input file
m: cannot remove `./vmlinux.srec': no such file or directory
/altera/kits/nios2_51/examples
why ?
where my 'vmlinux.bin' file shoulde lay?
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14330)
--- quote end ---
--- Quote End --- the vmlinux is in your kernel build dir . and if you make zImage , arch/nios2nommu/boot/zImage . Note the drives mapping in nios2 sdk shell, drive c: is /cygdrive/c/ drive d: is /cygdrive/d/ if you map your linux home to h: on windows with samba server, then it is /cygdrive/h/linux-2.6.x/vmlinux or /cygdrive/h/linux-2.6.x/vmlinux/arch/nios2nommu/boot/zImage