|
1 | 1 | # Using u-boot on Creator (Ci40) Marduk platform
|
2 | 2 |
|
3 |
| -### How to build/cross-compile for Ci40: |
| 3 | +## Toolchain setup |
| 4 | +If you are using the toolchain produced by OpenWrt you must setup the environment as explained |
| 5 | +[here](https://wiki.openwrt.org/doc/devel/crosscompile). |
4 | 6 |
|
5 |
| - $ export CROSS_COMPILE=/path/to/mips-toolchain/mips-toolchain-prefix |
6 |
| - $ make pistachio_marduk_defconfig |
7 |
| - $ make |
| 7 | +For the MIPS official toolchain see |
| 8 | +[here](https://community.imgtec.com/developers/mips/tools/codescape-mips-sdk/download-codescape-mips-sdk-essentials/). |
8 | 9 |
|
9 |
| -This will generate u-boot-pistachio-nor.img |
10 |
| - |
11 |
| -Note: Using OpenWrt's toolchain toolchain-mipsel_mips32_gcc-5.2.0_musl-1.1.11 will require [this patch](http://lists.denx.de/pipermail/u-boot/2015-July/217911.html) to be applied. |
12 |
| - |
13 |
| -### How to flash on Ci40: |
14 |
| - |
15 |
| -1. [Load OpenWrt](https://github.com/IMGCreator/openwrt/blob/master-pistachio/README.md) |
16 |
| - |
17 |
| -2. Erase and write u-boot image on bootloader partition of Ci40 |
18 |
| - |
19 |
| - $ flashcp -v u-boot-pistachio-nor.img /dev/mtd0 |
20 |
| - |
21 |
| - Note: flashcp needs to be manually selected in OpneWrt menuconfig |
| 10 | +## Configure and build it |
| 11 | + $ make CROSS_COMPILE=<toolchain-prefix> pistachio_marduk_defconfig |
| 12 | + $ make CROSS_COMPILE=<toolchain-prefix> |
22 | 13 |
|
23 |
| - Base system -> busybox -> Cutomize busybox options -> Miscellaneous Utilities -> flashcp |
24 |
| - |
25 |
| -3. Reboot |
26 |
| - |
27 |
| - $ reboot |
28 |
| - |
29 |
| - Once restarted the board, you should see the date when you have built the u-boot on the console as follows: |
30 |
| - |
31 |
| - U-Boot SPL 2015.07-rc2 (Jun 14 2016 - 19:20:36) |
32 |
| - |
33 |
| - |
34 |
| - U-Boot 2015.07-rc2 (Jun 14 2016 - 19:20:36 +0530) |
35 |
| - |
36 |
| - MIPS(interAptiv): IMG Pistachio 546MHz. |
37 |
| - Model: IMG Marduk |
38 |
| - DRAM: 256 MiB |
39 |
| - NAND: 512 MiB |
40 |
| - MMC: Synopsys Mobile storage: 0 |
41 |
| - SF: Detected W25Q16CL with page size 256 Bytes, erase size 4 KiB, total 2 MiB |
42 |
| - |
43 |
| -This means your built u-boot image has been flashed properly on the board!! |
| 14 | +This will generate u-boot-pistachio-nor.img |
44 | 15 |
|
45 |
| -_Please be aware that you may brick the board if you flashed a wrong bootloader. Only way to re-cover back the board is to use Dedi-prog SF100 programmer to flash the pre-built bootloader again._ |
| 16 | +## Flash it onto your Ci40 |
| 17 | +See our [docs](https://docs.creatordev.io/ci40/guides/openwrt-platform/#flashing-u-boot-binary). |
0 commit comments