Site Tools


Hotfix release available: 2024-02-06a "Kaos". upgrade now! [55.1] (what's this?)
New release available: 2024-02-06 "Kaos". upgrade now! [55] (what's this?)
Hotfix release available: 2023-04-04a "Jack Jackrum". upgrade now! [54.1] (what's this?)
New release available: 2023-04-04 "Jack Jackrum". upgrade now! [54] (what's this?)
Hotfix release available: 2022-07-31b "Igor". upgrade now! [53.1] (what's this?)
Hotfix release available: 2022-07-31a "Igor". upgrade now! [53] (what's this?)
New release available: 2022-07-31 "Igor". upgrade now! [52.2] (what's this?)
New release candidate 2 available: rc2022-06-26 "Igor". upgrade now! [52.1] (what's this?)
New release candidate available: 2022-06-26 "Igor". upgrade now! [52] (what's this?)
Hotfix release available: 2020-07-29a "Hogfather". upgrade now! [51.4] (what's this?)
New release available: 2020-07-29 "Hogfather". upgrade now! [51.3] (what's this?)
New release candidate 3 available: 2020-06-09 "Hogfather". upgrade now! [51.2] (what's this?)
New release candidate 2 available: 2020-06-01 "Hogfather". upgrade now! [51.1] (what's this?)
New release candidate available: 2020-06-01 "Hogfather". upgrade now! [51] (what's this?)
Hotfix release available: 2018-04-22c "Greebo". upgrade now! [50.3] (what's this?)
Hotfix release available: 2018-04-22b "Greebo". upgrade now! [50.2] (what's this?)
Hotfix release available: 2018-04-22a "Greebo". upgrade now! [50.1] (what's this?)
New release available: 2018-04-22 "Greebo". upgrade now! [50] (what's this?)
Hotfix release available: 2017-02-19g "Frusterick Manners". upgrade now! [49.7] (what's this?)
Hotfix release available: 2017-02-19f "Frusterick Manners". upgrade now! [49.6] (what's this?)
Hotfix release available: 2017-02-19e "Frusterick Manners". upgrade now! [49.5] (what's this?)
Hotfix release available fixing CVE-2017-12979 and CVE-2017-12980: 2017-02-19d "Frusterick Manners". upgrade now! [49.4] (what's this?)
Hotfix release available fixing CVE-2017-12583: 2017-02-19c "Frusterick Manners". upgrade now! [49.3] (what's this?)
uboot를_이용한_writing_-_bootstrap을_제외한_나머지

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
uboot를_이용한_writing_-_bootstrap을_제외한_나머지 [2017/08/06 14:42]
1.241.172.144
uboot를_이용한_writing_-_bootstrap을_제외한_나머지 [2017/08/07 10:13] (current)
1.241.172.144
Line 12: Line 12:
 {{wiki:​atmel_sama5d42:​uboot_write:​tftp_server_setup.jpg}} \\ {{wiki:​atmel_sama5d42:​uboot_write:​tftp_server_setup.jpg}} \\
  
 +이와 같이 TFTP server에서 공개될 폴더 하나를 설정한다.\\
  
 +아래는 본인의 설정에 따라 IP가 약간씩 변경된다.\\
 +이에 나의 설정에 따라 진행 된다. ​ 가가자 본인의 설정에 맞추어 변경 해서 사용하기 바란다.\\
  
 +일단 TFTP server가 설치된 Windows의 IP는 다음과 같다.
  
 +{{wiki:​atmel_sama5d42:​uboot_write:​server_ip.jpg}} \\
  
 +  IP = 192.168.28.100
  
 +==== Uboot를 이용한 Write 예제 ====
  
 +우선 SAM-BA로 BootStrap과 U-boot는 Target Board에 설치 되어 있어야 한다.\\
 +이의 두개가 Target Board에 설치 되어 있어야 하고 Serial Debug와 Ethernet이 연결 되어 있어야 한다.\\
 +\\
 +나는 다음과 같이 연결 되어 있다.\\
 +\\
 +{{wiki:​atmel_sama5d42:​uboot_write:​connection.jpg}} \\
 +\\
 +\\
 +Target Board의 Uboot 가 실행된 후 IP를 다음과 같이 설정한다.
  
 +  Bank Address Offset Bits = 0xB ...
 +  Target Board Initialized
 +  Enabled 32.768KHz OSC
 +  ​
 +  ​
 +  Atmel Boot Strap For VI3.8.7 (2017. 07. 31. (월) 15:10:39 KST)
 +  ​
 +  ​
 +  All interrupts redirected to AIC
 +  Loading Image Initialized
 +  NAND: ONFI flash detected
 +  NAND: ONFI para CRC error!
 +  NAND: Manufacturer ID: 0x1, Chip ID: 0xda
 +  NAND: Enable On-Die ECC
 +  NAND : Bits Of ECC = 4
 +  NAND : Bits Of Data = 8
 +  NAND : Byte Size Of ECC Base = 512
 +  NAND : Byte Size Of Spare = 64
 +  NAND : Byte Size Of Page = 2048
 +  NAND : Number Of Pages In Block = 64
 +  NAND : Number Of Blocks In Unit = 1024
 +  NAND : Number Of Units In Device = 2
 +  NAND: Image: Copy 80000 bytes from 40000 to 26f00000
 +  NAND: Done to load image
 +  Jump to u-boot
 +  ​
 +  ​
 +  U-Boot 2016.03-linux4sam_5.5 (Jul 31 2017 - 12:02:12 +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: ​ 0
 +  =>
 +  =>
 +  => setenv ipaddr 192.168.28.28
 +  => setenv serverip 192.168.28.100
 +  => saveenv
 +  Saving Environment to NAND...
 +  Erasing redundant NAND...
 +  Erasing at 0x100000 -- 100% complete.
 +  Writing to redundant NAND... OK
  
 +여기서 Target Board의 전원을 껏다가 키면 TFTP를 사용할 수 있게 된다.\\
 +DDR의 영역은 다음과 같다.\\
 +
 +{{wiki:​atmel_sama5d42:​uboot_write:​DDR_Address.jpg}} \\
 +
 +여기서 u-boot 가 사용하는 영역은 다음과 같다.\\
 +
 +{{wiki:​atmel_sama5d42:​uboot_write:​u-boot_Address.jpg}} \\
 +
 +이 DDR의 비어 있는 곳을 이용하여 DTB 파일을 프로그램 한다.
 +
 +DTB 파일을 다운로드한다.
 +
 +  Bank Address Offset Bits = 0xB ...
 +  Target Board Initialized
 +  Enabled 32.768KHz OSC
 +  ​
 +  Atmel Boot Strap For VI3.8.7 (2017. 07. 31. (월) 15:10:39 KST)
 +  ​
 +  All interrupts redirected to AIC
 +  Loading Image Initialized
 +  NAND: ONFI flash detected
 +  NAND: ONFI para CRC error!
 +  NAND: Manufacturer ID: 0x1, Chip ID: 0xda
 +  NAND: Enable On-Die ECC
 +  NAND : Bits Of ECC = 4
 +  NAND : Bits Of Data = 8
 +  NAND : Byte Size Of ECC Base = 512
 +  NAND : Byte Size Of Spare = 64
 +  NAND : Byte Size Of Page = 2048
 +  NAND : Number Of Pages In Block = 64
 +  NAND : Number Of Blocks In Unit = 1024
 +  NAND : Number Of Units In Device = 2
 +  NAND: Image: Copy 80000 bytes from 40000 to 26f00000
 +  NAND: Done to load image
 +  Jump to u-boot
 +  ​
 +  U-Boot 2016.03-linux4sam_5.5 (Jul 31 2017 - 12:02:12 +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: ​ 0
 +  =>
 +  =>
 +  => tftp 0x21000000 dtb.bin
 +  gmac0: PHY present at 0
 +  gmac0: link up, 100Mbps full-duplex (lpa: 0xcde1)
 +  Using gmac0 device
 +  TFTP from server 192.168.28.100;​ our IP address is 192.168.28.28
 +  Filename '​dtb.bin'​.
 +  Load address: 0x21000000
 +  Loading: ###
 +         667 KiB/s
 +  done
 +  Bytes transferred = 33486 (82ce hex)
 +  => 
 +
 +DTB 파일이 저장될 NAND Flash 영역을 지운다.
 +
 +  => nand erase 0x180000 0x80000
 +  ​
 +  NAND erase: device 0 offset 0x180000, size 0x80000
 +  Erasing at 0x1e0000 -- 100% complete.
 +  OK
 +  => 
 +
 +DTB 파일을 NAND Flash 영역에 프로그램 한다.
 +
 +  => nand write 0x21000000 0x180000 0x82CE
 +  ​
 +  NAND write: device 0 offset 0x180000, size 0x82CE
 +   33486 bytes written: OK
 +
 +Kernel Image 파일을 다운로드한다.
 +
 +  => tftp 0x22000000 zImage.bin
 +  gmac0: PHY present at 0
 +  gmac0: link up, 100Mbps full-duplex (lpa: 0xcde1)
 +  Using gmac0 device
 +  TFTP from server 192.168.28.100;​ our IP address is 192.168.28.28
 +  Filename '​zImage.bin'​.
 +  Load address: 0x22000000
 +  Loading: #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           ##############################################​
 +           1.5 MiB/s
 +  done
 +  Bytes transferred = 3524376 (35c718 hex)
 +  => 
 +
 +Kernel Image 파일이 저장될 NAND Flash 영역을 지운다.
 +
 +  => nand erase 0x200000 0x400000
 +  ​
 +  NAND erase: device 0 offset 0x200000, size 0x400000
 +  Erasing at 0x6e0000 -- 100% complete.
 +  OK
 +  => 
 +
 +Kernel Image 파일을 NAND Flash 영역에 프로그램 한다.
 +
 +  => nand write 0x22000000 0x200000 0x35C718
 +  ​
 +  NAND write: device 0 offset 0x200000, size 0x35C718
 +   ​3524376 bytes written: OK
 +  => 
 +
 +File System 파일을 다운로드한다.
 +
 +  => tftp 0x21000000 rootfs_ubi.bin
 +  gmac0: PHY present at 0
 +  gmac0: link up, 100Mbps full-duplex (lpa: 0xcde1)
 +  Using gmac0 device
 +  TFTP from server 192.168.28.100;​ our IP address is 192.168.28.28
 +  Filename '​rootfs_ubi.bin'​.
 +  Load address: 0x21000000
 +  Loading: #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #################################################################​
 +           #############​
 +           1.4 MiB/s
 +  done
 +  Bytes transferred = 43122688 (2920000 hex)
 +  => 
 +
 +File System 파일이 저장될 NAND Flash 영역을 지운다.
 +
 +  => nand erase 0x800000 0x2920000
 +  ​
 +  NAND erase: device 0 offset 0x800000 , size 0x2920000
 +  Erasing at 0x3110000 -- 100% complete.
 +  OK
 +  => 
 +
 +
 +File System 파일을 NAND Flash 영역에 프로그램 한다.
 +
 +  => nand write 0x21000000 0x800000 0x2920000
 +  ​
 +  NAND write: device 0 offset 0x800000, size 0x2920000
 +   ​43122688 bytes written: OK
 +  => 
 +
 +
 +다시 Reset을 하면 커널까지 부팅이 완료된다.
  
  
  
uboot를_이용한_writing_-_bootstrap을_제외한_나머지.1501998179.txt.gz · Last modified: 2017/08/06 14:42 by 1.241.172.144