Forum Discussion
Altera_Forum
Honored Contributor
20 years agoHow to run '"hello"
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?5 Replies
- Altera_Forum
Honored Contributor
--- 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)
- Altera_Forum
Honored Contributor
<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?
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" ?$ 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' 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' if ; then ln -f linux-2.6.x/vmlinux linux-2.6.x/linux; fi make: *** No rule to make target `zImage'. Stop. $ -------------------------------------------/COLOR] - Altera_Forum
Honored Contributor
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) - Altera_Forum
Honored Contributor
--- 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? - Altera_Forum
Honored Contributor
hippo you are good