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.

This is the script I use to create the firmware with the original inventel partitions.

#!/bin/bash

mod=../

dd if=$mod/user_fs.squashfs of=user_fs.squashfs bs=65536 conv=sync
dd if=$mod/user_2_fs.squashfs of=user_2_fs.squashfs bs=65536 conv=sync
gzip -9 -c $mod/Image > vmlinux.bin.gz
dd if=vmlinux.bin.gz of=vmlinux.gz bs=65536 conv=sync
rm vmlinux.bin.gz

userlength=`ls -l user_fs.squashfs |awk '{printf("%x\n",$5)}'`
user_2fladdr=`printf '%x\n' $[0xBE430000+0x00$userlength]`
user_2length=`ls -l user_2_fs.squashfs |awk '{printf("%x\n",$5)}'`
vmlinuxaddr=`printf '%x\n' $[0x$user_2fladdr+0x00$user_2length]`
vmlinuxleng=`ls -l vmlinux.gz |awk '{printf("%x\n",$5)}'`
jffs2addr=`printf '%x\n' $[0x$vmlinuxaddr+0x00$vmlinuxleng]`
jffs2leng=`printf '%x\n' $[0xBEBF0000-0x00$jffs2addr]`
offset2=`printf '%x\n' $[0x1000+0x$userlength]`
offset3=`printf '%x\n' $[0x1000+0x$userlength+0x$user_2length]`

echo "fis init -f

fconfig boot_script true
fconfig boot_script_data
fis load -b 0x80010000 -d vmlinux
exec -c \"boot_loader=RedBoot root=1F01 mem=16M\" 0x80010000


fconfig boot_script_timeout 20

fis create -f 0x$jffs2addr -r 0x$jffs2addr -l 0x00$jffs2leng -n jffs_system

fis create -o 0x1000 -f 0xBE430000 -l 0x00$userlength user_fs

fis create -o 0x$offset2 -f 0x$user_2fladdr -l 0x00$user_2length user_2_fs

fis create -o 0x$offset3 -f 0x$vmlinuxaddr -l 0x00$vmlinuxleng vmlinux

reset" > redbootscript.tmp

dd if=redbootscript.tmp of=redbootscriptpad.tmp bs=4096 conv=sync

cat redbootscriptpad.tmp user_fs.squashfs user_2_fs.squashfs vmlinux.gz > factory_script
rm redbootscriptpad.tmp redbootscript.tmp user_fs.squashfs user_2_fs.squashfs vmlinux.gz

Note the kernel is extracted from one of those partitions, also it is needed to remove some security checks in the latest firmwares. For older firmwares using a cramfs partition this is not needed, and the script should be a little different.

(Last edited by danitool on 24 Nov 2011, 10:34)

Thank you! smile I have unlocked the 5.11.13 version you posted, first it is necessary to use the unlock code in brdgoff.html page and then there is a hidden page adslident.html to configure the username@yourprovider.com, the main page will show other values but it will connect any provider with that trick.
I am working in mounting my USB HD 1TB, also I will try to add ssh to a livebox version 5.11.13 lets cross fingers tongue

Thank you walterpk77. I have got fix my problem with my provider when you get results with USB HD let us know as soon as possible.

Regards,

Mulardo

Hi, I have jtaged my livebox with your cfe.bin , everything seems to work fine, I can upload images to CFE but it complains of invalid image format. Is their a way I can flash any cfe compatible image? Thanks in advance.

(Last edited by christos2714 on 20 Apr 2016, 08:24)

danitool wrote:

Hi christos2714, I have this old Backfire builds for the CFE bootloader.

https://drive.google.com/file/d/0B-EMoB … sp=sharing

Hola danitool, me gustaria saber si el siguiente firmware para descargar es el correcto para el router WiFi Inventel-Thomson DV4210-WS Livebox:

"openwrt-15.05.1-brcm63xx-generic-livebox-redboot.bin",


y de no ser asi imagino que para el nucleo se usaria: openwrt-15.05.1-brcm63xx-generic-livebox-vmlinux.gz y para el resto del sistema de archivos seria: openwrt-15.05.1-brcm63xx-generic-livebox-root.squashfs

Agradezco tu respuesta

cjrs wrote:
danitool wrote:

Hi christos2714, I have this old Backfire builds for the CFE bootloader.

https://drive.google.com/file/d/0B-EMoB … sp=sharing

Hola danitool, me gustaria saber si el siguiente firmware para descargar es el correcto para el router WiFi Inventel-Thomson DV4210-WS Livebox:

"openwrt-15.05.1-brcm63xx-generic-livebox-redboot.bin",


y de no ser asi imagino que para el nucleo se usaria: openwrt-15.05.1-brcm63xx-generic-livebox-vmlinux.gz y para el resto del sistema de archivos seria: openwrt-15.05.1-brcm63xx-generic-livebox-root.squashfs

Agradezco tu respuesta

Siento decir, que los firms oficiales no te funcionarán, en la 15.05 debido a que no reconocerá bien las particiones de Redboot. Además debido a la poca memoria RAM del router seguramente sería bastante inviable el uso del router con las últimas versiones de Openwrt y las opciones por defecto.

Con lo cual solo quedaría la opción de compilar o bien un firmware con lo básico y parcheado. O soldar nuevos chips de memoria para ampliar la RAM, y entonces se podría flashear sin problemas una versión de LEDE/Openwrt actual ya arreglada:
https://downloads.lede-project.org/rele … edboot.bin

Saludos

danitool wrote:

Siento decir, que los firms oficiales no te funcionarán, en la 15.05 debido a que no reconocerá bien las particiones de Redboot. Además debido a la poca memoria RAM del router seguramente sería bastante inviable el uso del router con las últimas versiones de Openwrt y las opciones por defecto.

Hi Danitool, I was compiling an image for the 15.05, and while looking for updated guidelines, it is sad to find this quoted post.
I have the inventel running with the image provided in the main wiki. Due some kernel panic with the USB I wanted to recompile the image. Even If I stick to the minimum(no LuCi), you DO NOT recommend me going beyond AA?

In the release of the main wiki "OpenWrt_AA_12.09-livebox1_redboot.zip" the readme file, contains some patching, before the actual building, but somehow I see that in current releases these patches looks to be integrated in the main tree... at least partially, Is correct my understanding?

After finishing the build I have got an image:

4263940 ago 21 16:49 openwrt-brcm63xx-generic-livebox-redboot.bin

Checking the header of the file looks similar to the one you released in the wiki, but your post makes me think there might be additional steps to do (partitioning?). As well the one I built is bigger...

If you think it is worth a try getting a minimal image for CC or BB, can you comment which would be the additional steps to do with the current CC tree?

¡Muchas Gracias por tu aportación!

(Last edited by urnen on 21 Aug 2017, 16:32)

Hi urnen, 15.05 may work ok or not with only 16 MB RAM. Without LuCi there are more chances to avoid the OOM problem.

I had this patch for 15.05, which should fix the support in openwrt CC

https://pastebin.com/iFtmdLwJ

There are also some modifications in the kernel config that aren't needed, and you may want to load again the defaults after patching.

Regards

Hi Danitool

Will give a try.

Is there any sanity check I could do after getting the resulting image? Size for instance?

On the other side a small contribution form my side:

I just successfully did the USB fix for the USB hot-plugging problem. However the components were not the same as the ones mentioned/pictured in the wiki. There was a different IC mounted in a different location. Anyway I followed the wiki comments, but chose different soldering points(my skills were not suitable for the original location), check the picture for references:

yadi.sk/i/M0fgLLCK3MCwE4

Best Regards!

The discussion might have continued from here.