際際滷

際際滷Share a Scribd company logo
舒于亠仍 仂从亳仆 General R&D, 2017
舒仗从舒亠仄 Linux 仆舒
sama5d3
亢亳于仍磳仄 ARM SoC + NAND
舒于亠仍 仂从亳仆 General R&D, 2017
 仄 仗仂亶亟 亠?
 亳仆亳仄舒仍仆舒 亠仄舒
 仂仄仗仂仆亠仆 亰舒亞亰从亳 ARM-舒
 仂 NAND 亳 PMECC
 丐仍亠亶仆, 弍仂从舒 rootfs
 仂亳于从舒 NAND 亠亠亰 USB
 亟舒仗舒亳 仗仂亟 仗仍舒
2
舒于亠仍 仂从亳仆 General R&D, 2017
亳仆亳仄舒仍仆舒 亠仄舒
3
SAM a5d3NAND SDRAM
UART/
DBGU
USB
舒于亠仍 仂从亳仆 General R&D, 2017
SAM a5d3
 Atmel, 亠仗亠 Microchip
 Up to 536 MHz
 Cortex-A5, ARMv7 hard float
 Gigabit Ethernet, USB, UARTs, I2C, etc
 NAND, SD, etc..
 TRNG, Encryption Engine
4
舒于亠仍 仂从亳仆 General R&D, 2017
仂亠 亰舒亞亰从亳
1. Boot rom
2. bootstrap/preloader -- up to 128K
3. u-boot
4. Linux kernel + rootfs
丱舒仆亳仄 仆舒 NAND亠
5
舒于亠仍 仂从亳仆 General R&D, 2017
NAND + PMECC
 4016 亳亰 4096 弍亠亰 仂亳弍仂从
 2048B + 64B OOB 亟仍 ECC
 仂. 4 弍舒亶舒 亳亰 2048
 仂仆亳亞亳亠 仗亳
仗仂亳于从亠 NAND
6
仂. 弍亳 ECC 弍舒亶 亟仍
弍仍仂从舒 512 弍舒亶
2 4
4 7
8 13
12 20
24 39
舒于亠仍 仂从亳仆 General R&D, 2017
丐仍亠亶仆
 Debian 8
 gcc-gnueabi-armhf-gcc 仍亠亶仆 亳亰 亠仗仂亰亳仂亳
EmDebian
 Make
 Linaro toolchain 仂亢亠 仗仂亟仂亟亳
7
舒于亠仍 仂从亳仆 General R&D, 2017
rootfs
 Debian 8
 qemu-debootstrap 亟仍 弍仂从亳 rootfs
 mkfs.ubifs + ubinize 亟仍 弍仂从亳 ubi-仂弍舒亰舒
8
舒于亠仍 仂从亳仆 General R&D, 2017
sam-ba: 仗仂亳于从舒 NAND (GUI)
 USB
 Sam-ba 2.13
 仂仄仆亳仄 仗仂 PMECC
 at91bootstrap.bin
 at91-sama5d3.dtb
 u-boot.bin
 zImage
 rootfs
9
舒于亠仍 仂从亳仆 General R&D, 2017
sam-ba: 仗仂亳于从舒 NAND (CLI)
 https://github.com/linux4sam/meta-atmel
 Shell + tcl
 ~ 1 MB/s
10
舒于亠仍 仂从亳仆 General R&D, 2017
亟舒仗亳亠仄 仗仂亟 仗仍舒: bootstrap
 舒仂亶从舒 仗舒仄亳
 仆亠仆仆亳亶/于仆亠仆亳亶 RC-仂亳仍仍仂
 PMECC
 丐亳仗 亰舒亞亰从亳: 舒亰 磲仂 亳仍亳 u-boot
 C
 https://github.com/linux4sam/at91bootstrap
11
舒于亠仍 仂从亳仆 General R&D, 2017
亟舒仗亳亠仄 仗仂亟 仗仍舒: u-boot
 弍亳舒亠仄 仆亢仆 仗亠亳亠亳
 PMECC
 亟亠舒 dtb, zImage
 亟亠 u-boot environment舒
 舒舒仄亠 亰舒亞亰从亳 磲舒
 C
 https://github.com/linux4sam/u-boot-at91
12
舒于亠仍 仂从亳仆 General R&D, 2017
亟舒仗亳亠仄 仗仂亟 仗仍舒: kernel
 PMECC
 dts/dtb: 亰舒 仂仆仂于 弍亠仄 sama5d3-xplained
 从仍ム舒亠仄 仗仂亟亟亠亢从 UBI
 弌舒仂于亶 config: sama5-defconfig
 https://github.com/linux4sam/linux-at91
13
舒于亠仍 仂从亳仆 General R&D, 2017
U-boot enviroment
...
bootargs=console=ttyS0,115200n8 earlyprintk
mtdparts=atmel_nand:256k(bs)ro,512k(uboot)ro,256k(env),256k(env1),
256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs
ubi.mtd=7 root=ubi0:rootfs rw
bootcmd=nand read 0x21000000 0x180000 0x80000;nand read 0x22000000
0x200000 0x600000;bootz 0x22000000 - 0x21000000
...
14
舒于亠仍 仂从亳仆 General R&D, 2017
舒弍仍亳
 Trimffs 仗亳 仗仂亳于从亠 ubi rootfs
 仆亠仆仆亳亶/于仆亠仆亳亶 仂亳仍仍仂
 systemd
15
舒于亠仍 仂从亳仆 General R&D, 2017
仂亞仂
 亳仆亳仄舒仍亳亳仆仂亠 仂从亢亠仆亳亠 (debian forever)
 apt-get install binfmt-support qemu qemu-user-static mtd-utils
debootstrap
 apt-get install crossbuild-essential-armhf
 apt-get install mtd-tools
 sam-ba 亟仍 仗仂亳于从亳
 PMECC 亟仍 NAND
16
舒于亠仍 仂从亳仆 General R&D, 2017
弌仍从亳
 https://github.com/linux4sam/at91bootstrap
 https://github.com/linux4sam/u-boot-at91
 https://github.com/linux4sam/linux-at91
 http://www.at91.com/linux4sam/bin/view/Linux4SAM/
17

More Related Content

Sama5d3: how to run linux on it

  • 1. 舒于亠仍 仂从亳仆 General R&D, 2017 舒仗从舒亠仄 Linux 仆舒 sama5d3 亢亳于仍磳仄 ARM SoC + NAND
  • 2. 舒于亠仍 仂从亳仆 General R&D, 2017 仄 仗仂亶亟 亠? 亳仆亳仄舒仍仆舒 亠仄舒 仂仄仗仂仆亠仆 亰舒亞亰从亳 ARM-舒 仂 NAND 亳 PMECC 丐仍亠亶仆, 弍仂从舒 rootfs 仂亳于从舒 NAND 亠亠亰 USB 亟舒仗舒亳 仗仂亟 仗仍舒 2
  • 3. 舒于亠仍 仂从亳仆 General R&D, 2017 亳仆亳仄舒仍仆舒 亠仄舒 3 SAM a5d3NAND SDRAM UART/ DBGU USB
  • 4. 舒于亠仍 仂从亳仆 General R&D, 2017 SAM a5d3 Atmel, 亠仗亠 Microchip Up to 536 MHz Cortex-A5, ARMv7 hard float Gigabit Ethernet, USB, UARTs, I2C, etc NAND, SD, etc.. TRNG, Encryption Engine 4
  • 5. 舒于亠仍 仂从亳仆 General R&D, 2017 仂亠 亰舒亞亰从亳 1. Boot rom 2. bootstrap/preloader -- up to 128K 3. u-boot 4. Linux kernel + rootfs 丱舒仆亳仄 仆舒 NAND亠 5
  • 6. 舒于亠仍 仂从亳仆 General R&D, 2017 NAND + PMECC 4016 亳亰 4096 弍亠亰 仂亳弍仂从 2048B + 64B OOB 亟仍 ECC 仂. 4 弍舒亶舒 亳亰 2048 仂仆亳亞亳亠 仗亳 仗仂亳于从亠 NAND 6 仂. 弍亳 ECC 弍舒亶 亟仍 弍仍仂从舒 512 弍舒亶 2 4 4 7 8 13 12 20 24 39
  • 7. 舒于亠仍 仂从亳仆 General R&D, 2017 丐仍亠亶仆 Debian 8 gcc-gnueabi-armhf-gcc 仍亠亶仆 亳亰 亠仗仂亰亳仂亳 EmDebian Make Linaro toolchain 仂亢亠 仗仂亟仂亟亳 7
  • 8. 舒于亠仍 仂从亳仆 General R&D, 2017 rootfs Debian 8 qemu-debootstrap 亟仍 弍仂从亳 rootfs mkfs.ubifs + ubinize 亟仍 弍仂从亳 ubi-仂弍舒亰舒 8
  • 9. 舒于亠仍 仂从亳仆 General R&D, 2017 sam-ba: 仗仂亳于从舒 NAND (GUI) USB Sam-ba 2.13 仂仄仆亳仄 仗仂 PMECC at91bootstrap.bin at91-sama5d3.dtb u-boot.bin zImage rootfs 9
  • 10. 舒于亠仍 仂从亳仆 General R&D, 2017 sam-ba: 仗仂亳于从舒 NAND (CLI) https://github.com/linux4sam/meta-atmel Shell + tcl ~ 1 MB/s 10
  • 11. 舒于亠仍 仂从亳仆 General R&D, 2017 亟舒仗亳亠仄 仗仂亟 仗仍舒: bootstrap 舒仂亶从舒 仗舒仄亳 仆亠仆仆亳亶/于仆亠仆亳亶 RC-仂亳仍仍仂 PMECC 丐亳仗 亰舒亞亰从亳: 舒亰 磲仂 亳仍亳 u-boot C https://github.com/linux4sam/at91bootstrap 11
  • 12. 舒于亠仍 仂从亳仆 General R&D, 2017 亟舒仗亳亠仄 仗仂亟 仗仍舒: u-boot 弍亳舒亠仄 仆亢仆 仗亠亳亠亳 PMECC 亟亠舒 dtb, zImage 亟亠 u-boot environment舒 舒舒仄亠 亰舒亞亰从亳 磲舒 C https://github.com/linux4sam/u-boot-at91 12
  • 13. 舒于亠仍 仂从亳仆 General R&D, 2017 亟舒仗亳亠仄 仗仂亟 仗仍舒: kernel PMECC dts/dtb: 亰舒 仂仆仂于 弍亠仄 sama5d3-xplained 从仍ム舒亠仄 仗仂亟亟亠亢从 UBI 弌舒仂于亶 config: sama5-defconfig https://github.com/linux4sam/linux-at91 13
  • 14. 舒于亠仍 仂从亳仆 General R&D, 2017 U-boot enviroment ... bootargs=console=ttyS0,115200n8 earlyprintk mtdparts=atmel_nand:256k(bs)ro,512k(uboot)ro,256k(env),256k(env1), 256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs rw bootcmd=nand read 0x21000000 0x180000 0x80000;nand read 0x22000000 0x200000 0x600000;bootz 0x22000000 - 0x21000000 ... 14
  • 15. 舒于亠仍 仂从亳仆 General R&D, 2017 舒弍仍亳 Trimffs 仗亳 仗仂亳于从亠 ubi rootfs 仆亠仆仆亳亶/于仆亠仆亳亶 仂亳仍仍仂 systemd 15
  • 16. 舒于亠仍 仂从亳仆 General R&D, 2017 仂亞仂 亳仆亳仄舒仍亳亳仆仂亠 仂从亢亠仆亳亠 (debian forever) apt-get install binfmt-support qemu qemu-user-static mtd-utils debootstrap apt-get install crossbuild-essential-armhf apt-get install mtd-tools sam-ba 亟仍 仗仂亳于从亳 PMECC 亟仍 NAND 16
  • 17. 舒于亠仍 仂从亳仆 General R&D, 2017 弌仍从亳 https://github.com/linux4sam/at91bootstrap https://github.com/linux4sam/u-boot-at91 https://github.com/linux4sam/linux-at91 http://www.at91.com/linux4sam/bin/view/Linux4SAM/ 17