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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

How to run '"hello"

Altera_Forum
Honored Contributor II
1,376 Views

Dir all, 

According to this netpage: 

http://nioswiki.jot.com/wikihome/operating...duleprogarmming (http://nioswiki.jot.com/wikihome/operatingsystems/moduleprogarmming

I made a zImage and download to my cumstom bord. 

When boot linux,I can see:"Hello, world\",but can not see "Goodbye, cruel world\". 

Why? 

How can I run the program in nios2-terminal when I have download the zImage?
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
625 Views

 

--- Quote Start ---  

originally posted by nwpu_zhf2004@Jun 4 2006, 07:46 PM 

dir all, 

    according to this netpage: 

    http://nioswiki.jot.com/wikihome/operating...duleprogarmming (http://nioswiki.jot.com/wikihome/operatingsystems/moduleprogarmming

i made a zimage and download to my cumstom bord. 

when boot linux,i can see:"hello, world\",but can not see "goodbye, cruel world\". 

why? 

how can i run the program in nios2-terminal when  i have download the zimage? 

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

--- quote end ---  

 

--- Quote End ---  

 

You need to unload the module, ie, rmmod hello .  

You need to enable "module unloading" in kernel config. 

And enable "rmmod" in busybox. 

 

But please note, this is kernel programming, not user apps. You should use this mostly for drivers. 

 

For general (user) apps, 

http://nioswiki.jot.com/wikihome/operating...ms/compilehello (http://nioswiki.jot.com/wikihome/operatingsystems/compilehello)
0 Kudos
Altera_Forum
Honored Contributor II
625 Views

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

--- Quote Start ---  

You need to unload the module, ie, rmmod hello  .  

You need to enable "module unloading" in kernel config. 

And enable "rmmod" in busybox. 

 

-----------------------------------------[/b] 

--- Quote End ---  

 

Dear hippo, 

According to your advice,after exute "make" instruction,"zImage" is buiilded. 

Then I exute "make romfs". 

Then I exute "make linux zImage",just like the fllowing: 

I do not know wether "zImage" is right? 

$ make linux zImage make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc-  ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- -C linux-2.6.x zImage || exit 1  no emulation specific options. make: Entering directory `/home/wangzhiwunpu/uClinux-dist-test/linux-2.6.x&#39;  CHK     include/nios2_system.h  CHK     include/linux/version.h  CHK     include/linux/compile.h  CHK     usr/initramfs_list  OBJCOPY arch/nios2nommu/boot/zImage Kernel: arch/nios2nommu/boot/zImage is ready make: Leaving directory `/home/wangzhiwunpu/uClinux-dist-test/linux-2.6.x&#39; if ; then        ln -f linux-2.6.x/vmlinux linux-2.6.x/linux; fi make: *** No rule to make target `zImage&#39;.  Stop. $ -------------------------------------------/COLOR] 

When I download "zImage" to my custom board,exute the instrution "modprobe mytest",the information "mytest : applet not found". 

 

 

 

 

Whould you please tell me steps of "how to do a simple drive" ?
0 Kudos
Altera_Forum
Honored Contributor II
625 Views

the last make should be "make linux image", not "zImage", because we are in uClinux-dist-test. 

make linux will build zImage. 

make image will put zImage in images/zImage. 

 

I have updated the wiki. 

But it still has problem in modprobe, which may be a bug in the old busybox. 

I will check the problem later. 

 

For now, you can do it without modules, and build directly in kernel, 

ie,  

<*> example hello module 

 

There is an example driver in Chinese from Alex.liu, 

http://www.icwin.net/showartitle.asp?art_id=8452&cat_id=52 (http://www.icwin.net/showartitle.asp?art_id=8452&cat_id=52)
0 Kudos
Altera_Forum
Honored Contributor II
625 Views

 

--- Quote Start ---  

When I download "zImage" to my custom board,exute the instrution "modprobe mytest",the information "mytest : applet not found". 

 

 

i have the same problem when try the example described in "http://nioswiki.jot.com/WikiHome/OperatingSystems/ModuleProgarmming

 

has anyone resolved the problem?
0 Kudos
Altera_Forum
Honored Contributor II
625 Views

hippo you are good

0 Kudos
Reply