Allwinner Program

From ElectroDragon
Revision as of 09:00, 1 November 2019 by Chao (talk | contribs) (Created page with "== Flash == === USB Flash Mode === F1C200S * CS -> GND to flash mode * Flash software PhoenixSuit TF card Flash * Card in Card reader * Use software PhoenixCard == Flash ==...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Flash

USB Flash Mode

F1C200S

  • CS -> GND to flash mode
  • Flash software PhoenixSuit

TF card Flash

  • Card in Card reader
  • Use software PhoenixCard

Flash

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

WIN Flash for TF Card

  • win32disk
  • flash the *.dd suffix file, packed by dd

Linux DD Flash for TF Card

  • 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

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 tools programmer 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