1*625ec503SKever YangIntroduction 2*625ec503SKever Yang============ 3*625ec503SKever Yang 4*625ec503SKever YangRK3328 key features we might use in U-Boot: 5*625ec503SKever Yang* CPU: ARMv8 64bit quad-core Cortex-A53 6*625ec503SKever Yang* IRAM: 36KB 7*625ec503SKever Yang* DRAM: 4GB-16MB dual-channel 8*625ec503SKever Yang* eMMC: support eMMC 5.0/5.1, suport HS400, HS200, DDR50 9*625ec503SKever Yang* SD/MMC: support SD 3.0, MMC 4.51 10*625ec503SKever Yang* USB: USB2.0 EHCI host port *2 11*625ec503SKever Yang* Display: RGB/HDMI/DP/MIPI/EDP 12*625ec503SKever Yang 13*625ec503SKever Yangevb key features: 14*625ec503SKever Yang* regulator: pwm regulator for CPU B/L 15*625ec503SKever Yang* PMIC: rk808 16*625ec503SKever Yang* debug console: UART2 17*625ec503SKever Yang 18*625ec503SKever YangIn order to support Arm Trust Firmware(ATF), we need to use the 19*625ec503SKever Yangminiloader from rockchip which: 20*625ec503SKever Yang* do DRAM init 21*625ec503SKever Yang* load and verify ATF image 22*625ec503SKever Yang* load and verify U-Boot image 23*625ec503SKever Yang 24*625ec503SKever YangHere is the step-by-step to boot to U-Boot on rk3328. 25*625ec503SKever Yang 26*625ec503SKever YangGet the Source and prebuild binary 27*625ec503SKever Yang================================== 28*625ec503SKever Yang 29*625ec503SKever Yang > mkdir ~/evb_rk3328 30*625ec503SKever Yang > cd ~/evb_rk3328 31*625ec503SKever Yang > git clone https://github.com/ARM-software/arm-trusted-firmware.git 32*625ec503SKever Yang > git clone https://github.com/rockchip-linux/rkbin 33*625ec503SKever Yang > git clone https://github.com/rockchip-linux/rkflashtool 34*625ec503SKever Yang 35*625ec503SKever YangCompile ATF 36*625ec503SKever Yang=============== 37*625ec503SKever Yang 38*625ec503SKever Yang > cd arm-trusted-firmware 39*625ec503SKever Yang > make realclean 40*625ec503SKever Yang > make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3328 bl31 41*625ec503SKever Yang 42*625ec503SKever YangCompile U-Boot 43*625ec503SKever Yang================== 44*625ec503SKever Yang 45*625ec503SKever Yang > cd ../u-boot 46*625ec503SKever Yang > make CROSS_COMPILE=aarch64-linux-gnu- evb-rk3328_defconfig all 47*625ec503SKever Yang 48*625ec503SKever YangCompile rkflashtool 49*625ec503SKever Yang======================= 50*625ec503SKever Yang 51*625ec503SKever Yang > cd ../rkflashtool 52*625ec503SKever Yang > make 53*625ec503SKever Yang 54*625ec503SKever YangPackage image for miniloader 55*625ec503SKever Yang================================ 56*625ec503SKever Yang > cd .. 57*625ec503SKever Yang > cp arm-trusted-firmware/build/rk3328/release/bl31.bin rkbin/rk33 58*625ec503SKever Yang > ./rkbin/tools/trust_merger rkbin/tools/RK3328TRUST.ini 59*625ec503SKever Yang > ./rkbin/tools/loaderimage --pack --uboot u-boot/u-boot-dtb.bin uboot.img 60*625ec503SKever Yang > mkdir image 61*625ec503SKever Yang > mv trust.img ./image/ 62*625ec503SKever Yang > mv uboot.img ./image/rk3328evb-uboot.bin 63*625ec503SKever Yang 64*625ec503SKever YangFlash image 65*625ec503SKever Yang=============== 66*625ec503SKever YangPower on(or reset with RESET KEY) with MASKROM KEY preesed, and then: 67*625ec503SKever Yang 68*625ec503SKever Yang > ./rkflashtool/rkflashloader rk3328evb 69*625ec503SKever Yang 70*625ec503SKever YangYou should be able to get U-Boot log message in console/UART2 now. 71