After power on, there are 3 steps must be done before loading kernel,(Normally they all are called bootloader):
step 1: CPU init - the code is inside CPU;
step 2: init the flash device on which we boot from; (normally it’s called preloader)
step 3: u-boot;
RTD1296 supports booting from eMMC and SPI flash, so if we want to boot W2 from SD card, (that means
we put u-boot on the SD card.) the second step code must be written to SPI flash, normally it’s done in factory before the board sending out, and the code is fixed and provided by RTK without source. We need not care about it, it does a simple job.
In fact, if the board will boot from eMMC, the second code must be written to eMMC first too, remember that we introduced how to do it with u-boot together on other pages. Normally it’s also been done in factory.
The u-boot for eMMC and SD card are different, normally eMMC u-boot 's name is dvrboot.exe.bin, and u-boot for SD card name is u-boot.bin.
step 1: build a SD card system according:
step 2: boot up the board with eMMC and press ‘Esc’ key to let board stays on u-boot prompt;
step 3: using tftp to get u-boot.bin file from network;
Sorry, maybe I shared a wrong file, I have updated the link up, please download it again.
And please remember to set env var of u-boot to default in u-boot by:
env default …
Sadly. I use the newest uImage which is in this topic, but it still boot fail almost every times. (I need to keep reboot and hope there are one time to boot into system. I need to reboot about 20 to 30 times and it may successes boot. rarely)
I get different kernel panic message when boot failed.
I had tested different SD card.
But this board can boot to openWrt which in emmc.
I’m really thinking that is this a broken board or what I did wrong.
Could you please flash the newest u-boot to emmc and boot from it, which will load system from SD card firstly, to test if it works?
The u-boot for emmc name is dvrboot.exe.bin.
I don’t fully understand step 3. I’ve downloaded u-boot.bin using my Windows PC, but I’m not sure where to put it for this step. Can you please clarify for me. Thanks.
This is my result of executing tftp:
BPI-W2> tftp 0x1500000 u-boot.bin
Using r8168#0 device
TFTP from server 192.168.100.2; our IP address is 192.168.100.1
Filename 'u-boot.bin'.
Load address: 0x1500000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
BPI-W2>
Here is full output of reboot with ESC key:
C1:80000000
C2
?
C3hswitch frequency to 0x00000046
frequency divider is 0x00000080
switch frequency to 0x00000046
frequency divider is 0x00000004
switch to SDR 8 bit
switch bus width to 0x00000008 bits success
hwsetting size: 00000BE4
C4
f
5-5
s_f
5-5-2
Goto FSBL: 0x10100000
switch frequency to 0x00000046
frequency divider is 0x00000080
switch frequency to 0x00000046
frequency divider is 0x00000004
emmc_cid[3] = 0xE9547849 emmc_cid[2] = 0xDD650152 emmc_cid[1] = 0x34454D47 emmc_
cid[0] = 0x38000115
switch bus width to 0x00000008 bits success
DEVICE_TYPE = 00000057
emmc_sec_count = 00E90000
switch speed to 0x00000002 success
switch frequency to 0x000000A6
frequency divider is 0x00000000
1st TX_window = 0xFFFFFFDE
1st phase TX VP0= 0x00000012
RX_window = 0xFFFFFC03
phase RX VP1= 0x00000015
Welcome to FSBL ...
[FSBL] Warm Boot: 0x00000000
[FSBL] Secure: 0x0000BEEE
[FSBL] Flash Type: 0x00000002
[FSBL] DCache Enable: 0x00000000
[FSBL] SVP = N
********** FW_TYPE_GOLD_TEE **********
FW Image to 0x10200000, size=0x0007BDA0 (0x1027BDA0)
FW Image fr 0x000B0600
********** FW_TYPE_GOLD_BL31 **********
FW Image to 0x10120000, size=0x000062A0 (0x101262A0)
FW Image fr 0x0012C400
********** FW_TYPE_BOOTCODE **********
FW Image to 0x00020000, size=0x0007DC20 (0x0009DC20)
FW Image fr 0x00020E00
md copy audio bin
VERBOSE: bl31_setup
NOTICE: BL31: v1.2(debug):a6c9ab6
NOTICE: BL31: Built : 15:16:22, Apr 27 2017
INFO: BL31: Initializing runtime services
INFO: Start to init service std_svc
INFO: Finish to init service std_svc
INFO: Start to init service opteed_fast
INFO: Finish to init service opteed_fast
INFO: BL31: Initializing BL32
INFO: TEE-CORE: TEE OS v2.1
INFO: TEE-CORE: TA RAM slim vesion.
INFO: TEE-CORE: Skipping to check tee os version.
INFO: TEE-CORE: Initializing (9a5884c #1 四 12月 7 17:26:20 CST 2017 aarch
64)
MESSAGE: [0x0] TEE-CORE:tee_otp_get_hw_unique_key:70: ************************
tee_otp_get_hw_unique_key chip id: 30000
MESSAGE: [0x0] TEE-CORE:tee_otp_get_hw_unique_key:75: ************************
tee_otp_get_hw_unique_key used Kf
INFO: TEE-CORE: teecore inits done
INFO: Core_0 TEESMC_OPTEED_RETURN_ENTRY_DONE
INFO: Core_0 got optee_vectors (0x1020093c)
INFO: BL31: Initialized BL32
INFO: EXIT BL31
INFO: bl31_to_kernel: kernel_resume_entry = 0x1e000
INFO: bl31 jumps to EL2: LK entry
U-Boot 2015.07 (May 15 2018 - 22:44:59 +0800)
CPU : Cortex-A53 Quad Core - AARCH64
Board: Realtek QA Board
DRAM: 2 GiB
Watchdog: Disabled
mapping memory 0x20000000-0x40000000 non-cached
flushing dcache successfully.
nor flash id [0x00ef4018]
sector 256k en: 0
sector 64k en: 1
sector 32k en: 1
sector 4k en: 1
page_program : 1
max capacity : 0x01000000
spi type name : WINBOND_W325Q128BV_128Mbit
MMC: Initialize eMMC in traditional mmc flow.
RTD1295 eMMC: 0
rsp[0]=0x15010038,
rsp[1]=0x474d4534,
rsp[2]=0x520165dd,
rsp[3]=0x497854e9
The cid_val is 15.
rsp[0]=0xd0270132,
rsp[1]=0x0f5903ff,
rsp[2]=0xf6dbffef,
rsp[3]=0x8e40400d
mmc->version=0x40000000
version=0x00000004
[LY] cardtype=57, mmc->card_caps=0f
[LY] freq = 00464388, clk diver = 00000080
[LY] speed up emmc at HS-200
[LY] HS-200 bus width=2
[LY] mmc->boot_caps = 20b
TEMP TX_WINDOW=0xffffffde, TX_best=0x12
RX_WINDOW=0xfffffc03, RX_best=0x15
TX1_WINDOW=0x7fffff80, TX_best=0x12
[LY] hs200 : 0
[HC] ERASE Unit Size = 524288 bytes
[HC] WPG_SIZE = 8388608 bytes
Device: RTD1295 eMMC
Manufacturer ID: 15
OEM: 100
Name: 8GME4
Tran Speed: 200000000
Rd Block Len: 512
MMC version 4.0
High Capacity: No
Capacity: 7.3 GiB
User Capacity: 7.3 GiB
Boot Capacity: 4 MiB
RPMB Capacity: 512 KiB
Bus Width: 8-bit
Speed: HS200
SD:
SD device index# 0
Factory: MMC
Factory: pp:1, seq#:0x1a, size:0x22000
------------can't find tmp/factory/000BootParam.h
In: serial
Out: serial
Err: serial
HDMITx_HPD=False
------------tmp/factory/video_rpc.bin found
EDID checksum: read 00 00, last 8e 00
Sink changed, skip ONE_STEP_RPC
tv_system=25 mode=1
Net: Realtek PCIe GBE Family Controller mcfg = 0024
dev->name=r8168#0
Checking default environment
Hit Esc or Tab key to enter console mode or rescue linux: 0
------------can't find tmp/factory/recovery
Press Esc Key
Enter console mode, disable watchdog ...
BPI-W2> mmcinfo
Device: RTD1295 eMMC
Manufacturer ID: 15
OEM: 100
Name: 8GME4
Tran Speed: 200000000
Rd Block Len: 512
MMC version 4.0
High Capacity: No
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 256 MiB
BPI-W2> tftp 0x1500000 u-boot.bin
Using r8168#0 device
TFTP from server 192.168.100.2; our IP address is 192.168.100.1
Filename 'u-boot.bin'.
Load address: 0x1500000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
BPI-W2>
The issue you met is caused by CPU got wrong instruction, normally it should be one of three reasons:
CPU or cache within it is not stable;
DDR is not stable;
Got wrong data from SD card;
Since you said openwrt works fine, so could you please check SD partition 1 type and formatting, is it Fat32? And mount it on openwrt to do some reading tests?
I seem to have the same problem as Jalen. However, only cold system occurs with me. Once the processor has warmed up, it is fully initialized by the kernel. I hope this does not indicate a hardware error on the board.
Furthermore, I noticed that the LEDs of eth0 (interface next to usb3.0) are without any function.
Is this behavior with you too?
Is there a schematic of the board to download?
Is it possible to download the kernel source? I would like to work under Debian.