Bare-metal application for Rockchip RK3288
This bare-metal application is used for Rockchip RK3288 SoC, and blink POWER/WORK LEDs on Firefly RK3288 develop board
Getting Started
Please prepare your environment and check your environment is correct, and follow flow down below
Get arm cross compiler
download arm toolchain package (please prepare related environment)
- http://192.168.1.101/sdk/arm-none-eabi-toolchain/gcc-arm-none-eabi-6-2017-q1-update-linux.tar.bz2
- https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
1
2
3$ sudo apt-get -y install lib32z1 lib32ncurses5 lib32bz2-1.0
$ sudo apt-get -y install lib32ncurses5
$ sudo apt-get -y install ia32-libs
add toolchain directory
1 | $ mkdir -p ${HOME}/opt |
- extract package
1 | $ cd ${HOME}/opt |
- change
1 | $ chmod -R -w ${HOME}/opt/gcc-arm-none-eabi-7-2017-q4-major |
- test
1 | $ "${HOME}"/opt/gcc-arm-none-eabi-7-2017-q4-major/bin/arm-none-eabi-gcc --version |
- get binaries
All arm toolchain binaries are in1
${HOME}/opt/gcc-arm-none-eabi-7-2017-q4-major/bin/
Get U-boot
- download u-boot
1 | git clone git@192.168.1.178:RockChip/rk3288_uboot.git |
- using dd flash to your SD card
1 | sudo dd if=idbloader_SPL.img of=/dev/sdx seek=64 |
and /dev/sbx is your sd card partition
Build bare-metal application
- modify Makefile
1 | cd firefly-rk3288 |
1 | #In Makefile |
- build and copy binaries to your sd card (or usb disk)
1 | make clean |
Running on U-boot
- Boot , and go into command-line
- SD card:
1 | mmc dev 1 |
- USB
1 | usb reset |
If you want to using “bootelf” command, just copy kernel.elf to RAM address “0x00800800”, 0x00800800 is bootelf start address
1 | mmc dev 1 / usb reset |