OpenWRT en Inventel Livebox DV4210 (Parte 3/3) – Compilación
GRANDISIMA NOTICIA
Imprescindible visitar la pagina de danitool. Tiene nueva informacion de como poder utilizar la eth1 y muchisimos cambios mas.
Este HOWTO como el anterior estan basados en la pagina web de danitool. No olvides visitar su pagina web.
Para compilar nuestro propio OpenWRT vamos a utilizar como sistema Debian/Ubuntu o similares, y debemos instalar svn gcc g++ binutils patch make automake gettext pkg-config unzip bzip2 flex bison libz-dev quilt gawk flex libncurses-dev con el siguiente comando como root:
apt-get install subversion gcc g++ binutils patch make automake gettext pkg-config unzip bzip2 flex bison libz-dev quilt gawk flex build-essential libncurses5-dev
Crea un directorio «kamikaze» en algun lugar del disco y ejecuta lo siguiente:
svn -r r18454 co svn://svn.openwrt.org/openwrt/trunk/
svn co svn://svn.openwrt.org/openwrt/packages/
mv packages trunk/feeds
cd trunk
make packages/symlinks
Bajate este archivo, descomprimelo y copia el patch del kernel de Ruff 046-cramfs_endianness.patch ./trunk/target/linux/brcm63xx/patches-2.6.30 en para habilitar cramfs.
Ahora vamos a configurar nuestro OpenWRT, para ello tecleamos:
make menuconfig
Despues, busca por los menus y dejalo como lo siguiente, tambien puedes añadir aplicaciones si lo deseas:
┌────────────────────────── Target System ───────────────────────────┐ │ Use the arrow keys to navigate this window or press the hotkey of │ │ the item you wish to select followed by the <SPACE BAR>. Press │ │ <?> for additional information about this option. │ │ ┌───────────────────^(-)─────────────────────────────────────────┐ │ │ │ ( ) Atheros AR231x/AR5312 │ │ │ │ ( ) Atheros AR71xx/AR7240/AR913x │ │ │ │ ( ) Atmel AVR32 │ │ │ │ (X) Broadcom BCM63xx │ │ │ │ ( ) Broadcom BCM947xx/953xx │ │ │ │ ( ) Broadcom BCM947xx/953xx [2.4] │ │ │ └───────────────────v(+)─────────────────────────────────────────┘ │ ├────────────────────────────────────────────────────────────────────┤ │ <Select> < Help > │ └────────────────────────────────────────────────────────────────────┘ ┌─────────────────────────────── Target Images ──────────────────────────┐ │ ┌────────────────────────────────────────────────────────────────────┐ │ │ │ [ ] ramdisk (NEW) │ │ │ │ [ ] jffs2 │ │ │ │ [*] squashfs (NEW) │ │ │ │ [*] tgz │ │ │ │ [ ] cpiogz (NEW) │ │ │ │ [ ] ext2 (NEW) │ │ │ └─v(+)───────────────────────────────────────────────────────────────┘ │ ├────────────────────────────────────────────────────────────────────────┤ │ <Select> < Exit > < Help > │ └────────────────────────────────────────────────────────────────────────┘ ┌───────────────────────────────── 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 suppor│ │ │ │ < > 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 > │ └────────────────────────────────────────────────────────────────────────────┘ ┌───────────────────────────── 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 > │ └────────────────────────────────────────────────────────────────────────┘
Ahora sale y guarda la configuracion y escribe lo siguiente:
make kernel_menuconfig
Y configura las siguientes ventanas como estan.
┌────────────────────────────── 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 > │ └────────────────────────────────────────────────────────────────────┘ ┌──────────────────── Memory Technology Device (MTD) support ────────────────┐ │ ┌────────────────────────────────────────────────────────────────────────┐ │ │ │ --- Memory Technology Device (MTD) support │ │ │ │ [ ] Debugging │ │ │ │ <*> MTD concatenating support │ │ │ │ [*] MTD partitioning support │ │ │ │ < > MTD tests support │ │ │ │ [*] Automatically set 'rootfs' partition to be root filesystem │ │ │ │ [*] Automatically split 'rootfs' partition for squashfs │ │ │ │ <*> RedBoot partition table parsing │ │ │ │ (-1) Location of RedBoot partition table │ │ │ │ [*] Include unallocated flash regions │ │ │ │ [*] Force read-only for RedBoot system images │ │ │ │ [*] Command line partition table parsing │ │ │ │ < > TI AR7 partitioning support │ │ │ │ *** User Modules And Translation Layers *** │ │ │ │ <*> Direct char device access to MTD devices │ │ │ │ -*- Common interface to block layer for MTD 'translation layers │ │ │ │ <*> Caching block device access to MTD devices │ │ │ │ < > FTL (Flash Translation Layer) support │ │ │ │ < > NFTL (NAND Flash Translation Layer) support │ │ │ │ < > INFTL (Inverse NAND Flash Translation Layer) support │ │ │ │ < > Resident Flash Disk (Flash Translation Layer) support │ │ │ │ < > NAND SSFDC (SmartMedia) read only translation layer │ │ │ │ < > Log panic/oops to an MTD buffer │ │ │ │ RAM/ROM/Flash chip drivers ---> │ │ │ │ Mapping drivers for chip access ---> │ │ │ │ Self-contained MTD device drivers ---> │ │ │ │ < > NAND Device Support ---> │ │ │ │ < > OneNAND Device Support ---> │ │ │ │ LPDDR flash memory drivers ---> │ │ │ │ UBI - Unsorted block images ---> │ │ │ └────────────────────────────────────────────────────────────────────────┘ │ ├────────────────────────────────────────────────────────────────────────────┤ │ <Select> < Exit > < Help > │ └────────────────────────────────────────────────────────────────────────────┘ ┌────────────────────── 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 (NO) ---> │ │ │ │ [*] 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 > │ └─────────────────────────────────────────────────────────────────────────┘
LO SIGUIENTE ES IMPORTANTE:
┌────────────────────── Mapping drivers for chip access ───────────────────┐ │ ┌──────────────────────────────────────────────────────────────────────┐ │ │ │ [*] Support non-linear mappings of flash chips │ │ │ │ <*> Flash device in physical memory map │ │ │ │ [*] Physmap compat support │ │ │ │ (0x1e400000) Physical start address of flash mapping │ │ │ │ (0x00800000) Physical length of flash mapping │ │ │ │ (2) Bank width in octets (NEW) │ │ │ │ < > BCM963xx Flash device │ │ │ │ < > PCI MTD driver │ │ │ │ < > NOR flash on Intel Vermilion Range Expansion Bus CS0 │ │ │ │ < > Map driver for platform device RAM (mtd-ram) │ │ │ └──────────────────────────────────────────────────────────────────────┘ │ ├──────────────────────────────────────────────────────────────────────────┤ │ <Select> < Exit > < Help > │ └──────────────────────────────────────────────────────────────────────────┘ ┌───────────────────────────────── USB support ─────────────────────────────┐ │ ┌───────────────────────────────────────────────────────────────────────┐ │ │ │ --- USB support │ │ │ │ <*> Support for Host-side USB │ │ │ │ [ ] USB verbose debug messages │ │ │ │ [ ] USB announce new devices │ │ │ │ *** Miscellaneous USB options *** │ │ │ │ [*] USB device filesystem │ │ │ │ [ ] USB device class-devices (DEPRECATED) │ │ │ │ [ ] Dynamic USB minor allocation │ │ │ │ [ ] Rely on OTG Targeted Peripherals List │ │ │ │ [ ] Disable external hubs │ │ │ │ < > USB Monitor │ │ │ │ < > Enable Wireless USB extensions (EXPERIMENTAL) │ │ │ │ < > Support WUSB Cable Based Association (CBA) │ │ │ │ *** USB Host Controller Drivers *** │ │ │ │ < > Cypress C67x00 HCD support │ │ │ │ < > EHCI HCD (USB 2.0) support (NEW) │ │ │ │ < > OXU210HP HCD support │ │ │ │ < > ISP116X HCD support │ │ │ │ < > ISP 1760 HCD support │ │ │ │ <*> OHCI HCD support │ │ │ │ [ ] OHCI support for Broadcom SSB OHCI core │ │ │ │ < > UHCI HCD (most Intel and VIA) support (NEW) │ │ │ │ < > SL811HS HCD support │ │ │ │ < > R8A66597 HCD support │ │ │ └────v(+)───────────────────────────────────────────────────────────────┘ │ ├───────────────────────────────────────────────────────────────────────────┤ │ <Select> < Exit > < Help > │ └───────────────────────────────────────────────────────────────────────────┘ ┌───────────────────── Default kernel command string ─────────────────────────────────────┐ │ Please enter a string value. Use the <TAB> key to move from the input │ │ field to the buttons below it. │ │ ┌─────────────────────────────────────────────────────────────────────────────────────┐ │ │ │root=/dev/mtdblock1 rootfstype=cramfs,squashfs init=/etc/preinit console=ttyS0,115200│ │ │ └─────────────────────────────────────────────────────────────────────────────────────┘ │ │ │ ├─────────────────────────────────────────────────────────────────────────────────────────┤ │ < Ok > < Help > │ └─────────────────────────────────────────────────────────────────────────────────────────┘
Ahora sale y guarda la configuracion y compilalo con el siguiente comando:
make V=99
Una vez acabada la compilacion (que tardara bastante ya que tiene que bajar archivos gordos y compilarlos…), copia el resto de ficheros que hemos bajado antes (mkcramfs, etccramfs y network) al directorio «kamikaze». Edita el archivo network con tus preferencias de red y da permisos de ejecucion a mkcramfs, a etccramfs y a kamk.sh con:
chmod +x mkcramfs
chmod +x etccramfs
chmod +x kamk.sh
Ejecuta el siguiente comando:
./kamk.sh
Y en unos momentos ya tenemos nuestro archivo openwrt.cramfs listo para poner en el TFTP y cargarlo nuevamente tal y como se ha explicado en el articulo anterior a este.