===== SAM-BA로 Writing ===== 아래는 위의 방법으로 만들어진 Binary 들이다. {{wiki:atmel_sama5d42:binary.zip}} {{wiki:atmel_sama5d42:rootfs.zip}} 이를 다운받아 풀면 다음과 같다. {{wiki:atmel_sama5d42:SAM-BA-binay_list.jpg}} VI 통합 Board의 Push SW(NAND Disable Switch)를 누르고 전원을 연결한다. SAM-BA를 실행한다. {{wiki:atmel_sama5d42:Start-SAM-BA.jpg}} Connect를 눌러 연결한다. {{wiki:atmel_sama5d42:SAM-BA-Loading.jpg}} NAND를 선택한다. {{wiki:atmel_sama5d42:SAM-BA-To_NAND.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND.jpg}} Enable NandFlash를 실행한다. {{wiki:atmel_sama5d42:SAM-BA-NAND-Enable.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Enable-Result.jpg}} NAND Flash를 지운다. {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-Erase.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-Erase-s.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-Erase-e.jpg}} ECC를 새로설정한다. {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-PMECC.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-PMECC-s.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-PMECC-s1.jpg}} Spansion NAND 일 경우 {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-PMECC-s2.jpg}} EMST NAND 일 경우 {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-PMECC-s3.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-PMECC-e.jpg}} BootStrap을 Write한다. {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-Boot.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-Boot-s.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-Boot-s1.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Select-Boot-e.jpg}} u-boot를 Write 한다. {{wiki:atmel_sama5d42:SAM-BA-NAND-Uboot1.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Uboot2.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Uboot3.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Uboot4.jpg}} u-boot 환경변수를 Write 한다. {{wiki:atmel_sama5d42:SAM-BA-NAND-Uboot-ENV1.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Uboot-ENV2.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Uboot-ENV3.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-Uboot-ENV4.jpg}} DTB 를 Write 한다. {{wiki:atmel_sama5d42:SAM-BA-NAND-DTB1.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-DTB2.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-DTB3.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-DTB4.jpg}} Kernel 를 Write 한다. {{wiki:atmel_sama5d42:SAM-BA-NAND-kernel1.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-kernel2.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-kernel3.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-kernel4.jpg}} File System 을 Write 한다. {{wiki:atmel_sama5d42:SAM-BA-NAND-FS1.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-FS2.jpg}} {{wiki:atmel_sama5d42:SAM-BA-NAND-FS3.jpg}} Power를 Off/On 시킨다. 아래와 같은 Log를 얻을 수 있다. AT91Bootstrap 3.8.7 (2017. 06. 23. (금) 15:26:52 KST) NAND: ONFI flash detected NAND: Manufacturer ID: 0x1 Chip ID: 0x30 NAND: Page Bytes: 2048, Spare Bytes: 128 NAND: ECC Correctability Bits: 4, ECC Sector Bytes: 512 NAND: Enable On-Die ECC NAND: Image: Copy 0x80000 bytes from 0x40000 to 0x26f00000 main: end of load_image() image.dest = 0x26f00000 main: end of load_image() image.offset = 0x40000 main: end of load_image() return = 0 NAND: Done to load image U-Boot 2016.03-linux4sam_5.5 (Jun 26 2017 - 15:05:47 +0900) CPU: SAMA5D42 Crystal frequency: 12 MHz CPU clock : 528 MHz Master clock : 176 MHz I2C: ready DRAM: 128 MiB NAND: 256 MiB MMC: mci: 0 In: serial Out: serial Err: serial Net: gmac0, usb_ether Error: usb_ether address not set. Hit any key to stop autoboot: 10 9 8 7 6 5 4 3 2 1 0 NAND read: device 0 offset 0x180000, size 0x80000 524288 bytes read: OK NAND read: device 0 offset 0x200000, size 0x600000 6291456 bytes read: OK Kernel image @ 0x22000000 [ 0x000000 - 0x3a5ba0 ] ## Flattened Device Tree blob at 21000000 Booting using the fdt blob at 0x21000000 Loading Device Tree to 27b4d000, end 27b58237 ... OK Starting kernel ... Booting Linux on physical CPU 0x0 Linux version 4.4.68 (stephanos@stephanos-VirtualBox) (gcc version 6.2.1 20161016 (Linaro GCC 6.2-2016.11) ) #2 Sun Jun 25 04:10:03 KST 2017 CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache Machine model: Atmel SAMA5D4 VI cma: Failed to reserve 64 MiB Memory policy: Data cache writeback CPU: All CPU(s) started in SVC mode. Built 1 zonelists in Zone order, mobility grouping off. Total pages: 32512 Kernel command line: console=ttyS0,115200 earlyprintk mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256K(env),256k(env_redundent),256k(spare),512k(dtb),6M(kernel)ro,-(rootfs) rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs PID hash table entries: 512 (order: -1, 2048 bytes) Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 122076K/131072K available (5370K kernel code, 191K rwdata, 1680K rodata, 228K init, 177K bss, 8996K reserved, 0K cma-reserved) Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xffc00000 - 0xfff00000 (3072 kB) vmalloc : 0xc8800000 - 0xff800000 ( 880 MB) lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) modules : 0xbf000000 - 0xc0000000 ( 16 MB) .text : 0xc0008000 - 0xc06eac54 (7052 kB) .init : 0xc06eb000 - 0xc0724000 ( 228 kB) .data : 0xc0724000 - 0xc0753f40 ( 192 kB) .bss : 0xc0753f40 - 0xc0780680 ( 178 kB) NR_IRQS:16 nr_irqs:16 16 L2C-310 ID prefetch enabled, offset 2 lines L2C-310 dynamic clock gating enabled, standby mode enabled L2C-310 cache controller enabled, 8 ways, 128 kB L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x36020000 clocksource: pit: mask: 0x7ffffff max_cycles: 0x7ffffff, max_idle_ns: 10859434279 ns sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns Console: colour dummy device 80x30 Calibrating delay loop... 351.43 BogoMIPS (lpj=1757184) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) CPU: Testing write buffer coherency: ok Setting up static identity map for 0x20008200 - 0x20008258 devtmpfs: initialized VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1 clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns futex hash table entries: 256 (order: -1, 3072 bytes) pinctrl core: initialized pinctrl subsystem NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations cpuidle: using governor ladder cpuidle: using governor menu AT91: Detected SoC family: sama5d4 AT91: Detected SoC: sama5d42, revision 0 gpio-at91 fc06a000.gpio: at address c885c000 gpio-at91 fc06b000.gpio: at address c885e000 gpio-at91 fc06c000.gpio: at address c8872000 gpio-at91 fc068000.gpio: at address c8874000 gpio-at91 fc06d000.gpio: at address c8876000 pinctrl-at91 ahb:apb:pinctrl@fc06a000: initialized AT91 pinctrl driver clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 173750949719 ns at_xdmac f0004000.dma-controller: 16 channels, mapped at 0xc887c000 at_xdmac f0014000.dma-controller: 16 channels, mapped at 0xc887e000 SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb at91_i2c f8014000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers at91_i2c f8014000.i2c: AT91 i2c bus driver (hw version: 0x502). media: Linux media interface: v0.10 Linux video capture interface: v2.00 Advanced Linux Sound Architecture Driver Initialized. clocksource: Switched to clocksource tcb_clksrc NET: Registered protocol family 2 TCP established hash table entries: 1024 (order: 0, 4096 bytes) TCP bind hash table entries: 1024 (order: 0, 4096 bytes) TCP: Hash tables configured (established 1024 bind 1024) UDP hash table entries: 256 (order: 0, 4096 bytes) UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) NET: Registered protocol family 1 RPC: Registered named UNIX socket transport module. RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. io scheduler noop registered (default) backlight supply power not found, using dummy regulator f8004000.serial: ttyS5 at MMIO 0xf8004000 (irq = 31, base_baud = 5500000) is a ATMEL_SERIAL fc00c000.serial: ttyS0 at MMIO 0xfc00c000 (irq = 37, base_baud = 5500000) is a ATMEL_SERIAL console [ttyS0] enabled fc010000.serial: ttyS1 at MMIO 0xfc010000 (irq = 38, base_baud = 5500000) is a ATMEL_SERIAL [drm] Initialized drm 1.1.0 20060810 panel supply power not found, using dummy regulator brd: module loaded loop: module loaded [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [drm] No driver support for vblank timestamp query. atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to create HLCDC outputs: -517 atmel-hlcdc-display-controller atmel-hlcdc-dc: failed to initialize mode setting atmel_nand_nfc 90000000.nfc: NFC is probed. atmel_nand 80000000.nand: Cannot get PMECC lookup table offset, will build a lookup table in runtime. atmel_nand 80000000.nand: Use On Flash BBT atmel_nand 80000000.nand: Using dma0chan2 for DMA transfers. nand: device found, Manufacturer ID: 0x01, Chip ID: 0xda nand: AMD/Spansion S34ML02G2 nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128 atmel_nand 80000000.nand: minimum ECC: 4 bits in 512 bytes atmel_nand 80000000.nand: Initialize PMECC params, cap: 4, sector: 512 atmel_nand 80000000.nand: Using NFC Sram read and write Bad block table not found for chip 0 Bad block table not found for chip 0 Scanning device for bad blocks random: nonblocking pool is initialized Bad block table written to 0x00000ffe0000, version 0x01 Bad block table written to 0x00000ffc0000, version 0x01 8 cmdlinepart partitions found on MTD device atmel_nand Creating 8 MTD partitions on "atmel_nand": 0x000000000000-0x000000040000 : "bootstrap" 0x000000040000-0x0000000c0000 : "uboot" 0x0000000c0000-0x000000100000 : "env" 0x000000100000-0x000000140000 : "env_redundent" 0x000000140000-0x000000180000 : "spare" 0x000000180000-0x000000200000 : "dtb" 0x000000200000-0x000000800000 : "kernel" 0x000000800000-0x000010000000 : "rootfs" atmel_spi f8010000.spi: version: 0x221 atmel_spi f8010000.spi: Using dma0chan3 (tx) and dma0chan4 (rx) for DMA transfers atmel_spi f8010000.spi: Atmel SPI Controller at 0xf8010000 (irq 32) m25p80 spi32766.0: unrecognized JEDEC id bytes: 00, 0, 0 atmel_spi fc018000.spi: version: 0x221 atmel_spi fc018000.spi: Using dma0chan5 (tx) and dma0chan6 (rx) for DMA transfers atmel_spi fc018000.spi: Atmel SPI Controller at 0xfc018000 (irq 39) libphy: MACB_mii_bus: probed macb f8020000.ethernet eth0: Cadence GEM rev 0x00020120 at 0xf8020000 irq 35 (ac:f1:df:5e:4d:3f) macb f8020000.ethernet eth0: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=f8020000.etherne:01, irq=181) ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ehci-atmel: EHCI Atmel driver atmel-ehci 600000.ehci: EHCI Host Controller atmel-ehci 600000.ehci: new USB bus registered, assigned bus number 1 atmel-ehci 600000.ehci: irq 25, io mem 0x00600000 atmel-ehci 600000.ehci: USB 2.0 started, EHCI 1.00 usb usb1: New USB device found, idVendor=1d6b, idProduct=0002 usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb1: Product: EHCI Host Controller usb usb1: Manufacturer: Linux 4.4.68 ehci_hcd usb usb1: SerialNumber: 600000.ehci hub 1-0:1.0: USB hub found hub 1-0:1.0: 3 ports detected ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver ohci-atmel: OHCI Atmel driver at91_ohci 500000.ohci: failed to find sfr node at91_ohci 500000.ohci: USB Host Controller at91_ohci 500000.ohci: new USB bus registered, assigned bus number 2 at91_ohci 500000.ohci: irq 25, io mem 0x00500000 usb usb2: New USB device found, idVendor=1d6b, idProduct=0001 usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 usb usb2: Product: USB Host Controller usb usb2: Manufacturer: Linux 4.4.68 ohci_hcd usb usb2: SerialNumber: at91 hub 2-0:1.0: USB hub found hub 2-0:1.0: 3 ports detected usbcore: registered new interface driver cdc_acm cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters usbcore: registered new interface driver usb-storage usbcore: registered new interface driver usbserial usbcore: registered new interface driver usbserial_generic usbserial: USB Serial support registered for generic usbcore: registered new interface driver ftdi_sio usbserial: USB Serial support registered for FTDI USB Serial Device usbcore: registered new interface driver pl2303 usbserial: USB Serial support registered for pl2303 rtc rtc0: alarm rollover not handled rtc rtc0: invalid alarm value: 1900-1-1 0:0:0 at91_rtc fc0686b0.rtc: rtc core: registered fc0686b0.rtc as rtc0 at91_rtc fc0686b0.rtc: AT91 Real Time Clock driver. i2c /dev entries driver AT91: Starting after wakeup sama5d4_wdt fc068640.watchdog: initialized (timeout = 16 sec, nowayout = 0) sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman atmel_mci fc000000.mmc: version: 0x600 atmel_mci fc000000.mmc: using dma0chan7 for DMA transfers VDD MCI1: supplied by VCC 3V3 atmel_mci fc000000.mmc: Atmel MCI controller at 0xfc000000 irq 36, 1 slots sdhci-pltfm: SDHCI platform and OF driver helper leds-gpio leds: Led d10 renamed to d10_1 due to name collision ledtrig-cpu: registered to indicate activity on CPUs atmel_aes fc044000.aes: version: 0x201 atmel_aes fc044000.aes: Atmel AES - Using dma1chan0, dma1chan1 for DMA transfers atmel_sha fc050000.sha: version: 0x420 atmel_sha fc050000.sha: using dma1chan2 for DMA transfers atmel_sha fc050000.sha: Atmel SHA1/SHA256/SHA224/SHA384/SHA512 atmel_tdes fc04c000.tdes: version: 0x702 atmel_tdes fc04c000.tdes: using dma1chan3, dma1chan4 for DMA transfers atmel_tdes fc04c000.tdes: Atmel DES/TDES usbcore: registered new interface driver usbhid usbhid: USB HID core driver iio iio:device0: Resolution used: 10 bits iio iio:device0: ADC Touch screen is disabled. NET: Registered protocol family 10 sit: IPv6 over IPv4 tunneling driver NET: Registered protocol family 17 backlight supply power not found, using dummy regulator panel supply power not found, using dummy regulator [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). [drm] No driver support for vblank timestamp query. atmel-hlcdc-display-controller atmel-hlcdc-dc: DRM device successfully registered ubi0: default fastmap pool size: 95 ubi0: default fastmap WL pool size: 47 ubi0: attaching mtd7 ubi0: scanning is finished ubi0: volume 0 ("rootfs") re-sized from 257 to 1938 LEBs ubi0: attached mtd7 (name "rootfs", size 248 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048 ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096 ubi0: good PEBs: 1980, bad PEBs: 4, corrupted PEBs: 0 ubi0: user volume: 1, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1513179009 ubi0: available PEBs: 0, total reserved PEBs: 1980, PEBs reserved for bad PEB handling: 36 input: gpio_keys as /devices/soc0/gpio_keys/input/input0 ubi0: background thread "ubi_bgt0d" started, PID 97 at91_rtc fc0686b0.rtc: setting system clock to 2012-01-01 00:00:18 UTC (1325376018) ALSA device list: No soundcards found. atmel_usart fc00c000.serial: using dma0chan8 for rx DMA transfers atmel_usart fc00c000.serial: using dma0chan9 for tx DMA transfers UBIFS (ubi0:0): UBIFS: mounted UBI device 0, volume 0, name "rootfs", R/O mode UBIFS (ubi0:0): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes UBIFS (ubi0:0): FS size: 244682752 bytes (233 MiB, 1927 LEBs), journal size 9023488 bytes (8 MiB, 72 LEBs) UBIFS (ubi0:0): reserved for root: 0 bytes (0 KiB) UBIFS (ubi0:0): media format: w4/r0 (latest is w4/r0), UUID 4289B817-B849-426A-8EB4-54E811F89C16, small LPT model VFS: Mounted root (ubifs filesystem) readonly on device 0:14. devtmpfs: mounted Freeing unused kernel memory: 228K (c06eb000 - c0724000) UBIFS (ubi0:0): background thread "ubifs_bgt0_0" started, PID 100 devpts: called with bogus options Starting logging: OK Populating /dev using udev: /etc/init.d/S10udev: line 47: can't create /proc/sys/kernel/hotplug: nonexistent directory udevd[114]: starting version 3.2.1 udevd[115]: starting eudev-3.2.1 done Initializing random number generator... done. Starting system message bus: done Starting network: OK Starting dropbear sshd: OK ssh-keygen: generating new host keys: RSA atmel-hlcdc-display-controller atmel-hlcdc-dc: fb0: frame buffer device DSA ECDSA ED25519 Starting sshd: OK Welcome to Buildroot 2017.02.1 buildroot login: