Projekat

Općenito

Profil

Akcije

Prijedlozi #17059

Zatvoren

openwrt 2.4 sa tomato kernelom i iptables from tomato

Dodano od Ernad Husremović prije oko 16 godina. Izmjenjeno prije oko 15 godina.

Status:
Odbačeno
Prioritet:
Normalan
Odgovorna osoba:
Kategorija:
-
Početak:
14.04.2009
Završetak:
% završeno:

70%

Procjena vremena:

Fajlovi

Hacking_The_WRT54G_Presentation.PDF (1,86 MB) Hacking_The_WRT54G_Presentation.PDF Ernad Husremović, 21.04.2009 21:42

Povezani tiketi 3 (0 otvoreno3 zatvorenih)

korelira sa router - Nove funkcije #16893: router 192.168.45.202 - kernel 2.4.37, iptables 1.4.1.1, step-by-stepOdbačenoErnad Husremović30.03.2009

Akcije
korelira sa developer toolbox - Podrška #17065: crosscompile arm on linuxOdbačeno16.04.2009

Akcije
korelira sa router - Podrška #17150: build tomato-aZatvorenoErnad Husremović24.04.2009

Akcije
Akcije #1

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/openwrt$ mkdir build_dir/include/

Akcije #2

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/tomato$ cp -av ./release/src/include/* /home/hernad/devel/git/openwrt/build_dir/include/

Akcije #3

Izmjenjeno od Ernad Husremović prije oko 16 godina

home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/linux/netdevice.h:750: warning: use of compound expressions as lvalues is deprecated                                                                                                                      
usbnet.c: In function `zaurus_tx_fixup':                                                                                                       
usbnet.c:1682: warning: implicit declaration of function `crc32_le'
usbnet.c: In function `usbnet_probe':
usbnet.c:2518: error: structure has no member named `ethtool_ops'  <<<<<<<<<<<<<<<<<(net_dev) <<<<<<<<<<<<<<<< 
usbnet.c: At top level:
usbnet.c:2755: error: variable `usbnet_ethtool_ops' has initializer but incomplete type
usbnet.c:2756: error: unknown field `get_drvinfo' specified in initializer
usbnet.c:2756: warning: excess elements in struct initializer
usbnet.c:2756: warning: (near initialization for `usbnet_ethtool_ops')
usbnet.c:2757: error: unknown field `get_link' specified in initializer
usbnet.c:2757: warning: excess elements in struct initializer
usbnet.c:2757: warning: (near initialization for `usbnet_ethtool_ops')
usbnet.c:2758: error: unknown field `get_msglevel' specified in initializer
usbnet.c:2758: warning: excess elements in struct initializer
usbnet.c:2758: warning: (near initialization for `usbnet_ethtool_ops')
usbnet.c:2759: error: unknown field `set_msglevel' specified in initializer
usbnet.c:2759: warning: excess elements in struct initializer
usbnet.c:2759: warning: (near initialization for `usbnet_ethtool_ops')
usbnet.c:2755: error: storage size of `usbnet_ethtool_ops' isn't known
make[7]: *** [usbnet.o] Error 1
make[7]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/drivers/usb'
make[6]: *** [_modsubdir_usb] Error 2
make[6]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/drivers'
make[5]: *** [_mod_drivers] Error 2
make[5]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato'
make[4]: *** [/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/.modules] Error 2
make[4]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux/brcm-2.4'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux'
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/home/hernad/devel/git/openwrt'
make[1]: *** [/home/hernad/devel/git/openwrt/staging_dir/target-mipsel_uClibc-0.9.29/stamp/.target_compile] Error 2
make[1]: Leaving directory `/home/hernad/devel/git/openwrt'
make: *** [world] Error 2

Akcije #4

Izmjenjeno od Ernad Husremović prije oko 16 godina

hajmo isključiti usb - to ćemo ovdje uraditi

hernad@nmraka-5:~/devel/git/openwrt$ ls target/linux/generic-2.4/config-default

hernad@nmraka-5:~/devel/git/openwrt$ ls target/linux/brcm-2.4/config-default

Akcije #5

Izmjenjeno od Ernad Husremović prije oko 16 godina

home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/inetpeer.h: In function `inet_putpeer':                
/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/inetpeer.h:51: warning: use of compound expressions as lvalues is deprecated                                                                                                                          
/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/inetpeer.h: In function `inet_getid':                  
/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/inetpeer.h:62: warning: use of compound expressions as lvalues is deprecated                                                                                                                          
In file included from /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/ip.h:39,                         
                 from /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/checksum.h:31,                   
                 from ip_nat_helper.c:24:
/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/sock.h: In function `sock_orphan':
/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/sock.h:1017: warning: use of compound expressions as lvalues is deprecated
/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/sock.h: In function `sock_graft':
/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/sock.h:1026: warning: use of compound expressions as lvalues is deprecated
ip_nat_helper.c: In function `ip_nat_resize_packet':
ip_nat_helper.c:101: warning: use of compound expressions as lvalues is deprecated
ip_nat_helper.c: In function `ip_nat_helper_register':
ip_nat_helper.c:480: error: syntax error before string constant <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
ip_nat_helper.c:509: warning: use of compound expressions as lvalues is deprecated
ip_nat_helper.c: In function `ip_nat_helper_unregister':
ip_nat_helper.c:530: warning: use of compound expressions as lvalues is deprecated
ip_nat_helper.c:534: warning: use of compound expressions as lvalues is deprecated
ip_nat_helper.c:558: error: syntax error before string constant
ip_nat_helper.c:558: warning: left-hand operand of comma expression has no effect
ip_nat_helper.c:558: error: syntax error before ')' token
make[7]: *** [ip_nat_helper.o] Error 1
make[7]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net/ipv4/netfilter'
make[6]: *** [_modsubdir_ipv4/netfilter] Error 2
make[6]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net'
make[5]: *** [_mod_net] Error 2
make[5]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato'
make[4]: *** [/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/.modules] Error 2
make[4]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux/brcm-2.4'
make[3]: *** [compile] Error 2
make[3]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux'
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory `/home/hernad/devel/git/openwrt'
make[1]: *** [/home/hernad/devel/git/openwrt/staging_dir/target-mipsel_uClibc-0.9.29/stamp/.target_compile] Error 2
make[1]: Leaving directory `/home/hernad/devel/git/openwrt'
make: *** [world] Error 2
        if (me->me && !(me->flags & IP_NAT_HELPER_F_STANDALONE)) {
                struct ip_conntrack_helper *ct_helper;

                if ((ct_helper = ip_ct_find_helper(&me->tuple))
                    && ct_helper->me) {
                        __MOD_DEC_USE_COUNT(ct_helper->me);
                } else
                        printk(__FUNCTION__ ": unable to decrement usage count" 
                               " of conntrack helper %s\n", me->me->name);  <<<<<<<<<<<<<<<<<<<<<<<< sporna linija (ja sam ovo sastavio) i izbacio __FUNCTION__ (ovo isto uradio i na liniji 480 ovog fajla
        }

očigledno da FUNCTION macro nije definisan

Akcije #6

Izmjenjeno od Ernad Husremović prije oko 16 godina

tcp_ipv6.c:351: warning: use of compound expressions as lvalues is deprecated
tcp_ipv6.c: In function `tcp_v6_search_req':
tcp_ipv6.c:391: error: `ip6h' undeclared (first use in this function)
tcp_ipv6.c:391: error: (Each undeclared identifier is reported only once
tcp_ipv6.c:391: error: for each function it appears in.)
tcp_ipv6.c: In function `tcp_v6_check_established':
Akcije #7

Izmjenjeno od Ernad Husremović prije oko 16 godina

  1. CONFIG_IPV6 is not set

stavio na obje lokacije

hernad@nmraka-5:~/devel/git/openwrt$ vi /home/hernad/devel/git/openwrt/target/linux/brcm-2.4/config-default
hernad@nmraka-5:~/devel/git/openwrt$ vi /home/hernad/devel/git/openwrt/target/linux/generic-2.4/config-default

Akcije #8

Izmjenjeno od Ernad Husremović prije oko 16 godina

ali ništa to ne pije vode

a sad vidim da se to ovdje nalazi u tools ?!

tools/brcm/hndtools-mipsel-linux-3.2.3/mipsel-linux/sys-include/netinet/ip6.h:    uint8_t  ip6h_nxt;        /* next hesder.  */
tools/brcm/hndtools-mipsel-linux-3.2.3/mipsel-linux/sys-include/netinet/ip6.h:    uint8_t  ip6h_len;        /* length in units of 8 octets.  */

Akcije #9

Izmjenjeno od Ernad Husremović prije oko 16 godina

na openwrt-u

hernad@nmraka-5:~/devel/git/openwrt$ find -name ip6.h

./staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/usr/include/netinet/ip6.h

Akcije #10

Izmjenjeno od Ernad Husremović prije oko 16 godina

???

hernad@nmraka-5:~/devel/git/tomato$ cp -rv tools/brcm/hndtools-mipsel-uclibc-0.9.19/include/* ~/devel/git/openwrt/staging_dir.orig/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/usr/include/

Akcije #11

Izmjenjeno od Ernad Husremović prije oko 16 godina

kako tomato compajlira:

mipsel-linux-gcc -Wall -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -Os -fno-builtin -nostdinc -D_LIBC -I../../include -I. -I*/opt/brcm/hndtools-mipsel-linux-3.2.3/lib/gcc-lib/mipsel-linux/3.2.3/include* -DNDEBUG -fPIC -I../../libpthread/linuxthreads/sysdeps/unix/sysv/linux -I../../libpthread/linuxthreads/sysdeps/pthread -I../../libpthread/linuxthreads/sysdeps/unix/sysv -I../../libpthread/linuxthreads/sysdeps/unix/unix -I../../libpthread/linuxthreads/sysdeps/mipsel -I../../libpthread/linuxthreads/sysdeps -I../../libc/sysdeps/linux/mipsel -c specific.c -o specific.o

Akcije #12

Izmjenjeno od Ernad Husremović prije oko 16 godina

što se tiče config-a ovdje su tomato-vi pa ću njih staviti u brcm-2.4:

hernad@nmraka-5:~/devel/git/tomato$ cp release/src/linux/linux/arch/mips/defconfig-bcm947xx /home/hernad/devel/git/openwrt/target/linux/brcm-2.4

Akcije #13

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/tomato/release/src$ find -name et.o

./et/linux/et.o
./router/et/et.o

ručno ću ga "dati" openwrt-u:

hernad@nmraka-5:~/devel/git/tomato/release/src$ cp et/linux/et.o /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/drivers/net/et/
hernad@nmraka-5:~/devel/git/tomato/release/src$ ls et/linux/et.o l
-rw-r--r-
1 hernad hernad 37568 2009-04-03 20:13 et/linux/et.o

Akcije #14

Izmjenjeno od Ernad Husremović prije oko 16 godina

et.0 (proprietary brcm driver)

hernad@nmraka-5:~/devel/git/tomato$ cp ./release/src/et/linux/et.o ../openwrt/et/linux/

hernad@nmraka-5:~/devel/git/openwrt$ cp build_dir/linux-brcm-2.4/linux-2.4.20-tomato/.config target/linux/brcm-2.4/config-default

Akcije #15

Izmjenjeno od Ernad Husremović prije oko 16 godina

evo gdje treba biti - u build_dir

/home/hernad/devel/git/openwrt/build_dir/et/linux

Akcije #16

Izmjenjeno od Ernad Husremović prije oko 16 godina

evo ispravnog kopiranja:

hernad@nmraka-5:~/devel/git/tomato$ cp ./release/src/et/linux/et.o ../openwrt/build_dir/et/linux/

Akcije #17

Izmjenjeno od Ernad Husremović prije oko 16 godina

i ovo je binarni driver

./release/src/linux/linux/drivers/net/wl/wl_ap_onchip_g
./release/src/linux/linux/drivers/net/wl/wl_apsta_onchip_g
./release/src/linux/linux/drivers/net/wl/wl_apsta
./release/src/linux/linux/drivers/net/wl/wl_ap

jedini obj fajl je ovaj u tomato-u:

./release/src/wl/linux/wl_apsta.o
hernad@nmraka-5:~/devel/git/tomato$ ls l ./release/src/wl/linux/wl_apsta.o
-rw-r--r-
1 hernad hernad 9445222 2009-04-03 20:13 ./release/src/wl/linux/wl_apsta.o

ručno u openwrt-u na ovoj lokaciji

hernad@nmraka-5:~/devel/git/openwrt$ mkdir -p /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/../../wl/linux/
hernad@nmraka-5:~/devel/git/openwrt$ cd /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/../../wl/linux/
hernad@nmraka-5:~/devel/git/openwrt/build_dir/wl/linux$

Akcije #18

Izmjenjeno od Ernad Husremović prije oko 16 godina

podesio config-default u openwrt-u target brcm-24

# CONFIG_WL_USE_AP is not set
# CONFIG_WL_USE_STA is not set
CONFIG_WL_USE_APSTA=y
# CONFIG_WL_USE_AP_ONCHIP_G is not set
# CONFIG_WL_USE_STA_ONCHIP_G is not set
# CONFIG_WL_USE_APSTA_ONCHIP_G is not set

Akcije #19

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/tomato$ cp ./release/src/wl/linux/wl_apsta.o /home/hernad/devel/git/openwrt/build_dir/wl/linux/

Akcije #20

Izmjenjeno od Ernad Husremović prije oko 16 godina

/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/net/inetpeer.h:62: warning: use of compound expressions as lvalues is deprecated                                                                                                                          
ip_gre.c: In function `ipgre_tunnel_link':                                                                                                     
ip_gre.c:221: warning: use of compound expressions as lvalues is deprecated                                                                    
ip_gre.c: In function `ipgre_tunnel_unlink':                                                                                                   
ip_gre.c:232: warning: use of compound expressions as lvalues is deprecated                                                                    
make[7]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net/ipv4'                              
make -C ipv4/netfilter modules                                                                                                                 
make[7]: Entering directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net/ipv4/netfilter'                   
make[7]: *** No rule to make target `ip_conntrack_quake3.c', needed by `ip_conntrack_irc.o'.  <<<<<<<<<<<<<<<<<<<<<  Stop.                                            
make[7]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net/ipv4/netfilter'                    
make[6]: *** [_modsubdir_ipv4/netfilter] Error 2                                                                                               
make[6]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net'                                   
make[5]: *** [_mod_net] Error 2                                                                                                                
make[5]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato'                                       
make[4]: *** [/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/.modules] Error 2                                    
make[4]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux/brcm-2.4'                                                              
make[3]: *** [compile] Error 2                                                                                                                 
make[3]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux'                                                                       
make[2]: *** [target/linux/compile] Error 2                                                                                                    
make[2]: Leaving directory `/home/hernad/devel/git/openwrt'                                                                                    
make[1]: *** [/home/hernad/devel/git/openwrt/staging_dir/target-mipsel_uClibc-0.9.29/stamp/.target_compile] Error 2                            
make[1]: Leaving directory `/home/hernad/devel/git/openwrt'                                                                                    
make: *** [world] Error 2 
Akcije #21

Izmjenjeno od Ernad Husremović prije oko 16 godina

CONFIG_NF_LAYER7 nije bilo setovano sad sam to uradio

Akcije #22

Izmjenjeno od Ernad Husremović prije oko 16 godina

u configu isključio QUAKE3 netfilter

Akcije #23

Izmjenjeno od Ernad Husremović prije oko 16 godina

IPV6 - not set u tomato-u

Akcije #24

Izmjenjeno od Ernad Husremović prije oko 16 godina

openwrt/.config

#CONFIG_BUSYBOX_CONFIG_FEATURE_IPV6 is not set

Akcije #25

Izmjenjeno od Ernad Husremović prije oko 16 godina

sa make menuconfig isključio proprieatary wl broadcom driver (on je već uključen u kernelu)

Akcije #26

Izmjenjeno od Ernad Husremović prije oko 16 godina

openwrt build

networking/brctl.c: In function `brctl_main':
networking/brctl.c:189: error: `SIOCBRADDBR' undeclared (first use in this function)
networking/brctl.c:189: error: (Each undeclared identifier is reported only once
networking/brctl.c:189: error: for each function it appears in.)
networking/brctl.c:189: error: `SIOCBRDELBR' undeclared (first use in this function)
networking/brctl.c:217: error: `SIOCBRADDIF' undeclared (first use in this function)
networking/brctl.c:217: error: `SIOCBRDELIF' undeclared (first use in this function)

hernad@nmraka-5:/usr/src/linux-headers-2.6.28-11-generic$ grep -r "SIOC"

include/linux/sockios.h:#define SIOCBRADDBR     0x89a0          /* create new bridge device     */
include/linux/sockios.h:#define SIOCBRDELBR     0x89a1          /* remove bridge device         */
include/linux/sockios.h:#define SIOCBRADDIF     0x89a2          /* add interface to bridge      */
include/linux/sockios.h:#define SIOCBRDELIF     0x89a3          /* remove interface from bridge */

Akcije #27

Izmjenjeno od Ernad Husremović prije oko 16 godina

dodao u uClibc/usr/include/linux

hernad@nmraka-5:~/devel/git/openwrt$ ls ./staging_dir.orig/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/usr/include/linux/sockios.h
./staging_dir.orig/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/usr/include/linux/sockios.h

Akcije #28

Izmjenjeno od Ernad Husremović prije oko 16 godina

ništa ovo dodavanje ne pije vode

Akcije #29

Izmjenjeno od Ernad Husremović prije oko 16 godina

ni ovo

hernad@nmraka-5:~/devel/git/openwrt$ vi ./build_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/linux-2.4.20-tomato/include/linux/sockios.h

Akcije #30

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/openwrt$ find -name sockios.h | grep \/linux\/

./staging_dir.orig/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/usr/include/linux/sockios.h
./staging_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/usr/include/linux/sockios.h
./build_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/uClibc-dev/usr/include/linux/sockios.h
./build_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/linux-2.4.20-tomato/include/linux/sockios.h
./build_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/linux-dev/usr/include/linux/sockios.h
./build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/linux/sockios.h

i ovdje dodao hernad@nmraka-5:~/devel/git/openwrt$ vi ./build_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/uClibc-dev/usr/include/linux/sockios.

#define SIOCBRADDBR     0x89a0   
#define SIOCBRDELBR     0x89a1       
#define SIOCBRADDIF     0x89a2    
#define SIOCBRDELIF     0x89a3
Akcije #31

Izmjenjeno od Ernad Husremović prije oko 16 godina

pokušao i ovdje

hernad@nmraka-5:~/devel/git/openwrt$ vi ./build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/linux/sockios.h

ali opet isti error :(

staviću direktno u c fajl:

hernad@nmraka-5:~/devel/git/openwrt$ vi ./build_dir/target-mipsel_uClibc-0.9.29/busybox-1.11.3/networking/brctl.c

Akcije #32

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/openwrt$ cat ./build_dir/toolchain-mipsel_gcc-3.4.6_uClibc-0.9.29/linux-2.4.20-tomato/include/linux/kernel.h | grep FUNCTION

#define __FUNCTION__ (__func__)

Akcije #33

Izmjenjeno od Ernad Husremović prije oko 16 godina

ništa opet isti error dodao FUNCTION direktno u source

hernad@nmraka-5:~/devel/git/openwrt$ vi ./build_dir/linux-brcm-2.4/linux-2.4.20-tomato/drivers/mtd/mtdblock_ro.c

Akcije #34

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://midge.vlad.org.ua/forum/viewtopic.php?t=654

ovdje:http://www.cs.helsinki.fi/linux/linux-kernel/2002-34/0954.html našao da se neki kompajleri žale na FUNCTION na ovaj način

pa sam napravio promjenu da to bude string

                if (MINOR(req->rq_dev) >= MAX_MTD_DEVICES)
                        panic(" %s : minor out of bound", __FUNCTION__);

Akcije #35

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://forum.openwrt.org/viewtopic.php?id=9180

2.1 Configure Kamikaze (select target system) and the packages (a full build with all packages selected requires about 9GB of free disk space)

make menuconfig

2.2 If you select extra packages it's a good idea to check if you have all prerequisites installed. Check with:

make prereq

TIP: To find the missing packages search at http://packages.ubuntu.com/

2.3 Finally build Kamikaze (to download all packages at once use 'make download world')

make world

3. After the build finished, ready to use images can be found in $(TOPDIR)/bin

Targets for 'make'

download
download all source tarballs (from the selected packages and it's dependencies) at once before starting the build

prereq
checks if you have all prerequisites installed on the host-system for building the selected packages

world
build everything

tools/install toolchain/install
only build the tools and the toolchain

clean
cleans the packages (NOT the tools and toolchain)

distclean
cleans up everything expect $(TOPDIR)/.config and $(TOPDIR)/dl/

package/<package_name>-{clean,compile}
rebuild a single package

package/index
updates $(TOPDIR)/bin/packages/Packages

V=99
turns on debugging

make kernel_menuconfig
If you want, you can also modify the kernel config for the selected target system. Simply run "make kernel_menuconfig"
and the build system will unpack the kernel sources (if necessary), run menuconfig inside of the kernel tree, and then
copy the kernel config to target/linux/<platform>/config so that it is preserved over "make clean" call.

hernad@nmraka-5:~/devel/git/openwrt$ make kernel_menuconfig

broadcom HND (home network driver)

Akcije #36

Izmjenjeno od Ernad Husremović prije oko 16 godina

al opet problem

make[9]: Entering directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/drivers/net/hnd'
Makefile:64: warning: overriding commands for target `bcmutils.o'
Makefile:59: warning: ignoring old commands for target `bcmutils.o'
sh -e shared_ksyms.sh  bcmrobo.o > shared_ksyms.c
mipsel-openwrt-linux-uclibc-nm: 'bcmrobo.o': No such file <<<<<<<<<<<<<<<<<<<
mipsel-openwrt-linux-uclibc-gcc -D__KERNEL__ -I/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/../../include -DBCMDRIVER -I /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/asm/gcc-G 0 -mno-abicalls -fno-pic -pipe -I /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/../../ -mtune=r4600 -mips2 -Wa,--trap     -DBCM5354 -nostdinc -iwithprefix include -DKBUILD_BASENAME=  -DEXPORT_SYMTAB -c shared_ksyms.c
rm -f hnd.o
mipsel-openwrt-linux-uclibc-ld  -r -o hnd.o shared_ksyms.o bcmrobo.o
mipsel-openwrt-linux-uclibc-ld: bcmrobo.o: No such file: No such file or directory

Akcije #37

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/tomato$ ls -l ./release/src/linux/linux/drivers/net/hnd/bcmrobo.o

-rw-r--r-- 1 hernad hernad 12184 2009-04-15 00:45 ./release/src/linux/linux/drivers/net/hnd/bcmrobo.o

Akcije #38

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/tomato$ cp ./release/src/linux/linux/drivers/net/hnd/bcmrobo.o /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/drivers/net/hnd/

Akcije #39

Izmjenjeno od Ernad Husremović prije oko 16 godina

dev.c:111:21: cy_conf.h: No such file or directory     <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<                                                                                        
dev.c: In function `dev_add_pack':                                                                                                             
dev.c:257: warning: use of compound expressions as lvalues is deprecated                                                                       
dev.c: In function `dev_remove_pack':                                                                                                          
dev.c:291: warning: use of compound expressions as lvalues is deprecated                                                                       
dev.c:295: warning: use of compound expressions as lvalues is deprecated                                                                       
dev.c: In function `dev_queue_xmit':                                                                                                           
dev.c:1034: warning: use of compound expressions as lvalues is deprecated                                                                      
dev.c:1063: warning: use of compound expressions as lvalues is deprecated                                                                      
dev.c:1068: warning: use of compound expressions as lvalues is deprecated
dev.c:1079: warning: use of compound expressions as lvalues is deprecated
dev.c: In function `net_rx_action':
dev.c:1612: warning: use of compound expressions as lvalues is deprecated
dev.c: In function `netdev_set_master':
dev.c:1881: warning: use of compound expressions as lvalues is deprecated
dev.c: In function `dev_ifsioc':
dev.c:2018: warning: unused variable `stats'
dev.c: In function `register_netdevice':
dev.c:2491: warning: use of compound expressions as lvalues is deprecated
dev.c: In function `unregister_netdevice':
dev.c:2560: warning: use of compound expressions as lvalues is deprecated
dev.c:2571: warning: use of compound expressions as lvalues is deprecated
dev.c: In function `net_dev_init':
dev.c:2791: warning: use of compound expressions as lvalues is deprecated
make[8]: *** [dev.o] Error 1
make[8]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net/core'
make[7]: *** [first_rule] Error 2
make[7]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net/core'
make[6]: *** [_subdir_core] Error 2
make[6]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net'
make[5]: *** [_dir_net] Error 2
make[5]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato'
make[4]: *** [/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/.image] Error 2
make[4]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux/brcm-2.4'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux'
make[2]: *** [target/linux/install] Error 2
make[2]: Leaving directory `/home/hernad/devel/git/openwrt'
make[1]: *** [/home/hernad/devel/git/openwrt/staging_dir/target-mipsel_uClibc-0.9.29/stamp/.target_install] Error 2
make[1]: Leaving directory `/home/hernad/devel/git/openwrt'
make: *** [world] Error 2

Akcije #40

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/tomato$ find -name cy_conf.h

./release/src/cy_conf.h

Akcije #41

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/tomato$ cp ./release/src/cy_conf.h /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/

Akcije #42

Izmjenjeno od Ernad Husremović prije oko 16 godina

ipt_TRIGGER.c:132: warning: use of compound expressions as lvalues is deprecated
rm -f netfilter.o
mipsel-openwrt-linux-uclibc-ld  -r -o netfilter.o ip_conntrack.o ip_conntrack_h323.o ip_nat_h323.o ip_conntrack_proto_gre.o ip_nat_proto_gre.oip_conntrack_proto_esp.o ip_nat_proto_esp.o ip_conntrack_pptp.o ip_conntrack_sip.o ip_conntrack_tftp.o ip_conntrack_ftp.o ip_conntrack_rtsp.o ip_nat_rtsp.o ip_nat_cuseeme.o ip_nat_pptp.o ip_nat_sip.o ip_nat_tftp.o ip_nat_ftp.o ip_tables.o iptable_filter.o iptable_mangle.o iptable_nat.o ipt_limit.o ipt_mark.o ipt_mac.o ipt_tos.o ipt_time.o ipt_state.o ipt_webstr.o ipt_tcpmss.o ipt_REJECT.o ipt_TOS.o ipt_DSCP.o ipt_MARK.o ipt_MASQUERADE.o ipt_REDIRECT.o ipt_LOG.o ipt_TCPMSS.o ip_autofw.o ipt_TRIGGER.o
mipsel-openwrt-linux-uclibc-ld: ip_nat_cuseeme.o: No such file: No such file or directory
make[8]: *** [netfilter.o] Error 1
make[8]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net/ipv4/netfilter'
make[7]: *** [first_rule] Error 2
make[7]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net/ipv4/netfilter'
make[6]: *** [_subdir_ipv4/netfilter] Error 2
make[6]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/net'
Akcije #43

Izmjenjeno od Ernad Husremović prije oko 16 godina

sa make kernel_menuconfig isključio ip_nat_cusemee filter (tu je i quake3 takođe je isključen)

Akcije #44

Izmjenjeno od Ernad Husremović prije oko 16 godina

h/mips/brcm-boards/generic
make[6]: Entering directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/arch/mips/brcm-boards/generic'
make all_targets
make[7]: Entering directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/arch/mips/brcm-boards/generic'
rm -f brcm.o
mipsel-openwrt-linux-uclibc-ld  -r -o brcm.o int-handler.o
mipsel-openwrt-linux-uclibc-ld: int-handler.o: No such file: No such file or directory
make[7]: *** [brcm.o] Error 1
make[7]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/arch/mips/brcm-boards/generic'
make[6]: *** [first_rule] Error 2
make[6]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/arch/mips/brcm-boards/generic'
make[5]: *** [_dir_arch/mips/brcm-boards/generic] Error 2
make[5]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato'
make[4]: *** [/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/.image] Error 2
make[4]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux/brcm-2.4'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux
Akcije #45

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/tomato$ cp ./release/src/linux/linux/arch/mips/brcm-boards/generic/*.o /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/arch/mips/brcm-boards/generic/

ne kontam zašto ovi obj fajlova nema u openwrt-u pa sve sam zapakovao

Akcije #46

Izmjenjeno od Ernad Husremović prije oko 16 godina

još obj fajlova trebamo


./release/src/linux/linux/arch/mips/brcm-boards/bcm947xx/hndmips.o
./release/src/linux/linux/arch/mips/brcm-boards/bcm947xx/compressed/hndmips.o

hernad@nmraka-5:~/devel/git/tomato$ cp ./release/src/linux/linux/arch/mips/brcm-boards/bcm947xx/*.o /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/arch/mips/brcm-boards/bcm947xx
Akcije #47

Izmjenjeno od Ernad Husremović prije oko 16 godina

hah i opet završi sa milion error-a

drivers/net/net.o: In function `gpio_enable':                                                                                                  
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x81b8): undefined reference to `sb_gpioout'                                 
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x81b8): relocation truncated to fit: R_MIPS_26 against `sb_gpioout'         
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x81dc): undefined reference to `sb_gpioouten'                               
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x81dc): relocation truncated to fit: R_MIPS_26 against `sb_gpioouten'       
drivers/net/net.o: In function `gpio_disable':                                                                                                 
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x8218): undefined reference to `sb_gpioouten'                               
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x8218): relocation truncated to fit: R_MIPS_26 against `sb_gpioouten'       
drivers/net/net.o: In function `spi_write':                                                                                                    
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x8274): undefined reference to `sb_gpioout'                                 
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x8274): relocation truncated to fit: R_MIPS_26 against `sb_gpioout'         
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x827c): undefined reference to `osl_delay'                                  
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x827c): relocation truncated to fit: R_MIPS_26 against `osl_delay'          
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x82a4): undefined reference to `sb_gpioout'                                 
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x82a4): relocation truncated to fit: R_MIPS_26 against `sb_gpioout'         
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x82ac): undefined reference to `osl_delay'                                  
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x82ac): relocation truncated to fit: R_MIPS_26 against `osl_delay'          
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x82c0): undefined reference to `sb_gpioout'                                 
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x82c0): relocation truncated to fit: R_MIPS_26 against `sb_gpioout'         
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x82c8): undefined reference to `osl_delay'                                  
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x82c8): relocation truncated to fit: R_MIPS_26 against `osl_delay'          
drivers/net/net.o: In function `spi_read':                                                                                                     
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x8384): undefined reference to `sb_gpioout'                                 
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x8384): relocation truncated to fit: R_MIPS_26 against `sb_gpioout'         
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x838c): undefined reference to `osl_delay'                                  
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x838c): additional relocation overflows omitted from the output             
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x8394): undefined reference to `sb_gpioin'                                  
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x83bc): undefined reference to `sb_gpioout'                                 
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x83c4): undefined reference to `osl_delay'                                  
drivers/net/net.o: In function `spi_select':                                                                                                   
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x845c): undefined reference to `sb_gpioout'                                 
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x8464): undefined reference to `osl_delay'                                  
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8a9c): undefined reference to `sb_osh'                                                                                                
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8aa8): undefined reference to `osl_malloc'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8af4): undefined reference to `getgpiopin'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8b1c): undefined reference to `sb_gpioout'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8b30): undefined reference to `sb_gpioouten'                                                                                          
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8b38): undefined reference to `bcm_mdelay'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8b4c): undefined reference to `sb_gpioout'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8b54): undefined reference to `bcm_mdelay'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8bf8): undefined reference to `getgpiopin'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8c20): undefined reference to `getgpiopin'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8c40): undefined reference to `getgpiopin'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8c60): undefined reference to `getgpiopin'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8d58): undefined reference to `sb_coreidx'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8d6c): undefined reference to `sb_setcore'                                                                                            
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8d7c): undefined reference to `sb_setcoreidx'                                                                                         
drivers/net/net.o: In function `bcm_robo_attach':                                                                                              
(.text+0x8d90): undefined reference to `sb_core_reset'                                                                                         
drivers/net/net.o: In function `bcm_robo_detach':                                                                                              
(.text+0x8db0): undefined reference to `sb_osh'                                                                                                
drivers/net/net.o: In function `bcm_robo_detach':                                                                                              
(.text+0x8dc0): undefined reference to `osl_mfree'                                                                                             
drivers/net/net.o: In function `bcm_robo_config_vlan':                                                                                         
(.text+0x90ec): undefined reference to `sb_chip'                                                                                               
drivers/net/net.o: In function `bcm_robo_config_vlan':                                                                                         
(.text+0x9334): undefined reference to `getvar'                                                                                                
drivers/net/net.o: In function `bcm_robo_config_vlan':                                                                                         
(.text+0x937c): undefined reference to `bcmstrstr'                                                                                             
drivers/net/net.o: In function `bcm_robo_config_vlan':                                                                                         
(.text+0x93d4): undefined reference to `bcm_atoi'                                                                                              
drivers/net/net.o: In function `bcm_robo_config_vlan':                                                                                         
(.text+0x9580): undefined reference to `osl_delay'                                                                                             
drivers/net/net.o: In function `bcm_robo_config_vlan':                                                                                         
(.text+0x9650): undefined reference to `osl_delay'                                                                                             
drivers/net/net.o: In function `bcm_robo_port_monitor':                                                                                        
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x99a0): undefined reference to `sb_gpioouten'                               
/home/hernad/devel/git/tomato/release/src/shared/bcmrobo.c:(.text+0x99b4): undefined reference to `sb_gpioout'                                 
drivers/mtd/mtdlink.o: In function `sflash_init':                                                                                              
(.text+0x8c24): undefined reference to `sb_osh'                                                                                                
drivers/mtd/mtdlink.o: In function `sflash_read':                                                                                              
(.text+0x8f04): undefined reference to `sb_osh'                                                                                                
drivers/mtd/mtdlink.o: In function `sflash_read':                                                                                              
(.text+0x8f78): undefined reference to `sb_osh'                                                                                                
drivers/mtd/mtdlink.o: In function `sflash_poll':                                                                                              
(.text+0x9004): undefined reference to `sb_osh'                                                                                                
drivers/mtd/mtdlink.o: In function `sflash_write':                                                                                             
(.text+0x90f8): undefined reference to `sb_osh'                                                                                                
drivers/mtd/mtdlink.o: In function `sflash_write':                                                                                             
(.text+0x91c0): undefined reference to `SPINWAIT'                                                                                              
drivers/mtd/mtdlink.o: In function `sflash_erase':                                                                                             
(.text+0x9488): undefined reference to `sb_osh'                                                                                                
drivers/mtd/mtdlink.o: In function `sflash_commit':                                                                                            
(.text+0x9584): undefined reference to `sb_osh'                                                                                                
drivers/mtd/mtdlink.o: In function `sflash_commit':                                                                                            
(.text+0x95c8): undefined reference to `osl_malloc'                                                                                            
drivers/mtd/mtdlink.o: In function `sflash_commit':                                                                                            
(.text+0x9730): undefined reference to `osl_mfree'                                                                                             
drivers/mtd/mtdlink.o: In function `init_mtd_partitions':                                                                                      
(.text.init+0x1a4): undefined reference to `ROUNDUP'                                                                                           
drivers/mtd/mtdlink.o: In function `init_mtd_partitions':                                                                                      
(.text.init+0x1b8): undefined reference to `ROUNDUP'                                                                                           
drivers/mtd/mtdlink.o: In function `init_mtd_partitions':                                                                                      
(.text.init+0x594): undefined reference to `crc32_le'                                                                                          
drivers/isdn/vmlinux-obj.o: In function `isdn_net_dial':                                                                                       
(.text+0xa68): undefined reference to `strcpy'                                                                                                 
drivers/isdn/vmlinux-obj.o: In function `isdn_net_dial':                                                                                       
(.text+0xf3c): undefined reference to `strcpy'                                                                                                 
drivers/isdn/vmlinux-obj.o: In function `isdn_tty_write':                                                                                      
isdn_tty.c:(.text+0xa21c): undefined reference to `strcpy'                                                                                     
isdn_tty.c:(.text+0xa238): undefined reference to `strcpy'                                                                                     
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm947xx_machine_halt':                                                                
(.text+0x90): undefined reference to `sb_watchdog'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `get_system_type':                                                                      
(.text+0xe8): undefined reference to `sb_chip'                                                                                                 
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `get_system_type':                                                                      
(.text+0xf8): undefined reference to `sb_chiprev'                                                                                              
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `wlan_led_init':                                                                        
time.c:(.text+0x128): undefined reference to `sb_kattach'                                                                                      
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `gpio_led_on_off':                                                                      
time.c:(.text+0x188): undefined reference to `sb_gpioout'                                                                                      
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm947xx_timer_interrupt':                                                             
time.c:(.text+0x398): undefined reference to `sb_chip'                                                                                         
time.c:(.text+0x3d4): undefined reference to `sb_watchdog'                                                                                     
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_getirq':                                                                            
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x798): undefined reference to `sb_osh'                                      
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x7a0): undefined reference to `sb_flag'                                     
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x7ac): undefined reference to `sb_coreidx'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x7c0): undefined reference to `sb_setcore'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x82c): undefined reference to `sb_setcoreidx'                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_irq':                                                                               
(.text+0x894): undefined reference to `sb_flag'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_clearirq':                                                                          
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x8c0): undefined reference to `sb_osh'                                      
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x8d0): undefined reference to `sb_setcore'                                  
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_setirq':                                                                            
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x940): undefined reference to `sb_osh'                                      
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x950): undefined reference to `sb_setcore'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x958): undefined reference to `sb_flag'                                     
/home/hernad/devel/git/tomato/release/src/shared/hndmips.c:(.text+0x984): undefined reference to `sb_setcore'                                  
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_init':                                                                         
(.text+0xa44): undefined reference to `sb_osh'                                                                                                 
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_init':                                                                         
(.text+0xa4c): undefined reference to `sb_clock'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_init':                                                                         
(.text+0xa84): undefined reference to `sb_setcore'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_init':                                                                         
(.text+0xaf0): undefined reference to `sb_chip'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_init':                                                                         
(.text+0xbd8): undefined reference to `sb_chip'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_init':                                                                         
(.text+0xbec): undefined reference to `sb_chip'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_init':                                                                         
(.text+0xc00): undefined reference to `sb_chiprev'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_init':                                                                         
(.text+0xc18): undefined reference to `sb_chip'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_cpu_clock':                                                                         
(.text+0xc70): undefined reference to `sb_coreidx'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_cpu_clock':                                                                         
(.text+0xc84): undefined reference to `sb_setcore'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_cpu_clock':                                                                         
(.text+0xc94): undefined reference to `sb_chip'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_cpu_clock':                                                                         
(.text+0xd04): undefined reference to `sb_clock_rate'                                                                                          
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_cpu_clock':                                                                         
(.text+0xd24): undefined reference to `sb_setcoreidx'                                                                                          
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_cpu_clock':                                                                         
(.text+0xd7c): undefined reference to `sb_chip'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0xe08): undefined reference to `sb_coreidx'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0xe1c): undefined reference to `sb_setcore'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0xe28): undefined reference to `sb_chip'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x1000): undefined reference to `sb_chip'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x103c): undefined reference to `sb_chip'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x1088): undefined reference to `sb_chip'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x1144): undefined reference to `sb_setcore'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x12b8): undefined reference to `sb_clock_rate'                                                                                         
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x1310): undefined reference to `sb_chip'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x1324): undefined reference to `sb_setcoreidx'                                                                                         
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x14b8): undefined reference to `sb_chip'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x1540): undefined reference to `sb_watchdog'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x1614): undefined reference to `sb_watchdog'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_mips_setclock':                                                                     
(.text+0x166c): undefined reference to `sb_clock_rate'                                                                                         
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_memc_get_ncdl':                                                                     
(.text+0x1788): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_memc_get_ncdl':                                                                     
(.text+0x1790): undefined reference to `sb_coreidx'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_memc_get_ncdl':                                                                     
(.text+0x17a4): undefined reference to `sb_setcore'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_memc_get_ncdl':                                                                     
(.text+0x17bc): undefined reference to `sb_corerev'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_memc_get_ncdl':                                                                     
(.text+0x1834): undefined reference to `sb_setcoreidx'                                                                                         
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `hnd_cpu_reset':                                                                        
(.text+0x1878): undefined reference to `sb_chip'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `hnd_cpu_reset':                                                                        
(.text+0x188c): undefined reference to `sb_watchdog'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `hnd_cpu_reset':                                                                        
(.text+0x1894): undefined reference to `sb_chip'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_serial_init':                                                                       
(.text+0x18fc): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_serial_init':                                                                       
(.text+0x190c): undefined reference to `sb_setcore'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_serial_init':                                                                       
(.text+0x1a24): undefined reference to `sb_clock'                                                                                              
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_serial_init':                                                                       
(.text+0x1a4c): undefined reference to `sb_alp_clock'                                                                                          
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_serial_init':                                                                       
(.text+0x1a9c): undefined reference to `sb_clock_rate'                                                                                         
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_jtagm_init':                                                                        
(.text+0x1ad4): undefined reference to `sb_setcore'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_cc_register_isr':                                                                   
(.text+0x1bcc): undefined reference to `sb_coreidx'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_cc_register_isr':                                                                   
(.text+0x1be0): undefined reference to `sb_setcore'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_cc_register_isr':                                                                   
(.text+0x1c34): undefined reference to `sb_setcoreidx'                                                                                         
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `gpio_read':                                                                            
gpio.c:(.text+0x1fa8): undefined reference to `sb_gpiocontrol'                                                                                 
gpio.c:(.text+0x1ff0): undefined reference to `sb_gpioouten'                                                                                   
gpio.c:(.text+0x2004): undefined reference to `sb_gpioin'                                                                                      
gpio.c:(.text+0x2024): undefined reference to `sb_gpioout'                                                                                     
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `gpio_write':                                                                           
gpio.c:(.text+0x20b4): undefined reference to `sb_gpiocontrol'                                                                                 
gpio.c:(.text+0x20cc): undefined reference to `sb_gpioouten'                                                                                   
gpio.c:(.text+0x20e4): undefined reference to `sb_gpioout'                                                                                     
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sflash_init':                                                                          
(.text+0x2120): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sflash_read':                                                                          
(.text+0x2424): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sflash_poll':                                                                          
(.text+0x24d4): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sflash_write':                                                                         
(.text+0x25c0): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sflash_write':                                                                         
(.text+0x26ac): undefined reference to `osl_delay'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sflash_write':                                                                         
(.text+0x293c): undefined reference to `osl_delay'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sflash_erase':                                                                         
(.text+0x29b0): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sflash_commit':                                                                        
(.text+0x2ab8): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sflash_commit':                                                                        
(.text+0x2b2c): undefined reference to `osl_malloc'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sflash_commit':                                                                        
(.text+0x2c5c): undefined reference to `osl_mfree'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `_nvram_commit':                                                                        
(.text+0x3490): undefined reference to `bcm_strtoul'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `_nvram_commit':                                                                        
(.text+0x34b0): undefined reference to `bcm_strtoul'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `_nvram_commit':                                                                        
(.text+0x34c8): undefined reference to `bcm_strtoul'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `_nvram_commit':                                                                        
(.text+0x34e8): undefined reference to `bcm_strtoul'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `_nvram_init':                                                                          
(.text+0x3618): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `_nvram_init':                                                                          
(.text+0x3624): undefined reference to `osl_malloc'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `_nvram_init':                                                                          
(.text+0x3660): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `_nvram_init':                                                                          
(.text+0x3670): undefined reference to `osl_mfree'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `nvram_calc_crc':                                                                       
(.text+0x3708): undefined reference to `hndcrc8'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `nvram_calc_crc':                                                                       
(.text+0x3720): undefined reference to `hndcrc8'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `config_cmd':                                                                           
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4634): undefined reference to `sb_osh'                                      
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x463c): undefined reference to `sb_coreidx'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4650): undefined reference to `sb_setcore'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x469c): undefined reference to `sb_setcoreidx'                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_pcihb_read_config':                                                                 
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4718): undefined reference to `sb_osh'                                      
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4720): undefined reference to `sb_coreidx'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4734): undefined reference to `sb_setcore'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x474c): undefined reference to `sb_corerev'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4794): undefined reference to `sb_setcoreidx'                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `extpci_write_config':                                                                  
(.text+0x49c8): undefined reference to `sb_osh'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_pcid_read_config':                                                                  
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4c20): undefined reference to `sb_osh'                                      
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4c28): undefined reference to `sb_coreidx'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4c38): undefined reference to `sb_setcoreidx'                               
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4c40): undefined reference to `sb_iscoreup'                                 
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4c70): undefined reference to `sb_setcoreidx'                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_pcid_write_config':                                                                 
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4d00): undefined reference to `sb_osh'                                      
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4d8c): undefined reference to `sb_coreidx'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4d9c): undefined reference to `sb_setcoreidx'                               
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4da4): undefined reference to `sb_iscoreup'                                 
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x4dd4): undefined reference to `sb_setcoreidx'                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sb_write_config':                                                                      
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x5004): undefined reference to `sb_osh'                                      
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x5108): undefined reference to `sb_coreidx'                                  
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x5118): undefined reference to `sb_setcoreidx'                               
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text+0x5158): undefined reference to `sb_setcoreidx'                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_arb_park':                                                                       
(.text+0x52c4): undefined reference to `sb_setcore'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_arb_park':                                                                       
(.text+0x52d4): undefined reference to `sb_corerev'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_arb_park':                                                                       
(.text+0x5344): undefined reference to `osl_delay'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_arb_park':                                                                       
(.text+0x5370): undefined reference to `getintvar'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_arb_park':                                                                       
(.text+0x5380): undefined reference to `getvar'                                                                                                
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x5938): undefined reference to `sb_coreidx'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x5950): undefined reference to `sb_setcoreidx'                                                                                         
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x5968): undefined reference to `sb_coreid'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x5980): undefined reference to `sb_coreid'                                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x599c): undefined reference to `sb_core_reset'                                                                                         
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x59ac): undefined reference to `sb_setcoreidx'                                                                                         
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x59f8): undefined reference to `sb_iscoreup'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x5a0c): undefined reference to `sb_corerev'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x5a24): undefined reference to `sb_corerev'                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x5a3c): undefined reference to `sb_chip'                                                                                               
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x5ad8): undefined reference to `sb_core_reset'                                                                                         
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x5b18): undefined reference to `sb_coreflags'                                                                                          
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_enable_device':                                                                
(.text+0x5b28): undefined reference to `sb_core_disable'                                                                                       
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `brcm_setup':                                                                           
(.text.init+0x120): undefined reference to `sb_kattach'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm947xx_time_init':                                                                   
(.text.init+0x47c): undefined reference to `sb_chip'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm947xx_time_init':                                                                   
(.text.init+0x48c): undefined reference to `sb_chiprev'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm947xx_time_init':                                                                   
(.text.init+0x4cc): undefined reference to `sb_chip'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm947xx_time_init':                                                                   
(.text.init+0x568): undefined reference to `sb_setcore'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm947xx_time_init':                                                                   
(.text.init+0x57c): undefined reference to `sb_base'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `init_IRQ':                                                                             
(.text.init+0x65c): undefined reference to `sb_coreidx'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `init_IRQ':                                                                             
(.text.init+0x674): undefined reference to `sb_setcore'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `init_IRQ':                                                                             
(.text.init+0x698): undefined reference to `sb_setcore'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `init_IRQ':                                                                             
(.text.init+0x6cc): undefined reference to `sb_setcoreidx'                                                                                     
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `gpio_init':                                                                            
gpio.c:(.text.init+0x7b4): undefined reference to `sb_kattach'                                                                                 
gpio.c:(.text.init+0x7fc): undefined reference to `sb_gpiosetcore'                                                                             
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `early_nvram_init':                                                                     
nvram_linux.c:(.text.init+0x8bc): undefined reference to `sb_setcore'                                                                          
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `dev_nvram_init':                                                                       
nvram_linux.c:(.text.init+0xe4c): undefined reference to `sb_osh'                                                                              
nvram_linux.c:(.text.init+0xe60): undefined reference to `osl_attach'                                                                          
nvram_linux.c:(.text.init+0xe7c): undefined reference to `sb_setosh'                                                                           
nvram_linux.c:(.text.init+0xf60): undefined reference to `getintvar'                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x1030): undefined reference to `sb_chip'                                                                                          
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x103c): undefined reference to `sb_chiprev'                                                                                       
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x1048): undefined reference to `sb_chippkg'                                                                                       
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x1054): undefined reference to `sb_osh'                                                                                           
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x1064): undefined reference to `sb_setcore'                                                                                       
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x1080): undefined reference to `getintvar'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x10b8): undefined reference to `sb_core_reset'                                                                                    
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x10f8): undefined reference to `sb_core_disable'                                                                                  
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x1178): undefined reference to `osl_delay'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x118c): undefined reference to `osl_delay'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x119c): undefined reference to `getintvar'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x11e4): undefined reference to `bcm_strtoul'                                                                                      
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x124c): undefined reference to `sb_gpioout'                                                                                       
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x1260): undefined reference to `sb_gpioouten'                                                                                     
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_pci':                                                                       
(.text.init+0x128c): undefined reference to `sb_commit'                                                                                        
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_regions':                                                                   
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x12fc): undefined reference to `sb_osh'                                 
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x1304): undefined reference to `sb_coreid'                              
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x1310): undefined reference to `sb_coreregs'                            
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x1328): undefined reference to `sb_base'                                
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x1334): undefined reference to `sb_base'                                
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x1340): undefined reference to `sb_base'                                
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x134c): undefined reference to `sb_base'
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x1370): undefined reference to `sb_size'
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x137c): undefined reference to `sb_size'
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x1388): undefined reference to `sb_size'
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x1394): undefined reference to `sb_size'
/home/hernad/devel/git/tomato/release/src/shared/hndpci.c:(.text.init+0x13c4): undefined reference to `sb_base'
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_cores':
(.text.init+0x1440): undefined reference to `sb_chiprev'
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_cores':
(.text.init+0x1454): undefined reference to `sb_coreidx'
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_cores':
(.text.init+0x1468): undefined reference to `sb_osh'
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_cores':
(.text.init+0x14c8): undefined reference to `sb_setcoreidx'
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_cores':
(.text.init+0x14d8): undefined reference to `sb_coreid'
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_cores':
(.text.init+0x1578): undefined reference to `sb_corepciid'
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `sbpci_init_cores':
(.text.init+0x1658): undefined reference to `sb_setcoreidx'
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `pcibios_init':
(.text.init+0x16f4): undefined reference to `sb_kattach'
make[5]: *** [vmlinux] Error 1
make[5]: Leaving directory `/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato'
make[4]: *** [/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/.image] Error 2
make[4]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux/brcm-2.4'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/home/hernad/devel/git/openwrt/target/linux'

Akcije #48

Izmjenjeno od Ernad Husremović prije oko 16 godina

prekopiro .config iz tomato-a

make =>

nls_base.c:486: `CONFIG_NLS_DEFAULT' undeclared

na forumu pročitah treba prvo

make oldconfig

("make oldconfig" tool will attempt to configure my current kernel using the parameters fed from an old configuration file .config.old or .config)

pa onda make

Akcije #49

Izmjenjeno od Ernad Husremović prije oko 16 godina

iz nekog razloga sbutils.c se ne builda uopšte i sve iz tog fajla prijavljuje nepostojeće simbole

hernad@nmraka-5:~/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato$ ls arch/mips/bcm947xx

bcmsrom.c  export.c  gpio.c      hndpmu.c  Makefile  nvram_linux.c  prom.c    sbpci.c    setup.c  utils.c
cfe_env.c  generic   hndchipc.c  include   nvram.c   pcibios.c      sbmips.c  sbutils.c  time.c   utils.h

Akcije #51

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://www.ravnborg.org/kbuild/makefiles.html

The Makefiles have five parts:

Makefile     the top Makefile.
.config     the kernel configuration file.
arch/$(ARCH)/Makefile     the arch Makefile.
scripts/Makefile.*     common rules etc. for all kbuild Makefiles.
kbuild Makefiles     there are about 500 of these.

The top Makefile reads the .config file, which comes from the kernel configuration process.

The top Makefile is responsible for building two major products: vmlinux (the resident kernel image) and modules (any module files). It builds these goals by recursively descending into the subdirectories of the kernel source tree. The list of subdirectories which are visited depends upon the kernel configuration. The top Makefile textually includes an arch Makefile with the name arch/$(ARCH)/Makefile. The arch Makefile supplies architecture-specific information to the top Makefile.

Each subdirectory has a kbuild Makefile which carries out the commands passed down from above. The kbuild Makefile uses information from the .config file to construct various file lists used by kbuild to build any built-in or modular targets.

scripts/Makefile.* contains all the definitions/rules etc. that are used to build the kernel based on the kbuild makefiles.

Akcije #52

Izmjenjeno od Ernad Husremović prije oko 16 godina

ovo sam tražio - kako da buildam jedan module: http://wiki.centos.org/HowTos/BuildingKernelModules

Akcije #53

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato$ ls ./arch/mips/bcm947xx/*c

./arch/mips/bcm947xx/bcmsrom.c   ./arch/mips/bcm947xx/nvram.c        ./arch/mips/bcm947xx/sbutils.c
./arch/mips/bcm947xx/cfe_env.c   ./arch/mips/bcm947xx/nvram_linux.c  ./arch/mips/bcm947xx/setup.c
./arch/mips/bcm947xx/export.c    ./arch/mips/bcm947xx/pcibios.c      ./arch/mips/bcm947xx/time.c
./arch/mips/bcm947xx/gpio.c      ./arch/mips/bcm947xx/prom.c         ./arch/mips/bcm947xx/utils.c
./arch/mips/bcm947xx/hndchipc.c  ./arch/mips/bcm947xx/sbmips.c
./arch/mips/bcm947xx/hndpmu.c    ./arch/mips/bcm947xx/sbpci.c

./arch/mips/bcm947xx/generic:
int-handler.S irq.c Makefile
hernad@nmraka-5:~/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato$ ls ./arch/mips/brcm-boards/bcm947xx/*c

./arch/mips/brcm-boards/bcm947xx/gpio.c         ./arch/mips/brcm-boards/bcm947xx/perfcntr.c
./arch/mips/brcm-boards/bcm947xx/irq.c          ./arch/mips/brcm-boards/bcm947xx/prom.c
./arch/mips/brcm-boards/bcm947xx/nvram_linux.c  ./arch/mips/brcm-boards/bcm947xx/setup.c
./arch/mips/brcm-boards/bcm947xx/pcibios.c      ./arch/mips/brcm-boards/bcm947xx/time.c

imamo dva bcm947xxx direktorija ?!

Akcije #54

Izmjenjeno od Ernad Husremović prije oko 16 godina

a u tomato-u

hernad@nmraka-5:~/devel/git/tomato/release/src$ find -name bcm947xx

./linux/linux/arch/mips/brcm-boards/bcm947xx

Akcije #55

Izmjenjeno od Ernad Husremović prije oko 16 godina

aha

hernad@nmraka-5:~/devel/git/tomato/release/src$ find -name sbutils.c

./shared/sbutils.c

Akcije #56

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato$ cp -av ./arch/mips/bcm947xx/include/ arch/mips/brcm-boards/bcm947xx/

Akcije #57

Izmjenjeno od Ernad Husremović prije oko 16 godina

izgleda da arch/mips/bcm947xx nije u stablu kernel dependencies pa to sve treba kopirati u brcm-boards

hernad@nmraka-5:~/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato$ cp -av ./arch/mips/bcm947xx/* arch/mips/brcm-boards/bcm947xx/

sad se žali na ovo:

mipsel-linux-gcc -D__KERNEL__ -I/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -I/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/../../include -DBCMDRIVER -I /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/include/asm/gcc -G 0 -mno-abicalls -fno-pic -pipe -I /home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/../../ -mtune=r4600 -mips2 -Wa,--trap  -m4710a0kern  -I/home/hernad/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/arch/mips/bcm947xx/include -DBCMDRIVER -nostdinc -iwithprefix include -DKBUILD_BASENAME=setup  -c -o setup.o setup.c

setup.c: In function `brcm_setup':
setup.c:190: structure has no member named `processor_id'
setup.c:190: structure has no member named `processor_id'
make[2]: *** [setup.o] Error 1

Akcije #58

Izmjenjeno od Ernad Husremović prije oko 16 godina

aa evo odakle se "stvorio" dupli bcm947xx

hernad@nmraka-5:~/devel/git/openwrt/target/linux/brcm-2.4$ ls files/arch/mips/bcm947xx/
bcmsrom.c export.c gpio.c hndpmu.c Makefile nvram_linux.c prom.c sbpci.c setup.c utils.c
cfe_env.c generic hndchipc.c include nvram.c pcibios.c sbmips.c sbutils.c time.c utils.h

Akcije #59

Izmjenjeno od Ernad Husremović prije oko 16 godina

a ovdje opet imamo tomato--ve postavke koje sam ja sada ispravio da koristim arch/mips/bcm947xx

hernad@nmraka-5:~/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato$ vi arch/mips/Makefile

#
# Broadcom BCM947XX variants
#
ifdef CONFIG_BCM947XX
LIBS            += arch/mips/bcm947xx/bcm947xx.o
SUBDIRS         += arch/mips/generic arch/mips/bcm947xx
LOADADDR        := 0x80001000
#zImage: vmlinux
#       $(MAKE) -C arch/$(ARCH)/brcm-boards/bcm947xx/compressed
export LOADADDR
endif

Akcije #60

Izmjenjeno od Ernad Husremović prije oko 16 godina

koliko mogu da upratim tomato sadrži svježiji kod (broadcom 2007 a openwrt 2006)

Akcije #61

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato$ cat .config | grep HND

# Broadcom HND network devices
# CONFIG_HND is not set

hernad@nmraka-5:~/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato$ cat .config | grep 947

# CONFIG_BCM947XX is not set
CONFIG_MTD_BCM947XX=y

Akcije #62

Izmjenjeno od Ernad Husremović prije oko 16 godina

c-mips32.c: In function `setup_noscache_funcs':
c-mips32.c:612: `_dma_cache_wback_inv' undeclared (first use in this function)
c-mips32.c:612: (Each undeclared identifier is reported only once
c-mips32.c:612: for each function it appears in.)
c-mips32.c:613: `_dma_cache_wback' undeclared (first use in this function)
c-mips32.c:614: `_dma_cache_inv' undeclared (first use in this function)
c-mips32.c: In function `setup_scache_funcs':
c-mips32.c:630: `_dma_cache_wback_inv' undeclared (first use in this function)
#ifdef CONFIG_NONCOHERENT_IO

/* DMA cache operations. */
void (*_dma_cache_wback_inv)(unsigned long start, unsigned long size);
void (*_dma_cache_wback)(unsigned long start, unsigned long size);
void (*_dma_cache_inv)(unsigned long start, unsigned long size);

EXPORT_SYMBOL(_dma_cache_wback_inv);
EXPORT_SYMBOL(_dma_cache_wback);
EXPORT_SYMBOL(_dma_cache_inv);

#endif /* CONFIG_NONCOHERENT_IO */
Akcije #63

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/tomato/release/src$ grep -r CONFIG_NONCOHERENT_IO *

linux/linux/.config:CONFIG_NONCOHERENT_IO=y

Akcije #64

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://downloads.openwrt.org/docs/buildroot-documentation.html

OpenWrt Buildroot is a set of Makefiles and patches that allows to easily generate both a cross-compilation toolchain and a root filesystem for your Wireless Router. The cross-compilation toolchain uses uClibc (http://www.uclibc.org/), a tiny C standard library.

A compilation toolchain is the set of tools that allows to compile code for your system. It consists of a compiler (in our case, gcc), binary utils like assembler and linker (in our case, binutils) and a C standard library (for example GNU Libc, uClibc or dietlibc). The system installed on your development station certainly already has a compilation toolchain that you can use to compile application that runs on your system. If you're using a PC, your compilation toolchain runs on an x86 processor and generates code for a x86 processor. Under most Linux systems, the compilation toolchain uses the GNU libc as C standard library. This compilation toolchain is called the "host compilation toolchain", and more generally, the machine on which it is running, and on which you're working is called the "host system". The compilation toolchain is provided by your distribution, and OpenWrt Buildroot has nothing to do with it.

As said above, the compilation toolchain that comes with your system runs and generates code for the processor of your host system. As your embedded system has a different processor, you need a cross-compilation toolchain: it's a compilation toolchain that runs on your host system but that generates code for your target system (and target processor). For example, if your host system uses x86 and your target system uses MIPS, the regular compilation toolchain of your host runs on x86 and generates code for x86, while the cross-compilation toolchain runs on x86 and generates code for MIPS.

You might wonder why such a tool is needed when you can compile gcc, binutils, uClibc and all the tools by hand. Of course, doing so is possible. But dealing with all configure options, with all problems of every gcc or binutils version is very time-consuming and uninteresting. OpenWrt Buildroot automates this process through the use of Makefiles, and has a collection of patches for each gcc and binutils version to make them work on the MIPS architecture of most Wireless Routers.

Akcije #65

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/openwrt/target/linux/brcm-2.4$ tree files

files                                                                                                             
|-- arch                                                                                                          
|   `-- mips                                                                                                      
|       `-- bcm947xx                                                                                              
|           |-- Makefile                                                                                          
|           |-- bcmsrom.c                                                                                         
|           |-- cfe_env.c                                                                                         
|           |-- export.c                                                                                          
|           |-- generic                                                                                           
|           |   |-- Makefile                                                                                      
|           |   |-- int-handler.S                                                                                 
|           |   `-- irq.c                                                                                         
|           |-- gpio.c                                                                                            
|           |-- hndchipc.c                                                                                        
|           |-- hndpmu.c                                                                                          
|           |-- include                                                                                           
|           |   |-- bcm4710.h                                                                                     
|           |   |-- bcmdefs.h                                                                                     
|           |   |-- bcmdevs.h                                                                                     
|           |   |-- bcmdevs1.h                                                                                    
|           |   |-- bcmendian.h                                                                                   
|           |   |-- bcmnvram.h                                                                                    
|           |   |-- bcmsrom.h                                                                                     
|           |   |-- hndchipc.h                                                                                    
|           |   |-- hndcpu.h                                                                                      
|           |   |-- hndmips.h                                                                                     
|           |   |-- hndpci.h                                                                                      
|           |   |-- hndpmu.h                                                                                      
|           |   |-- linux_gpio.h                                                                                  
|           |   |-- linuxver.h                                                                                    
|           |   |-- mipsinc.h                                                                                     
|           |   |-- osl.h                                                                                         
|           |   |-- pcicfg.h                                                                                      
|           |   |-- sbchipc.h                                                                                     
|           |   |-- sbconfig.h                                                                                    
|           |   |-- sbextif.h                                                                                     
|           |   |-- sbhndmips.h                                                                                   
|           |   |-- sbmemc.h                                                                                      
|           |   |-- sbpci.h                                                                                       
|           |   |-- sbpcie.h                                                                                      
|           |   |-- sbpcmcia.h                                                                                    
|           |   |-- sbsdram.h                                                                                     
|           |   |-- sbsocram.h                                                                                    
|           |   |-- sbsprom.h                                                                                     
|           |   |-- sbutils.h                                                                                     
|           |   |-- sflash.h
|           |   |-- trxhdr.h
|           |   `-- typedefs.h
|           |-- nvram.c
|           |-- nvram_linux.c
|           |-- pcibios.c
|           |-- prom.c
|           |-- sbmips.c
|           |-- sbpci.c
|           |-- sbutils.c
|           |-- setup.c
|           |-- time.c
|           |-- utils.c
|           `-- utils.h
`-- drivers
    |-- mtd
    |   |-- devices
    |   |   `-- sflash.c
    |   `-- maps
    |       `-- bcm947xx-flash.c
    `-- parport
        `-- parport_splink.c

10 directories, 56 files

hernad@nmraka-5:~/devel/git/openwrt/target/linux/brcm-2.4$ mv files files-orig

Akcije #66

Izmjenjeno od Ernad Husremović prije oko 16 godina

TOMATO Multilink support for consumer routers

Tomato/MLPPP is a fork of the popular Tomato firmware (http://www.polarcloud.com/tomato) for consumer broadband routers. The primary goal is to enable users to bond multiple DSL connections using MultiLink PPP (MLPPP), and/or to circumvent Bell Canada's DPI-based throttling by using MLPPP on a single DSL line.

Akcije #67

Izmjenjeno od Ernad Husremović prije oko 16 godina

sada će se cy_conf.h koji tomato traži uvijek optakovati u build_dir/linux-brcm-2.4/linux .. tomato kernel

hernad@nmraka-5:~/devel/git/tomato$ cp ./release/src/cy_conf.h /home/hernad/devel/git/openwrt/target/linux/brcm-2.4/files/include/

Akcije #69

Izmjenjeno od Ernad Husremović prije oko 16 godina

tomato ima shared source dir koji kernel koristi:

hernad@nmraka-5:~/devel/git/tomato/release/src$ cp -av shared /home/hernad/devel/git/openwrt/target/linux/brcm-2.4/files/

Akcije #70

Izmjenjeno od Ernad Husremović prije oko 16 godina

konflikt između drivers.net i bcm947 ...

b.a arch/mips/brcm-boards/generic/brcm.o arch/mips/brcm-boards/bcm947xx/bcm947xx.o \                                  
                --end-group \                                                                                         
                -o vmlinux                                                                                            
arch/mips/brcm-boards/bcm947xx/bcm947xx.o:(.data+0x12d8): multiple definition of `pdesc97'                            
drivers/net/net.o:(.data+0xf2c): first defined here                                                                   
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm_robo_detach':                                             
(.text+0xdf1c): multiple definition of `bcm_robo_detach'                                                              
drivers/net/net.o:(.text+0x8da0): first defined here                                                                  
arch/mips/brcm-boards/bcm947xx/bcm947xx.o:(.data+0x1290): multiple definition of `pdesc25'                            
drivers/net/net.o:(.data+0xf98): first defined here                                                                   
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm_robo_attach':                                             
(.text+0xdf50): multiple definition of `bcm_robo_attach'                                                              
drivers/net/net.o:(.text+0x8a6c): first defined here                                                                  
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `robo_read_link_status':                                       
(.text+0xef34): multiple definition of `robo_read_link_status'                                                        
drivers/net/net.o:(.text+0x99d8): first defined here                                                                  
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm_robo_enable_switch':                                      
(.text+0xed30): multiple definition of `bcm_robo_enable_switch'                                                       
drivers/net/net.o:(.text+0x97d4): first defined here                                                                  
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm_robo_enable_device':                                      
(.text+0xe2c0): multiple definition of `bcm_robo_enable_device'                                                       
drivers/net/net.o:(.text+0x8dd8): first defined here                                                                  
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `robo_read_lan_speed':                                         
(.text+0xf198): multiple definition of `robo_read_lan_speed'                                                          
drivers/net/net.o:(.text+0x9bb0): first defined here                                                                  
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `bcm_robo_config_vlan':                                        
(.text+0xe454): multiple definition of `bcm_robo_config_vlan'
drivers/net/net.o:(.text+0x8f44): first defined here
arch/mips/brcm-boards/bcm947xx/bcm947xx.o: In function `robo_enable_port':
(.text+0xf0b0): multiple definition of `robo_enable_port'
drivers/net/net.o:(.text+0x9b2c): first defined here
drivers/net/net.o:(__ksymtab+0x508): undefined reference to `dma_txpioloopback'
drivers/net/net.o:(__ksymtab+0x510): undefined reference to `dma_attach'
drivers/net/net.o:(__ksymtab+0x518): undefined reference to `dma_addrwidth'
drivers/net/net.o:(__ksymtab+0x6e0): undefined reference to `otp_status'
drivers/net/net.o:(__ksymtab+0x6e8): undefined reference to `otp_size'
drivers/net/net.o:(__ksymtab+0x6f0): undefined reference to `otp_read_region'
drivers/net/net.o:(__ksymtab+0x6f8): undefined reference to `otpr'
drivers/net/net.o:(__ksymtab+0x700): undefined reference to `otp_nvread'
drivers/net/net.o:(__ksymtab+0x708): undefined reference to `otp_init'

izgleda da je bcmrobo suvišan

Akcije #71

Izmjenjeno od Ernad Husremović prije oko 16 godina

make menuconfig isključio isdn podršku

Akcije #72

Izmjenjeno od Ernad Husremović prije oko 16 godina

ručno izmjenio Makefile
hernad@nmraka-5:~/devel/git/openwrt/build_dir/linux-brcm-2.4/linux-2.4.20-tomato/arch/mips/brcm-boards/bcm947xx$ cat Makefile

#                                                                                                                     
# Makefile for Broadcom BCM947XX boards                                                                               
#                                                                                                                     
# Copyright 2006, Broadcom Corporation                                                                                
# All Rights Reserved.
#
# THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
# KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
# SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
#
# $Id$
#

O_TARGET        := bcm947xx.o

export-objs     := nvram_linux.o setup.o
obj-y           := prom.o setup.o time.o irq.o
#obj-y          += hndmips.o hndchipc.o perfcntr.o linux_gpio.o
obj-y           += hndmips.o hndchipc.o perfcntr.o gpio.o
obj-y           += sflash.o nvram.o nvram_linux.o
obj-y           += ../../../../shared/sbutils.o ../../../../shared/linux_osl.o ../../../../shared/linux_gpio.o ../../../../shared/bcmutils.o  ../../../../shared/bcmsrom.o ../../../../shared/hndpmu.o ../../../../shared/hnddma.o ../../../../shared/bcmotp.o
#../../../../shared/nvram/nvram.o
obj-$(CONFIG_PCI) += hndpci.o pcibios.o

vpath %.c $(SRCBASE)/shared $(SRCBASE)/shared/nvram

include $(TOPDIR)/Rules.make

Akcije #73

Izmjenjeno od Ernad Husremović prije oko 16 godina

tomato distrib ima wlconf (to je sigurno wlc u openwrt-u)


#
# $Id$
#
include ../common.mak

CFLAGS  += -I. -I$(TOP)/shared -I$(SRCBASE)/include -Wall
#CFLAGS += -g -DDEBUG
CFLAGS  += -s -O2
LDFLAGS += -L$(TOP)/nvram -lnvram -L$(TOP)/shared -lshared

OBJS := wlconf.o

all: wlconf

clean:
        rm -f *.o wlconf

install: all
        install -d $(INSTALLDIR)/usr/sbin
        install wlconf $(INSTALLDIR)/usr/sbin
        $(STRIP) $(INSTALLDIR)/usr/sbin/wlconf

wlconf: $(OBJS)
        $(CC) -o $@ $^ $(LDFLAGS)

hernad@nmraka-5:~/devel/git/openwrt/package/broadcom-wl$ tree .

|-- Makefile                                                 
|-- files                                                    
|   |-- etc                                                  
|   |   `-- hotplug.d                                        
|   |       `-- net                                          
|   |           `-- 20-broadcom_wds                          
|   `-- lib                                                  
|       `-- wifi                                             
|           `-- broadcom.sh                                  
|-- patches                                                  
|   `-- 100-timer_fix.patch                                  
`-- src                                                      
    |-- driver                                               
    |   |-- Makefile                                         
    |   |-- bcmip.h                                          
    |   |-- bcmutils.c                                       
    |   |-- bcmutils.h                                       
    |   |-- hnddma.c                                         
    |   |-- hnddma.h                                         
    |   |-- linux_osl.c                                      
    |   |-- linux_osl.h                                      
    |   |-- proto                                            
    |   |   |-- 802.11.h                                     
    |   |   |-- 802.11e.h                                    
    |   |   |-- 802.1d.h                                     
    |   |   |-- 802.3.h                                      
    |   |   |-- bcmarp.h                                     
    |   |   |-- bcmdhcp.h                                    
    |   |   |-- bcmeth.h                                     
    |   |   |-- bcmevent.h                                   
    |   |   |-- bcmip.h                                      
    |   |   |-- bcmtcp.h                                     
    |   |   |-- bcmudp.h                                     
    |   |   |-- eap.h                                        
    |   |   |-- eapol.h                                      
    |   |   |-- ethernet.h
    |   |   |-- vlan.h
    |   |   `-- wpa.h
    |   `-- sbhnddma.h
    |-- include
    |   |-- bcmdefs.h
    |   |-- bcmutils.h
    |   |-- proto
    |   |   |-- 802.11.h
    |   |   |-- bcmeth.h
    |   |   |-- bcmevent.h
    |   |   |-- ethernet.h
    |   |   `-- wpa.h
    |   |-- typedefs.h
    |   |-- wlioctl.h
    |   `-- wlutils.h
    |-- wlc
    |   |-- Makefile
    |   |-- ioctl.c
    |   `-- wlc.c
    `-- wlcompat
        |-- Makefile
        `-- wlcompat.c

hernad@nmraka-5:~/devel/git/openwrt/package$ cat ~/devel/git/openwrt/package/broadcom-wl/Makefile

#                                                                                                
# Copyright (C) 2006-2009 OpenWrt.org                                                            
#                                                                                                
# This is free software, licensed under the GNU General Public License v2.                       
# See /LICENSE for more information.                                                             
#                                                                                                
# $Id$                                                                                           

include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk

PKG_NAME:=broadcom-wl
PKG_VERSION:=4.150.10.5.3
PKG_RELEASE:=2           
WLC_VERSION:=0.1         

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://downloads.openwrt.org/sources
PKG_MD5SUM:=cc615fd49719eea8bce5b2a8813783f3        

WL_WEXT=1

include $(INCLUDE_DIR)/package.mk

define Package/broadcom-wl/Default
  SECTION:=kernel                 
  CATEGORY:=Kernel modules        
  DEPENDS:=@PACKAGE_kmod-brcm-wl||PACKAGE_kmod-brcm-wl-mimo
  SUBMENU:=Proprietary BCM43xx WiFi driver                 
  SUBMENUDEP:=@TARGET_brcm_2_4                             
endef                                                      

define KernelPackage/brcm-wl/Default
  $(call Package/broadcom-wl/Default)
  SECTION:=kernel                    
  DEPENDS:=@TARGET_brcm_2_4 +wireless-tools
  TITLE:=Kernel driver for BCM43xx chipsets
  FILES:=$(PKG_BUILD_DIR)/driver/wl$(1).o  
  AUTOLOAD:=$(call AutoLoad,30,wl$(1))     
endef                                      

define KernelPackage/brcm-wl/Default/description
 This package contains the proprietary wireless driver for the Broadcom 
 BCM43xx chipset.                                                       
endef                                                                   

define KernelPackage/brcm-wl
$(call KernelPackage/brcm-wl/Default,)
  TITLE+= (normal version)            
endef                                 

define KernelPackage/brcm-wl/description
$(call KernelPackage/brcm-wl/Default/description)
endef                                            

define KernelPackage/brcm-wl-mimo
$(call KernelPackage/brcm-wl/Default,_mimo)
  TITLE+= (MIMO version)                   
endef                                      

define KernelPackage/brcm-wl-mimo/description
$(call KernelPackage/brcm-wl/Default/description)
endef                                            

define KernelPackage/wlcompat/Default
  $(call KernelPackage/brcm-wl/Default,)
  TITLE:=Kernel driver for BCM43xx chipsets
  FILES:=$(PKG_BUILD_DIR)/wlcompat/wlcompat$(1).o
endef                                            

define KernelPackage/wlcompat
$(call KernelPackage/wlcompat/Default,)
  AUTOLOAD:=$(call AutoLoad,50,wlcompat)
endef                                   

define KernelPackage/wlcompat/description
 This package contains a wrapper module, that provides Wireless Extension 
 support for the proprietary Broadcom wl module.                          
endef                                                                     

define KernelPackage/wlcompat-debug
$(call KernelPackage/wlcompat/Default,-debug)
  TITLE+= (debug)                            
  AUTOLOAD:=                                 
endef                                        

define KernelPackage/wlcompat-debug/description
$(call KernelPackage/wlcompat/description)     
 This is the debugging version.                
endef                                          

define Package/wlc
$(call Package/broadcom-wl/Default)
  TITLE:=wl driver setup utility   
endef                              

define Package/wlc/description
 This package contains an utility for initializing the proprietary Broadcom 
 wl driver.                                                                 
endef                                                                       

define Package/wl
$(call Package/broadcom-wl/Default)
  DEPENDS+= +nvram                 
  TITLE:=Proprietary Broadcom wl driver config utility
endef                                                 

define Package/wl/description
 This package contains the proprietary utility (wl) for configuring the 
 proprietary Broadcom wl driver.                                        
endef                                                                   

define Package/nas
$(call Package/broadcom-wl/Default)
  DEPENDS+= +nvram                 
  TITLE:=Proprietary Broadcom WPA/WPA2 authenticator
endef                                               

define Package/nas/description
 This package contains the proprietary WPA/WPA2 authenticator (nas) for the 
 proprietary Broadcom wl driver.                                            
endef                                                                       

MAKE_KMOD := $(MAKE) -C "$(LINUX_DIR)" \
                CROSS_COMPILE="$(TARGET_CROSS)" \
                ARCH="$(LINUX_KARCH)" \          
                PATH="$(TARGET_PATH)" \          
                SUBDIRS="$(PKG_BUILD_DIR)/kmod"  

define Build/Prepare
        $(call Build/Prepare/Default)
        $(CP) src/* $(PKG_BUILD_DIR)/
endef                                

define Build/Compile
        # Compile the kernel part
        $(MAKE_KMOD) \           
                SUBDIRS="$(PKG_BUILD_DIR)/driver" \
                modules                            
        $(MAKE_KMOD) \                             
                SUBDIRS="$(PKG_BUILD_DIR)/driver" \
                MOD_NAME="_mimo" \                 
                modules                            
        $(MAKE_KMOD) \                             
                SUBDIRS="$(PKG_BUILD_DIR)/wlcompat" \
                $(if $(WL_WEXT),WL_WEXT=1) \         
                modules                              
        $(MAKE_KMOD) \                               
                SUBDIRS="$(PKG_BUILD_DIR)/wlcompat" \
                DEBUG=1 \                            
                $(if $(WL_WEXT),WL_WEXT=1) \         
                modules                              

        # Compile wlc
        $(MAKE) -C $(PKG_BUILD_DIR)/wlc \
                $(TARGET_CONFIGURE_OPTS) \
                CFLAGS="$(TARGET_CFLAGS)" \
                all                        
        # Compile libshared                
        $(MAKE) -C $(PKG_BUILD_DIR)/router/shared \
                $(TARGET_CONFIGURE_OPTS) \         
                CFLAGS="$(TARGET_CFLAGS) -I. -I$(PKG_BUILD_DIR)/include -Dlinux=1" \
                all                                                                 
        $(TARGET_CC) -o $(PKG_BUILD_DIR)/nas $(PKG_BUILD_DIR)/nas_exe.o $(TARGET_LDFLAGS) -lnvram $(PKG_BUILD_DIR)/router/shared/libshared.a                                                                                                
        $(TARGET_CC) -o $(PKG_BUILD_DIR)/wl $(PKG_BUILD_DIR)/wl_exe.o                                                 
endef                                                                                                                 

define Build/InstallDev
        $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_BUILD_DIR)/router/shared/libshared.a $(1)/usr/lib/
endef                                                                 

define Package/wlc/install
        $(CP) ./files/* $(1)/
        $(INSTALL_DIR) $(1)/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/wlc/wlc $(1)/sbin/
endef

define Package/wl/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/wl $(1)/usr/sbin/
endef

define Package/nas/install
        $(INSTALL_DIR) $(1)/usr/sbin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/nas $(1)/usr/sbin/
        ln -sf nas $(1)/usr/sbin/nas4not
        ln -sf nas $(1)/usr/sbin/nas4wds
endef

$(eval $(call KernelPackage,brcm-wl))
$(eval $(call KernelPackage,brcm-wl-mimo))
$(eval $(call KernelPackage,wlcompat))
$(eval $(call KernelPackage,wlcompat-debug))
$(eval $(call BuildPackage,wlc))
$(eval $(call BuildPackage,wl))
$(eval $(call BuildPackage,nas))

Akcije #74

Izmjenjeno od Ernad Husremović prije oko 16 godina

u tomato-u

hernad@nmraka-5:~/devel/git/tomato/release/src/router/wlconf$ vi wlconf.c

/*
 * Wireless Network Adapter Configuration Utility
 *
 * Copyright 2007, Broadcom Corporation
 * All Rights Reserved.
 *
 * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Broadcom Corporation;
 * the contents of this file may not be disclosed to third parties, copied
 * or duplicated in any form, in whole or in part, without the prior
 * written permission of Broadcom Corporation.
 *
 * $Id$
 */

#include <typedefs.h>
#include <stdio.h>
...

Akcije #75

Izmjenjeno od Ernad Husremović prije oko 16 godina

a gdje je ovaj nas u tomato-u

hernad@nmraka-5:~/devel/git/tomato/release/src/router$ ls prebuilt/nas -l

-rwxr-xr-x 1 hernad hernad 155412 2009-04-03 20:13 prebuilt/nas

Akcije #76

Izmjenjeno od Ernad Husremović prije oko 16 godina

./mipsel-uclibc/install/prebuilt/usr/sbin/nas
./mipsel-uclibc/install/prebuilt/usr/sbin/nas4not
Akcije #77

Izmjenjeno od Ernad Husremović prije oko 16 godina

greškom sam ticketirao na #17043

Akcije #78

Izmjenjeno od Ernad Husremović prije oko 16 godina

sav taj posao se u openwrt distribuciji obavlja unutar broadcom-wl paketa

./build_dir/linux-brcm-2.4/broadcom-wl-4.150.10.5.3/nas_exe.o

Akcije #79

Izmjenjeno od Ernad Husremović prije oko 16 godina

ovdje vidimo root sistem wrt image-a:

hernad@nmraka-5:~/devel/git/openwrt$ ls ./build_dir/target-mipsel_uClibc-0.9.29/root-brcm-2.4/

Akcije #80

Izmjenjeno od Ernad Husremović prije oko 16 godina

wl i nas binaries:

hernad@nmraka-5:~/devel/git/tomato$ cp ./release/src/router/prebuilt/nas /devel/git/openwrt/package/broadcom-userland/files/
hernad@nmraka-5:
/devel/git/tomato$ cp ./release/src/router/prebuilt/wl ~/devel/git/openwrt/package/broadcom-userland/files/

Akcije #81

Izmjenjeno od Ernad Husremović prije oko 16 godina

i sve je to super, ali nakon što sam spržio kreirani firmware - ni mukajeta od router-a samo trepti power lampa

ni na jedan načim mu se ne može prići

Akcije #83

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://martybugs.net/wireless/openwrt/flash.cgi

The First Boot with OpenWrt

Boot Status

The DMZ LED on the front of the WRT is used by OpenWrt to indicate the boot status. The LED is on while OpenWrt is booting, and is turned off once the boot process is complete.

Firstboot Script

When your WRT boots for the first time after it's been reflashed with OpenWrt firmware, the firstboot script is automatically run, and will create the jffs2 partition.

Akcije #84

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://forum.openwrt.org/viewtopic.php?id=13967

boot_wait is not something used the operating system, it has nothing to do with the firmware you are running. It is a function of the bootloader (CFE)

boot_wait, along with all nvram, cannot be accessed under the 2.6 kernel as the nvram driver has not be ported. It must be set via a firmware using the 2.4 kernel (either Kamikaze, White Russian, or any other firmware.) Once this is set you shouldn't need to touch it again.

Akcije #85

Izmjenjeno od Ernad Husremović prije oko 16 godina

da li je moguće da bootwait nije bilo podešeno na router-u ? pojma nemam

Akcije #86

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://oldwiki.openwrt.org/OpenWrtDocs(2f)BootWait.html

Information here was verified with a WRT54G 1.0. There are minor changes with each variable hardware revision (1.0 vs. 1.1 vs. 2.0 vs. GS), but the general principles remain the same, as well as the final result. To really understand boot_wait, you need to understand the boot process on the WRT, and how ARP tables work.

When the boot loader begins (PMON on v1.x and CFE on v2.x), it starts by validating the nvram data (configuration data that is stored at the end of flash). If this data is valid, it checks for the existence of the variable boot_wait. If boot_wait is set to on (nvram set boot_wait=on), the loader will go into a "boot_wait state".

The WRT will remain in this state for 3 seconds before proceeding with loading the kerne*l. The next step of the bootstrap is to do a CRC check on the trx file stored in flash (trx contains kernel and root file-system; *bin file is trx with some extra headers). If the CRC check fails, the router falls back to the boot loader and stays there, waiting for a new firmware. If the CRC check passes, the router loads the kernel from flash and executes it.

During the 3 second boot_wait state, or if the CRC fails, the loader will be accepting Ethernet packets. It does not contain a fully-working IP stack, and is only looking for 2 types of packets: ARP broadcasts and incoming TFTP attempts.

An ARP is an "Address Resolution Protocol" which converts an IP address into a mac address (machine address / hardware address), used for basic ethernet communication. An ARP request for 192.168.1.1 will return the mac address of the router. While in boot_wait, the router will accept any packet with the correct mac address, regardless of IP address. In particular in some situations on various networks, this is a bit problematic, because the ARP tables are not updated correctly or there are old stale ARP entries laying around (on another switch, or on the client PC; most layer-2 equipment does some form of ARP caching). In this case, you can bypass the ARP stage altogether and set a static ARP entry for an otherwise unused IP on your LAN with the MAC address of the router.

If you TFTP put a valid firmware image during the 3-5 second window, the unit will accept the file, and flash the file and proceed to boot -- which will then check the CRC. The easiest way to send a file during boot is to just start the TFTP tranfer (binary mode) to 192.168.1.1 during the 3-5 second window of opportunity.

The most common problem we hear about is folks under the mistaken impression that the TFTP server requires a username and password to send a file during boot_wait state. This is FALSE. There is a TFTP server enabled within the stock Linksys firmware; this is not the same thing as PMON or CFE. If you attempt to TFTP a firmware image to the unit while the Linksys TFTP server is running, you'll receive an error message claiming "incorrect password" or something of that nature. If you see that error message, then you missed the boot_wait window of opportunity or you didn't set boot_wait to on. In this case, you can still update the firmware via the Web-based "Firmware Upgrade" page. Note that without boot_wait set, recovery is tricker, so once you've upgraded it's highly recommended that you do enable boot_wait.

If you have a v2 or GS unit, during the CFE phase, you will always be able to reach the unit at IP 192.168.1.1. If this doesn't work for you, you likely forgot to enable boot_wait.

If you do end up with a 'dead' WRT unit due to not enabling boot_wait, there's still hope. Please see VoidMain's WRT54G Revival Page.

Setting Via the console

With a serial connection to your WRT, you don't have to use the ping bug or change your Linksys firmware. You can set boot_wait from the console, using the commands

#nvram set boot_wait=on
#nvram get boot_wait (just to confirm, should respond with "on")
#nvram commit (takes a few seconds to complete)

You can also set boot_wait from the CFE boot loader (to enter CFE, reboot the router with "# reboot" while hitting CTRL-C continously)

CFE> nvram set boot_wait=on
CFE> nvram get boot_wait (just to confirm, should respond with "on")
CFE> nvram commit (takes a few seconds to complete)

Or via PMON (older models, hit CTRL-C repeatedly during powerup or reboot)

PMON> set boot_wait on
PMON> set nvram boot_wait

Akcije #87

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://andrey.mikhalchuk.com/2008/10/23/how-to-add-serial-interface-to-wrt54gl-router.html

   1.  Open the router. This video shows how.
   2. Locate the *10-pin connector on the board*. It provides two serial interfaces and we will need one of them (serial console). You can similarly use the other one to control other devices via serial interface, but this is a separate topic.
   3. Get an RS232 adapter. For instance this one.
   4. If your computer doesn’t have com port, and has USB then get an adapter. For instance this one. If your computer doesn’t have USB ports, get another computer. Any computer with either USB or serial interface would work.
   5. Connect pins from the router board to pins on the RS232 adapter as following: 4->”TX”, 6->”RX”, 10->”-”, 2->”+”. Use either soldering iron or standard F/F connectors like this ones.
   6. Connect the RS232 adapter to the computer (via USB-Serial adapter if necessary), connect the RS232 adapter to the router board, turn everything on and check that the leds on the RS232 adapter lit appropriately (refer to the adapter manual to find out what’s appropriate)
   7. Turn everything off, start your favorite terminal program (for windows users that’s possibly hyperterm), configure it as 115200 8N1 (115200 bps speed, 8 data bits, no parity, 1 stop bit) and power the router on again. 

Now you should be able to see what’s happening in the router’s brain. Based on your linux experience you can diagnose what’s going wrong and try to fix it using full access to the router you just got.

In addition to 10-pin serial connector the router also provides 12-pin JTAG connector you can use to bring the router to live in situations when serial port is dead. But this is completely different story and I hope you will never need JTAG (for this purpose).

Akcije #88

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://www.adamsinfo.com/tag/serial-console/

Adding a serial port to your Linksys WRT54G, WRT54GS, WRT54GL and probably a wide range more is really really easy. The only thing we need is a serial to ttl converter. I personally followed the guide right here: http://www.rwhitby.net/projects/wrt54gs - works perfectly, and very well laid out. This http://www.compsys1.com/workbench/On_top_of_the_Bench/Max233_Adapter/max233_adapter.html is where I purchased my MAX232 kit from.

Akcije #89

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://blog.billy.gr/archives/2005/02/12/debrick-a-wrt54g/

Getting a cfe is easy is just a dd if=/dev/mtd/0 of=/tmp/cfe.bin if you have another WRT54G. Make sure that is the same version

http://oldwiki.openwrt.org/OpenWrtDocs(2f)Customizing(2f)Firmware(2f)CFE.html

Telnet/ssh to your router running your favorite firmware and type the following

nvram i cfe boot manager

dd if=/dev/mtdblock/0 bs=1 skip=4116 count=2048 | strings > /tmp/cfe.txt
dd if=/dev/mtdblock/0 of=/tmp/cfe.bin

Copy both cfe.bin and cfe.txt to your linux box (this is required).

Creating new CFE image

You will need a nvserial utility which comes with several GPL tarballs. Linksys supplies it in the wrt54g.1.42.3, wrt54g.1.42.2, wap55ag.1.07, wap54gv2.2.06. Launch nvserial in the way like this on your x86 linux box: You can get nvserial from http://downloads.openwrt.org/people/inh/programs/nvserial

nvserial -i cfe.bin -o cfe_new.bin -b 4096 -c 2048 cfe.txt

It works really slow, but it should finally create cfe_new.bin file for you, which has new embedded nvram.

Recompiling kernel with writable pmon partition

By default most firmwares has pmon partition write protected, i.e. you can't flash anything to this first 256k of flash. This is to prevent corrupting PMON/CFE. To remove this "lock" you will need to compile your own firmare with the following patch, you will need to copy the patch into "target/linux/linux-2.4/patches/brcm". (This patch works with WHITERUSSIAN RC3)

--- linux-2.4.30/arch/mips/bcm947xx/setup.c.orig        2005-09-21 11:24:09.000000000 -0400
+++ linux-2.4.30/arch/mips/bcm947xx/setup.c     2005-09-21 13:48:46.853425632 -0400
@@ -174,7 +174,7 @@
 #ifdef CONFIG_MTD_PARTITIONS

 static struct mtd_partition bcm947xx_parts[] = {
-       { name: "pmon", offset: 0, size: 0, mask_flags: MTD_WRITEABLE, },
+       { name: "pmon", offset: 0, size: 0 /*, mask_flags: MTD_WRITEABLE,*/ },
        { name: "linux", offset: 0, size: 0, },
        { name: "rootfs", offset: 0, size: 0, },
        { name: "nvram", offset: 0, size: 0, },

Note: At least on White Russian recompiling the kernel is not necessary. Theres a kernel module thats makes the CFE Partition writable at http://myantihero.net/pub/openwrt/

Flashing new CFE image

So, once you've recompiled and flashed your new firmware you need you upgrade CFE. This process is dangerous, as flash failure during it will prevent your unit from booting. Copy cfe_new.bin to your wrt54g and flash it. The exact commands are dependent on the firmware. With OpenWrt I've used the following:

mtd unlock pmon
mtd write -f /tmp/cfe_new.bin pmon

I recommend using the JTAG cable method for re-flashing your CFE. If something were to go wrong, you would end up needing the JTAG cable anyways. It's really cheap and easy to build, and makes it possible to recover from almost any error you make when writing to the flash. Check out http://openwrt.org/OpenWrtDocs

Akcije #90

Izmjenjeno od Ernad Husremović prije oko 16 godina

aha imamo sljedeća područja na flash-u:
  • pmon (boot loader)
  • linux (linux firmware)
  • rootfs (root file sistem koji se pravi nakon prvog boot-a)
  • nvram (nvram flash varijable)
Akcije #91

Izmjenjeno od Ernad Husremović prije oko 16 godina

openwrt 2.6 kerneli ne znaju handlirati nvram

Akcije #92

Izmjenjeno od Ernad Husremović prije oko 16 godina

interesantno

tomato na pmon-u ima MTD_WRITEABLE flag

static struct mtd_partition bcm947xx_parts[] = {
        { name: "pmon",   offset: 0, size: 0, mask_flags: MTD_WRITEABLE, },
        { name: "linux",  offset: 0, size: 0, },
        { name: "rootfs", offset: 0, size: 0, mask_flags: MTD_WRITEABLE, },
        { name: "jffs2",  offset: 0, size: 0, },
        { name: "nvram",  offset: 0, size: 0, },
        { name: NULL, },
};

Akcije #93

Izmjenjeno od Ernad Husremović prije oko 16 godina

ove strukture u samom openwrt-u nema nigdje !

hernad@nmraka-5:~/devel/git/openwrt/target/linux/brcm-2.4/files-orig/arch/mips/bcm947xx$ grep -r "mtd_" *

nvram_linux.c:static struct mtd_info *nvram_mtd = NULL;
nvram_linux.c:          put_mtd_device(nvram_mtd);
nvram_linux.c:          nvram_mtd = get_mtd_device(NULL, i);
nvram_linux.c:                  put_mtd_device(nvram_mtd);

hernad@nmraka-5:~/devel/git/openwrt/package/broadcom-wl$ grep -r "mtd_partition" *

ništa

Akcije #94

Izmjenjeno od Ernad Husremović prije oko 16 godina

hernad@nmraka-5:~/devel/git/tomato/release/src$ fnd_c "bcm947xx_parts"

./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:218:static struct mtd_partition bcm947xx_parts[] = {
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:242:       bcm947xx_parts[PART_NVRAM].offset = size - ROUNDUP(NVRAM_SPACE, mtd->erasesize);                                                                                            
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:243:       bcm947xx_parts[PART_NVRAM].size = size - bcm947xx_parts[PART_NVRAM].offset;                                                                                                 
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:251:                       bcm947xx_parts[PART_BOOT].size = off; 
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:253:                       bcm947xx_parts[PART_LINUX].offset = off;                                                                                                                    
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:254:                       bcm947xx_parts[PART_LINUX].size = bcm947xx_parts[PART_NVRAM].offset - off;                                                                                  
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:258:                       bcm947xx_parts[PART_ROOTFS].offset = trx->offsets[1] + off;                                                                                                 
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:259:                       bcm947xx_parts[PART_ROOTFS].size = trxsize - trx->offsets[1];                                                                                               
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:261:                       bcm947xx_parts[PART_JFFS2].offset = off + trxsize;                                                                                                          
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:262:                       bcm947xx_parts[PART_JFFS2].size = bcm947xx_parts[PART_NVRAM].offset - bcm947xx_parts[PART_JFFS2].offset;                                                    
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:275:       for (i = 0; bcm947xx_parts[i].name; ++i) {            
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:277:                       bcm947xx_parts[i].offset,             
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:278:                       (bcm947xx_parts[i].offset + bcm947xx_parts[i].size) - 1,                                                                                                    
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:279:                       bcm947xx_parts[i].size,               
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:280:                       bcm947xx_parts[i].name);              
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:284:       return bcm947xx_parts;                                
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:289:static struct mtd_partition bcm947xx_parts[] = {             
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:340:                       bcm947xx_parts[1].offset = off;
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:420:                       //bcm947xx_parts[1].offset = off1;
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:421:                       printk("bcm947xx_parts[1].offset=0x%lx trx->offsets[1]=0x%lx off\n", bcm947xx_parts[2].offset);
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:455:       bcm947xx_parts[4].offset = size - ROUNDUP(NVRAM_SPACE, mtd->erasesize);
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:456:       bcm947xx_parts[4].size = size - bcm947xx_parts[4].offset;
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:457:       printk("nvram: offset=0x%lx size=0x%lx\n",  bcm947xx_parts[4].offset, bcm947xx_parts[4].size);
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:459:       bcm947xx_parts[3].offset = off1;
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:460:       bcm947xx_parts[3].size = bcm947xx_parts[4].offset - bcm947xx_parts[3].offset;
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:464:       bcm947xx_parts[3].offset = size - ROUNDUP(NVRAM_SPACE, mtd->erasesize);
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:465:       bcm947xx_parts[3].size = size - bcm947xx_parts[3].offset;
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:469:               bcm947xx_parts[2].offset = off;
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:470:               bcm947xx_parts[2].size = bcm947xx_parts[3].offset - bcm947xx_parts[2].offset;
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:474:       bcm947xx_parts[1].size = bcm947xx_parts[3].offset - bcm947xx_parts[1].offset;
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:477:       bcm947xx_parts[0].size = bcm947xx_parts[1].offset - bcm947xx_parts[0].offset;
./linux/linux/arch/mips/brcm-boards/bcm947xx/setup.c:479:       return bcm947xx_parts;

Akcije #95

Izmjenjeno od Ernad Husremović prije oko 16 godina

tomato koristi jffs2, evo gdje se dešava formatiranje (prvo) jffs-a:

hernad@nmraka-5:~/devel/git/tomato/release/src/router/rc$ grep "start_jffs" *

init.c: start_jffs2();
Binary file init.o matches
jffs2.c:void start_jffs2(void)
Binary file jffs2.o matches
Binary file rc matches
rc.h:extern void start_jffs2(void);
rc.h:static inline void start_jffs2(void) { };
services.c:             if (action & A_START) start_jffs2();
Binary file services.o matches

Akcije #96

Izmjenjeno od Ernad Husremović prije oko 16 godina

http://lwn.net/Articles/219827/

SquashFS

A more recent (and more actively supported, the last updates coming in mid January 2007) compressed file system is SquashFS. SquashFS is a kind of successor to CramFS (originalni linksys firmware je rađen sa cramfs-om) because it aims at the same target audience while providing a similar process for creation and use of the file system. What makes SquashFS an improvement over CramFS is best stated by Phillip Lougher in a linux-kernel mailing list post: "SquashFS basically gives better compression, bigger files/file system support, and more inode information."

Both SquashFS and CramFS use zlib compression. However, CramFS uses a fixed size 4KB block while SquashFS supports from 0.5KB to 64KB. This variable block size allows for much larger file systems under SquashFS, something desirable for complex embedded systems like digital video recorders. Also SquashFS supports compression of both the metadata and block fragments while CramFS does not. And, while CramFS is integrated with the kernel source, SquashFS is not. It comes as a set of kernel patches and the driver module. The CELinux Forum provides some comparisons of SquashFS against other file systems (compressed and uncompressed).

JFFS2

Another compressed file system is JFFS2, the Journaling Flash file system, version 2. It was designed specifically for use with both NOR and NAND flash devices, and recently received an update via David Woodhouse for the NAND flash memory being used in the OLPC project. JFFS2 is actually a bit more sophisticated than SquashFS because it provides mechanisms for plugging in different compression algorithms, including not using any compression at all. But unlike SquashFS, JFFS2 is integrated into the kernel.

So if you're building an embedded system with flash storage, wouldn't you be better with JFFS2? Not necessarily.

According to the OpenWRT project, which uses both SquashFS and JFFS2, SquashFS provides better performance than JFFS2. Additionally, at least in the case of the few files that need to be updated for a production version of the project, there is little advantage to using a read/write JFFS2 compressed root file system with respect to the performance hit it incurs vs a read-only SquashFS root file system used with a writable JFFS2 file system for stored files.

JFFS2 is a read/write file system while SquashFS is a read-only file system. A runtime system very often needs to write to its root file system. Imagine making updates to /etc/hosts, for example, as you might with a embedded video recorder client trying to access a server backend on a local network. If writing to the file system is required for an embedded system, how could you use SquashFS at all?

Some projects, like OpenWRT, use a hybrid system that uses a read-only root file system mixed with a read/write file system for saving files. In such a hybrid you might use special configurations or modified applications to access read/write file systems, but that doesn't help if you need write access to /etc/hosts on a read-only file system. What you need is a method of having parts of the directory structure writable while other parts are read-only. What you need is a stackable file system like UnionFS.

Akcije #97

Izmjenjeno od Ernad Husremović prije oko 16 godina

Ernad Husremović je napisao/la:

interesantno

tomato na pmon-u ima MTD_WRITEABLE flag
[...]

ovo znači koliko sam shvatio (ovaj flag) da se pmon NE može formatirati

Akcije #98

Izmjenjeno od Ernad Husremović prije oko 16 godina

nešto kod ovog firmware-a smrdi velik je samo 2.2 MB. Recimo tomato kernel je veliki 3.7 MB

Akcije #99

Izmjenjeno od Ernad Husremović prije oko 16 godina

sljedeća stvar koju sam se sjetio jeste nvram utility, možda bih trebao uzeti nvram iz tomato source-a

hernad@nmraka-5:~/devel/git/tomato$ ls ./release/src/router/nvram/

hernad@nmraka-5:~/devel/git/openwrt$ find -name nvram

./package/nvram
./target/linux/brcm-2.4/files/shared/nvram

Akcije #101

Izmjenjeno od Ernad Husremović prije oko 16 godina

ovdje se objašnjava da imamo dva eth drivera:

I tried two software images for wl500gP: openwrt kamikaze and Olegs's firmware. Kamikaze can route about 40-44 megabits, Oleg's firmware can do 80-88 megabits. I tried to turn off every not needed to run features in the openwrt (firewall, imq etc ...) but I only got a 48 mefabits of routing through my wl500gP :-(

I asked question about this difference on Russian forum at http://wl500g.info/showthread.php?t=8812.
Oleg said that reason (may be) in the driver b44. Oleg uses original driver + his patches from et.o wich is already under GPL.

Akcije #103

Izmjenjeno od Ernad Husremović prije oko 16 godina

  • % završeno promijenjeno iz 0 u 70

borba borba borba ... ali je rezultat na kraju supica tach :(

zaglavio sam na build-u nvram-a i et.c drivera ...

još malo pa će i ova varijanta biti - zaboravi

Akcije #104

Izmjenjeno od Ernad Husremović prije oko 15 godina

  • Status promijenjeno iz Dodijeljeno u Odbačeno
Akcije

Također dostupno kao Atom PDF