【速報】電源ONで直接SDスロットから自前ビルドu-bootの起動に成功

タイトルの件、成功

一番先に成功したからってずっと試してたMMCカード。
USBつないでsunxi-fel uboot u-boot-sunxi-with-spl.binでは起動してたのに、
何度書いて試しても起動しない。
(MMCは読みに行ってるけど結局あきらめられてNANDのu-bootが走っちゃってた)

 

512MBという今となってはちょっと小さい(しかもSDじゃない)ということから
ふと思い立って、数少ない普通に読めてた2GのSDカードに手順通り

Bootable SD card - linux-sunxi.org

書いてスイッチ入れたらいきなりu-boot起動したわ。しかもちゃんとUART2で。

 

なんだってーーーーーー

 

いや、さすがにちょっと信じられなくて何度もスイッチON/OFFして確かめちゃったよ。
というわけで、これでKernelをコンパイルして配置すれば単体起動が出来そう。
テンション上がってきた。

 

起動ログ。MMCのTRACE入ってるから読みにくいわ。

 

U-Boot SPL 2016.11-rc3-g8cf4582-dirty (Dec 07 2016 - 14:46:32)
DRAM: 256 MiB
Trying to boot from MMC1
init mmc 0 clock and io
mmc 0 set  clock to 24000000
create mmc
init mmc 2 clock and io
mmc 2 set  clock to 24000000
create mmc
set ios: bus_width: 1, clock: 0
set ios: bus_width: 1, clock: 400000
mmc 0 set  clock to 400000
CMD_SEND:0
                ARG                      0x00000000
mmc 0, cmd 0(0x80008000), arg 0x00000000
mmc resp 0x00000000
                MMC_RSP_NONE
CMD_SEND:8
                ARG                      0x00000000
mmc 0, cmd 8(0x80000148), arg 0x000001aa
mmc resp 0x000001aa
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:55
                ARG                      0x00000000
mmc 0, cmd 55(0x80000177), arg 0x00000000
mmc resp 0x00000120
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:41
                ARG                      0x00000000
mmc 0, cmd 41(0x80000069), arg 0x40300000
mmc resp 0x00ff8000
                MMC_RSP_R3,4             0x00000000
CMD_SEND:55
                ARG                      0x00000000
mmc 0, cmd 55(0x80000177), arg 0x00000000
mmc resp 0x00000120
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:41
                ARG                      0x00000000
mmc 0, cmd 41(0x80000069), arg 0x40300000
mmc resp 0x80ff8000
                MMC_RSP_R3,4             0x00000000
MMC Starup
CMD_SEND:2
                ARG                      0x00000000
mmc 0, cmd 2(0x800001c2), arg 0x00000000
mmc resp 0xdb00ace3 0x006221aa 0x44303247 0x134b4753
                MMC_RSP_R2               0x00000000
                                         0x00000000
                                         0x00000000
                                         0x00000000

                                        DUMPING DATA
                                        000 - 00 00 00 00
                                        004 - 00 00 00 00
                                        008 - 00 00 00 00
                                        012 - 00 00 00 00
CMD_SEND:3
                ARG                      0x00000000
mmc 0, cmd 3(0x80000143), arg 0x00000000
mmc resp 0xb3680520
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:9
                ARG                      0x00000000
mmc 0, cmd 9(0x800001c9), arg 0xb3680000
mmc resp 0x968000f5 0xedb7ffbf 0x5f5a83a2 0x002f0032
                MMC_RSP_R2               0x00000000
                                         0x00000000
                                         0x00000000
                                         0x00000000

                                        DUMPING DATA
                                        000 - 00 00 00 00
                                        004 - 00 00 00 00
                                        008 - 00 00 00 00
                                        012 - 00 00 00 00
CMD_SEND:13
                ARG                      0x00000000
mmc 0, cmd 13(0x8000014d), arg 0xb3680000
mmc resp 0x00000700
                MMC_RSP_R1,5,6,7         0x00000000
CURR STATE:3
CMD_SEND:7
                ARG                      0x00000000
mmc 0, cmd 7(0x80000147), arg 0xb3680000
mmc resp 0x00000700
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:55
                ARG                      0x00000000
mmc 0, cmd 55(0x80000177), arg 0xb3680000
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:51
                ARG                      0x00000000
mmc 0, cmd 51(0x80002373), arg 0x00000000
trans data 8 bytes
cacl timeout 78 msec
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:6
                ARG                      0x00000000
mmc 0, cmd 6(0x80002346), arg 0x00fffff1
trans data 64 bytes
cacl timeout 78 msec
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:6
                ARG                      0x00000000
mmc 0, cmd 6(0x80002346), arg 0x80fffff1
trans data 64 bytes
cacl timeout 78 msec
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:55
                ARG                      0x00000000
mmc 0, cmd 55(0x80000177), arg 0xb3680000
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:6
                ARG                      0x00000000
mmc 0, cmd 6(0x80000146), arg 0x00000002
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000000
set ios: bus_width: 4, clock: 400000
mmc 0 set  clock to 400000
CMD_SEND:55
                ARG                      0x00000000
mmc 0, cmd 55(0x80000177), arg 0xb3680000
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:13
                ARG                      0x00000000
mmc 0, cmd 13(0x8000234d), arg 0x00000000
trans data 64 bytes
cacl timeout 78 msec
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000000
set ios: bus_width: 4, clock: 50000000
mmc 0 set  clock to 50000000
CMD_SEND:16
                ARG                      0x00000000
mmc 0, cmd 16(0x80000150), arg 0x00000200
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:17
                ARG                      0x00000000
mmc 0, cmd 17(0x80002351), arg 0x0000a000
trans data 512 bytes
cacl timeout 78 msec
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:16
                ARG                      0x00000000
mmc 0, cmd 16(0x80000150), arg 0x00000200
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:18
                ARG                      0x00000000
mmc 0, cmd 18(0x80003352), arg 0x0000a000
trans data 367616 bytes
cacl timeout 78 msec
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000000
CMD_SEND:12
                ARG                      0x00000000
mmc cmd 12 check rsp busy
                MMC_RSP_R1b              0x00000000


U-Boot 2016.11-rc3-g8cf4582-dirty (Dec 07 2016 - 14:46:32 -0800) Allwinner Technology

DRAM:  256 MiB
MMC:   init mmc 0 clock and io
mmc 0 set  clock to 24000000
create mmc
init mmc 2 clock and io
mmc 2 set  clock to 24000000
create mmc
SUNXI SD/MMC: 0, SUNXI SD/MMC: 1
set ios: bus_width: 1, clock: 0
set ios: bus_width: 1, clock: 400000
mmc 0 set  clock to 400000
CMD_SEND:0
                ARG                      0x00000000
mmc 0, cmd 0(0x80008000), arg 0x00000000
mmc resp 0x00000000
                MMC_RSP_NONE
CMD_SEND:8
                ARG                      0x000001AA
mmc 0, cmd 8(0x80000148), arg 0x000001aa
mmc resp 0x000001aa
                MMC_RSP_R1,5,6,7         0x000001AA
CMD_SEND:55
                ARG                      0x00000000
mmc 0, cmd 55(0x80000177), arg 0x00000000
mmc resp 0x00000120
                MMC_RSP_R1,5,6,7         0x00000120
CMD_SEND:41
                ARG                      0x40300000
mmc 0, cmd 41(0x80000069), arg 0x40300000
mmc resp 0x00ff8000
                MMC_RSP_R3,4             0x00FF8000
CMD_SEND:55
                ARG                      0x00000000
mmc 0, cmd 55(0x80000177), arg 0x00000000
mmc resp 0x00000120
                MMC_RSP_R1,5,6,7         0x00000120
CMD_SEND:41
                ARG                      0x40300000
mmc 0, cmd 41(0x80000069), arg 0x40300000
mmc resp 0x80ff8000
                MMC_RSP_R3,4             0x80FF8000
MMC Starup
CMD_SEND:2
                ARG                      0x00000000
mmc 0, cmd 2(0x800001c2), arg 0x00000000
mmc resp 0xdb00ace3 0x006221aa 0x44303247 0x134b4753
                MMC_RSP_R2               0x134B4753
                                         0x44303247
                                         0x006221AA
                                         0xDB00ACE3

                                        DUMPING DATA
                                        000 - 13 4B 47 53
                                        004 - 44 30 32 47
                                        008 - 00 62 21 AA
                                        012 - DB 00 AC E3
CMD_SEND:3
                ARG                      0x00000000
mmc 0, cmd 3(0x80000143), arg 0x00000000
mmc resp 0xb3680520
                MMC_RSP_R1,5,6,7         0xB3680520
CMD_SEND:9
                ARG                      0xB3680000
mmc 0, cmd 9(0x800001c9), arg 0xb3680000
mmc resp 0x968000f5 0xedb7ffbf 0x5f5a83a2 0x002f0032
                MMC_RSP_R2               0x002F0032
                                         0x5F5A83A2
                                         0xEDB7FFBF
                                         0x968000F5

                                        DUMPING DATA
                                        000 - 00 2F 00 32
                                        004 - 5F 5A 83 A2
                                        008 - ED B7 FF BF
                                        012 - 96 80 00 F5
CMD_SEND:13
                ARG                      0xB3680000
mmc 0, cmd 13(0x8000014d), arg 0xb3680000
mmc resp 0x00000700
                MMC_RSP_R1,5,6,7         0x00000700
CURR STATE:3
CMD_SEND:7
                ARG                      0xB3680000
mmc 0, cmd 7(0x80000147), arg 0xb3680000
mmc resp 0x00000700
                MMC_RSP_R1,5,6,7         0x00000700
CMD_SEND:55
                ARG                      0xB3680000
mmc 0, cmd 55(0x80000177), arg 0xb3680000
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000920
CMD_SEND:51
                ARG                      0x00000000
mmc 0, cmd 51(0x80002373), arg 0x00000000
trans data 8 bytes
cacl timeout 78 msec
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000920
CMD_SEND:6
                ARG                      0x00FFFFF1
mmc 0, cmd 6(0x80002346), arg 0x00fffff1
trans data 64 bytes
cacl timeout 78 msec
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000900
CMD_SEND:6
                ARG                      0x80FFFFF1
mmc 0, cmd 6(0x80002346), arg 0x80fffff1
trans data 64 bytes
cacl timeout 78 msec
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000900
CMD_SEND:55
                ARG                      0xB3680000
mmc 0, cmd 55(0x80000177), arg 0xb3680000
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000920
CMD_SEND:6
                ARG                      0x00000002
mmc 0, cmd 6(0x80000146), arg 0x00000002
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000920
set ios: bus_width: 4, clock: 400000
mmc 0 set  clock to 400000
CMD_SEND:55
                ARG                      0xB3680000
mmc 0, cmd 55(0x80000177), arg 0xb3680000
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000920
CMD_SEND:13
                ARG                      0x00000000
mmc 0, cmd 13(0x8000234d), arg 0x00000000
trans data 64 bytes
cacl timeout 78 msec
mmc resp 0x00000920
                MMC_RSP_R1,5,6,7         0x00000920
set ios: bus_width: 4, clock: 50000000
mmc 0 set  clock to 50000000
CMD_SEND:16
                ARG                      0x00000200
mmc 0, cmd 16(0x80000150), arg 0x00000200
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000900
CMD_SEND:17
                ARG                      0x00000000
mmc 0, cmd 17(0x80002351), arg 0x00000000
trans data 512 bytes
cacl timeout 78 msec
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000900
CMD_SEND:16
                ARG                      0x00000200
mmc 0, cmd 16(0x80000150), arg 0x00000200
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000900
CMD_SEND:17
                ARG                      0x00000000
mmc 0, cmd 17(0x80002351), arg 0x00000000
trans data 512 bytes
cacl timeout 78 msec
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000900
CMD_SEND:16
                ARG                      0x00000200
mmc 0, cmd 16(0x80000150), arg 0x00000200
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000900
CMD_SEND:18
                ARG                      0x00088000
mmc 0, cmd 18(0x80003352), arg 0x00088000
trans data 131072 bytes
cacl timeout 78 msec
mmc resp 0x00000900
                MMC_RSP_R1,5,6,7         0x00000900
CMD_SEND:12
                ARG                      0x00000000
mmc cmd 12 check rsp busy
                MMC_RSP_R1b              0x00000900
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   No ethernet found.
starting USB...
No controllers found