# Clonar repositorio
git clone https://www.github.com/openwrt/openwrt -b openwrt-18.06
# Actualizar e instalar fuentes
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
# Entrar en el menú de configuración
make menuconfig
# Seleccionar Sistema
Target System ---> (X) Broadcom BCM63xx
# Selecciona Perfil
Target Profile ---> (X) Huawei EchoLife HG553
# MUY IMPORTANTE, habilitar la emulación FPU
Global build settings ---> Kernel build options ---> (*) Compile the kernel with MIPS FPU Emulator
# Poner interfaz luci,
LuCI ---> Collections ---> <*> LuCI
# Dar soporte WiFi
Kernel modules ---> Wireless Drivers ---> <*> kmod-b43
# Dar soporte WPA-PSK
Network ---> <*> wpad-mini
Base system ---> <*> block-mount
Kernel modules ---> Filesystems ---> <*> kmod-fs-ext4
Kernel modules ---> USB Support ---> <*> kmod-usb-storage
Utilities ---> Disc ---> <*> cfdisk
Utilities ---> Filesystem ---> <*> e2fsprogs
Utilities ---> Compression ---> <*> xz-utils (si no se selecciona, no aparecerá deboostrap)
Administration ---> <*> debootstrap
# Entrar en el menú de configuración del Kernel
make kernel_menuconfig
# Habilitar emulación FPU
Kernel type ---> (*) MIPS FPU Emulator
# Compilar
make -j 3 V=cs
# Particionar Disco
cfdisk /dev/sda
# Formatear /dev/sda2
mke2fs -t ext4 /dev/sda2
# Montar
mount /dev/sda2 /mnt
# Formatear swap
mkswap /dev/sda1
# Montar swap
swapon /dev/sda1
opkg update
opkg install debootstrap
uname -m
En teoría, este comando devuelve la arquitectura del router. Pero, según reporta jar229, este método no es fiable. Sugiero entonces consultar la toh de OpenWrt. LANG=C
debootstrap --verbose --arch=mips jessie /mnt http://ftp.de.debian.org/debian
chroot /mnt /bin/bash
La idea no es nueva. Hay algo publicado para el D-Link DIR-825 aquí: https://wiki.debian.org/InstallingDebianOn/D-Link/DIR-825
Después de varios días intentándolo, finalmente lo he podido instalar en un HG553.
En el PC,
Compilar una imagen OpenWRT específica con emulación FPU y soporte USB para sistemas de archivo ext4.
En el router,
1. Configurar la red.
2. Particionar y montar una memoria USB externa.
3. Instalar la utilidad debootstrap.
4. Instalar en la memoria externa Debian 8 («jessie») para MIPS.
5. Lanzar Debian.
Sistema OperativoCitarroot@OpenWrt:/# cat /etc/issue.netKernel
Debian GNU/Linux 8Citarroot@OpenWrt:/# uname -a
Linux OpenWrt 4.9.133 #0 Mon Oct 15 14:54:30 2018 mips GNU/Linux
Si alguien está interesado en el tema, puedo hacer una pequeña guía paso a paso.
Si alguien está interesado en el tema, puedo hacer una pequeña guía paso a paso.
¡Por favor! ¡Eso ya sería para descubrirse el sombrero!
Adelante.
echo
echo
echo "Bash v$BASH_VERSION"
echo " _____ __ ________ __ "
echo "| \.-----.| |--.| | | |.----.| |_ "
echo "| -- | -__|| _ || | | || _|| _|"
echo "|_____/|_____||_____||________||__| |____|"
echo " D e b i a n o v e r O p e n W r t "
echo "-----------------------------------------------"
echo $(cat /etc/issue.net) "~ Kernel" $(uname -nr)
echo "-----------------------------------------------"
PS1='\[\033[01;32m\]\u@Debian:\[\033[01;34m\]\w\$ \[\033[00m\]'
Muy interesante >:( >:( >:( >:(
root@OpenWrt:~# debootstrap --verbose --arch=mips jessie /mnt http://ftp.de.debi
an.org/debian
W: Cannot check Release signature; keyring file not available /usr/share/keyring s/debian-archive-keyring.gpg
I: Retrieving InRelease
I: Retrieving Release
I: Retrieving Packages
I: Validating Packages
E: Couldn't download dists/jessie/main/binary-mips/Packages
root@OpenWrt:~# debootstrap --verbose --arch=mips jessie /mnt http://ftp.de.debian.org/debian
W: Cannot check Release signature; keyring file not available /usr/share/keyrings/debian-archive-keyring.gpg
I: Retrieving InRelease
I: Retrieving Release
I: Retrieving Packages
I: Retrieving Packages
I: Retrieving Packages
E: Couldn't download dists/jessie/main/binary-mips/Packages
root@OpenWrt:~#
debootstrap --verbose --arch=mipsel jessie /mnt http://ftp.de.debian.org/debian
@ jar229
Según https://openwrt.org/toh/hwdata/xiaomi/xiaomi_mini_v1 el Xiaomi MiWiFi Mini tiene arquitectura mipsel. Prueba esto:Código: [Seleccionar]debootstrap --verbose --arch=mipsel jessie /mnt http://ftp.de.debian.org/debian
¡Saludos!
@ jar229
Según https://openwrt.org/toh/hwdata/xiaomi/xiaomi_mini_v1 el Xiaomi MiWiFi Mini tiene arquitectura mipsel. Prueba esto:Código: [Seleccionar]debootstrap --verbose --arch=mipsel jessie /mnt http://ftp.de.debian.org/debian
¡Saludos!
Lo probaré cuando vuelva a sacar un poco de tiempo, gracias :D
root@OpenWrt:~# uname -m
mips
Efectivamente, era eso la arquitectura >:(
Pero la forma de verificarlo con uname no es correcta ya que me devuelveCódigo: [Seleccionar]root@OpenWrt:~# uname -m
mips
mips | --> | arquitectura mips, modo big endian |
mipsel | --> | arquitectura mips, modo little endian |
armel | --> | arquitectura arm, modo little endian |
armhf | --> | arquitectura arm, modo little endian, con FPU por hardware (hard float) |
printf "01%s" | hexdump
0000000 3031
0000002
printf "01%s" | hexdump
0000000 3130
0000002
Alguien que me ilumine.
openwrt # cd config/
wifislax64 config # ls
Config-build.in Config-devel.in Config-images.in Config-kernel.in
Error Instalar Debian en un router OpenWrt (https://pastebin.com/CgKmEiFm)
Salu2
@Garcad
¿Has compilado OpenWrt para tu HG556?
https://foro.seguridadwireless.net/openwrt/(tutorial)-como-compilar-openwrt-a-nuestro-gusto/
cd openwrt
make menuconfig
make kernel_menuconfig
make # o => make -j 3 V=cs
[...]¿No será porque hace falta parchear/configurar para que compile con la bibliotecas de openwrt (musl) en lugar de con glibc?
Con openwrt el apt-get install linux-headers-`uname -r`me funciona, pero la compilacionde asterisk se bloquea;
[...]
Debian deja de ser compatible con mips. En teoría, jessie, stretch y buster son las últimas versiones compatibles con mips.
FUENTE: https://lists.debian.org/debian-release/2019/08/msg00582.html