Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mp 5 porting new spi device #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 27 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
BCM63xx CFE Bootloader
======================
This is the buildsystem for the CFE BCM63XX bootloader.

You need to have installed gcc, make, libstdc++5, unzip, libz-dev and libc headers.

Building
--------
Go to the main directory for building:

cd cfe/build/broadcom/bcm63xx_rom

make clean

make BRCM_CHIP=6338

make BRCM_CHIP=6348

make BRCM_CHIP=6358

Building Script
---------------
First edit build.sh to match your board's ID and MAC addresses

./build.sh
# BCM63xx CFE Bootloader

This is the build system for the CFE BCM63XX bootloader.
To build CFE bootloader, the following steps are required:

## Install dependencies:
```bash
$ sudo apt install gcc make libstdc++5 linux-libc-dev:i386 unzip libz-dev
```
Clone the CFE from
```bash
$ git clone https://github.com/javad123javad/cfe-bcm63xx
```
Run the `build.sh` file based on your chip id and board name. At the moment the following chips are supported:
* BCM6338(32)
* BCM6348
* BCM6358

If you don’t know the configuration of your modem's hardware, type `generic` as the board name
For example, to build the CFE for `BCM6338`, run the `build.sh` script as follows:
```bash
$ ./build.sh 96338L-2M-8M 6338
```

If everything goes well, the CFE bootloader will be available in the parent directory. There are two bin files, one is `cfe{CHIP_ID}.bin` and another is `cfe_{CHIP_ID}-nvr.bin`. The `nvr` file contains the board’s hardware-related information (e.g. MAC address, board name, etc…)

Credits
-------
Expand All @@ -31,3 +31,5 @@ Broadcom
@danitool

@Noltari

@javad123javad
20 changes: 16 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
#!/bin/bash
currdir=`pwd`

if [ -z "$1" ] || [ -z "$2" ];
then
echo 'Usage: build.sh <BOARD_NAME> <CHIP_NAME>'
echo 'Example: ./build_38.sh 96338L-2M-8M 6338'
exit 1
fi

BRCM_CHIP=$2
BCM_CC_FLAG=_BCM9${BRCM_CHIP}_
echo $BCM_CC_FLAG
BOARD_NAME=$1

rm cfe63*.bin
cd cfe/build/broadcom/bcm63xx_rom

make clean
make BRCM_CHIP=6348
make BRCM_CHIP=${BRCM_CHIP}

cp cfe6348.bin $currdir
cp cfe${BRCM_CHIP}.bin $currdir
cd $currdir/hostTools
gcc -m32 -D _BCM96348_ -I ../shared/opensource/include/bcm963xx/ \
gcc -m32 -D ${BCM_CC_FLAG} -I ../shared/opensource/include/bcm963xx/ \
-o nvramembed nvramembed.c ../shared/opensource/boardparms/bcm963xx/boardparms.c

#####################################
Expand All @@ -18,5 +30,5 @@ gcc -m32 -D _BCM96348_ -I ../shared/opensource/include/bcm963xx/ \
# -m ethernet MAC
#####################################
cd $currdir
hostTools/nvramembed -b "96348GW-11" -n 4 -m 00:11:22:33:44:55 -i cfe6348.bin -o cfe6348-nvr.bin
hostTools/nvramembed -b ${BOARD_NAME} -n 4 -m 00:11:22:33:44:55 -i cfe${BRCM_CHIP}.bin -o cfe${BRCM_CHIP}-nvr.bin

Loading