Difference between revisions of "Rock/U-Boot"
< Rock
(→Build) |
|||
Line 7: | Line 7: | ||
* (need more investigation...) | * (need more investigation...) | ||
− | == | + | == For NAND flash == |
− | git clone https://github.com/radxa/u-boot-rockchip.git | + | === Build === |
+ | |||
+ | git clone -b u-boot-rk3188 https://github.com/radxa/u-boot-rockchip.git | ||
cd u-boot-rockchip | cd u-boot-rockchip | ||
export ARCH=arm | export ARCH=arm | ||
Line 17: | Line 19: | ||
The binary we need for nand flash is '''RK3188Loader_miniall.bin''' and '''uboot.img'''. | The binary we need for nand flash is '''RK3188Loader_miniall.bin''' and '''uboot.img'''. | ||
− | == Flash == | + | === Flash === |
refer [[rock/flash_the_image| flash image page]] | refer [[rock/flash_the_image| flash image page]] | ||
Line 33: | Line 35: | ||
Booting log can be found at: http://paste.ubuntu.com/9623598/ | Booting log can be found at: http://paste.ubuntu.com/9623598/ | ||
+ | |||
+ | == For SD card == | ||
+ | === Build === | ||
+ | git clone -b u-boot-rk3188 https://github.com/radxa/u-boot-rockchip.git | ||
+ | cd u-boot-rockchip | ||
+ | export ARCH=arm | ||
+ | export CROSS_COMPILE=arm-eabi- # recommend to use the rockchip official toolchain, refer [[Rock/Booting_Linux#Install_the_toolchain| kernel building]] to install it | ||
+ | make rk30xx | ||
+ | ./pack-sd.sh | ||
+ | |||
+ | The binary we need for sdcard is '''u-boot-sd.img'''. | ||
+ | |||
+ | === Flash === | ||
+ | |||
+ | sudo dd if=u-boot-sd.img of=/dev/sdx seek=64 | ||
+ | |||
+ | Insert the uSD card to rock pro, it will boot from u-boot on uSD card. | ||
== Develop == | == Develop == |
Revision as of 12:38, 4 January 2015
Contents
Features
- both Rockchip proprietary USB protocol and fastboot USB protocol are supported (Rockchip USB tools works)
- format of partitions (images) are compatible to Rockchip proprietary bootloader (rkcrc, mkbootimg works)
- (need more investigation...)
For NAND flash
Build
git clone -b u-boot-rk3188 https://github.com/radxa/u-boot-rockchip.git cd u-boot-rockchip export ARCH=arm export CROSS_COMPILE=arm-eabi- # recommend to use the rockchip official toolchain, refer kernel building to install it make rk30xx
The binary we need for nand flash is RK3188Loader_miniall.bin and uboot.img.
Flash
refer flash image page
use the new u-boot to erase the old loader
sudo upgrade_tool ef RK3188Loader_miniall.bin
flash new loader
sudo upgrade_tool ul RK3188Loader_miniall.bin
format NAND (first time only)
sudo upgrade_tool lf
flash U-Boot
sudo upgrade_tool wl 0x2000 uboot.img sudo upgrade_tool rd
Booting log can be found at: http://paste.ubuntu.com/9623598/
For SD card
Build
git clone -b u-boot-rk3188 https://github.com/radxa/u-boot-rockchip.git cd u-boot-rockchip export ARCH=arm export CROSS_COMPILE=arm-eabi- # recommend to use the rockchip official toolchain, refer kernel building to install it make rk30xx ./pack-sd.sh
The binary we need for sdcard is u-boot-sd.img.
Flash
sudo dd if=u-boot-sd.img of=/dev/sdx seek=64
Insert the uSD card to rock pro, it will boot from u-boot on uSD card.
Develop
Some important files and directories related to the Rockchip platform:
* UserManual - documentation * include/configs/rk30xx.h - configuration file * tools/rk_tools
* board/rockchip ├── common │ ├── armlinux │ ├── common │ │ ├── A8MMU │ │ ├── crc │ │ ├── emmc │ │ ├── fat │ │ ├── rc4 │ │ ├── rockusb │ │ ├── serial_p9 │ │ └── SPI │ └── platform │ ├── rk2928 │ └── rk30 └── rk30xx
* arch/arm/cpu/armv7/rk30xx * arch/arm/include/asm/arch-rk30xx
Unbrick
If something goes wrong and your device doesn't boot anymore, read Unbrick Rock.
External links
- http://androtab.info/rockchip/u-boot/ (working binaries)
- https://github.com/linux-rockchip/u-boot-rockchip (some improvement)