Forum Discussion
Altera_Forum
Honored Contributor
16 years agoJFFS2 kernel support
Hello all
I'm trying to add jffs2 support to a kernel (3c120 dev board) and I'm facing an strange problem. If I checked in jffs2 support in menuconfig, _after_ compiling the kernel core and _while compiling_ the apps , the compile process barfs
|| ( touch mtd-utils/.sgbuilt_user && make -C mtd-utils ) || exit $?
make: se ingresa al directorio `/home/eugenio/uCLinux-MMU/nios2-linux/uClinux-dist/user/mtd-utils'
unset CC CFLAGS CPPFLAGS CROSS LDFLAGS; make -C 606f38a2221648ca5c5fa292c9f71d2ddd59fa66/ WITHOUT_XATTR=1 SUBDIRS= BUILDDIR=$PWD/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/ TARGETS=" mkfs.jffs2"
make: se ingresa al directorio `/home/eugenio/uCLinux-MMU/nios2-linux/uClinux-dist/user/mtd-utils/606f38a2221648ca5c5fa292c9f71d2ddd59fa66'
mkdir -p /home/eugenio/uCLinux-MMU/nios2-linux/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/
gcc -I./include -DWITHOUT_XATTR -D_FILE_OFFSET_BITS=64 -O2 -g -Wall -Wextra -Wwrite-strings -Wno-sign-compare -c -o /home/eugenio/uCLinux-MMU/nios2-linux/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/compr_lzo.o compr_lzo.c -g -Wp,-MD,/home/eugenio/uCLinux-MMU/nios2-linux/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/.compr_lzo.c.dep
compr_lzo.c:29:23: error: lzo/lzo1x.h: No existe el fichero o el directorio
compr_lzo.c: In function ‘jffs2_lzo_cmpr’:
compr_lzo.c:51: error: ‘lzo_uint’ undeclared (first use in this function)
compr_lzo.c:51: error: (Each undeclared identifier is reported only once
compr_lzo.c:51: error: for each function it appears in.)
compr_lzo.c:51: error: expected ‘;’ before ‘compress_size’
compr_lzo.c:54: warning: implicit declaration of function ‘lzo1x_999_compress’
compr_lzo.c:54: error: ‘compress_size’ undeclared (first use in this function)
compr_lzo.c:56: error: ‘LZO_E_OK’ undeclared (first use in this function)
The strange thing is that it tries to compile mkfs.jffs2 using my x86 gcc compiler :confused: If I try to disable mtd-utils, it doesn't mind; same error while compiling mkfs.jffs2 in mtd-utils which I have previously disabled.... Adding kernel support for MTD and user apps. support for mtd-utils works fine. No errors. It only happens when adding jffs2 kernel support and while compiling mkfs.jffs2 (mtd-utils enabled or not) Any hints? TIA22 Replies
- Altera_Forum
Honored Contributor
I do have a NEEK, but I am not actively using it right now, as our interests have moved to different targets. So I can only help with some knowledge I collected when I was investigating NIOS and I am still lurking here - just in case. But I can't do any practical tests.
-Michael - Altera_Forum
Honored Contributor
Hi all!!!!!!
good news!!!!!! \o/ i have successfully booting 2 cpus !!! the problem was both starting at the same time!!!! i add a cpu_resetrequest on my linux_cpu and a pio in another cpu..... the linux cpu starts at reset and an374 starts normally after an374 starts i set on nios a pio to starts uclinux cpu.....and voila!!!! now i have the an374 with web browser management......with eth grafics!!! booting from a flash and using only one ethernet port :) now i want to put a snmp agent on it thanks very much all!!!!! Franz Wagner - Altera_Forum
Honored Contributor
Sounds good :).
-Michael (what exactly is an374, what does the second CPU do ?) - Altera_Forum
Honored Contributor
Hello Michael !!! thank for you assistence...
an374 is a Altera Video Over IP Reference Design, i port to cycloneiii dev board, but i need a webserver and snmp ....so I decided to put another cpu with uclinux...very good....thank you again if someone needs help I'll be glad to help...... cheers Franz Wagner - Altera_Forum
Honored Contributor
How do you manage the concurrent accesses to the Ethernet "hardware" ?
-Michael - Altera_Forum
Honored Contributor
Hi michael .......
was very funny and little hardo to do that....... the linux cpu manage the phy chip ... mdc and mdio....... an374 wait linux configure a phy....... in eth rx i do a verilog block that does a filtering of packets ..by mac (linux mac and an374 mac) in eth tx i do a verilog block that always send a an374 udp flow , if the linux cpu want to send a packet the block wait a interpacket gap send the packet and back send an374 flow .......... i do that usin two dualport ram.....and a monostable.......... i did tests and had very good results..... doesnt lose packets............:) regards Franz wagner - Altera_Forum
Honored Contributor
So when sending, you did a hardware block without the Linux driver even knowing about this. Nice !
Does the an374 unit not receive any Ethernet blocks ? -Michael - Altera_Forum
Honored Contributor
hi Michael !!
yes... i cheated the two phy controlers....... for any one another doesnt exist........ in receive i copy the packets in a dual port ram and distributed according to the mac address......broadcast and multicast are duplicaded.... under tests an374 dont loose packets in RX an TX...... because it has priority over uclinux packets........ try do it :) is very interesting ....... if you want i post the code...... cheers Franz wagner - Altera_Forum
Honored Contributor
--- Quote Start --- Hello Michael !!! thank for you assistence... an374 is a Altera Video Over IP Reference Design, i port to cycloneiii dev board, but i need a webserver and snmp ....so I decided to put another cpu with uclinux...very good....thank you again if someone needs help I'll be glad to help...... cheers Franz Wagner --- Quote End --- Hi Franz, I am looking into porting the an374 to the The NEEK, Cyclone III Edition (consists of the Cyclone III Starter Kit and an LCD/VGA high-speed mezzanine card (HSMC).) It sounds like you were successful in porting the design to one of the Cyclone III boards, was it the same Starter Kit I am looking at? Also, can you tell me what version of Quartus II you were using? Thank you, Tracee - Altera_Forum
Honored Contributor
hi Tracee..........
my board is Cyclone iii development board ...... ..........I do not know if Neek will have enough memory for the project but you can try ..... i use quartus 10.0 cheers Franz Wagner