Forum Discussion
Altera_Forum
Honored Contributor
20 years agoproblem with goahead webserver...
i followed alex's steps to port the webserver. everything seems fine but i cant access the demo webpage. i can ping my de2 but cant access it with web browser.
here are some of my questions: 1. must i follow the Buildrootguide to build the toolchain? i'm totally new and i used the BinaryToolchain for newbies. 2. step 9: shud i run that cmd under ~/ws031202/LINUX dir or under ~/uClinux-dist-test/ dir? is it this cmd is suppose to replace the 'make linux image' as in uClinuxDist? 3. step 10: whr shud i run this cmd? i tried the vmlinux file under ~/uClinux-dist-test/linux-2.6.xx/ (<= sry cant remember the numbers...) is it correct? Pls help. thank you in advance. ps. i'm totally new n i hope my q doesnt sound stupid. i'll b glad if u would like to suggest anything.13 Replies
- Altera_Forum
Honored Contributor
there is no need to run the buildroot.
you can use the rootfs, http://nioswiki.jot.com/wikihome/operating...2rootfs.tar.bz2 (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/binarytoolchain/nios2rootfs.tar.bz2) cd ~ tar jxf nios2rootfs.tar.bz2 The rootfs with busybox will be in ~/rootfs and ~/download/rootfs_list . you can add goahead to the rootfs. then update the initramfs path in kernel config. and rebuild zImage. - Altera_Forum
Honored Contributor
thx for your reply, hippo.
i've done wat u said and made the zImage. I download it to my DE2, i can go into the terminal but it show sth like this (http://i74.photobucket.com/albums/i248/jwlam1984/console.jpg) when i run any command. the list keep going on non stop. any idea wat's going on? pls help. thx again. - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by jwlam@Jul 21 2006, 12:25 AM thx for your reply, hippo.i've done wat u said and made the zimage. i download it to my de2, i can go into the terminal but it show sth like this (http://i74.photobucket.com/albums/i248/jwlam1984/console.jpg) when i run any command. the list keep going on non stop.
any idea wat's going on? pls help. thx again.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=17046)
--- quote end ---
--- Quote End --- I'm affraid you're out of memory. The message your getting are from the oom-killer (Out Of Memory killer) The DE2 board has not much memory... I'm affraid that board will not run a webserver. You can however if you manage to get the SD-card running and put your rootfs and a swap partition on the SD card so you will get extra memory from losing the rootfs in RAM and the oom-killer will not kick in when there is swap-space available (unless that is full too). One thing to consider: Swap space is VERY slow memory... Your system won't run any faster with it, it will run. That's all. Hope this helps! Edit: He Hippo! We were typing the same info at the same time.... http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/wink.gif
- Altera_Forum
Honored Contributor
it is running out of memory.
how big is your initramfs? DE2 has only 8MB sdram. the rootfs from buildroot take up a lot of memory. what is the result of goahead with uClinux-dist-test ? which will use fewer memory. You should try to reduce the initramfs size. put some of user program and data onto other storages, eg, jffs2 on CFI, usb disk, or nfs. - Altera_Forum
Honored Contributor
putting the memory matter aside, did my setup refuse to work bcoz of the need for rootfs?
b4 this i put everything under ~/uClinux-dist-test/romfs and i manage to boot it n run some cmd n ping. the only prob is tat i failed to open the test page with browser. - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by jwlam@Jul 21 2006, 02:40 AM putting the memory matter aside, did my setup refuse to work bcoz of the need for rootfs?b4 this i put everything under ~/uclinux-dist-test/romfs and i manage to boot it n run some cmd n ping. the only prob is tat i failed to open the test page with browser.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=17053)
--- quote end ---
--- Quote End --- When you hadn't yet added the goahead web server your rootfs didn't use that much memory so you could still run.
- Altera_Forum
Honored Contributor
From mnl_nios2_board_cycloneII_2c35.pdf
<div class='quotetop'>QUOTE </div> --- Quote Start --- - 16 Mbytes of flash memory - 2 Mbytes of synchronous SRAM - 32 Mbytes of double data rate (DDR) SDRAM[/b] --- Quote End --- From DE2_Introduction_box.pdf <div class='quotetop'>QUOTE </div> --- Quote Start --- 8-MB SDRAM, 512-KB SRAM, 4-MB Flash[/b] --- Quote End --- these 2 files come with the CDs (Nios II Embedded System and DE2 System respectively) included in my DE2 package. On the DE2 board i can c it's Cyclone II EP2C35F672C6, so i always tot the 2 files r refering to the same board. obviously it's not but which board is the first one refering to? also, it seems tat all those example designs under C:\altera\kits\nios2_60\examples\verilog\niosII_cycloneII_2c35 r not meant for DE2 bcoz they r using the lan91c111 ethernet chip which doesnt exist on DE2. correct my if i'm wrong. Thx. - Altera_Forum
Honored Contributor
Is it possible tat i install n run everything on a usb pendrive connected to my DE2? if so, can anyone give me a guide on it? Thx a lot!
- Altera_Forum
Honored Contributor
Ahh... nios forum is finally back online.
i think i'll rearrange my problem here... <div class='quotetop'>QUOTE </div> --- Quote Start --- wgoossens: When you hadn't yet added the goahead web server your rootfs didn't use that much memory so you could still run.[/b] --- Quote End --- before using rootfs, i put my web dir n webs in ~/uClinux-dist-test/romfs and ~/uClinux-dist-test/romfs/bin. it booted ok but after i run the webs cmd, it seems tat nth happen n i cant access anything with browser. <div class='quotetop'>QUOTE </div> --- Quote Start --- hippo: what is the result of goahead with uClinux-dist-test ?[/b] --- Quote End --- does it mean putting my web dir n webs under romfs n romfs/bin as above? <div class='quotetop'>QUOTE </div> --- Quote Start --- hippo: You should try to reduce the initramfs size.[/b] --- Quote End --- how do i do tat? <div class='quotetop'>QUOTE </div> --- Quote Start --- hippo: DE2 has only 8MB sdram.[/b] --- Quote End --- i suppose my problem is not with the 8mb ram as this (http://i74.photobucket.com/albums/i248/jwlam1984/console2.jpg) but with the 1mb flash instead. coz my zImage file is 1.3 or 1.4mb. pls correct me if i'm wrong. is there any method i can reduce the size of zImage? pls guide. thx. ps. i din add any user apps. all r default. - Altera_Forum
Honored Contributor
for flash size problem, read this about DE2
http://nioswiki.jot.com/wikihome/operating...flashprogrammer (http://nioswiki.jot.com/wikihome/operatingsystems/flashprogrammer)