?>/script>'; } ?> [Proyecto] U-Boot para BMIPS (BCM63xx, BCM33xx) Widgets Magazine

Autor Tema: [Proyecto] U-Boot para BMIPS (BCM63xx, BCM33xx)  (Leído 27755 veces)

0 Usuarios y 1 Visitante están viendo este tema.

zorrua

  • Visitante
Re: Re: [Proyecto] U-Boot para BMIPS (BCM63xx, BCM33xx)
« Respuesta #20 en: 31-08-2017, 11:10 (Jueves) »
Buenas,

Por lo que os leo, router como el Vodafone Avanzado va a estar difícil que por el momento estén soportados por openwrt/lede. Dos preguntas

¿Hay algún router con wifi ac al que se le pueda cargar Openwrt?

En la página de donaciones no he visto nada al respecto, pero ¿Vendría bien para acelerar el desarrollo la donación de algún Vodafone Avanzado?

Un saludo!
El router mini de xiaomi tiene wifi AC y funciona con LEDE.

Saludos.

Desconectado Tki2000

  • Moderador
  • *
  • Mensajes: 2247
Re: [Proyecto] U-Boot para BMIPS (BCM63xx, BCM33xx)
« Respuesta #21 en: 31-08-2017, 14:12 (Jueves) »
Buenas,

Por lo que os leo, router como el Vodafone Avanzado va a estar difícil que por el momento estén soportados por openwrt/lede. Dos preguntas

¿Hay algún router con wifi ac al que se le pueda cargar Openwrt?

En la página de donaciones no he visto nada al respecto, pero ¿Vendría bien para acelerar el desarrollo la donación de algún Vodafone Avanzado?

Un saludo!

TP-Link C7 v2.0, TP-Link C5 v1.x, Sitecom WLR-8100, entre otros...

ifsnop

  • Visitante
Re: [Proyecto] U-Boot para BMIPS (BCM63xx, BCM33xx)
« Respuesta #22 en: 01-09-2017, 10:59 (Viernes) »
Gracias! Pensaba más bien en router proporcionados por operadoras.
Un saludo!

antares

  • Visitante
Re:[Proyecto] U-Boot para BMIPS (BCM63xx, BCM33xx)
« Respuesta #23 en: 15-11-2019, 12:52 (Viernes) »
Retomo el tema porque he estado probando el u-boot que colgó Noltari y después de unas modificaciones he conseguido que funcione con un AD1018, reconozca la NAND y monte un UBIfs partiendo del defconfig de un ar-5387un.
Ahora voy a ver si consigo hacer un fichero de configuración por defecto para el AD1018 incluyendo las modificaciones del .config


Dejo aquí los comandos que hay que utilizar para montar un UBIfs en u-boot, por si le sirve a alguien:

Código: [Seleccionar]
CFE> r u-boot.elf
0x80010000/601731 Entry at 0x80010000
Closing network.
Disabling Switch ports.
Flushing Receive Buffers...
0 buffers found.
Closing DMA Channels.
Starting program at 0x80010000


U-Boot 2020.01-rc2 (Nov 14 2019 - 18:18:02 +0100)

CPU:   BCM63283B0
Model: Comtrend AR-5387un
DRAM:  128 MiB
NAND:  128 MiB
In:    serial@10000100
Out:   serial@10000100
Err:   serial@10000100
Model: Comtrend AR-5387un
Net:
Warning: ethernet@10e00000 (eth0) using random MAC address - da:db:3d:d3:c0:4a
eth0: ethernet@10e00000

AR-5387un # mtd list
List of MTD devices:
* nand0
  - type: NAND flash
  - block size: 0x20000 bytes
  - min I/O: 0x800 bytes
  - OOB size: 64 bytes
  - OOB available: 51 bytes
  - ECC strength: 15 bits
  - ECC step size: 512 bytes
  - bitflip threshold: 1 bits
  - 0x000000000000-0x000008000000 : "nand0"
* nor0
  - type: NOR flash
  - block size: 0x10000 bytes
  - min I/O: 0x1 bytes
  - 0x000000000000-0x000001000000 : "nor0"

###Montar particion en NAND
AR-5387un # ubi part nand0

AR-5387un # ubi part
Device 0: ubi0, MTD partition nand0

AR-5387un # ubi info
UBI: MTD device name:            "nand0"
UBI: MTD device size:            128 MiB
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: number of good PEBs:        1019
UBI: number of bad PEBs:         5
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 1019
UBI: number of PEBs reserved for bad PEB handling: 15
UBI: max/mean erase counter: 1/0

###Montar UBI filesystem
AR-5387un # ubifsmount ubi0:data

AR-5387un # ubifsls
           619775  Wed Nov 13 18:11:45 2019  u-boot.bin
          4616320  Wed Nov 13 18:14:22 2019  initramfs7.elf
               56  Sun Nov 03 08:25:29 2019  hello.txt
            25371  Sun Nov 03 08:05:20 2019  logread.txt
            12936  Sun Nov 03 08:05:06 2019  dmesg.txt

AR-5387un # ubifsload 0x80060000 hello.txt
Loading file 'hello.txt' to addr 0x80060000...
Done
AR-5387un # md 0x80060000
80060000: 48656c6c 6f204e61 6e640a2e 2e2e0a2e    Hello Nand......
80060010: 2e2e0a2e 2e2e0a2e 2e2e0a2e 2e2e0a42    ...............B
80060020: 79652c20 62796520 4e616e64 0a2e0a2e    ye, bye Nand....

###Cargar binario en memoria y ejecutarlo
AR-5387un # ubifsload 0x80010000 u-boot.bin
Loading file 'u-boot.bin' to addr 0x80010000...
Done

###Ahora estamos en un u-boot distinto
AR-5387un # go 0x80010000
## Starting application at 0x80010000 ...


U-Boot 2020.01-rc2 (Nov 15 2019 - 08:38:08 +0100)

CPU:   BCM63283B0
Model: Comtrend AR-5387un
DRAM:  128 MiB
NAND:  128 MiB
In:    serial@10000100
Out:   serial@10000100
Err:   serial@10000100
Model: Comtrend AR-5387un
Net:
Warning: ethernet@10e00000 (eth0) using random MAC address - 86:5d:67:17:74:d9
eth0: ethernet@10e00000


###Desmontar UBI filesystem
AR-5387un # ubifsumount
Unmounting UBIFS volume data!


El volumen UBI ya lo tenía creado desde Openwrt de esta forma:

mtdinfo /dev/mtd0
ubiformat /dev/mtd0
ubiattach -p /dev/mtd0
ubimkvol /dev/ubi0 -N data -s 121MiB
mkdir /mnt/data_disk
mount -t ubifs ubi0:data /mnt/data_disk

echo "Hello Nand" > /mnt/data_disk/hello.txt
cat /mnt/data_disk/hello.txt

umount /mnt/data_disk
ubidetach -p /dev/mtd0


antares

  • Visitante
Re:[Proyecto] U-Boot para BMIPS (BCM63xx, BCM33xx)
« Respuesta #24 en: 02-12-2019, 10:04 (Lunes) »
Ya tengo el u-boot arrancando desde la memoria nand de un ad1018 con SoC BCM6328.
El cferom.bin, de 16KB, lo he grabado en el bloque 0 de la nand y a un u-boot.bin renombrado como cferam.000 le he añadido 12 bytes de cabecera con la dirección de entrada de memoria.
Este cferam.000 se lo he pasado al mkfs.jffs2 para que creara una imagen JFFS2 y la he grabado en los bloques 1,2,3,4 y 5 (ocupa unos 600KB)
Vamos, lo que se hace con el cferam.bin lo he hecho con el u-boot.bin.
Al u-boot.bin le cambié en el make menuconfig la dirección de entrada (CONFIG_SYS_TEXT_BASE) de 0x80010000 a 0x80600000, porque la primera me machacaba los punteros debido a que un cferam es bastante más pequeño.

Pero no se cómo añadir al cferom.bin los datos por defecto de la NVRAM cuando compilo ¿Alguna idea?


Un saludo

Código: [Seleccionar]
HELO
CPUI
L1CI
DRAM
----
PHYS
ZQDN
PHYE
DINT
LSYN
USYN
MSYN
LMBE
PASS
----
ZBSS
CODE
DATA
L12F
MAIN
NAN0
NAN6
NAN7
BT00
NAN9
NAN3
RFS1
NAN5


U-Boot 2020.01-rc2 (Dec 01 2019 - 21:33:56 +0100)

CPU:   BCM63283B0
Model: Comtrend AR-5387un
DRAM:  128 MiB
NAND:  128 MiB
In:    serial@10000100
Out:   serial@10000100
Err:   serial@10000100
Model: Comtrend AR-5387un
Net:   
Warning: ethernet@10e00000 (eth0) using random MAC address - 82:e0:24:1d:c2:50
eth0: ethernet@10e00000
AR-5387un # help
?         - alias for 'help'
base      - print or set address offset
bdinfo    - print Board Info structure
bootm     - boot application image from memory
bootp     - boot image via network using BOOTP/TFTP protocol
chpart    - change active partition
cmp       - memory compare
coninfo   - print console devices and information
cp        - memory copy
cpu       - display information about CPUs
dm        - Driver model low level access
echo      - echo args to console
env       - environment handling commands
exit      - exit script
false     - do nothing, unsuccessfully
fdt       - flattened device tree utility commands
fstype    - Look up a filesystem type
go        - start application at address 'addr'
help      - print command description/usage
iminfo    - print header information for application image
itest     - return true/false on integer compare
led       - manage LEDs
license   - print GPL license text
ln        - Create a symbolic link
load      - load binary file from a filesystem
loadb     - load binary file over serial line (kermit mode)
loadx     - load binary file over serial line (xmodem mode)
loady     - load binary file over serial line (ymodem mode)
loop      - infinite loop on address range
ls        - list files in a directory (default /)
md        - memory display
meminfo   - display memory information
mii       - MII utility commands
mm        - memory modify (auto-incrementing address)
mtd       - MTD utils
mtdparts  - define flash/nand partitions
mw        - memory write (fill)
nand      - NAND sub-system
nboot     - boot from NAND device
nfs       - boot image via network using NFS protocol
nm        - memory modify (constant address)
ping      - send ICMP ECHO_REQUEST to network host
printenv  - print environment variables
random    - fill memory with random pattern
reset     - Perform RESET of the CPU
run       - run commands in an environment variable
save      - save file to a filesystem
setenv    - set environment variables
setexpr   - set environment variable as the result of eval expression
sf        - SPI flash sub-system
showvar   - print local hushshell variables
size      - determine a file's size
source    - run script from memory
sspi      - SPI utility command
test      - minimal test like /bin/sh
tftpboot  - boot image via network using TFTP protocol
true      - do nothing, successfully
ubi       - ubi commands
ubifsload - load file from an UBIFS filesystem
ubifsls   - list files in a directory
ubifsmount- mount UBIFS volume
ubifsumount- unmount UBIFS volume
version   - print monitor, compiler and linker version
AR-5387un # setenv ipaddr 192.168.3.130
AR-5387un # setenv serverip 192.168.3.40
AR-5387un # printenv
baudrate=115200
bootdelay=2
fdtcontroladdr=87d5b94c
ipaddr=192.168.3.130
serverip=192.168.3.40
stderr=serial@10000100
stdin=serial@10000100
stdout=serial@10000100

Environment size: 164/8188 bytes
AR-5387un # sspi
SF: Detected s25fl129p1 with page size 256 Bytes, erase size 64 KiB, total 16 MiB

AR-5387un # mtd list
List of MTD devices:
* nand0
  - type: NAND flash
  - block size: 0x20000 bytes
  - min I/O: 0x800 bytes
  - OOB size: 64 bytes
  - OOB available: 51 bytes
  - ECC strength: 15 bits
  - ECC step size: 512 bytes
  - bitflip threshold: 1 bits
  - 0x000000000000-0x000008000000 : "nand0"
* nor0
  - type: NOR flash
  - block size: 0x10000 bytes
  - min I/O: 0x1 bytes
  - 0x000000000000-0x000001000000 : "nor0"
AR-5387un # meminfo
DRAM:  128 MiB
AR-5387un # cpu list
  0: cpu@0      BCM63283B0
  1: cpu@1      BCM63283B0
AR-5387un # bdinfo
boot_params = 0x87d65d08
memstart    = 0x80000000
memsize     = 0x08000000
flashstart  = 0x00000000
flashsize   = 0x00000000
flashoffset = 0x00000000
ethaddr     = (not set)
IP addr     = 192.168.3.130
baudrate    = 115200 bps
relocaddr   = 0x87f60000
reloc off   = 0x07960000
AR-5387un # coninfo
List of available devices:
serial@10000100 00000007 IO stdin stdout stderr
serial   00000003 IO
AR-5387un #