Home Forum Developers IP0x Reflashing Atcom IP01 with SwitchFin?

JRPassphrase Registration Control

In order to register on this site, you must first submit the passphrase below.

TODO list for each hardware target can be found as sticky topic in the corresponding forum


Gilles
useravatar
User Info

Reflashing Atcom IP01 with SwitchFin?

Hello

I'm playing with an Atcom IP01, and stumbled upon Switchfin while learning my options to install more recent versions of the uClinux and applications on that device, and possibly compiling applications that are not available with the standard software that is currently shipped with the Atcom.

I have a couple of newbie questions:

1. Unless I'm mistaken, the current options are:
- Keep using BAPS to install the different parts (uBoot bootloader, uClinux kernel, applications), and learn how to compile/package software as BAPS packages
- Build image with AstFin
- Use Switchfin instead of AstFin

Is this correct?

2. Is there an up-to-date tutorial on how to install a compiling environment ("buildroot"?) on a Linux x86 host, and compile everything needed to reflash an Atcom IP01 device with the latest SwitchFin software?

3. What applications are contained within SwitchFin? I assume it has Asterisk and Dahdi. Are there others?

Thank you.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

In "http://docs.blackfin.uclinux.org/doku.php?id=installing_linux", the following requirements are specified:

binutils
gcc
glibc development files
ncurses
zlib
texinfo
GTK+
QT
TCL/TK
host side kernel source

If someone has succesfully compiled Switchfin on a Fedora (13) host, could you tell me what "yum install" commands to run to install required software?

Code:


cd /usr/src/switchfin/

make uBoot

[...]
Configuring for ip04 board...
make[1]: Leaving directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1'
touch /usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/.configured
mkdir -p /usr/src/switchfin/build_ip01/image_ip01
make -j1  -C /usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1
make[1]: bfin-uclinux-gcc: Command not found
make[1]: Entering directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1'
for dir in tools examples post post/cpu ; do make -C $dir _depend ; done
make[2]: bfin-uclinux-gcc: Command not found
make[2]: Entering directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/tools'
ln -s ../common/environment.c environment.c
ln -s ../lib_generic/crc32.c crc32.c
make[2]: Leaving directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/tools'
make[2]: bfin-uclinux-gcc: Command not found
make[2]: Entering directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/tools'
make[2]: Nothing to be done for `_depend'.
make[2]: Leaving directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/tools'
make[2]: bfin-uclinux-gcc: Command not found
make[2]: Entering directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/examples'
/bin/sh: bfin-uclinux-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
/bin/sh: bfin-uclinux-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
/bin/sh: line 2: bfin-uclinux-gcc: command not found
make[2]: *** No rule to make target `.depend', needed by `_depend'.  Stop.
make[2]: Leaving directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/examples'
make[2]: bfin-uclinux-gcc: Command not found
make[2]: Entering directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/post'
/bin/sh: line 2: bfin-uclinux-gcc: command not found
[...]
/bin/sh: line 2: bfin-uclinux-gcc: command not found
make[2]: *** No rule to make target `.depend', needed by `_depend'.  Stop.
make[2]: Leaving directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/post'
make[2]: bfin-uclinux-gcc: Command not found
make[2]: Entering directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/post/cpu'
/bin/sh: line 2: bfin-uclinux-gcc: command not found
[...]
/bin/sh: line 2: bfin-uclinux-gcc: command not found
make[2]: *** No rule to make target `.depend', needed by `_depend'.  Stop.
make[2]: Leaving directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/post/cpu'
make[1]: *** [depend] Error 2
make[1]: Leaving directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1'
make: *** [uBoot] Error 2

Thank you.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

BTW, are GTK+, QT, and TCL/TK really needed to compile SwitchFin for Atcom IP01?


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

I ran the following commands:

Code:


yum install binutils
yum install gcc
yum install glibc-devel
yum install ncurses
yum install zlib
yum install texinfo

yum update kernel*
reboot
cd /usr/src/switchfin
make uBoot

It appears that Switchfin doesn't include uClinux:

Code:


make[2]: bfin-uclinux-gcc: Command not found
make[2]: Entering directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/examples'
/bin/sh: bfin-uclinux-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
/bin/sh: bfin-uclinux-gcc: command not found
dirname: missing operand
Try `dirname --help' for more information.
bfin-uclinux-gcc -g  -Os   -ffixed-P5 -D__KERNEL__ -DTEXT_BASE=0x03FE0000  -I/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/include -fno-builtin -ffreestanding -nostdinc -isystem  -pipe  -D__BLACKFIN__ -DCONFIG_BLACKFIN -D__blackfin__ -I/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1 -Werror -Wall -Wstrict-prototypes -c -o stubs.o stubs.c
make[2]: bfin-uclinux-gcc: Command not found
make[2]: *** [stubs.o] Error 127
make[2]: Leaving directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1/examples'
make[1]: *** [examples] Error 2
make[1]: Leaving directory `/usr/src/switchfin/build_ip01/u-boot-1.1.5-bf1'
make: *** [uBoot] Error 2
[root@freeswitch switchfin]# where bfin-uclinux
-bash: where: command not found
[root@freeswitch switchfin]# which bfin-uclinux
/usr/bin/which: no bfin-uclinux in (/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/freeswitch/bin:/root/bin)
[root@freeswitch switchfin]# find . -name "bfin-uclinux"

Do I need to first merge the uClinux source code into /usr/src/switchfin before running "make uBoot ; make menuconfig ; make ; make image"?

Thank you.


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

By reading the online doc here and on the Blackfin site, and some trial and error, I made some progress, but "make uBoot" can't find bfin-uclinux-gcc.

Here are the exact steps I took to set things up on a Fedora 13 host:

Code:


yum install binutils
yum install gcc
yum install glibc-devel
yum install ncurses
yum install zlib
yum install texinfo
yum update kernel*

reboot

cd /tmp

wget http://blackfin.uclinux.org/gf/download/frsrelease/470/7171/blackfin-toolchain-09r1.1-2.i386.rpm
rpm -Uvh blackfin-toolchain-09r1.1-2.i386.rpm

wget http://blackfin.uclinux.org/gf/download/frsrelease/470/7176/blackfin-toolchain-uclibc-default-09r1.1-2.i386.rpm
rpm -Uvh blackfin-toolchain-uclibc-default-09r1.1-2.i386.rpm

wget http://blackfin.uclinux.org/gf/download/frsrelease/470/7169/blackfin-jtag-tools-09r1.1-2.i386.rpm
rpm -Uvh blackfin-jtag-tools-09r1.1-2.i386.rpm

vim ~/.bashrc: export PATH=$PATH:/opt/uClinux/bfin-uclinux/bin:/opt/uClinux/bfin-linux-uclibc/bin
<logoff, logon>
echo $PATH

# which bfin-uclinux-gcc
/opt/uClinux/bfin-uclinux/bin/bfin-uclinux-gcc

# bfin-uclinux-gcc --version
bfin-uclinux-gcc (GCC) 4.1.2 (ADI svn)

# cd /usr/src
# svn co https://switchfin.svn.sourceforge.net/svnroot/switchfin/switchfin/trunk/ switchfin
# cd switchfin

# make menuconfig: Chose Atcom IP01
# make uBoot
[...]
make[2]: bfin-uclinux-gcc: Command not found

Does someone know why "make" can't locate bfin-uclinux-gcc while "which" finds it?

Thank you.


Administrator has disabled public posting
admin
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Hi Gilles,

As far as I understand your procedure you are downloading blackfin toolchain manually. This is not needed. Switchfin building proces will download and configure the toolchain for you.

I would advice you read the README file in the Switchfin root folder. It should contain all the information to let you start.
If you find something missing please let us know so we update it.

To build Switchfin you need some packages as described at http://docs.blackfin.uclinux.org/doku.p … ling_linux
 
Also I would advice that you re use the existing uboot on your IP01 and reflash the uImage directly.

Good luck smile
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Thanks Dimitar for the clarification.

At this point, just for test, I could successfully compile uBoot (although I'll follow your suggestion, keep the original uBoot that comes with the Atcom IP01, and just install the new image).

However, I get an error when trying to build the image:

Code:


ranlib ../lib/libncurses_g.a
make[7]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/lib/ncurses/build-host-ncurses-5.7/ncurses'
cc ../objects/tic.o ../objects/dump_entry.o  -I../progs -I../../ncurses-5.7/progs -DHAVE_CONFIG_H -I../../ncurses-5.7/progs/../include -I. -I../include  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -DNDEBUG -O2 -g  --param max-inline-insns-single=1200 -static -L../lib -lncurses -L../lib -lncurses -dynamic  -ldl  -o tic
/usr/bin/ld: cannot find -ldl
collect2: ld returned 1 exit status
make[6]: *** [tic] Error 1

Before I start messing with the Makefile etc., what would you recommend I do?

FWIW, here are the Yum commands I sent on this Fedora 13 host before trying to compile things:

Code:


yum install binutils
yum install gcc
yum install glibc-devel
yum install ncurses
yum install zlib
yum install texinfo
yum update kernel*
reboot

Thank you.


Administrator has disabled public posting
admin
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Hi Gilles,

Probably you are missing libncurses-dev?

Luke, was installing his Fedora system recently probably he can advice you.

Cheers
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Thanks again.

So... first, to check what ncurses packages were available in the Fedora repo, I ran "yum list | grep -i ncurses" which returned the following:

Code:


ncurses.i686
ncurses-base.i686
ncurses-devel.i686
ncurses-libs.i686
ncurses-static.i686
ncurses-term.i686

Next, I tried installing the whole shebang, and install what was missing, if any:

Code:


yum install ncurses.i686 ncurses-base.i686 ncurses-devel.i686 ncurses-libs.i686 ncurses-static.i686 ncurses-term.i686

Finally, in /usr/src/switchfin, I ran: "make clean ; make menuconfig (chose IP01) ; make":

Code:


cc ../objects/tic.o ../objects/dump_entry.o  -I../progs -I../../ncurses-5.7/progs -DHAVE_CONFIG_H -I../../ncurses-5.7/progs/../include -I. -I../include  -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64  -DNDEBUG -O2 -g  --param max-inline-insns-single=1200 -static -L../lib -lncurses -L../lib -lncurses -dynamic  -ldl  -o tic
/usr/bin/ld: cannot find -ldl
collect2: ld returned 1 exit status
make[6]: *** [tic] Error 1
make[6]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/lib/ncurses/build-host-ncurses-5.7/progs'
make[5]: *** [host-build] Error 2
make[5]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/lib/ncurses'
make[4]: *** [build-host-ncurses-5.7/Makefile] Error 2
make[4]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/lib/ncurses'
make[3]: *** [ncurses] Error 2
make[3]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/lib'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist'
make: *** [uClinux] Error 2

Am I missing a requirement, or does the Makefile need some tickering to compile Switchfin for the Blackfin 532?

Thank you.


Administrator has disabled public posting
luckman212
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Hi guys,
well I never did have success compiling switchfin trunk on Fedora, despite many attempts.

I gave up and switched to Ubuntu 10.04, and after installing dependencies I was successful.

So you may try Ubuntu Gilles.... my recommendation.

I am not sure why Fedora is not working but I am guessing there are some dependencies that are not listed for uClinux somehow -- but I am not enough of  a linux guru to understand which ones.  So for now Ubuntu is working for me.  Try it and see.... let me know, if you still can't do it with Ubuntu I can tell you which packages I have loaded


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Mmm.. Does Switchfin take care of downloading all dependencies or could it be that some of them have to be downloaded by the user before?


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

People told me that I was simply missing this line:

Code:


yum install glibc-devel glibc-static

after deleting /usr/src/switchfin, downloading the latest SVN, and trying again, make did go OK for about 30mn on an Atom host, but at some point, I'm getting some warnings that end with an error:


[...]
make[4]: Entering directory `/usr/src/switchfin/build_ip01/uClinux-dist/user/login'
bfin-linux-uclibc-gcc -pipe -Wall -g -O2      -mcpu=bf532-0.5 -DEMBED -D__uClinux__ -I/usr/src/switchfin/build_ip01/uClinux-dist  -mcpu=bf532-0.5  -c -o login.o login.c
login.c: In function ‘main’:
login.c:69: warning: unused variable ‘realpwd’
bfin-linux-uclibc-gcc     -mcpu=bf532-0.5 -o login login.o -lcrypt
bfin-linux-uclibc-gcc -pipe -Wall -g -O2      -mcpu=bf532-0.5 -DEMBED -D__uClinux__ -I/usr/src/switchfin/build_ip01/uClinux-dist  -mcpu=bf532-0.5  -c -o passwd.o passwd.c
passwd.c: In function ‘main’:
passwd.c:114: warning: unused variable ‘cryptmode’
passwd.c: In function ‘set_password’:
passwd.c:108: warning: control reaches end of non-void function
bfin-linux-uclibc-gcc     -mcpu=bf532-0.5 -o passwd passwd.o -lcrypt
make[4]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/user/login'
[ ! -d "mtd-utils" ] || ( touch mtd-utils/.sgbuilt_user && make -C mtd-utils ) || exit $?
make[4]: Entering directory `/usr/src/switchfin/build_ip01/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[5]: Entering directory `/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/606f38a2221648ca5c5fa292c9f71d2ddd59fa66'
mkdir -p /usr/src/switchfin/build_ip01/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 /usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/mkfs.jffs2.o mkfs.jffs2.c -g -Wp,-MD,/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/.mkfs.jffs2.c.dep
mkfs.jffs2.c: In function ‘recursive_populate_directory’:
mkfs.jffs2.c:1336: warning: format ‘%9lu’ expects type ‘long unsigned int’, but argument 3 has type ‘__off64_t’
mkfs.jffs2.c:1345: warning: format ‘%9lu’ expects type ‘long unsigned int’, but argument 3 has type ‘__off64_t’
mkfs.jffs2.c:1354: warning: format ‘%9lu’ expects type ‘long unsigned int’, but argument 3 has type ‘__off64_t’
mkfs.jffs2.c:1384: warning: format ‘%9lu’ expects type ‘long unsigned int’, but argument 3 has type ‘__off64_t’
mkfs.jffs2.c:1395: warning: format ‘%9lu’ expects type ‘long unsigned int’, but argument 3 has type ‘__off64_t’
mkfs.jffs2.c: At top level:
mkfs.jffs2.c:1519: warning: initialization discards qualifiers from pointer target type
mkfs.jffs2.c:1521: warning: initialization discards qualifiers from pointer target type
mkfs.jffs2.c: In function ‘main’:
mkfs.jffs2.c:1881: warning: passing argument 2 of ‘recursive_add_host_directory’ discards qualifiers from pointer target type
mkfs.jffs2.c:403: note: expected ‘char *’ but argument is of type ‘const char *’
mkdir -p /usr/src/switchfin/build_ip01/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 /usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/crc32.o crc32.c -g -Wp,-MD,/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/.crc32.c.dep
mkdir -p /usr/src/switchfin/build_ip01/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 /usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/compr_rtime.o compr_rtime.c -g -Wp,-MD,/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/.compr_rtime.c.dep
compr_rtime.c: In function ‘jffs2_rtime_compress’:
compr_rtime.c:27: warning: unused parameter ‘model’
compr_rtime.c: In function ‘jffs2_rtime_decompress’:
compr_rtime.c:67: warning: unused parameter ‘srclen’
compr_rtime.c:67: warning: unused parameter ‘model’
compr_rtime.c: At top level:
compr_rtime.c:104: warning: initialization discards qualifiers from pointer target type
mkdir -p /usr/src/switchfin/build_ip01/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 /usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/compr_zlib.o compr_zlib.c -g -Wp,-MD,/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/.compr_zlib.c.dep
compr_zlib.c: In function ‘jffs2_zlib_compress’:
compr_zlib.c:54: warning: unused parameter ‘model’
compr_zlib.c: In function ‘jffs2_zlib_decompress’:
compr_zlib.c:102: warning: unused parameter ‘model’
compr_zlib.c: At top level:
compr_zlib.c:130: warning: initialization discards qualifiers from pointer target type
mkdir -p /usr/src/switchfin/build_ip01/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 /usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/compr_lzo.o compr_lzo.c -g -Wp,-MD,/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/.compr_lzo.c.dep
compr_lzo.c:29:23: error: lzo/lzo1x.h: No such file or directory
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)
compr_lzo.c:49: warning: unused parameter ‘model’
compr_lzo.c: In function ‘jffs2_lzo_decompress’:
compr_lzo.c:72: error: ‘lzo_uint’ undeclared (first use in this function)
compr_lzo.c:72: error: expected ‘;’ before ‘dl’
compr_lzo.c:74: warning: implicit declaration of function ‘lzo1x_decompress_safe’
compr_lzo.c:74: error: ‘dl’ undeclared (first use in this function)
compr_lzo.c:76: error: ‘LZO_E_OK’ undeclared (first use in this function)
compr_lzo.c:69: warning: unused parameter ‘model’
compr_lzo.c: At top level:
compr_lzo.c:84: warning: initialization discards qualifiers from pointer target type
compr_lzo.c: In function ‘jffs2_lzo_init’:
compr_lzo.c:95: error: ‘LZO1X_999_MEM_COMPRESS’ undeclared (first use in this function)
make[5]: *** [/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/compr_lzo.o] Error 1
make[5]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/606f38a2221648ca5c5fa292c9f71d2ddd59fa66'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils'
make[3]: *** [mtd-utils] Error 2
make[3]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/user'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist/user'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/usr/src/switchfin/build_ip01/uClinux-dist'
make: *** [uClinux] Error 2
#
Any idea what it could be?


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

I have a hint to explain the above, but I don't know the right way to correct this error:

My host is running Linux 2.6, why I still cannot build the uClinux-dist

Sometimes, on a Linux 2.6 system (e.g, Fedora Core), the mtd-utils header files (linux/mtd/*.h) do not exist in the default “include” path: /usr/include/, so you may get an error like:

$ gcc -I/usr/include -I. -o build/ftl_format ftl_format.c
ftl_format.c:51:27: error: linux/mtd/ftl.h: No such file or directory

In this case, please try to find the headers files for mtd-utils in the host kernel source tree (kernel source will be installed in /usr/src/ by default):

<kernel_src>/include/linux/mtd/.

If it is not there, you can copy (or link) the target mtd directory from <target_kernel_src>/uClinux-dist/linux-2.6.x/include/mtd/ to usr/include/linux/mtd. (which hopefully is a path that your host's gcc looks at for include files).

# ll /usr/src: no trace of linux or header:
drwxr-xr-x.  6 root root  4096 Jun  8 18:46 kernels
drwxr-xr-x. 14 root root  4096 Jun 10 10:05 uClinux-dist

cd /usr/src/kernels/2.6.33.5-112.fc13.i686/include/linux/mtd
ln -s



make[5]: Entering directory `/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/606f38a2221648ca5c5fa292c9f71d2ddd59fa66'

mkdir -p /usr/src/switchfin/build_ip01/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 /usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/compr_lzo.o compr_lzo.c -g -Wp,-MD,/usr/src/switchfin/build_ip01/uClinux-dist/user/mtd-utils/build-606f38a2221648ca5c5fa292c9f71d2ddd59fa66-host/.compr_lzo.c.dep

compr_lzo.c:29:23: error: lzo/lzo1x.h: No such file or directory
FYI, lzo.h can be found here:

/usr/src/kernels/2.6.33.5-112.fc13.i686/include/linux/

What would be a good way to configure the Switchfin makefile to solve this problem?


Administrator has disabled public posting
admin
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Hi Gilles,

Do you have lzo and lzo-devel installed on your system?

Please try to keep track what you have installed so we know the real Switchfin dependencies.

Thanks
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Thanks for the tip. After adding "yum install lzo lzo-devel" and re-running "make" followed by "make image", it worked :-)

I notice two things:

1. "make" creates both the uImage and u-boot-ldr: Am I correct in understanding that u-boot-ldr is a new bootloader, or is it some kind of glue between the new image and whatever bootloader is already installed in the Atcom appliance (which we'll keep using)?

If the former, do you recommend always building both the image and the bootloader, to avoid incompatibilities?

2. What are the following files in ./build_ip01/image_ip01/:

Code:


linux.ext2
rootfs.ext2
rootfs.ubifs
uImage
uImage.ext2
uImage-md5
vmImage
vmlinux

Thank you.


Administrator has disabled public posting
Albi90
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Hi Gilles

uImage-md5 - this file is used to upgrade the firmware via the GUI
uImage - this file is used yo upgrade the firmware via uboot/tftp

as Dimitar stated before dont worry about re-flashing uBoot, I would also recommend doing
make clean
make
make image

(sometimes only make and make image are required but to be safe you should clean)

if your system is running baps you will have to flash using uBoot/tftp over console see below howto
http://www.atcom.cn/downloads/IPPBX/IP0 … 409-EN.pdf


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Thanks, I'll first try just downloading an image with uBoot/TFTP and see how it goes.

Still, I'm curious about the other files. What are they?

Code:


linux.ext2
rootfs.ext2
rootfs.ubifs
uImage
uImage.ext2
uImage-md5
vmImage
vmlinux


Administrator has disabled public posting
admin
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Hi Gilles,

Please take a look at http://switchfin.org/index.php?option=c … id=54#p178


Gilles, can you share with us the dependencies you had to install on your Fedore box so you manage to compile Switchfin. It will be useful for the others. 

Thanks
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Yes, here's how I did it:

1. yum install binutils install gcc glibc-devel ncurses ncurses-devel zlib texinfo glibc-devel glibc-static lzo lzo-devel coreutils newt newt-devel
2. yum update kernel*
3. reboot
4. cd /usr/src
5. svn co https://switchfin.svn.sourceforge.net/s … fin/trunk/
  switchfin
6. cd switchfin
7. make menuconfig
8. make
9. make image: Output will be found in eg. ./build_{your_target}/image_{your_target}/:
* u-boot.ldr - u-boot image which you can load in your hardware target using JTAG programmer (like icebear) or serial interface (if you have already an old u-boot loaded).
* uImage - uClinux image + file system compressed in a single file. This image typically you load using the tftp support of u-boot or using the serial interface support of u-boot.
* uImage-md5 - This is the image above with 32 bytes MD5 check sum appended. This kind of image you can load directly (http or tftp) from the GUI of the PBX.
10. Install the new image (and possibly the bootloader) on the Atcom

FWIW, after succesfully compiling Switchfin on this Fedora 13 host, out of curiosity, I tried to compile AstFin2, and it fails with the familiar "termcap support not found". It looks like Fedora isn't putting files in the location or under the names that the makefile expects.


Administrator has disabled public posting
admin
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Hi Gilles,

Could you please put this in the FAQ section.

Best Regards
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Yes, I'll update the FAQ soon.


Administrator has disabled public posting
admin
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Hi Guys,

I had to compile Switchfin on new CentOS release 5.2. Let me share my notes before forget.

To the yum list of Gilles I had to add
zlib-devel lzo2 lzo2-devel

also I had to install uuid-devel from EPEL repository to get uuid.h
and copy it on the new location
cp /usr/include/uuid.h  /usr/include/uuid/

Also I had to disable the curl patch from package/uClinux-dist/uClinux-dist.mk
as I had newer version of curl installed on that PC 
#       patch -d $(UCLINUX_DIR) -p1 < package/uClinux-dist/common/curl.patch

Best Regards
Dimitar


Administrator has disabled public posting
ckleea
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Yes, you need zlib-devel lzo2 lzo2-devel

For curl.patch, it has resolved in the latest build. It defaults to so.4 not so.5


Administrator has disabled public posting
jbanos
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

Gilles I tried your procedure using Fedora 14, I get an error and I have no idea if it is a dependency or what. here is part of the log, any help will be appreciated.

Code:


Checked out revision 9645.
patch -d /usr/src/swichfin/build_ip04/uClinux-dist -p1 < package/uClinux-dist/common/dhcpd.patch
patching file user/busybox/busybox-1.16.1/networking/udhcp/dhcpd.c
mkdir -p /usr/src/swichfin/build_ip04/uClinux-dist/vendors/Rowetel/IP04/
mkdir -p /usr/src/swichfin/build_ip04/uClinux-dist/vendors/Rowetel/common/
cp -af package/uClinux-dist/vendors/Rowetel/IP04/* /usr/src/swichfin/build_ip04/uClinux-dist/vendors/Rowetel/IP04/
cp -af package/uClinux-dist/vendors/Rowetel/common/* /usr/src/swichfin/build_ip04/uClinux-dist/vendors/Rowetel/common
cp -af package/uClinux-dist/vendors/Rowetel/vendor.mak /usr/src/swichfin/build_ip04/uClinux-dist/vendors/Rowetel/
cat /usr/src/swichfin/build_ip04/config_tmp >> /usr/src/swichfin/build_ip04/uClinux-dist/vendors/Rowetel/IP04/config.linux-2.6.x
cat /usr/src/swichfin/build_ip04/config_tmp1 >> /usr/src/swichfin/build_ip04/uClinux-dist/vendors/Rowetel/IP04/config.vendor-2.6.x;
cp -af package/uClinux-dist/vendors/Rowetel/IP04/pre_config/ip04.c /usr/src/swichfin/build_ip04/uClinux-dist/linux-2.6.x/arch/blackfin/mach-bf533/boards/ip0x.c
ln -sf /usr/src/swichfin/build_ip04/uClinux-dist/vendors/Rowetel/IP04/config.linux-2.6.x /usr/src/swichfin/build_ip04/uClinux-dist/linux-2.6.x/arch/blackfin/configs/IP04_defconfig
make -j1 -C /usr/src/swichfin/build_ip04/uClinux-dist Rowetel/IP04_defconfig
make[1]: Entering directory `/usr/src/swichfin/build_ip04/uClinux-dist'
Makefile:287: *** mixed implicit and normal rules.  Stop.
make[1]: Leaving directory `/usr/src/swichfin/build_ip04/uClinux-dist'
make: *** [/usr/src/swichfin/build_ip04/uClinux-dist/.configured] Error 2


Administrator has disabled public posting
jbanos
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

I found the answer in the uClinux FAQ http://docs.blackfin.uclinux.org/doku.php?id=faq

"Busybox build fails with ''mixed implicit and normal rules''
Newer versions of GNU make changed their handling of implicit rules and did so in a backwards incompatible way. The latest versions in svn have been updated to address this. You can find the relevant commit here. "

I will try and post the results


Administrator has disabled public posting
jbanos
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

No luck, any Ideas how to do this? where can I change the makefile so it downloads the SVN instead of the 2009R1.1_RC4 tar of uClinux


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Reflashing Atcom IP01 with SwitchFin?

You'll have to read through the top-most Makefile used by Switchfin and make the necessary changes.

Note that using the latest uClinux-dist might generate other errors due to eg. incompatible patches that are part of Switchfin. You'll have to give it a try.


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 2587  Total Topics: 299  Total Polls: 1  Total Posts: 1727  Dormant
User Info:   Newest User :  user2553   Members Online: 0   Guests Online: 405
Online  There are no members online
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked