Created
November 20, 2015 21:20
-
-
Save RobertCNelson/2556ee943368b8dd43ee to your computer and use it in GitHub Desktop.
hikey
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| linaro_builds="15.06" | |
| export CC=/home/voodoo/dl/gcc/gcc-linaro-5.1-2015.08-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- | |
| mkdir -p ./aarch64/bin | |
| cd ./aarch64 | |
| git clone --reference /opt/github/u-boot git://git.denx.de/u-boot.git | |
| cd ./u-boot | |
| make ARCH=arm CROSS_COMPILE=${CC} distclean | |
| make ARCH=arm CROSS_COMPILE=${CC} hikey_defconfig | |
| make ARCH=arm CROSS_COMPILE=${CC} | |
| cp -v u-boot.bin ../bin/u-boot-hikey.bin | |
| cd .. | |
| wget -P bin https://builds.96boards.org/releases/hikey/linaro/binaries/${linaro_builds}/mcuimage.bin | |
| git clone https://github.com/96boards/arm-trusted-firmware.git --depth=1 | |
| cd ./arm-trusted-firmware | |
| cp ../u-boot/board/hisilicon/hikey/build-tf.mak . | |
| make CROSS_COMPILE=${CC} -f build-tf.mak build | |
| cd .. | |
| git clone https://github.com/96boards/l-loader.git | |
| cd ./l-loader | |
| git checkout 64797c79ac51ed71c1757e0f837c8178a363d41a -b tmp | |
| ln -s ../bin/bl1-hikey.bin bl1.bin | |
| ln -s ../bin/fip-hikey.bin fip.bin | |
| export CC=/home/voodoo/dl/gcc/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf- | |
| ${CC}gcc -c -o start.o start.S | |
| ${CC}gcc -c -o debug.o debug.S | |
| ${CC}ld -Bstatic -Tl-loader.lds -Ttext 0xf9800800 start.o debug.o -o loader | |
| ${CC}objcopy -O binary loader temp | |
| python gen_loader.py -o ../bin/l-loader.bin --img_loader=temp --img_bl1=bl1.bin | |
| sudo bash -x generate_ptable.sh | |
| python gen_loader.py -o ../bin/ptable.img --img_prm_ptable=./prm_ptable.img --img_sec_ptable=./sec_ptable.img |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cd ./aarch64 | |
| wget -P bin https://builds.96boards.org/releases/hikey/linaro/binaries/latest/nvme.img | |
| sudo fastboot flash ptable ./bin/ptable.img | |
| sudo fastboot flash fastboot ./bin/fip-hikey.bin | |
| sudo fastboot flash nvme ./bin/nvme.img |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cd ./aarch64 | |
| git clone https://github.com/96boards/burn-boot.git --depth=1 | |
| sudo ./burn-boot/hisi-idt.py -d /dev/ttyUSB1 --img1=./bin/l-loader.bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment