Ok there is no linux-distribution,only initramfs like buildroot/busybox?
Have you build the image (with steps) or an official image?
I don’t want to speak against your work,i only want to know what the image is/what it does
which uboot/kernel is used with which support (rtl8367/mt7531)?
and most important: how did you build the image (source atf, where to put atf, where uboot, partitions?)
the only source i had was this: https://github.com/BPI-SINOVOIP/BPI-R64-BSP/blob/5738a31e6393d11ef4a771341e00149b7cd4ee30/scripts/bootloader.sh#L30
and i hung on the preloader (sd-card-preloader was not working in my tests), so good that you have now a emmc preloader
do you use the same atf?
tried now writing the emmc-preloader to boot0-block…looks good so far:
F0: 102B 0000
F5: 480A 0031
F5: 480A 0031
F3: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 0000 0041 [0000]
G0: 0190 0000
T0: 0000 0395 [000F]
Jump to BL
UNIVPLL_CON0 = 0xFE000000!!!
mt_pll_init: Set pll frequency for 25M crystal
[PMIC_WRAP]wrap_init pass,the return value=0.
[pmic_init] Preloader Start..................
[pmic_init] MT6380 CHIP Code, reg_val = 0, 1:E2 0:E3
[pmic_init] Done...................
Chip part number:7622A
MT7622 Version: 1.2.7, (iPA)
SSC OFF
mt_pll_post_init: mt_get_cpu_freq = 1350000Khz
mt_pll_post_init: mt_get_mem_freq = 1600000Khz
mt_pll_post_init: mt_get_bus_freq = 1119920Khz
[PLFM] Init I2C: OK(0)
[BLDR] Build Time: 20180622-162441
==== Dump RGU Reg ========
RGU MODE: 4D
RGU LENGTH: FFE0
RGU STA: 0
RGU INTERVAL: FFF
RGU SWSYSRST: 8000
==== Dump RGU Reg End ====
RGU: g_rgu_satus:0
mtk_wdt_mode_config mode value=10, tmp:22000010
PL P ON
WDT does not trigger reboot
WDT NONRST=0x20000000
WDT IRQ_EN=0x340003
RGU mtk_wdt_init:MTK_WDT_DEBUG_CTL(590200F3)
[EMI] MDL number = 2
[EMI] DRAMC calibration start
[EMI] DRAMC calibration end
[EMI]rank0 size: 0x40000000
[MEM] complex R/W mem test pass
RAM_CONSOLE wdt status (0x0)=0x0
[mmc_init]: msdc0 start mmc_init_host() in PL...
[msdc_init]: msdc0 Host controller intialization start
[SD0] Pins mode(1), none(0), down(1), up(2), keep(3)
[SD0] Pins mode(2), none(0), down(1), up(2), keep(3)
[info][msdc_set_startbit 1127] read data start bit at rising edge
[info][msdc_config_clksrc] input clock is 400000kHz
[SD0] Bus Width: 1
[info][msdc_config_clksrc] input clock is 400000kHz
[info][msdc_set_startbit 1127] read data start bit at rising edge
[SD0] SET_CLK(260kHz): SCLK(259kHz) MODE(0) DDR(0) DIV(385) DS(0) RS(0)
[msdc_init]: msdc0 Host controller intialization done
[mmc_init]: msdc0 start mmc_init_card() in PL...
[mmc_init_card]: start
[info][msdc_config_clksrc] input clock is 400000kHz
[info][msdc_set_startbit 1127] read data start bit at rising edge
[SD0] SET_CLK(260kHz): SCLK(259kHz) MODE(0) DDR(0) DIV(385) DS(0) RS(0)
[SD0] Bus Width: 8
[SD0] Switch to High-Speed mode!
[info][msdc_config_clksrc] input clock is 400000kHz
[info][msdc_set_startbit 1127] read data start bit at rising edge
[SD0] SET_CLK(260kHz): SCLK(259kHz) MODE(2) DDR(1) DIV(192) DS(0) RS(0)
[SD0] Bus Width: 8
[SD0] Size: 7456 MB, Max.Speed: 52000 kHz, blklen(512), nblks(15269888), ro(0)
[mmc_init_mem_card 3140][SD0] Initialized, eMMC50
before host->cur_bus_clk(259740)
[info][msdc_config_clksrc] input clock is 400000kHz
[info][msdc_set_startbit 1127] read data start bit at rising edge
[SD0] SET_CLK(52000kHz): SCLK(50000kHz) MODE(2) DDR(1) DIV(1) DS(0) RS(0)
host->cur_bus_clk(50000000)
[mmc_init_card]: finish successfully
[PLFM] Init Boot Device: OK(0)
[GPT_PL]Parsing Primary GPT now...
[GPT_PL]check header, err(signature 0x0000000000000000!=0x5452415020494645)
[GPT_PL]Parsing Secondary GPT now...
[GPT_PL]check header, err(signature 0x0000000000000000!=0x5452415020494645)
[GPT_PL]Failure to find valid GPT.
[PART] blksz: 512B
Device APC domain init setup:
Domain Setup (0x0)
Domain Setup (0x0)
Device APC domain after setup:
Domain Setup (0x0)
Domain Setup (0x0)
[BLDR] lk partition not found
load lk (ret=-1)
[BLDR] Second Bootloader Load Failed
PL fatal error...
have written uboot and atf to same positions as for sdcard…this seems wrong…where have you put these in your image?
made simple byte-analysis…looks like you have also uboot at 0xC0000 and atf at 0x80000
maybe they are different??
you image boots up using these steps from running system:
root@bpi-r64:/boot# echo 0 > /sys/block/mmcblk1boot0/force_ro
root@bpi-r64:/boot# dd of=/dev/mmcblk1boot0 bs=1024 seek=0 if=r64_preloader_emmc.bin
root@bpi-r64:/boot# dd of=/dev/mmcblk1 if=r64_emmc_singleimage.img
it seems it is build for newer r64 (mt7531) because old ethernet-switch-chip is not recognized…
[ 2.321133] mt753x gsw@0: No mt753x switch found
[ 2.325776] mt753x: probe of gsw@0 failed with error -22
for others as info, it is lede 17.01 with kernel 4.4.177
I also tried losetup to load image and readout gpt,but this failed is it needed? Maybe i missed gpt…messages in log suggesting this
Does uboot need special options (like efi)?