看 t3 的芯片手册,可以看到t3 的启动流程:板卡上有个 36KB的 ROM boot loader,然后进入fast boot, fast boot 启动后加载存储设备中的 BOOT0,启动boot0 ,boot0再引导uboot 启动;
/***************************************************************************************************************************************/
t3 boot0 编译:
/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-ld /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/dram/libchipid.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/dram/libdram.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/libs/libgeneric.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/main/libmain.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/spl/libsource_spl.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/spl/lib/libgeneric.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/nand/libnand.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/load_nand/libloadnand.o -L /home/sylixos/workspace/lrj/lichee/brandy/gcc-linaro/bin/../lib/gcc/arm-linux-gnueabi/4.6.3 -lgcc -T/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/boot0.lds -o boot0_nand.axf -Map boot0_nand.map
bootaddr is (0x00000)
/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-objcopy -O binary /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/boot0_nand.axf /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/boot0_nand.bin
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/mmc/
CC mmc_bsp.c ...
CC mmc.c ...
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/load_mmc/
CC load_boot1_from_sdmmc.c ...
/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-ld /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/dram/libchipid.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/dram/libdram.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/libs/libgeneric.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/main/libmain.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/spl/libsource_spl.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/spl/lib/libgeneric.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/mmc/libmmc.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/load_mmc/libloadmmc.o -L /home/sylixos/workspace/lrj/lichee/brandy/gcc-linaro/bin/../lib/gcc/arm-linux-gnueabi/4.6.3 -lgcc -T/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/boot0.lds -o boot0_sdcard.axf -Map boot0_sdcard.map
/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-objcopy -O binary /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/boot0_sdcard.axf /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/boot0/boot0_sdcard.bin
fatal: Not a git repository (or any of the parent directories): .git
not set commit log
'boot0_nand_sun8iw11p1.bin' -> '/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../../tools/pack/chips/sun8iw11p1/bin/boot0_nand_sun8iw11p1.bin'
fatal: Not a git repository (or any of the parent directories): .git
not set commit log
'boot0_sdcard_sun8iw11p1.bin' -> '/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../../tools/pack/chips/sun8iw11p1/bin/boot0_sdcard_sun8iw11p1.bin'
/*********************************************************************************************************************************/
t3 fes 编译:
make -f spl_make fes
make -C sunxi_spl/fes_init all
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/dram/
libdram exist
lib-chipid exist
cp ./libdram ./libdram.o
cp ./libchipid ./libchipid.o
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/dram/
libdram exist
lib-chipid exist
cp ./libdram ./libdram.o
cp ./libchipid ./libchipid.o
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/main/
CC fes_head.c ...
CC fes1_entry.S ...
CC fes1_main.c ...
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/spl/
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/spl/lib/
make[3]: Nothing to be done for 'all'.
/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-ld /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/dram/libchipid.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/dram/libdram.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/main/libmain.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/spl/libsource_spl.o /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/spl/lib/libgeneric.o -L /home/sylixos/workspace/lrj/lichee/brandy/gcc-linaro/bin/../lib/gcc/arm-linux-gnueabi/4.6.3 -lgcc -T/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/fes_init.lds -o fes1.axf -Map fes1.map
/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../gcc-linaro/bin/arm-linux-gnueabi-objcopy -O binary /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/fes1.axf /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/fes_init/fes1.bin
'fes1_sun8iw11p1.bin' -> '/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../../tools/pack/chips/sun8iw11p1/bin/fes1_sun8iw11p1.bin'
/*********************************************************************************************************************************/
t3 sboot 编译:再编译 sboot 时报错,发现 sun8iw11p1.h 将 sbrom 宏定义已经去掉,估计不使用这种方式启动
make -f spl_make sboot
make -C sunxi_spl/sbrom all
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/dram/
libdram exist
lib-chipid exist
cp ./libdram ./libdram.o
cp ./libchipid ./libchipid.o
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/dram/
libdram exist
lib-chipid exist
cp ./libdram ./libdram.o
cp ./libchipid ./libchipid.o
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/mmc/
make[3]: Nothing to be done for 'all'.
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/arch/arm/cpu/armv7/sun8iw11p1/nand/
make[3]: Nothing to be done for 'all'.
make -C /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/flash/
flash.c: In function 鈥榮unxi_flash_init鈥
flash.c:53:25: error: 鈥楥ONFIG_TOC1_STORE_IN_DRAM_BASE鈥undeclared (first use in this function)
flash.c:53:25: note: each undeclared identifier is reported only once for each function it appears in
flash.c: In function 鈥榮unxi_flash_read鈥
flash.c:142:24: error: CONFIG_TOC1_STORE_IN_DRAM_BASE鈥undeclared (first use in this function)
/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/config.mk:69: recipe for target 'flash.o' failed
make[3]: *** [flash.o] Error 1
Makefile:77: recipe for target '/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/flash/libflash.o' failed
make[2]: *** [/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/sunxi_spl/sbrom/flash/libflash.o] Error 2
spl_make:65: recipe for target 'sboot' failed
make[1]: *** [sboot] Error 2
Makefile:884: recipe for target 'sboot' failed
make: *** [sboot] Error 2
/***************************************************************************************************************************************/
t3 uboot 编译时需要输入 :make sun8iw11p1_config
通过顶层 Makefile 分析,在执行make sun8iw11p1_config时,调用了:
%_config:: outputmakefile
@$(MKCONFIG) -A $(@:_config=) // mkconfig -A sun8iw11p1
mkconfig:
if [ \( $# -eq 2 \) -a \( "$1" = "-A" \) ] ; then
# Automatic mode
line=`awk '($0 !~ /^#/ && $7 ~ /^'"$2"'$/) { print $1, $2, $3, $4, $5, $6, $7, $8 }' $srctree/boards.cfg`
if [ -z "$line" ] ; then
echo "make: *** No rule to make target \`$2_config'. Stop." >&2
exit 1
fi
set ${line}
# add default board name if needed
[ $# = 3 ] && set ${line} ${1}
fi
将从 boards.cfg 中读取CPU相关配置信息
最终在 u-boot-2014.07/include 目录下生成 config.h文件
建立在 u-boot-2014.07/arch/arm/include/asm 的 arch 链接
lrwxrwxrwx 1 root root 15 Apr 2 16:51 arch -> arch-sun8iw11p1
综上,总结下mkconfig文件(或者叫mkconfig -A sun8iw11p1)的作用:
l 确定ARCH、CPU、BOARD等变量的值,并存到./include/config.mk文件中
l 建立板级相关的 ./include/config.h文件
l 建立指向其他文件的软链接
include/config.mk 中的内容
ARCH = arm
CPU = armv7
BOARD = sun8iw11p1
VENDOR = sunxi
SOC = sun8iw11p1
LDSCRIPT 的路径 即为u-boot-2014.07/arch/arm/cpu/u-boot.lds
CPUDIR=arch/$(ARCH)/cpu$(if $(CPU),/$(CPU),) == u-boot-2014.07/arch/arm/cpu/armv7
去除 key 检测 CONFIG_SUNXI_KEY_SUPPORT
2, U_BOOT_CMD : include/command.h
#define U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, _comp) \
ll_entry_declare(cmd_tbl_t, _name, cmd) = \
U_BOOT_CMD_MKENT_COMPLETE(_name, _maxargs, _rep, _cmd, \
_usage, _help, _comp);
#define U_BOOT_CMD(_name, _maxargs, _rep, _cmd, _usage, _help) \
U_BOOT_CMD_COMPLETE(_name, _maxargs, _rep, _cmd, _usage, _help, NULL)
编译流程:
GEN include/autoconf.mk.dep
GEN include/autoconf.mk
CHK include/config/uboot.release
CHK include/generated/timestamp_autogenerated.h
HOSTCC scripts/basic/fixdep
UPD include/generated/timestamp_autogenerated.h
CHK include/generated/version_autogenerated.h
CC arch/arm/lib/asm-offsets.s
CC lib/asm-offsets.s
GEN include/generated/asm-offsets.h
GEN include/generated/generic-asm-offsets.h
HOSTCC tools/gen_eth_addr
WRAP tools/common/image-fit.c
HOSTCC tools/aisimage.o
HOSTCC tools/default_image.o
HOSTCC tools/dumpimage.o
HOSTCC tools/fit_common.o
WRAP tools/common/bootm.c
WRAP tools/common/image.c
HOSTCC tools/atmelimage.o
HOSTCC tools/fit_image.o
HOSTCC tools/gpimage-common.o
HOSTCC tools/gpimage.o
HOSTCC tools/image-host.o
HOSTCC tools/imagetool.o
HOSTCC tools/kwbimage.o
HOSTCC tools/imximage.o
WRAP tools/lib/crc32.c
WRAP tools/lib/fdtdec.c
WRAP tools/lib/fdtdec_common.c
WRAP tools/lib/libfdt/fdt.c
WRAP tools/lib/libfdt/fdt_ro.c
WRAP tools/lib/libfdt/fdt_rw.c
WRAP tools/lib/libfdt/fdt_wip.c
WRAP tools/lib/md5.c
WRAP tools/lib/sha1.c
WRAP tools/lib/libfdt/fdt_strerror.c
HOSTCC tools/mkenvimage.o
HOSTCC tools/mkimage.o
WRAP tools/lib/sha256.c
HOSTCC tools/mxsimage.o
HOSTCC tools/omapimage.o
HOSTCC tools/os_support.o
HOSTCC tools/pbl_crc32.o
HOSTCC tools/pblimage.o
HOSTCC tools/mksunxiboot
HOSTCC tools/ublimage.o
HOSTCC tools/proftool
HOSTCC tools/common/bootm.o
HOSTCC tools/common/image.o
HOSTCC tools/common/image-fit.o
HOSTCC tools/lib/fdtdec.o
HOSTCC tools/lib/crc32.o
HOSTCC tools/lib/fdtdec_common.o
HOSTCC tools/lib/libfdt/fdt.o
HOSTCC tools/lib/libfdt/fdt_ro.o
HOSTCC tools/lib/libfdt/fdt_rw.o
HOSTCC tools/lib/libfdt/fdt_strerror.o
HOSTCC tools/lib/libfdt/fdt_wip.o
HOSTCC tools/lib/md5.o
HOSTCC tools/lib/sha1.o
HOSTCC tools/lib/sha256.o
LDS u-boot.lds
HOSTLD tools/dumpimage
HOSTLD tools/mkenvimage
HOSTLD tools/mkimage
LD arch/arm/cpu/built-in.o
CC arch/arm/cpu/armv7/sunxi-common/board.o
CC arch/arm/cpu/armv7/sun8iw11p1/clock.o
CC arch/arm/cpu/armv7/sun8iw11p1/board.o
CC arch/arm/cpu/armv7/cache_v7.o
CC arch/arm/cpu/armv7/cpu.o
CC board/sunxi/sun8iw11p1/sun8iw11p1.o
CC board/sunxi/common/sunxi_debug.o
AS arch/arm/lib/vectors.o
AS arch/arm/lib/crt0.o
CC arch/arm/cpu/armv7/sun8iw11p1/usb_clock.o
CC board/sunxi/common/sys_config.o
AS arch/arm/lib/relocate.o
CC board/sunxi/common/sys_config_old.o
CC arch/arm/cpu/armv7/syslib.o
LD arch/arm/cpu/armv7/sun8iw11p1/built-in.o
LD board/sunxi/sun8iw11p1/built-in.o
LD arch/arm/cpu/armv7/sunxi-common/built-in.o
CC arch/arm/lib/bootm-fdt.o
CC disk/part.o
AS arch/arm/cpu/armv7/lowlevel_init.o
CC arch/arm/cpu/armv7/spare_head.o
AS arch/arm/cpu/armv7/start.o
CC arch/arm/lib/bootm.o
CC arch/arm/cpu/armv7/uboot_hash.o
CC drivers/arisc/arisc.o
LD arch/arm/cpu/armv7/built-in.o
LD drivers/block/built-in.o
LD drivers/crypto/built-in.o
CC disk/part_dos.o
CC drivers/clk/clk_factor.o
LD drivers/dfu/built-in.o
LD drivers/hwmon/built-in.o
AS arch/arm/lib/memset.o
LD drivers/memory/built-in.o
AS arch/arm/lib/memcpy.o
CC board/sunxi/common/sys_partition.o
CC arch/arm/lib/sections.o
CC arch/arm/lib/interrupts.o
CC common/main.o
LD disk/built-in.o
CC arch/arm/lib/reset.o
CC drivers/dma/sunxi_dma.o
CC common/command.o
CC arch/arm/lib/cache.o
CC arch/arm/lib/cache-cp15.o
AR arch/arm/lib/lib.a
CC arch/arm/lib/eabi_compat.o
CC common/exports.o
CC drivers/clk/clk_periph.o
LD drivers/arisc/built-in.o
LD drivers/misc/built-in.o
CC drivers/pcmcia/tqm8xx_pcmcia.o
CC board/sunxi/common/sunxi_string.o
LD drivers/dma/built-in.o
CC drivers/rtc/date.o
LD arch/arm/lib/built-in.o
CC drivers/gic/sunxi_gic.o
LD drivers/pcmcia/built-in.o
LD drivers/sound/built-in.o
LD drivers/spinor/built-in.o
CC common/hash.o
CC board/sunxi/common/power_probe.o
LD drivers/tpm/built-in.o
LD drivers/rtc/built-in.o
LD drivers/twserial/built-in.o
CC common/cli_hush.o
LD drivers/watchdog/built-in.o
LD drivers/video/built-in.o
LD drivers/built-in.o
LD drivers/gpio/built-in.o
CC board/sunxi/common/power_check.o
CC drivers/i2c/sunxi_i2c.o
CC drivers/input/key_matrix.o
CC drivers/input/input.o
CC common/cli_simple.o
CC drivers/clk/clk.o
LD drivers/gic/built-in.o
CC board/sunxi/common/check_key_uart.o
CC drivers/key/sunxi_key.o
CC common/cli.o
CC drivers/mmc/mmc.o
LD drivers/input/built-in.o
CC board/sunxi/common/debug_mode.o
LD drivers/key/built-in.o
LD drivers/mtd/built-in.o
LD drivers/mtd/onenand/built-in.o
LD drivers/i2c/built-in.o
CC board/sunxi/common/board_common.o
LD drivers/mtd/spi/built-in.o
CC drivers/net/sunxi_geth.o
CC common/cli_readline.o
LD drivers/net/phy/built-in.o
LD drivers/pci/built-in.o
CC common/s_record.o
CC common/xyzModem.o
CC common/cmd_disk.o
CC drivers/clk/clk_fixed_rate.o
LD drivers/net/built-in.o
CC drivers/clk/clk-sun8iw11.o
CC common/autoboot.o
LD drivers/power/battery/built-in.o
LD board/sunxi/common/built-in.o
CC drivers/power/sunxi/axp_null.o
LD drivers/power/fuel_gauge/built-in.o
LD drivers/power/mfd/built-in.o
CC drivers/mmc/sunxi_mmc.o
LD drivers/power/pmic/built-in.o
CC common/board_f.o
CC drivers/power/sunxi/axp_supply_null.o
CC common/board_r.o
CC drivers/mmc/mmc_write.o
CC common/cmd_boot.o
CC drivers/power/sunxi/axp.o
CC drivers/power/sunxi/axp22.o
CC common/cmd_bootm.o
CC common/bootm.o
CC common/bootm_os.o
CC common/cmd_help.o
LD drivers/clk/built-in.o
CC drivers/mmc/sunxi_mmc_interface.o
CC drivers/power/sunxi/axp22_supply.o
CC drivers/pwm/sunxi_pwm_enhance.o
CC common/cmd_version.o
CC common/cmd_boota.o
CC common/cmd_sunxi_flash.o
CC common/cmd_sunxi_sprite.o
CC drivers/mmc/sunxi_mmc_tuning.o
CC drivers/mmc/mmc_test.o
CC drivers/mmc/sun8iw11p1/sunxi_host0_2_v4p1.o
CC common/cmd_sunxi_timer.o
CC common/cmd_sunxi_efex.o
CC common/cmd_sunxi_shutdown.o
CC common/cmd_sunxi_memtest.o
CC common/env_attr.o
CC common/env_callback.o
CC drivers/mmc/sun8iw11p1/sunxi_host_mmc.o
CC common/env_flags.o
LD drivers/pwm/built-in.o
CC common/env_sunxi_flash.o
LD drivers/rsb/built-in.o
LD drivers/power/built-in.o
CC common/cmd_elf.o
CC drivers/serial/serial.o
CC common/cmd_exit.o
CC drivers/smc/sunxi_smc.o
CC common/cmd_fat.o
CC common/fdt_support.o
CC common/cmd_fdt.o
CC drivers/serial/ns16550.o
CC drivers/serial/serial_ns16550.o
CC drivers/spi/spi.o
LD drivers/sunxi_crypto/built-in.o
AS drivers/smc/smc_helps.o
CC drivers/sunxi_flash/sunxi_flash.o
CC drivers/sunxi_flash/sdmmc.o
LD drivers/smc/built-in.o
LD drivers/spi/built-in.o
CC drivers/sunxi_usb/usbc.o
CC drivers/timer/sunxi_timer.o
LD drivers/serial/built-in.o
LD drivers/usb/eth/built-in.o
LD drivers/mmc/built-in.o
LD drivers/usb/gadget/built-in.o
CC common/cmd_irq.o
CC drivers/sunxi_flash/nand.o
CC common/cmd_load.o
CC drivers/usb/host/ehci-hcd.o
LD drivers/timer/built-in.o
CC common/cmd_mem.o
LD drivers/sunxi_flash/built-in.o
CC common/miiphyutil.o
LD drivers/usb/musb/built-in.o
LD drivers/usb/phy/built-in.o
LD drivers/usb/musb-new/built-in.o
LD drivers/usb/ulpi/built-in.o
CC fs/fs.o
CC common/cmd_mii.o
CC lib/zlib/zlib.o
CC common/cmd_net.o
CC common/cmd_mmc.o
CC drivers/sunxi_usb/usbc_dev.o
CC fs/fat/fat.o
CC common/cmd_pcmcia.o
CC drivers/sunxi_usb/usbc_dma.o
CC lib/crc7.o
CC common/cmd_test.o
CC drivers/usb/host/ehci-sunxi.o
CC lib/crc8.o
CC common/cmd_usb.o
CC drivers/sunxi_usb/usbc_host.o
CC lib/crc16.o
CC drivers/sunxi_usb/usbc_phy.o
CC common/usb.o
CC lib/fdtdec_common.o
CC lib/fdtdec.o
LD drivers/usb/host/built-in.o
CC lib/gunzip.o
CC lib/libfdt/fdt.o
CC lib/libfdt/fdt_ro.o
CC lib/initcall.o
CC common/usb_hub.o
LD drivers/sunxi_usb/built-in.o
CC fs/fat/file.o
CC lib/lmb.o
CC memtest/mem_tests.o
CC lib/ldiv.o
CC lib/net_utils.o
LD fs/fat/built-in.o
LD fs/built-in.o
CC lib/qsort.o
CC common/usb_storage.o
CC nand_sunxi/nand_interface/nand_for_uboot.o
CC lib/strmhz.o
CC common/flash.o
CC lib/libfdt/fdt_rw.o
CC lib/hashtable.o
CC lib/errno.o
CC common/splash.o
CC lib/display_options.o
CC nand_sunxi/nand_interface/nand_fspart.o
LD memtest/built-in.o
CC common/cmd_nvedit.o
CC net/arp.o
LD nand_sunxi/nand_interface/built-in.o
CC net/bootp.o
CC nand_sunxi/sun8iw11p1/osal/nand_osal_uboot.o
LD lib/zlib/built-in.o
CC lib/crc32.o
CC nand_sunxi/sun8iw11p1/osal/nand_uboot_fun.o
CC net/eth.o
CC lib/libfdt/fdt_strerror.o
CC lib/ctype.o
CC lib/div64.o
CC common/env_common.o
CC common/console.o
CC nand_sunxi/sun8iw11p1/osal/nand_lib_cfg.o
CC common/dlmalloc.o
CC lib/libfdt/fdt_sw.o
CC lib/hang.o
CC lib/libfdt/fdt_wip.o
CC lib/linux_string.o
LD nand_sunxi/sun8iw11p1/osal/built-in.o
CC common/image.o
LD nand_sunxi/built-in.o
CC lib/string.o
CC net/net.o
CC sprite/queue.o
CC lib/libfdt/fdt_empty_tree.o
CC common/image-android.o
CC sprite/sprite_queue.o
CC lib/libfdt/fdt_acc.o
CC sprite/sprite_card.o
CC common/image-fdt.o
CC lib/time.o
CC sprite/encrypt/twofish/twofish.o
CC common/memsize.o
CC sprite/encrypt/twofish/twofish_new.o
CC common/stdio.o
CC lib/vsprintf.o
LD lib/libfdt/built-in.o
CC net/ping.o
LD test/built-in.o
CC net/tftp.o
CC sprite/sparse/sparse.o
CC common/sunxi_mem_alloc.o
LD test/dm/built-in.o
CC usb_sunxi/usb_mass.o
CC usb_sunxi/usb_efex.o
LD common/built-in.o
LD net/built-in.o
CC sprite/sprite_verify.o
CC sprite/sprite_download.o
CC usb_sunxi/usb_fastboot.o
CC sprite/firmware/imgdecode.o
CC sprite/sprite_privatedata.o
CC sprite/sprite_main.o
LD lib/built-in.o
CC usb_sunxi/usb_burn.o
CC sprite/sprite_erase.o
CC usb_sunxi/usb_base_common.o
CC sprite/sprite_recovery.o
CC sprite/sprite_led.o
CC usb_sunxi/buf_queue.o
CC sprite/sprite_cartoon.o
CC sprite/sprite_storage_crypt.o
CC usb_sunxi/efex_queue.o
CC usb_sunxi/usb_base_platform.o
CC usb_sunxi/usb_dma_control.o
LD sprite/built-in.o
LD usb_sunxi/built-in.o
CC examples/standalone/stubs.o
CC examples/standalone/hello_world.o
LD examples/standalone/libstubs.o
LD examples/standalone/hello_world
OBJCOPY examples/standalone/hello_world.srec
OBJCOPY examples/standalone/hello_world.bin
LD u-boot
OBJCOPY u-boot.srec
OBJCOPY u-boot.bin
fatal: Not a git repository (or any of the parent directories): .git
./tools/add_hash_uboot.sh -f u-boot.bin -m uboot
not set commit log
'u-boot.bin' -> 'u-boot-sun8iw11p1.bin'
'u-boot-sun8iw11p1.bin' -> '/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../../tools/pack/chips/sun8iw11p1/bin/u-boot-sun8iw11p1.bin'
if [ -z "" ]; then \
cp -v u-boot-"sun8iw11p1".bin /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../../tools/pack/chips/"sun8iw11p1"/bin/u-boot-"sun8iw11p1".bin; \
else \
cp -v u-boot-"sun8iw11p1".bin /home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../../tools/pack/chips/"sun8iw11p1"/bin/u-boot-"sun8iw11p1"-.bin; \
fi
'u-boot-sun8iw11p1.bin' -> '/home/sylixos/workspace/lrj/lichee/brandy/u-boot-2014.07/../../tools/pack/chips/sun8iw11p1/bin/u-boot-sun8iw11p1.bin'
3,启动流程
U-Boot 2014.07 (Jun 04 2020 - 11:08:41) Allwinner Technology
uboot commit : 8
i2c_init: by cpux
i2c_init ok
[ 0.173]pmbus: ready
[ 0.192]PMU: AXP221
[ 0.192]PMU: AXP22x found
[ 0.193]PMU: dcdc2 1160
[ 0.195]PMU: cpux 1008 Mhz,AXI=336 Mhz
PLL6=600 Mhz,AHB1=200 Mhz, APB1=100Mhz MBus=400Mhz
set power on vol to default
dcdc1_vol = 3300, onoff=1
dcdc2_vol = 1160, onoff=1
dcdc3_vol = 1200, onoff=1
dcdc4_vol = 1100, onoff=0
aldo1_vol = 3300, onoff=0
aldo2_vol = 1800, onoff=1
aldo3_vol = 3000, onoff=1
dc1sw_vol = 3000, onoff=0
dc5ldo_vol = 1100, onoff=0
dldo1_vol = 3300, onoff=0
dldo2_vol = 3300, onoff=0
dldo3_vol = 3300, onoff=0
dldo4_vol = 2500, onoff=0
eldo1_vol = 2800, onoff=0
eldo2_vol = 3300, onoff=1
eldo3_vol = 1200, onoff=0
gpio0_vol = 3300, onoff=1
gpio1_vol = 3300, onoff=1
find power_sply to end
vbus exist
no uart input
DRAM: 1 GiB
fdt addr: 0x76e94138
Relocation Offset is: 35eea000
In: serial
Out: serial
Err: serial
gic: normal mode
[ 0.324]start
drv_disp_init
init_clocks: finish init_clocks.
pwm_request: reg = 0x1c23400. pwm = 0.
request pwm success, pwm = 0.
tv_init:
tv_probe:000
tv0 have no type1
tv0 have no type2
tv0 have no type3
no report hpd work,you need support the switch class!
screen 0 don't support TV!
screen 1 don't support TV!
screen 0 do not support VGA TYPE!
screen 1 do not support VGA TYPE!
tv_init:
drv_disp_init finish
fetch script data boot_disp.output_disp fail
fetch script data boot_disp.output_type fail
fetch script data boot_disp.output_mode fail
fetch script data boot_disp.auto_hpd fail
disp0 device type(1) enable
disp 0, clk: pll(329000000),clk(329000000),dclk(47000000) dsi_rate(329000000)
clk real:pll(332307692),clk(332307692),dclk(47472527) dsi_rate(0)
enable power vcc-lcd, ret=0
[ 1.086]end
workmode = 0,storage type = 2
[ 1.086]MMC: 2
[mmc]: mmc driver ver 2016-07-01 15:50:00
[mmc]: mmc_update_timing_para: error sdc_no 2
SUNXI SD/MMC: 2
[mmc]: 50 MHz...
[mmc]: sample: 63 - 158(ps)
[mmc]: ds: 63 - 158(ps)
[mmc]: 100 MHz...
[mmc]: sample: 33 - 151(ps)
[mmc]: ds: 33 - 151(ps)
[mmc]: 200 MHz...
[mmc]: sample: 17 - 147(ps)
[mmc]: ds: 17 - 147(ps)
[mmc]: media type 0x8000000
[mmc]: ************Try MMC card 2************
[mmc]: host caps: 0x6f
[mmc]: MID 000015 PSN 8c608e9e
[mmc]: PNM 8GME4R -- 0x38-47-4d-45-34
[mmc]: PRV 0.1
[mmc]: MDT m-1 y-2018
[mmc]: MMC v5.1
[mmc]: speed mode : HSSDR52/SDR25
[mmc]: clock : 50000000 Hz
[mmc]: bus_width : 8 bit
[mmc]: user capacity : 7456 MB
[mmc]: boot capacity : 4096 KB
[mmc]: rpmb capacity : 512 KB
[mmc]: ************SD/MMC 2 init OK!!!************
[mmc]: use default speed mode: 1-HSSDR52/SDR25, ifreq: 2
[mmc]: ========best spd md: 1-HSSDR52/SDR25, freq: 2-50000000
[mmc]: already at HSSDR52_SDR25 mode
[mmc]: erase_grp_size : 0x400WrBlk*0x200=0x80000 Byte
[mmc]: secure_feature : 0x55
[mmc]: secure_removal_type : 0x39
[mmc]: EOL Info(Rev blks): Normal
[mmc]: Wear out(type A): 0%-10% life time used
[mmc]: Wear out(type B): 0%-10% life time used
[ 1.322]sunxi flash init ok
--------fastboot partitions--------
-total partitions:5-
-name- -start- -size-
boot-resource: 1000000 700000
env : 1700000 400000
boot : 1b00000 1000000
rootfs : 2b00000 70800000
UDISK : 73300000 0
-----------------------------------
base bootcmd=run setargs_nand boot_normal
bootcmd set setargs_mmc
key 0
cant find rcvy value
cant find fstbt value
no misc partition is found
to be run cmd=run setargs_mmc boot_normal
update dtb dram start
update dtb dram end
PowerBus = 3( 2:vBus 3:acBus other: not exist)
no battery, limit to dc
no battery exist
EnterNormalBootMode sunxi_bmp_display--
reading bootlogo.bmp
5529656 bytes read in 133 ms (39.6 MiB/s)
bmp file buffer: 0x40000000, bmp_info.buffer: 46400000
fetch script data boot_disp.output_full fail
screen_id =0, screen_width =1920, screen_height =720
frame buffer address 46400036
[ 1.685]inter uboot shell
Hit any key to stop autoboot: 0
read partition: boot or recovery
[ 1.883]sunxi flash read :offset 1b00000, 8791652 bytes OK
Android's image name: arm
Kernel load addr 0x40000000 size 6207 KiB
RAM disk load addr 0x41000000 size 1355 KiB
[ 1.958]ready to boot
prepare for kernel
[mmc]: mmc exit start
[mmc]: 50 MHz...
[mmc]: sample: 63 - 158(ps)
[mmc]: ds: 63 - 158(ps)
[mmc]: 100 MHz...
[mmc]: sample: 32 - 156(ps)
[mmc]: ds: 32 - 156(ps)
[mmc]: 200 MHz...
[mmc]: sample: 16 - 156(ps)
[mmc]: ds: 16 - 156(ps)
[mmc]: mmc 2 exit ok
boot0 启动:
boot0_main.c 文件:
static int init_func_pmubus(void)
{
s32 ret = 0;
#if defined(CONFIG_AXP_USE_RSB)
ret = sunxi_rsb_init(0);
#elif defined (CONFIG_AXP_USE_I2C)
i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); // i2c 总线初始化
#else
#endif
tick_printf("pmbus: %s\n", ret? "not ready":"ready");
return (0);
}
int power_source_init(void); // 电源管理芯片初始化