en:bpi-r64:storage
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:bpi-r64:storage [2020/11/28 18:04] – [SD] frank | en:bpi-r64:storage [2023/06/08 17:06] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== storage ====== | ||
+ | https:// | ||
+ | |||
+ | image: https:// | ||
+ | |||
+ | ===== new way ===== | ||
+ | |||
+ | With the opensource ATF we switched to full 64bit mode,fip (bl31+uboot) and fit kernel | ||
+ | |||
+ | Details on my ATF repo: https:// | ||
+ | |||
+ | sudo dd of=$target if=./ | ||
+ | ===== legacy way ===== | ||
+ | ==== SD ==== | ||
+ | |||
+ | < | ||
+ | PRELOADER=$TOPDIR/ | ||
+ | ATF=$TOPDIR/ | ||
+ | UBOOT=$TOPDIR/ | ||
+ | |||
+ | HEAD0=$TOPDIR/ | ||
+ | HEAD1=$TOPDIR/ | ||
+ | |||
+ | sudo dd if=$HEAD0 of=$O bs=512 seek=0 #0 | ||
+ | sudo dd if=$HEAD1 of=$O bs=512 seek=1 #512 = 0x200 | ||
+ | |||
+ | sudo dd if=$PRELOADER of=$O bs=1k seek=2 #2k = 0x800 | ||
+ | |||
+ | sudo dd if=$ATF of=$O bs=1k seek=512 #512k = 0x80000 | ||
+ | |||
+ | sudo dd if=$UBOOT of=$O bs=1k seek=768 #768k = 0xC0000 | ||
+ | |||
+ | # partition1 /dev/sdc1 vfat 204800~327679 | ||
+ | # partition2 /dev/sdc2 ext4 327680~end | ||
+ | |||
+ | root@x:~# sfdisk /dev/sdb < r64_parttable.dat | ||
+ | root@x:~# mkfs.vfat /dev/sdb1 | ||
+ | root@x:~# mkfs.ext4 /dev/sdb2 | ||
+ | root@x:~# fatlabel /dev/sdb1 BPI-BOOT | ||
+ | root@x:~# e2label /dev/sdb2 BPI-ROOT | ||
+ | </ | ||
+ | |||
+ | https:// | ||
+ | |||
+ | only uboot-mtk.bin (with littlekernel=LK) works | ||
+ | |||
+ | A better ATF is mt7622_atf_push_wps_uboot_64.img (can be found on my gdrive too) supports booting 32bit uboot by default and 64bit uboot by pressing wps-button | ||
+ | |||
+ | http:// | ||
+ | ==== EMMC ==== | ||
+ | |||
+ | this Preloader have to be used: [[https:// | ||
+ | |||
+ | - boot from sd-card | ||
+ | |||
+ | < | ||
+ | / | ||
+ | / | ||
+ | #configure lan-port | ||
+ | root@bpi-r64: | ||
+ | root@bpi-r64: | ||
+ | root@bpi-r64: | ||
+ | #download preloader and flash it | ||
+ | root@bpi-r64: | ||
+ | root@bpi-r64: | ||
+ | root@bpi-r64: | ||
+ | </ | ||
+ | |||
+ | - boot0-block exists, but mmc-utils showing partconfig 0x0 (should be 0x48), emmc-boot hangs at bootrom: | ||
+ | |||
+ | < | ||
+ | F0: 102B 0000 | ||
+ | F5: 480A 0031 | ||
+ | F5: 480A 0031 | ||
+ | F3: 4000 0036 | ||
+ | F2: 300C 0000 | ||
+ | 00: 1005 0000 | ||
+ | F5: 480A 0031 | ||
+ | F5: 480A 0031 | ||
+ | F3: 4000 0036 | ||
+ | F2: 300C 0000 | ||
+ | 01: 102A 0001 | ||
+ | 02: 1005 0000 | ||
+ | BP: 0000 00C0 [0001] | ||
+ | T0: 0000 035F [000F] | ||
+ | System halt! | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | root@bpi-r64: | ||
+ | Boot configuration bytes [PARTITION_CONFIG: | ||
+ | root@bpi-r64: | ||
+ | root@bpi-r64: | ||
+ | Boot configuration bytes [PARTITION_CONFIG: | ||
+ | </ | ||
+ | |||
+ | This can also be done in recent uboot | ||
+ | |||
+ | mmc partconf 0 | ||
+ | mmc partconf 0 1 1 0 | ||
+ | |||
+ | after this steps preloader gets loaded (i had only flashed preloader here and nothing alse, so error is correct...full boot needs additional headers HEAD0, | ||
+ | |||
+ | < | ||
+ | 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 039F [000F] | ||
+ | Jump to BL | ||
+ | | ||
+ | UNIVPLL_CON0 = 0xFE000000!!! | ||
+ | mt_pll_init: | ||
+ | RAM_CONSOLE preloader last status: 0x0 0x0 0x0 0x0 0x0 0x0 | ||
+ | [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: | ||
+ | MT7622 Version: 1.2.7, (iPA) | ||
+ | SSC OFF | ||
+ | mt_pll_post_init: | ||
+ | mt_pll_post_init: | ||
+ | mt_pll_post_init: | ||
+ | [PLFM] Init I2C: OK(0) | ||
+ | | ||
+ | [BLDR] Build Time: 20190927-141930 | ||
+ | ==== Dump RGU Reg ======== | ||
+ | RGU MODE: | ||
+ | RGU LENGTH: | ||
+ | RGU STA: 0 | ||
+ | RGU INTERVAL: FFF | ||
+ | RGU SWSYSRST: 8000 | ||
+ | ==== Dump RGU Reg End ==== | ||
+ | RGU: g_rgu_satus: | ||
+ | | ||
+ | PL P ON | ||
+ | WDT does not trigger reboot | ||
+ | WDT NONRST=0x20000000 | ||
+ | WDT IRQ_EN=0x340003 | ||
+ | RGU mtk_wdt_init: | ||
+ | [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]: | ||
+ | [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): | ||
+ | [msdc_init]: | ||
+ | [mmc_init]: msdc0 start mmc_init_card() in PL... | ||
+ | [mmc_init_card]: | ||
+ | [info][msdc_config_clksrc] input clock is 400000kHz | ||
+ | [info][msdc_set_startbit 1127] read data start bit at rising edge | ||
+ | [SD0] SET_CLK(260kHz): | ||
+ | [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): | ||
+ | [SD0] Bus Width: 8 | ||
+ | [SD0] Size: 7456 MB, Max.Speed: 52000 kHz, blklen(512), | ||
+ | [mmc_init_mem_card 3140][SD0] Initialized, | ||
+ | before host-> | ||
+ | [info][msdc_config_clksrc] input clock is 400000kHz | ||
+ | [info][msdc_set_startbit 1127] read data start bit at rising edge | ||
+ | [SD0] SET_CLK(52000kHz): | ||
+ | host-> | ||
+ | [mmc_init_card]: | ||
+ | [PLFM] Init Boot Device: OK(0) | ||
+ | [GPT_PL](BPI)Parsing Primary GPT now... | ||
+ | [GPT_PL]check header, err(signature 0x0000000000000000!=0x5452415020494645) | ||
+ | [GPT_PL]Success to find valid GPT. | ||
+ | | ||
+ | [PART] blksz: 512B | ||
+ | [PART] [0x0000000000020000-0x000000000007FFFF] " | ||
+ | [PART] [0x0000000000080000-0x00000000000BFFFF] " | ||
+ | [PART] [0x00000000000C0000-0x000000000013FFFF] " | ||
+ | | ||
+ | Device APC domain init setup: | ||
+ | | ||
+ | Domain Setup (0x0) | ||
+ | Domain Setup (0x0) | ||
+ | Device APC domain after setup: | ||
+ | Domain Setup (0x0) | ||
+ | Domain Setup (0x0) | ||
+ | [get_part] part-> | ||
+ | [get_part] part-> | ||
+ | [get_part] part-> | ||
+ | load lk (ret=-1) | ||
+ | [BLDR] Second Bootloader Load Failed | ||
+ | PL fatal error... | ||
+ | </ | ||
+ | maybe write partitiontable | ||
+ | < | ||
+ | < | ||
+ | root@bpi-r64: | ||
+ | root@bpi-r64: | ||
+ | ... | ||
+ | root@bpi-r64: | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | </ | ||
+ | boot from emmc till uboot: | ||
+ | http:// | ||
+ | |||
+ | i've created a small script with all headers needed for emmc-boot: https:// |
en/bpi-r64/storage.txt · Last modified: 2023/06/08 17:06 by 127.0.0.1