Allwinner Program

From ElectroDragon
Jump to navigation Jump to search

Flash

  • Support either SPI Flash or TF card boot
  • For nano, find file folder Nano_Pub_V4 enter into build folder

CPU Boot Mode and Flash IMG to Target

  • Flash software PhoenixSuit
Mode TF Card SD_NAND SPI-Flash Flash Target
PROG Mode No Card NC
  • SPI_CS -> GND
  • Disable Flash
  • Not Necessary if no SPI-Flash mounted
Flash Target
SPI-Flash Boot No Card NC NC Disconnect SPI_CS to flash SPI-Flash (connect SPI_Flash)
SD_NAND Boot No Card -> CS -> GND (Optional? ) SD_NAND->CS to flash SD_NAND (connect SD_NAND)
TF Card Boot Inserted Card NC -> GND (Not Necessary) Insert TF card to flash TF card (connect TF Card)



TF Card: WIN Flash

  • Card in Card reader
  • Use software PhoenixCard or win32disk
  •  ? flash the *.dd suffix file, packed by dd

All: DD Flash

  • flash the *.dd suffix file, packed by dd
  • sudo dd if=源路径 of=/dev/r卷标 bs=1m [‘r’ 会让命令执行加快一点] [‘bs’为一次填充的容量]
  • sudo fdisk -l
  • sudo dd if=/path/to/your-dd-image of=/your/tf-card && sync


  • run commands ./write_all.sh

All in one Configuration "Zero Imager"

write_dd.sh /dev/sdX: 一键烧录dd镜像,小白专用
//以下为调试时逐个分区调试使用的烧录脚本
write_all.sh /dev/sdX: 一键烧录
write_partion.sh /dev/sdX: 对tf卡分区
write_mkfs.sh /dev/sdX: tf卡格式化
write_boot.sh /dev/sdX: 烧录uboot
write_p1.sh /dev/sdX: 烧录第一分区
write_p2.sh /dev/sdX: 烧录第二分区
write_overlay.sh /dev/sdX: 烧录overlay
write_swap.sh /dev/sdX: 启用swap

All: Sunxi-fei

Linux 16M SPI Flash (fei Mode )

  • 先编译出u-boot, Linux, dtb 文件, 用buildroot编译出根文件系统.
  • 烧录TF卡,打开gparted, 删除TF卡所有分区
  • 将uboot写入到sd卡8k偏移处。
sudo dd if=u-boot-sunxi-with-spl_480800.bin of=/dev/sdb bs=1024 seek=8
  • 建立第一个分区,大小32M(可以随意填写), 格式FAT16, 把zImage, sun8i-v3s-licheepi-zero-dock.dtb拷贝到 这个分区
  • 建立第二个分区,用尽剩余空间,格式ext4, 把buildroot产生的rootfs.tar解压到该分区根目录
  • short connect Pin 1 and PIN4, then boot up board via USB power
  • sudo sunxi-fel -p spiflash-write 0 Your-Flash-BIN

Sunxi-fei for SPI Flash

Sunxi fel flash USB.png
  • Make sure use correct branch for board chips.
  • Remove perpherials like LCDs, camera, etc to avoid interferences, use high quality USB cable

For Zero do

For nano do

  • 进入工具目录执行 make && sudo make install
  • plug use device: Onda (unverified) V972 tablet in flashing mode [02B3]
  • Make sure no TF card or SPI flash
sudo sunxi-fel version              #查看连接的cpu信息
AWUSBFEX soc=00001681(V3s) 00000001 ver=0001 44 08 scratchpad=00007e00 00000000 00000000
sudo sunxi-fel spiflash-info        #显示flash信息
Manufacturer: Unknown (C2h), model: 20h, size: 33554432 bytes.

Reference

Debug Port

  • Debug port only available when have system linux core

For firmware sunivw1p1_linux_evb_uart0.img

  • Debug port UART1: A2-->RX A3-->TX

For LPI:

  • Debug port UART0