Commit Graph

15 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Álvaro Fernández Rojas 9eb9d0baa0 bcm63xx: image: support device-specific load address
Some CFEs are located at the address currently used for relocation and lzma
loader load address, so we need to provide a way to override it.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Daniel González Cabanelas 27c20a1ef5 bcm63xx: image: don't add the CFE to the sercomm factory
There is no need to include the CFE bootloader in the Sercomm factory
images.

There might be a case when this could be useful:
  - We are running the stock firmware on the first Sercomm image
  - The second partition storing the botloader was erased (unlikely)
Even in this case flashing an image without a bootlader is harmless.

Don't include the bootloader in the factory image creation and rid of the
risk of flashing factory images with an untested bootloader partition.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
4 years ago
Álvaro Fernández Rojas 6dc01cdee8 bcm63xx: lzma-loader: allow bigger ramdisks
Some (older) CFEs are loaded at 0x80401000 and ramdisks are loaded at
0x80010000, which means that ramdisk size limit is 0x3F1000 (almost 4M).
Therefore, current ramdisks (~4MB) are overwritting CFE in these devices,
which results in a crash.

This commit changes the address where ramdisks are loaded to 0x80a00000,
which is the same address where kernel is loaded when booting from the flash.
Therefore, lzma-loader will now be loaded at 0x80a00000, but it will still
decompress the kernel at 0x80010000.

Tested with huawei,hg556a-b, which has its CFE loaded at 0x80401000.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 231f728f69 bcm63xx: ad1018: remove cfe.bin image support
Apparently, Sercomm allows loading a BCM WFI image via CFE, but this image
destroys "serial" and "protect" nand partitions, which is wrong.
It will also set both bootflags to the same value, which causes booting
issues with cferam (cferom will alternatively boot from cferam1 or cferam2
each time the device is rebooted).
Now that OEM Sercomm images are supported it's time to remove this hacky
cfe.bin image support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas e238c85e57 bcm63xx: nand: sercomm: switch to sercomm-load script
xxd is not a valid dependency and shouldn't be used.
Fixes buildbot failure.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas f263a0f9ff bcm63xx: nand: support Sercomm firmwares
Add support for Sercomm factory firmwares (AES 256 CBC encrypted).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 5998c8f059 bcm63xx: nand: support CFE partition tags
Introduce support for generating JFFS2 CFE partition tags.
This is used in NAND devices in order to verify the integrity of the JFFS2
partition.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas c93cdf536a bcm63xx: lzma-loader: rely on CHIP_ID for UART address
lzma-loader uart output wasn't working on BCM3380/BCM6362 because these
SoCs have the same processor ID.
Let's use CHIP_ID for establishing the UART base address.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 91b275b6e3 bcm63xx: image: rename CFE_CHIP_ID to CHIP_ID
Rename CFE_CHIP_ID to a generic name that doesn't involve CFE.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 5f82691923 bcm63xx: add unmodded SERCOMM AD1018 support
Until now only HW modded SPI flash version was supported.

BCM6328 with 64M RAM and 128M NAND.
More info: https://openwrt.org/toh/sercomm/ad1018

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 86583384ff bcm63xx: smp: add NAND support
NAND controller is present on BCM6328, BCM6362, BCM6368 and BCM63268.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas aa2f2276f7 bcm63xx: image: remove unused definition
KERNEL_ENTRY isn't used by lzma-loader.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas a0081b1945 bcm63xx: loader-lzma: use default lzma
Specific CFE LZMA parameters aren't needed for LZMA Loader.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Álvaro Fernández Rojas 84646936a6 bcm63xx: image: rename LOADADDR to KERNEL_LOADADDR
Also remove KERNEL_ENTRY, since it's the same as KERNEL_LOADADDR

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years ago
Adrian Schmutzler e7bfda2c24 brcm63xx: rename target to bcm63xx
This change makes the names of Broadcom targets consistent by using
the common notation based on SoC/CPU ID (which is used internally
anyway), bcmXXXX instead of brcmXXXX.
This is even used for target TITLE in make menuconfig already,
only the short target name used brcm so far.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago