OpenWrt Forum Archive

Topic: HOWTO: Openwrt and LIVEBOX

The content of this topic has been archived between 31 Mar 2018 and 23 Apr 2018. Unfortunately there are posts – most likely complete pages – missing.

HOWTO OUTDATED

Probably you may want to use another howto I've made
https://forum.openwrt.org/viewtopic.php?id=29101
It should be easier

http://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Livebox_sagem.jpg/180px-Livebox_sagem.jpg
VERY IMPORTANT NOTE: NEVER, NEVER FLASH YOUR REDBOOT WITH A ROM REDBOOT WORKING!!! ---> BRICK.
USE INSTEAD WORKING A RAM REDBOOT BOOTED TO DO IT, OR WITH LINUX BOOTED.

In this post i will bring you the clues to convert your inventel Livebox (Inventel DV4210) into an Openwrt machine. You will need two things to do this in a easy way

1. First of all you will need a telnet command line access to your Livebox, there are several howtos on internet to do this.
2. A ftp or http server to load redboot, and the openwrt firmware

This is the redboot, and openwrt that we will flash to mtd0, and mtd1:
http://files.myopera.com/danitool/liveb … lnet03.rom
http://files.myopera.com/danitool/liveb … 727.cramfs       (with Luci)
Put this files in your ftp server.

Telnet you livebox load (wget) the redboot and openwrt:

# /etc/init.d/ramdisk start 16 
# cd /mnt/ramdisk/rd1
# wget http://url_to_get/redbootelnet03.rom
# wget http://url_to_get/openwrt25727.cramfs
# fcp -v redbootelnet03.rom /dev/mtd0
Erasing blocks: 3/3 (100%)
Writing data: 192k/192k (100%)
Verifying data: 192k/192k (100%)
#fcp -v openwrt25661.cramfs /dev/mtd1
#

To erase the old config from the inventel's firmware unplug the router, press the button 1 and plug the router again, wait 5 seconds, release the button, now you access redboot console also through telnet

telnet 10.7.58.112 9000

Check the boot script in the redboot. The important configuration must be like this:

RedBoot> fconfig -l -n
boot_script: true
boot_script_data: 
.. fis load -b 0x80010000 -m cramfs -f Image user_fs
.. exec -c "boot_loader=RedBoot root=1F01 mem=16M" 0x80010000
bootp_my_ip: 10.7.58.112
bootp_server_ip: 10.7.58.114

To adjust this variables if you need it:

RedBoot> fconfig boot_script true
RedBoot> fconfig boot_script_data
boot_script_data: 
.. fis load -b 0x80010000 -m cramfs -f Image wrong
.. exec -c "boot_loader=RedBoot root=1F01 mem=16M" 0x80010000
Enter script, terminate with empty line
>> fis load -b 0x80010000 -m cramfs -f Image user_fs
>> exec -c "boot_loader=RedBoot root=1F01 mem=16M" 0x80010000
>> 
RedBoot> fconfig bootp_my_ip 10.7.58.112
RedBoot> bootp_server_ip 10.7.58.114

Now you can reboot the router. and wait 90 seconds until the system is completely started.
That's all, now you have openwrt in your livebox, you can access it via telnet (use a compatible ip in your pc and telnet to 192.168.1.1). Or use a web browser (http://192.168.1.1)

[dani@tool ~]$ telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
 === IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
 ------------------------------------------
BusyBox v1.17.3 (2011-02-23 19:23:00 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 ATTITUDE ADJUSTMENT (bleeding edge, r25727) ----------
  * 1/4 oz Vodka      Pour all ingredents into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------
root@OpenWrt:/#

Edit /etc/config/wireless and /etc/config/network to your preferences with the command vi




The hard way through serial console, and building your custom firmware:

You will need access over your serial port, or the new redboot I built for the Livebox which allows to telnet it in the port 9000. Here you have information about the serial console: special cable, a serial TTL (most routers have one serial port and Openwrt is loaded sending commands through this device). I use an old usb to serial cable data phone (a Sony Ericcsson one), many people use a Nokia one, the most important is to identify the pinout: TX, RX and GND. The software I use to control this serial port is CuteCom.

This is a schema of our target SoC BCM6348
http://files.myopera.com/danitool/linux/bcm6348.png

This is how I connected the serial port to a cellphone data cable.
http://files.myopera.com/danitool/linux/livebox-serial.jpg

Livebox Pin-out:
1       data in (3V)
2       data out (3V)
3       button "2" input
4       button "1" input
5       +5V
6       ground
Parameters: 115200 baud, 8 databits, no parity, 1 stopbit

(I needed to plug the phone because this crap cable does not transmit if the phone is not plugged, probably you won't need to do this with your cable)

First we need access via telnet because we will need to change the Redboot loader with another one that let us to break into the command line while the Livebox boots:

http://files.myopera.com/danitool/liveb … lnet02.rom


Check this file and be sure the file is not corrupted, it is very important, you can make a brick with an improper Redboot loader.

# cd /tmp
# wget http://url_to_get/redbootelnet02.rom
# fcp -v redbootelnet02.rom /dev/mtd0
Erasing blocks: 3/3 (100%)
Writing data: 192k/192k (100%)
Verifying data: 192k/192k (100%)#

If you already have changed the firmware to openwrt and you want to flash with this new redboot which allows to telnet it in the 9000 port when you press button then power on the router, then you can back to the inventel's firmware through serial console with this image:
http://www.andyp.uwclub.net/livebox_fir … -uk.cramfs . Or maybe you just want back to the inventel firmware smile.

Another thing you will need of course is a GNU-Linux environment. I use kubuntu karmic-koala. And a tftp server installed. You can install it simply with:

sudo apt-get install atftp

The directory where atftp works serving files is in my system located at /var/lib/tftpboot. That is where you will put yor openwrt image. Make it writeable:

sudo chmod ugo+rwx /var/lib/tftpboot

Be sure you use an ip that the Redboot of your livebox will understand, default is 10.7.58.114, you can make a virtual interface in your pc with this ip:

sudo ifconfig eth0:10 10.7.58.114

Once you have flashed the new Redboot check that you can break into it, conect the serial port, start CuteCom and press Ctrl+C while the livebox boots up, you must see the redboot command line. Review the config

fconfig -l -n

You can change the ip of redboot, if you need to do so, this is an example:

fconfig bootp_my_ip 10.7.58.112
fconfig bootp_server_ip 10.7.58.114

Before start building the OpenWrt image for livebox you will need some stuff:
svn gcc g++ binutils patch make automake gettext pkg-config unzip bzip2 flex bison libz-dev quilt gawk flex libghc6-zlib-dev...

Make a directory somewhere called "kamikaze" and open a terminal there. Enter this comands

[dani@tool kamikaze]$ svn co svn://svn.openwrt.org/openwrt/trunk/

[dani@tool kamikaze]$ find ./trunk/package/base-files/ -type f -exec sed -i 's/rootfs_data/jffs_system/g' {} \;

[dani@tool kamikaze]$ grep LINUX_VERSION ./trunk/target/linux/brcm63xx/Makefile 
LINUX_VERSION:=2.6.35.7

Put the new livebox profile 170-board_livebox.patch in:

trunk/target/linux/brcm63xx/patches-2.6.3x/      (2.6.3x is the current linux version, grep told us it is 2.6.35)

Open another terminal in trunk subdirectory and enter the command:

[dani@tool trunk]$ make menuconfig

Then search in the menus the following stuff and check it.

??????????????????????????? Target System ????????????????????????????
?                                                                    ?
? ????????????????????^(-)?????????????????????????????????????????? ?
? ?               ( ) Atheros AR231x/AR5312                        ? ?
? ?               ( ) Atheros AR71xx/AR7240/AR913x                 ? ?
? ?               ( ) Atmel AT91                                   ? ?
? ?               ( ) Atmel AVR32                                  ? ?
? ?               ( ) Axis ETRAX 100LX                             ? ?
? ?               (X) Broadcom BCM63xx                             ? ?
? ????????????????????v(+)?????????????????????????????????????????? ?
??????????????????????????????????????????????????????????????????????
?                       <Select>      < Help >                       ?
??????????????????????????????????????????????????????????????????????
  ????????????????????????????????????? Target Images ?????????????????????????????????????
  ?                                                                                       ?
  ? ????????????????????????????????????????????????????????????????????????????????????? ?
  ? ? [ ] ramdisk  --->                                                                 ? ?
  ? ? --- Root filesystem archives                                                      ? ?
  ? ? [ ] cpio.gz                                                                       ? ?
  ? ? [*] tar.gz                                                                        ? ?
  ? ? --- Root filesystem images                                                        ? ?
  ? ? [ ] ext2                                                                          ? ?
  ? ? [*] jffs2                                                                         ? ?
  ? ? [*] squashfs                                                                      ? ?
  ? ? --- Image Options                                                                 ? ?
  ? ????????????????????????????????????????????????????????????????????????????????????? ?
  ?????????????????????????????????????????????????????????????????????????????????????????
  ?                           <Select>    < Exit >    < Help >                            ?
  ?????????????????????????????????????????????????????????????????????????????????????????

disable the switch, livebox doesn't have one

?????????????????????????????????? Other modules ?????????????????????????????
? ??^(-)???????????????????????????????????????????????????????????????????? ?
? ? < > kmod-ledtrig-netdev.............................. LED NETDEV Trigge? ?
? ? < > kmod-mmc........................................ MMC/SD Card Suppor? ?
? ? < > kmod-mmc-over-gpio.................... MMC/SD card over GPIO suppor? ?
? ? < > kmod-pcmcia-core............................ PCMCIA/CardBus support? ?
? ? <>  kmod-pcmcia-bcm63xx.............. Broadcom BCM63xx PCMCIA support? ?
? ? < > kmod-pcspkr...................................... PC speaker suppor? ?
? ? < > kmod-softdog............................... Software watchdog drive? ?
? ? < > kmod-switch.......................................... Switch driver? ?
? ? < > kmod-textsearch.............Textsearch support is selected if neede? ?
? ?????????????????????????????????????????????????????????????????????????? ?
??????????????????????????????????????????????????????????????????????????????
?                   <Select>    < Exit >    < Help >                         ?
??????????????????????????????????????????????????????????????????????????????

Select modules that you need for usb. Note that bcm6348 has usb 1.1 then it uses OHCI drivers

Location:
     -> Kernel modules
       -> USB Support
?????????????????????????????? USB Support ???????????????????????????????
? ?????????????????????????????????????????????????????????????????????? ?
? ? <*> kmod-usb-core................................... Support for US? ?
? ? < >   kmod-usb-acm................ Support for modems/isdn controll? ?
? ? < >   kmod-usb-atm......................... Support for ATM on USB ? ?
? ? < >   kmod-usb-audio.................... Support for USB audio devi? ?
? ? < >   kmod-usb-cm109......................... Support for CM109 dev? ?
? ? < >   kmod-usb-hid................ Support for USB Human Input Devi? ?
? ? < >   kmod-usb-net...... Kernel modules for USB-to-Ethernet convert? ?
? ? <*>   kmod-usb-ohci...................... Support for OHCI controll? ?
? ? < >   kmod-usb-phidget............................. USB Phidget Dri? ?
? ? < >   kmod-usb-printer........................... Support for print? ?
? ? < >   kmod-usb-serial............ Support for USB-to-Serial convert? ?
? ? <*>   kmod-usb-storage............................ USB Storage supp? ?
? ? < >   kmod-usb-uhci...................... Support for UHCI controll? ?
? ? < >   kmod-usb-video.................... Support for USB video devi? ?
? ? < >   kmod-usb-yealink......................... USB Yealink VOIP ph? ?
? ? < >   kmod-usb2.......................... Support for USB2 controll? ?
? ?????????????????????????????????????????????????????????????????????? ?
??????????????????????????????????????????????????????????????????????????
?                    <Select>    < Exit >    < Help >                    ?
??????????????????????????????????????????????????????????????????????????

Don't forget to enable the Native Language Support for the usb storage

Location:
     -> Kernel modules
       -> Native Language Support
????????????????????????????? Native Language Support ??????????????????????????????   
? ???????????????????????????????????????????????????????????????????????????????? ?   
? ? --- kmod-nls-base.................................... Native Language Support? ?   
? ? < > kmod-nls-cp1250........................... Codepage 1250 (Eastern Europe)? ?   
? ? < > kmod-nls-cp1251.................................. Codepage 1251 (Russian)? ?   
? ? <*> kmod-nls-cp437...................... Codepage 437 (United States, Canada)? ?   
? ? < > kmod-nls-cp775................................. Codepage 775 (Baltic Rim)? ?   
? ? < > kmod-nls-cp850..................................... Codepage 850 (Europe)? ?   
? ? < > kmod-nls-cp852..................................... Codepage 852 (Europe)? ?   
? ? < > kmod-nls-cp866................................... Codepage 866 (Cyrillic)? ?   
? ? <*> kmod-nls-iso8859-1...... ISO 8859-1 (Latin 1; Western European Languages)? ?   
? ? < > kmod-nls-iso8859-13........................ ISO 8859-13 (Latin 7; Baltic)? ?   
? ? < > kmod-nls-iso8859-15..... ISO 8859-15 (Latin 9; Western, with Euro symbol)? ?   
? ? < > kmod-nls-iso8859-2...... ISO 8859-2 (Latin 2; Central European Languages)? ?   
? ? < > kmod-nls-koi8r.......................................... KOI8-R (Russian)? ?   
? ? <*> kmod-nls-utf8...................................................... UTF-8? ?   
? ???????????????????????????????????????????????????????????????????????????????? ?   
????????????????????????????????????????????????????????????????????????????????????   
?                         <Select>    < Exit >    < Help >                         ?   
????????????????????????????????????????????????????????????????????????????????????

and the mount-utils:

Location:  
     -> Utilities
???????????????????????????????????? Utilities ?????????????????????????????????????   
? ??^(-)?????????????????????????????????????????????????????????????????????????? ?
? ? < > haserl............ A CGI wrapper to embed shell scripts in HTML documents? ?
? ? <*> hwclock........................ Utilities for managing the hardware clock? ?
? ? < > jshn................................................. JSON SHell Notation? ?
? ? < > kexec-tools.......................................... Kernel boots kernel? ?
? ? < > ldconfig............................... Shared library path configuration? ?
? ? < > ldd.................................................... LDD trace utility? ?
? ? < > losetup....................... Loopback devices setup and control utility? ?
? ? <*> mount-utils........................... Devices mount/unmounting utilities? ?
? ? < > mountd.......................................... OpenWrt automount daemon? ?
? ? < > ocf-crypto-headers............................ OCF-Linux cryptodev header? ?
? ? < > openssl-util........................... Open source SSL toolkit (utility)? ?
? ? < > px5g.............................. Standalone X.509 certificate generator? ?
? ? < > robocfg....................... BCM5325E/536x switch configuration utility? ?
? ? < > spidev-test.......................................... SPI testing utility? ?
? ??v(+)?????????????????????????????????????????????????????????????????????????? ?
????????????????????????????????????????????????????????????????????????????????????
?                         <Select>    < Exit >    < Help >                         ?
????????????????????????????????????????????????????????????????????????????????????

Exit and save, next do:

make kernel_menuconfig
??????????????????????????????? CPU support ????????????????????????????????
? ???????????????????????????????????????????????????????????????????????? ?
? ?    [ ] support 6338 CPU                                              ? ?
? ?    [ ] support 6345 CPU                                              ? ?
? ?    [*] support 6348 CPU                                              ? ?
? ?    [ ] support 6358 CPU                                              ? ?
? ?                                                                      ? ?
? ???????????????????????????????????????????????????????????????????????? ?
????????????????????????????????????????????????????????????????????????????
?                     <Select>    < Exit >    < Help >                     ?
????????????????????????????????????????????????????????????????????????????
  ??????????????????????????? Board support ????????????????????????????
  ? ?????????????????????????????????????????????????????????????????? ?
  ? ?               ( ) Generic Broadcom 963xx boards                ? ?
  ? ?               (X) Inventel Livebox(es) boards                  ? ?
  ? ?                                                                ? ?
  ? ?????????????????????????????????????????????????????????????????? ?
  ??????????????????????????????????????????????????????????????????????
  ?                       <Select>      < Help >                       ?
  ??????????????????????????????????????????????????????????????????????

Adjust settings to our flash memory chip:

Location:
     -> Device Drivers
       -> Memory Technology Device (MTD) support (MTD [=y])
         -> RAM/ROM/Flash chip drivers 
??????????????????????? RAM/ROM/Flash chip drivers ????????????????????????
? ??????????????????????????????????????????????????????????????????????? ?
? ?    <*> Detect flash chips by Common Flash Interface (CFI) probe     ? ?
? ?    <*> Detect non-CFI AMD/JEDEC-compatible flash chips              ? ?
? ?    [*] Flash chip driver advanced configuration options             ? ?
? ?          Flash cmd/query data swapping (BIG_ENDIAN_BYTE)  --->      ? ?
? ?    [*]   Specific CFI Flash geometry selection                      ? ?
? ?    [ ]     Support  8-bit buswidth                                  ? ?
? ?    [*]     Support 16-bit buswidth                                  ? ?
? ?    [ ]     Support 32-bit buswidth                                  ? ?
? ?    [ ]     Support 64-bit buswidth                                  ? ?
? ?    [ ]     Support 128-bit buswidth                                 ? ?
? ?    [ ]     Support 256-bit buswidth                                 ? ?
? ?    [*]     Support 1-chip flash interleave                          ? ?
? ?    [ ]     Support 2-chip flash interleave                          ? ?
? ?    [ ]     Support 4-chip flash interleave                          ? ?
? ?    [ ]     Support 8-chip flash interleave                          ? ?
? ?    [ ]   Protection Registers aka one-time programmable (OTP) bits  ? ?
? ?    <*> Support for Intel/Sharp flash chips                          ? ?
? ?    <*> Support for AMD/Fujitsu/Spansion flash chips                 ? ?
? ?    <*> Support for ST (Advanced Architecture) flash chips           ? ?
? ?    < > Support for RAM chips in bus mapping                         ? ?
? ?    < > Support for ROM chips in bus mapping                         ? ?
? ?    < > Support for absent chips in bus mapping                      ? ?
? ??????????????????????????????????????????????????????????????????????? ?
???????????????????????????????????????????????????????????????????????????
?                    <Select>    < Exit >    < Help >                     ?
???????????????????????????????????????????????????????????????????????????

Kernel hacking, this is very important too

???????????????????????????? Default kernel command string ????????????????????????????????
?                                                                                         ?
? ??????????????????????????????????????????????????????????????????????????????????????? ?
? ?root=/dev/mtdblock1 rootfstype=cramfs,squashfs init=/etc/preinit console=ttyS0,115200? ?
? ??????????????????????????????????????????????????????????????????????????????????????? ?
?                                                                                         ?
???????????????????????????????????????????????????????????????????????????????????????????
?                                <  Ok  >      < Help >                                   ?
???????????????????????????????????????????????????????????????????????????????????????????

now exit and save changes, and make the world

[dani@tool trunk]$ make V=99

Next step is to convert our stuff into a cramfs image to flash the Livebox
Download the ruff's script to your kamikaze directory, wireless, system and network (edit the last 3 files to your preferences). Make the cramfs image.

[dani@tool kamikaze]$ chmod +x kamk.sh
[dani@tool kamikaze]$ ./kamk.sh

We will get openwrt.cramfs image ready to flash. This is mine http://files.myopera.com/danitool/liveb … 727.cramfs (use it only for testing purpose)
put openwrt.cramfs into the atftp server directory /var/lib/tftpboot. Plug an ethernet cable from your computer to the yellow port in the livebox.

Now you have two options to flash it

a)  Push the button 1 and power on the router, wait 5 seconds and release the button. This is if you use the new redboot. Telnet redboot:

telnet 10.7.58.112 9000
Redboot >

Now you can use the commands exactly as in the next option, but without the serial console.

b) Open cutecom and lug your serial interface to the livebox, an power on the livebox, push control+c to break into redboot
First check your partition table. This is mine:

RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xBE400000  0xBE400000  0x00030000  0x00000000
user_fs           0xBE430000  0xBE430000  0x00720000  0x80545FB0
jffs_system       0xBEB50000  0xBEB50000  0x000A0000  0x80545FB0
FIS directory     0xBEBF0000  0xBEBF0000  0x0000F000  0x00000000
RedBoot config    0xBEBFF000  0xBEBFF000  0x00001000  0x00000000

As you see I have jffs_system with flash adress=0xBEB50000 and length=0x000A0000.
erase jffs_system

fis erase -f 0xBEB50000 -l 0x000A0000

load openwrt.cramfs

load -r -v -b 0x80800000 openwrt.cramfs

flash openwr.cramfs

fis create -b 0x80800000 user_fs

http://files.myopera.com/danitool/linux/cutecom.png

Reboot your device, and telnet it in your computer

telnet 10.7.58.112

This is my log

root@OpenWrt:/# dmesg 
[    0.000000] Linux version 2.6.35.7 (dani@tool) (gcc version 4.3.3 (GCC) ) #2 Mon Oct 11 23:47:18 CEST 2010
[    0.000000] Detected Broadcom 0x6348 CPU revision b0
[    0.000000] CPU frequency is 256 MHz
[    0.000000] 16MB of RAM installed
[    0.000000] registering 37 GPIOs
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 00029107 (Broadcom BCM6348)
[    0.000000] board_livebox: board name: Livebox
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 01000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00001000
[    0.000000] Movable zone start PFN for each node
[    0.000000] early_node_map[1] active PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00001000
[    0.000000] On node 0 totalpages: 4096
[    0.000000] free_area_init_node: node 0, pgdat 80280220, node_mem_map 802c7000
[    0.000000]   Normal zone: 32 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 4064 pages, LIFO batch:0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
[    0.000000] Kernel command line:  root=/dev/mtdblock1 rootfstype=cramfs,squashfs noinitrd console=ttyS0,115200
[    0.000000] PID hash table entries: 64 (order: -4, 256 bytes)
[    0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes.
[    0.000000] Primary data cache 8kB, 2-way, VIPT, no aliases, linesize 16 bytes
[    0.000000] Memory: 13380k/16384k available (2129k kernel code, 3004k reserved, 369k data, 148k init, 0k highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU-based detection of stalled CPUs is disabled.
[    0.000000]  Verbose stalled-CPUs detection is disabled.
[    0.000000] NR_IRQS:128
[    0.000000] Calibrating delay loop... 253.63 BogoMIPS (lpj=989184)
[    0.164062] pid_max: default: 32768 minimum: 301
[    0.171875] Mount-cache hash table entries: 512
[    0.242187] NET: Registered protocol family 16
[    0.312500] registering PCI controller with io_map_base unset
[    0.351562] bio: create slab <bio-0> at 0
[    0.382812] pci 0000:00:01.0: reg 10: [mem 0x00000000-0x00001fff]
[    0.398437] pci 0000:00:01.0: BAR 0: assigned [mem 0x30000000-0x30001fff]
[    0.406250] pci 0000:00:01.0: BAR 0: set to [mem 0x30000000-0x30001fff] (PCI address [0x30000000-0x30001fff]
[    0.421875] Switching to clocksource MIPS
[    0.476562] PCI: Enabling device 0000:00:01.0 (0000 -> 0002)
[    0.484375] PCI: Setting latency timer of device 0000:00:01.0 to 64
[    0.523437] ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x0D, vendor 0x4243)
[    0.523437] ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x09, vendor 0x4243)
[    0.523437] ssb: Core 2 found: PCI (cc 0x804, rev 0x0C, vendor 0x4243)
[    0.523437] ssb: Core 3 found: PCMCIA (cc 0x80D, rev 0x07, vendor 0x4243)
[    0.585937] ssb: Sonics Silicon Backplane found on PCI device 0000:00:01.0
[    0.601562] NET: Registered protocol family 2
[    0.609375] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.640625] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.648437] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.656250] TCP: Hash tables configured (established 512 bind 512)
[    0.664062] TCP reno registered
[    0.664062] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.671875] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.687500] NET: Registered protocol family 1
[    0.687500] PCI: CLS 0 bytes, default 32
[    0.718750] audit: initializing netlink socket (disabled)
[    0.718750] type=2000 audit(0.718:1): initialized
[    0.734375] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.742187] Registering mini_fo version $Id$
[    0.750000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.765625] msgmni has been set to 26
[    0.789062] io scheduler noop registered
[    0.789062] io scheduler deadline registered (default)
[    0.812500] gpiodev: gpio device registered with major 254
[    0.828125] bcm63xx_uart.0: ttyS0 at MMIO 0xfffe0300 (irq = 10) is a bcm63xx_uart
[    0.835937] console [ttyS0] enabled, bootconsole disabled
[    0.867187] bcm963xx_flash: 0x00800000 at 0x1fc00000
[    0.875000] bcm963xx: Found 1 x16 devices at 0x0 in 16-bit bank
[    0.882812]  CFI mfr 0x00000001
[    0.890625]  CFI id  0x00001000
[    0.890625] Amd/Fujitsu Extended Query Table at 0x0040
[    0.898437]   Amd/Fujitsu Extended Query version 1.3.
[    0.906250] number of CFI chips: 1
[    0.906250] bcm963xx_flash: Read Signature value of 
[    0.914062] bcm963xx_flash: assuming RedBoot bootloader
[    0.921875] bcm963xx_flash: Support for extended flash memory size : 0x142f - livebox virt->be400000
[    0.929687] Searching for RedBoot partition table in bcm963xx at offset 0x7f0000
[    0.960937] Creating 5 MTD partitions on "bcm963xx":
[    0.960937] 0x000000000000-0x000000030000 : "RedBoot"
[    0.992187] 0x000000030000-0x000000750000 : "user_fs"
[    1.023437] 0x000000750000-0x0000007f0000 : "jffs_system"
[    1.046875] 0x0000007f0000-0x0000007ff000 : "FIS directory"
[    1.078125] 0x0000007ff000-0x000000800000 : "RedBoot config"
[    1.140625] bcm63xx_enet MII bus: probed
[    1.195312] bcm63xx_wdt started, timer margin: 30 sec
[    1.210937] Registered led device: power
[    1.210937] Registered led device: phone
[    1.218750] Registered led device: wifi
[    1.218750] Registered led device: adsl-fail
[    1.226562] Registered led device: adsl
[    1.234375] Registered led device: eth1
[    1.265625] TCP westwood registered
[    1.265625] NET: Registered protocol family 17
[    1.273437] 802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
[    1.281250] All bugs added by David S. Miller <davem@redhat.com>
[    1.320312] cramfs: Read magic [45 3D FFCD 28] expecting [28 FFCD 3D 45]
[    1.328125] cramfs: wrong endianess, trying to swap
[    1.335937] cramfs: Read magic [28 FFCD 3D 45] expecting [28 FFCD 3D 45]
[    1.343750] VFS: Mounted root (cramfs filesystem) readonly on device 31:1.
[    1.359375] Freeing unused kernel memory: 148k freed
[    8.554687] eth1: link forced UP - 100/full - flow control off/off
[   17.359375] mini_fo: using base directory: /
[   17.359375] mini_fo: using storage directory: /overlay
[   27.343750] bcm63xx_enet bcm63xx_enet.0: attached PHY at address 1 [Broadcom BCM63XX (1)]
[   28.804687] device eth0 entered promiscuous mode
[   30.031250] eth0: link UP - 100/full - flow control off
[   30.054687] br-lan: port 1(eth0) entering forwarding state
[   30.062500] br-lan: port 1(eth0) entering forwarding state
[   32.101562] eth1: link forced UP - 100/full - flow control off/off
[   33.015625] device eth1 entered promiscuous mode
[   33.023437] br-lan: port 2(eth1) entering forwarding state
[   33.031250] br-lan: port 2(eth1) entering forwarding state
[   36.867187] Compat-wireless backport release: compat-wireless-2010-10-01-10-gb9b0a4f
[   36.875000] Backport based on wireless-testing.git master-2010-10-07
[   39.578125] cfg80211: Calling CRDA to update world regulatory domain
[   41.640625] cfg80211: World regulatory domain updated:
[   41.648437]     (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   41.656250]     (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   41.664062]     (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   41.671875]     (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   41.679687]     (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   41.687500]     (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   46.765625] SCSI subsystem initialized
[   50.484375] usbcore: registered new interface driver usbfs
[   50.492187] usbcore: registered new interface driver hub
[   50.546875] usbcore: registered new device driver usb
[   55.632812] b43-phy0: Broadcom 4318 WLAN found (core revision 9)
[   55.796875] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   55.828125] Registered led device: b43-phy0::tx
[   55.828125] Registered led device: b43-phy0::rx
[   55.828125] Registered led device: b43-phy0::radio
[   55.835937] Broadcom 43xx driver loaded [ Features: PL, GPIO LED Mask: 0x000f, Firmware-ID: FW13 ]
[   59.156250] PPP generic driver version 2.4.2
[   64.414062] ip_tables: (C) 2000-2006 Netfilter Core Team
[   66.617187] NET: Registered protocol family 24
[   69.804687] nf_conntrack version 0.5.0 (211 buckets, 844 max)
[   75.312500] Initializing USB Mass Storage driver...
[   75.320312] usbcore: registered new interface driver usb-storage
[   75.328125] USB Mass Storage support registered.
[   75.968750] bcm63xx-spi bcm63xx-spi.0:  at 0xfffe0c00 (irq 9, FIFOs size 63) v0.1.2
[   84.640625] b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
[   90.812500] wlan0: authenticate with 00:1a:2b:07:0a:b9 (try 1)
[   90.812500] wlan0: authenticated
[   90.945312] wlan0: associate with 00:1a:2b:07:0a:b9 (try 1)
[   90.953125] wlan0: RX AssocResp from 00:1a:2b:07:0a:b9 (capab=0x11 status=0 aid=2)
[   90.953125] wlan0: associated

You can probe this steps if you are sure enough.

Be care, and of course don't blow me if you make a brick.

                                           enjoy
                                         (danitool)

external links:
psidoc
andyp website
dbzoo
darkfader
kamikaze latest trunk br63xx
pinouts
old openwrt thread

(Last edited by danitool on 1 Mar 2012, 19:40)

may be due to last changes in trunk, script from ruff must create  /jffs folder before execute mkcramfs

Thnx for your work.
Tested and up with 20390 trunk

I'm getting this error after latest trunk:

mini_fo: error accessing hidden 
directory '/jffs/etc-ro'
mini_fo_read_super: lookup_dentry failed (err = -22)

maybe due script from ruff
I cannot write changes in configuration files.

dani,
i made this changes:
1.- from redboot console rename jff-system to rootfs_data (as usually openwrt uses) with:

                  fis create rootfs_data -b 0xBEB50000 -l 0x000A0000 -e 0x80545FB0

2.- i changed ruff script as:

#!/bin/bash

# depends where you installs toolchain (trunk)
OPENWRT=/home/openwrt/trunk
TARGET=root


# erasing old versions
rm -rf $TARGET

# making root
mkdir $TARGET
# tar xzf $OPENWRT/bin/brcm63xx/openwrt-brcm63xx-rootfs.tgz -C $TARGET
tar xzf $OPENWRT/bin/brcm63xx/openwrt-brcm63xx-rootfs.tar.gz -C $TARGET
cp $OPENWRT/build_dir/linux-brcm63xx/vmlinux $TARGET/Image

# personal changes to openwrt standards
# remember eth1 must be on lan interface (eth0 not running)

cp ./pedassos/network $TARGET/etc/config/
cp ./pedassos/fstab $TARGET/etc/config/
cp ./pedassos/platform.sh $TARGET/lib/upgrade/
cp ./pedassos/system $TARGET/etc/config/
cp ./pedassos/sw_wifi $TARGET/sbin
mkdir $TARGET/etc/hotplug.d/button
cp ./pedassos/01-button-togle $TARGET/etc/hotplug.d/button

#  packing firmware
./mkcramfs $TARGET openwrt.cramfs
cp openwrt.cramfs $OPENWRT/bin

and i not use ruff patch "cp etccramfs $TARGET/etc/init.d/", because after renamed partition as rootfs_data it became writeable.
also i'm sloowly working on eth0, leds and buttons (i found gpios), this is my actual board_livebox.c file

/*
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org>
 */

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/platform_device.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/physmap.h>
#include <linux/gpio_buttons.h>
#include <linux/input.h>
#include <asm/addrspace.h>
#include <bcm63xx_board.h>
#include <bcm63xx_cpu.h>
#include <bcm63xx_regs.h>
#include <bcm63xx_io.h>
#include <bcm63xx_dev_pci.h>
#include <bcm63xx_dev_enet.h>
#include <bcm63xx_dev_dsp.h>
#include <bcm63xx_dev_pcmcia.h>
#include <bcm63xx_dev_usb_ohci.h>
#include <bcm63xx_dev_usb_ehci.h>
#include <bcm63xx_dev_usb_udc.h>
#include <bcm63xx_dev_spi.h>
#include <board_bcm963xx.h>

#define PFX    "board_livebox: "

static unsigned int mac_addr_used = 0;
static struct board_info board;

/*
 * known 6348 boards
 */
#ifdef CONFIG_BCM63XX_CPU_6348
static struct board_info __initdata board_livebox = {
    .name                = "Livebox",
    .expected_cpu_id        = 0x6348,

    .has_enet0            = 1,
    .has_enet1            = 1,
    .has_pci            = 1,

    .enet0 = {
        .has_phy        = 1,
        .use_internal_phy    = 1,
    },

    .enet1 = {
        .has_phy        = 0,
/*        .use_internal_phy    = 1,
        .pause_auto        = ?,
        .pause_rx        = ?,
        .pause_tx        = ?,
        .phy_id            = 2,
        .has_phy_interrupt    = 0,
        .phy_interrupt        = ?,*/
        .force_speed_100    = 1,
        .force_duplex_full    = 1,
    },

    .has_ohci0            = 1,
/*    .has_pccard            = 1,
    .has_ehci0            = 1,
    .has_udc0            = 1,

    .has_dsp            = 1,
    .dsp = {
        .gpio_rst        = 6,
        .gpio_int        = 34,
        .cs            = 2,
        .ext_irq        = 2,
    },*/

    .leds = {
        {
            .name        = "power",
            .gpio        = 2,
            .active_low    = 0,
        },
        {
            .name        = "phone",
            .gpio        = 3,
            .active_low    = 0,
        },
        {
            .name        = "wifi",
            .gpio        = 4,
            .active_low    = 0,
        },
        {
            .name        = "adsl-fail",
            .gpio        = 0,
            .active_low    = 0,
            .default_trigger = "default-on",
        },
        {
            .name        = "adsl",
            .gpio        = 1,
            .active_low    = 0,
        },
    },

    .buttons = {
        {
            .desc        = "BTN_1",
            .gpio        = 36,
            .active_low    = 1,
            .type        = EV_KEY,
            .code        = BTN_1,
            .threshold    = 3,
        },
        {
            .desc        = "BTN_2",
            .gpio        = 7,
            .active_low    = 1,
            .type        = EV_KEY,
            .code        = BTN_2,
            .threshold    = 3,
        },

    },

};
#endif

/*
 * all boards
 */
static const struct board_info __initdata *bcm963xx_boards[] = {
#ifdef CONFIG_BCM63XX_CPU_6348
    &board_livebox
#endif
};

/*
 * early init callback
 */
void __init board_prom_init(void)
{
    u32 val;

    /* read base address of boot chip select (0) */
    val = bcm_mpi_readl(MPI_CSBASE_REG(0));
    val &= MPI_CSBASE_BASE_MASK;

    /* assume board is a Livebox */
    memcpy(&board, bcm963xx_boards[0], sizeof(board));

    /* setup pin multiplexing depending on board enabled device,
     * this has to be done this early since PCI init is done
     * inside arch_initcall */
    val = 0;

    if (board.has_pci) {
        bcm63xx_pci_enabled = 1;
        if (BCMCPU_IS_6348())
            val |= GPIO_MODE_6348_G2_PCI;
    }

    if (board.has_pccard) {
        if (BCMCPU_IS_6348())
            val |= GPIO_MODE_6348_G1_MII_PCCARD;
    }

    if (board.has_enet0 && !board.enet0.use_internal_phy) {
        if (BCMCPU_IS_6348())
            val |= GPIO_MODE_6348_G3_EXT_MII |
                GPIO_MODE_6348_G0_EXT_MII;
    }

    if (board.has_enet1 && !board.enet1.use_internal_phy) {
        if (BCMCPU_IS_6348())
            val |= GPIO_MODE_6348_G3_EXT_MII |
                GPIO_MODE_6348_G0_EXT_MII;
    }

    bcm_gpio_writel(val, GPIO_MODE_REG);
}

/*
 * second stage init callback, good time to panic if we couldn't
 * identify on which board we're running since early printk is working
 */
void __init board_setup(void)
{
    if (!board.name[0])
        panic("unable to detect bcm963xx board");
    printk(KERN_INFO PFX "board name: %s\n", board.name);

    /* make sure we're running on expected cpu */
    if (bcm63xx_get_cpu_id() != board.expected_cpu_id)
        panic("unexpected CPU for bcm963xx board");
}

/*
 * return board name for /proc/cpuinfo
 */
const char *board_get_name(void)
{
    return board.name;
}

/*
 * register & return a new board mac address
 */

static int board_get_mac_address(u8 *mac)
{
    u8 default_mac[ETH_ALEN] = {0x00, 0x07, 0x3A, 0x00, 0x00, 0x00};
    u8 *p;
    int count;

    memcpy(mac, default_mac, ETH_ALEN);

    p = mac + ETH_ALEN - 1;
    count = mac_addr_used;

    while (count--) {
        do {
            (*p)++;
            if (*p != 0)
                break;
            p--;
        } while (p != mac);
    }

    if (p == mac) {
        printk(KERN_ERR PFX "unable to fetch mac address\n");
        return -ENODEV;
    }
        mac_addr_used++;

    return 0;
}

static struct resource mtd_resources[] = {
    {
        .start          = 0,    /* filled at runtime */
        .end            = 0,    /* filled at runtime */
        .flags          = IORESOURCE_MEM,
    }
};

static struct platform_device mtd_dev = {
    .name                   = "bcm963xx-flash",
    .resource               = mtd_resources,
    .num_resources          = ARRAY_SIZE(mtd_resources),
};

/* inici mod */
static struct resource gpiodev_resource = {
    .start            = 0xFFFFFFFF,
};

static struct gpio_led_platform_data bcm63xx_led_data;

static struct platform_device bcm63xx_gpio_leds = {
    .name            = "leds-gpio",
    .id            = 0,
    .dev.platform_data    = &bcm63xx_led_data,
};

static struct gpio_buttons_platform_data bcm63xx_gpio_buttons_data = {
    .poll_interval      = 20,
};

static struct platform_device bcm63xx_gpio_buttons_device = {
    .name            = "gpio-buttons",
    .id            = 0,
    .dev.platform_data     = &bcm63xx_gpio_buttons_data,
};
/* fi mod*/

/*
 * third stage init callback, register all board devices.
 */
int __init board_register_devices(void)
{
    u32 val;
    int led_count = 0;
    int button_count = 0;

    if (board.has_pccard)
        bcm63xx_pcmcia_register();

    if (board.has_enet0 &&
        !board_get_mac_address(board.enet0.mac_addr))
        bcm63xx_enet_register(0, &board.enet0);

    if (board.has_enet1 &&
        !board_get_mac_address(board.enet1.mac_addr))
        bcm63xx_enet_register(1, &board.enet1);

    if (board.has_ohci0)
        bcm63xx_ohci_register();

    if (board.has_ehci0)
        bcm63xx_ehci_register();
/* inici mod */

    if (board.has_dsp)
        bcm63xx_dsp_register(&board.dsp);

    if (board.has_udc0)
        bcm63xx_udc_register();

    if (!BCMCPU_IS_6345())
        bcm63xx_spi_register();
/* fi mod */

    /* read base address of boot chip select (0) */
    val = bcm_mpi_readl(MPI_CSBASE_REG(0));
    val &= MPI_CSBASE_BASE_MASK;
    mtd_resources[0].start = val;
    mtd_resources[0].end = 0x1FFFFFFF;

    platform_device_register(&mtd_dev);
/* inici mod */
    platform_device_register_simple("GPIODEV", 0, &gpiodev_resource, 1);

    /* count number of LEDs defined by this device */
    while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name)
        led_count++;

    bcm63xx_led_data.num_leds = led_count;
    bcm63xx_led_data.leds = board.leds;

    platform_device_register(&bcm63xx_gpio_leds);

    /* count number of BUTTONs defined by this device */ 
    while (button_count < ARRAY_SIZE(board.buttons) && board.buttons[button_count].desc) 
        button_count++; 
    if (button_count) { 
        bcm63xx_gpio_buttons_data.nbuttons = button_count;
        bcm63xx_gpio_buttons_data.buttons = board.buttons;
        platform_device_register(&bcm63xx_gpio_buttons_device);
    }

/* fi mod */
    return 0;
}

(Last edited by t3l3m4k0 on 13 May 2010, 21:46)

thanks

Hi,

I don't have any serial nor USB-to-serial adapter but tryed to flash my Livebox anyway...

After flashing Redboot, I've downloaded your image (http://files.myopera.com/danitool/linux/openwrt.cramfs) and used

fcp -v openwrt.cramfs /dev/mtd1

It does NOT seems to work. Only the middle LED stays on. I think it's due to partition size, OpenWRT is smaller than the original firmware. Does it sounds plausible?

I was easily able to reflash with the original firmware and will try to debug once I got access to a USB-to-serial.

Edit: Ok, I think I bricked it... I can only send the firmware via TFTP but nothings happend after the transfer, even with the original firmware. I will verify that once I got a serial

(Last edited by Tito1337 on 29 May 2010, 23:28)

Now that I have serial access, I see that OpenWRT is booting ^_^ Didn't knew the IP address was 10.200.200.1.

So I can confirm that

fcp -v openwrt.cramfs /dev/mtd1

Does actually work with patched RedBoot (didn't yet tried on original RedBoot)

If you used danitool's compiled cramfs, you can gain access via telenet on the IP 10.200.200.1

Thanks for this great work. Any clue to activate WiFi?

(Last edited by Tito1337 on 31 May 2010, 15:14)

To use wifi properly maybe you need the latest trunk, it works better. But you need to build your image yourself. The wifi on latest trunk works fine but you need to modify the partition table with redboot like t3l3m4k0 did before to flash openwrt.

Thanks for answers danitool. It's the first time I work with OpenWRT and embedded devices so I'm still quite unsure of what I'm doing big_smile (I had never established a serial connection before!)

I actually have two Liveboxes. I flashed the first one thru telnet with danitool's CramFS image. It's a little slow, takes a WHILE to up WiFi but it works altogether.

Now that I have (almost) stable internet connection, I can play with the second one. I'm trying the t3l3m4k0 method and have renamed the "jffs_system" partition to "rootfs_data". I spent two days compiling OpenWRT and making the cramfs image... Only to end with

No filesystem could mount root, tried: cramfs sqashfs
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,1)

So now I'm still recompiling the kernel with, I hope, better options. I spend great hours to search for my error but I begin to despair... Thus if you have an idea or a track it's welcome !

Here is my partition table:

RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xBE400000  0xBE400000  0x00030000  0x00000000
user_fs           0xBE430000  0x80800000  0x00720000  0x80800000
rootfs_data       0xBEB50000  0xBEB50000  0x000A0000  0x80534720
FIS directory     0xBEBF0000  0xBEBF0000  0x0000F000  0x00000000
RedBoot config    0xBEBFF000  0xBEBFF000  0x00001000  0x00000000

Thanks

do you have applied patch 046-cramfs_endianness.patch  to enable cramfs endiannes to actual kernel?

I made some progress in the device. I fixed the ethernet 1 (labeled as red), added the gpios which t3l3m4k0 got, and I sent a patch. Then this will be in next trunks I think.
https://dev.openwrt.org/ticket/6326
Also I have built a redboot which can let us telnet it. Telnet works only when we press button 1 and then plugging the power cord. And also erases jffs_system. Then we don't need anymore the serial console to flash this device

http://files.myopera.com/danitool/liveb … lnet00.rom

Just we need to flash it with the inventel firmware, in the command line:

# fcp -v redbootelnet00.rom /dev/mtd0
Erasing blocks: 3/3 (100%)
Writing data: 192k/192k (100%)
Verifying data: 192k/192k (100%)
#
# reboot
Sending SIGTERM to adsld and pppd.

To back to original firmware you can use this image http://www.andyp.uwclub.net/livebox_fir … -uk.cramfs . This is when you already have flashed openwrt, because I don't know how to change redboot with openwrt.

Press button 1 and plug the power, now you can telnet into RedBoot:

[dani@tool ~]$ telnet 10.7.58.112 9000
Trying 10.7.58.112...
Connected to 10.7.58.112.
Escape character is '^]'.
RedBoot>

And if we want to continue using jffs_system rather than rootfs_data, just do this command above the trunk directory, before building the openwrt image:

[dani@tool kamikaze]$ find ./trunk/package/base-files/ -type f -exec sed -i 's/rootfs_data/jffs_system/g' {} \;

(Last edited by danitool on 5 Oct 2010, 19:29)

thx, good news.

I've built another redboot for the livebox. This build is able to read cramfs partitions created as big endian. It has more sense because the board is BIG endian itself.

Now we don't need anymore the ruff's kernel patch 047-cramfs_endianness.patch, because openwrt reads partitions with the same endian as the board where it works.

http://files.myopera.com/danitool/liveb … lnet01.rom

For flashing this image you can use another redboot RAM version I've built.

http://files.myopera.com/danitool/liveb … ootRAM.img

RedBoot> load -v redbootRAM.img
...
RedBoot> go
...

press Ctl+C and make sure the Redboot RAM verison is loaded

RedBoot> version
RedBoot(tm) bootstrap and debug environment [RAM]

now you can flash the Redboot ROM version.

RedBoot>load -v -r -b 0x80800000 redbootelnet01.rom
....
RedBoot>fis create RedBoot -r 0xBE400000 -e 0x00000000
......

Because now this Redboot only reads Big endian cramfs partitions, to create the image we will need to make it as Big endian too

mkfs.cramfs -N big $TARGET openwrt.cramfs

Good!!,
How did you do it?. Do you have redboot sources for livebox?
Finaly, it will be greath if redboot accept squashfs. Can you do it?
Thx

I got the source from the PsiDOC.com guys:

http://rapidshare.com/files/410052766/redboot.tar.gz

I think this source code was already there. In  the official software release that Inventel made to meet their GPL requirements, but Inventel no longer makes it available. Inside this huge compressed file:

http://www.dbzoo.com/public/OPENSOURCE- … -07-18.tgz

If you find another redboot with squashfs support with source code released, we can try to take the code and insert it in the livebox one. To play with this is very easy an harmless because the build is very fast and a RAM redboot never damages our board.

BTW, the priority for me is to guess why the board has a low performance with openwrt. Processes when active triggers the cpu load and always consumes 100 %. When I wget a file to /dev/null through ethernet, the max transfer rate is 700K/s with 100% cpu load. But it would have at least about 2M/s. It is not a wget problem, luci or others wastes a lot of cpu. I'm still digging, maybe this is something related to IRQ.

danitool wrote:

I got the source from the PsiDOC.com guys:

http://rapidshare.com/files/410052766/redboot.tar.gz

I think this source code was already there. In  the official software release that Inventel made to meet their GPL requirements, but Inventel no longer makes it available. Inside this huge compressed file:

http://www.dbzoo.com/public/OPENSOURCE- … -07-18.tgz

If you find another redboot with squashfs support with source code released, we can try to take the code and insert it in the livebox one. To play with this is very easy an harmless because the build is very fast and a RAM redboot never damages our board.

will take a look

danitool wrote:

BTW, the priority for me is to guess why the board has a low performance with openwrt. Processes when active triggers the cpu load and always consumes 100 %. When I wget a file to /dev/null through ethernet, the max transfer rate is 700K/s with 100% cpu load. But it would have at least about 2M/s. It is not a wget problem, luci or others wastes a lot of cpu. I'm still digging, maybe this is something related to IRQ.

siomilar bahavior for me

Hi Danitool. I am quite a newbie but... do you think it could be due to the fact that the the code might be using "floats" and it is hard for the MIPS to handle them?

I have a couple of questions for you:
- Does your precompiled openwrt kernel support USB audio? Have you tried it as "internet radio"?

I have tried to do it (internet radio) without changing the linux kernel, 2.4.x (with an old uk firmware). I installed the audio.o and souncore.o modules and compiled madplay (MIPS toolchain).
Since MADPLAY (static) was 921K I had to run it from a NFS mounted directory... but I only get a "Segmentation fault" when trying to run it. I have no clue... but I think that the 2.4 linux kernel I am using is not built with USB audio support...

Best regards.

agordaliza, my precompiled doesn't have usb audio support because it works very bad. Yes, I tried to use the router as an internet radio station, all is ok, it works but the low performance is still very low, and the sound is very choppy.

About floats, I compiled openwrt without soft float and use instead a kernel with Algorithmics/MIPS FPU Emulator like in the original firmware, but no difference, still the same low performance. I'm stuck with this problem.

Florian suggested me to use oprofile to locate the problem, but this produces images too big to flash, also I don't have skills to manage oprofile. Then I've not tried yet oprofile.

Hola, he cargado el nuevo redboot y he compilado el firmware y todo estaba correcto pero cuando cargo en el Livebox me pone que es solo lectura. (READ ONLY FILE SYSTEM).
Ayuda, gracias

pepenue fíjate que antes de compilar has de introducir el siguiente comando

find ./trunk/package/base-files/ -type f -exec sed -i 's/rootfs_data/jffs_system/g' {} \;

esto en el directorio superior a trunk. Lo que hace es permitir que monte jffs_system como partición para almacenar los archivos de configuración, aunque no en principio instalar paquetes nuevos. También has de borrar esa partición jffs_system, bien mediante comandos o con el botón 1 pulsado mientras le enchufas la corriente al router.

Saludos.

Gracias ahora si! Tengo un problema con el PCMCIA me sale (bcm63xx_pcmcia: Unknown symbol pccard_static_ops (err 0)), me puedes ayudar? cuando compile marque el aparatado pcmcia BCM63XX
saludos y gracias

danitool,

Florian suggested me to use oprofile to locate the problem, but this produces images too big to flash, also I don't have skills to manage oprofile. Then I've not tried yet oprofile.

Could you run the kernel image via tftp?

RedBoot> i -l local-ip -h tftp-host-ip

RedBoot> l vmlinux.elf

RedBoot> g

Or is it the root fs thats too big?

Does the livebox have usb?
Going from my memory,
Build usb+all related stuff (scsi, nls, block storage, might be somthing else) and ext2 support into the kernel,
Change the default boot line to /dev/sda1,

Format a usb drive ext2,
Chuck the rootfs onto the ext2 formatted usb drive,
Stick the drive in the device,
Tftp the kernel,
Hope that it boots.

It might mess with the startup scripts though.

Im working on the home hub at psidoc. I've got get this performance thing fixed.

Id do this myself but while i have a new device to work on, i now have a new computer with no parallel port. So no jtag means im not messing with anything untill i get a pci parallel.

thank for this tutorial,

i have successful flashed my livebox with your méthode.
but the network acces is so slow and i can update the pciids

root@OpenWrt:~# update-pciids
Connecting to pciids.sourceforge.net (216.34.181.96:80)
pci.ids.gz.new        54% |*****************************************                                   | 97792  00:00:33 ETAwget: short write
update-pciids: download failed

i use your http://files.myopera.com/danitool/liveb … lnet00.rom and http://files.myopera.com/danitool/liveb … 405.cramfs

wat can i do?

thank

You can configure your router with this firmware, but you can't make any update or install via ipkg. It is possible to make it but I have choose this way because it is easier. We could repartition the flash and use a second and bigger partition for ipkg and some updates but it is more complicated, and some work is still needed in this router.

About the performance, yes it can be slow, we have some work pending to solve it.

re-hi,
when i do wat you do in post #13 i loose telnet!
is the redbootRAM.img have another ip than 10.7.58.112???



RedBoot> version

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version release-wanadoo-fr - built 16:56:44, Oct  5 2010

Platform: Blue_5g (MIPS32 4Kc)
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x80000000-0x81000000, [0x80434d10-0x80fe2000] available
FLASH: 0xbe400000 - 0xbec00000, 128 blocks of 0x00010000 bytes each.
RedBoot> ip_addr -h 10.7.58.114
IP: 10.7.58.112, Default server: 10.7.58.114
RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xBE400000  0xBE400000  0x00030000  0x00000000
user_fs           0xBE430000  0x80800000  0x00720000  0x80800000
jffs_system       0xBEB50000  0xBEB50000  0x000A0000  0x80545FB0
FIS directory     0xBEBF0000  0xBEBF0000  0x0000F000  0x00000000
RedBoot config    0xBEBFF000  0xBEBFF000  0x00001000  0x00000000
RedBoot> load -v redbootRAM.img
Using default protocol (TFTP)
Entry point: 0x806000bc, address range: 0x80600000-0x80624ad8
---- VERSION SANS SECURITE ---- AUCUN TEST N'EST EFFECTUE ----
close
RedBoot> go


thank