Forum Discussion
107 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@Feb 21 2006, 11:19 AM hi dumdan,you are very close to sucess.
1. start with minimal kernel config, (copy kernel2.config to .config).
2. check if you have network support and your opencore emac / tdk phy in kernel menuconfig, better compile-in kernel, instead of modules.
ie, minimal config + network + emac + phy
3. cfi, mtd,ramdisk,and kernel command line are not required in kernel config, because we use initramfs.
4. boot uclinux, and check if the eth0 init sucessfully.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=12846)
--- quote end ---
--- Quote End --- Hi hippo, Thanks for the prompt answer. You see, my network driver is not really ready, yet. So, for my tests I configured the kernel without network support (NO NET). For the network part I was, mostly, concerned with why I still see some netwiork messages. The network is not a major concern of mine, just yet. Now, I know the goal here is to be able to use initramfs and, because of that, the cfi & mtd-related messages are what i'm concerned about. " ..... failed to ioremap ..... mtd: partition "romfs" is out of reach -- disabled .... " Where do these come from and what (if anything) should I do about them ? (of course, I could read the sources and figure out for myself, but the time I have is very, very limitted) Also, I am going to need access to the flash in the very near future, so I'd like to be able to mount readonly a flash partition, if at all possible. That's why I did not totaly removed the MTD and CFI options. What would be the minmal options to be able to access the AMD flash on the eval board and nothing else ? Thanks again, Daniel
- Altera_Forum
Honored Contributor
Hi dumdan,
The read-only rom partition is TOTALLY NOT REQUIRED. You should copy the content of your rom partition into ~/rootfs. The initramfs is much better and easier than romfs. So just use the default kernel2.config as .config for kernel. It will save you a lot of time. The cfi and mtd will be required ONLY when you need a read/write flash partition , such as jffs2. You need a proper map for mtd to work. - Altera_Forum
Honored Contributor
Hi Alex,
I think the problem may be stack overflow, because the elf2flt's default stack is 4K. So please change boa's stack to 32K. "nios2-linux-uclibc-flthdr -s 32000 ~/rootfs/bin/boa" - Altera_Forum
Honored Contributor
In post# 1, hippo wrote....
<div class='quotetop'>QUOTE </div> --- Quote Start --- [11. Add user apps ported to uClinux from uClinux-dist. In menuconfig, select Kernel/Library/Defaults Selection ---> [*] Customize Vendor/User Settings (NEW)[/b] --- Quote End --- But I don't see 'Kernel/Library/Defaults Selection' option in menuconfig (ie. version 2.6..15.4). Any ideas what I'm doing wrong? - Altera_Forum
Honored Contributor
cd ~/uClinux-dist-test
make menuconfig - Altera_Forum
Honored Contributor
--- Quote Start --- originally posted by hippo@Jan 11 2006, 12:35 PM 9. you should try out the new kernel.follow step5, build kernel as before, but "cd ~/linux-2.6.15.4" .
if you will develop drivers, you should use the new kernel. --- Quote End --- While testing the new kernel, I discovered that "socket.h" needs a patch. Also, the SMC91111 driver is missing its header file. This soon becomes apparent when you enable Networking -> Networking support, then attempt to build new kernel. Save the following as ~/download/linux-nios2-03.diff
Apply the patch as follows....--- include/asm-nios2nommu/socket.h 2006-03-10 11:50:53.000000000 +1000 +++ include/asm-nios2nommu/socket.h 2006-03-10 11:39:14.000000000 +1000 @@ -38,6 +38,8 @@ # define SO_BROADCAST 6 # define SO_SNDBUF 7 # define SO_RCVBUF 8 +#define SO_SNDBUFFORCE 32 +#define SO_RCVBUFFORCE 33 # define SO_KEEPALIVE 9 # define SO_OOBINLINE 10 # define SO_NO_CHECK 11
Pls let me know how it goescd ~/linux-2.6.15.4 # Patch socket.h patch -p0 <~/download/linux-nios2-03.diff # Salvage the missing SMC91111 header file cp ~/linux-2.6.x/drivers/net/smc91111.h drivers/net # Config the kernel make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- menuconfig # Compile the kernel make ARCH=nios2nommu CROSS_COMPILE=nios2-linux-uclibc- - Altera_Forum
Honored Contributor
Attached is a port of the Microtronix 2.6.11 Nios2 patch to kernel 2.6.15.6-uc0.
I believe the patch should be fairly complete, with module loading, ethernet (91c111), mtd, compact flash, usb, i2c e.t.c. NB: usb and i2c support is not tested on HW. - Atle - Altera_Forum
Honored Contributor
Atle,
Awesome ! Welcome and best thanks. - Altera_Forum
Honored Contributor
We have problems in some of the apps port in uClinux-dist. Here is how to use the Microtroni'sx port of apps. There are patches for the Makefile of inetd,ftpd and boa. You can look at the patches and update other apps yourself. Note you have to prepare proper config files to run these apps.
Download attached mx140apps.zip to ~/download,
build the apps, and install to rootfscd ~/download unzip mx140apps.zip mkdir ~/apps cp -a ~/download/mx140/examples/software/linux/apps/* ~/apps cd ~/apps patch -p1 <mx140apps.diff
Then rebuild the kernel for initramfs. Run them on nios2 uclinux, ftpd will be invoked by inetd.cd ~/apps/inetd make make install cd ~/apps/ftpd make make install cd ~/apps/boa/src make make installifconfig eth0 192.168.1.100 route add default gw 192.168.1.254 inetd& boa& - Altera_Forum
Honored Contributor
Hi hippo,
as you asked me in "ohs900 and 2.6.11, Opencore USB 1.1 Port to 2.6.11" thread, I attach the code of the USB driver. It comes from Steve Fielding on Opencores, but there is no update since kernel 2.6.10 or so and I am not very familiar with the USB drivers... If you have time to take a look it would be great. Well, I apparently cannot attach a .tar.bz2 file... anyway you can find the files on http://www.opencores.org/pdownloads.cgi/list/usbhostslave (http://www.opencores.org/pdownloads.cgi/list/usbhostslave) it is the ohs900.zip file, there is a small explanation on how to add it in 2.6.10 Thanks a lot, Best regards Pierre-Olivier