README.sata 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. 1. SATA usage in U-Boot
  2. There are two ways to operate the hard disk
  3. * Read/write raw blocks from/to SATA hard disk
  4. * ext2load to read a file from ext2 file system
  5. 1.0 How to read the SATA hard disk's information?
  6. => sata info
  7. SATA device 0: Model: ST3320620AS Firm: 3.AAD Ser#: 4QF01ZTN
  8. Type: Hard Disk
  9. Supports 48-bit addressing
  10. Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
  11. 1.1 How to raw write the kernel, file system, dtb to a SATA hard disk?
  12. Notes: Hard disk sectors are normally 512 bytes, so
  13. 0x1000 sectors = 2 MBytes
  14. write kernel
  15. => tftp 40000 /tftpboot/uImage.837x
  16. => sata write 40000 0 2000
  17. write ramdisk
  18. => tftp 40000 /tftpboot/ramdisk.837x
  19. => sata write 40000 2000 8000
  20. write dtb
  21. => tftp 40000 /tftpboot/mpc837xemds.dtb
  22. => sata write 40000 a000 1000
  23. 1.2 How to raw read the kernel, file system, dtb from a SATA hard disk?
  24. load kernel
  25. => sata read 200000 0 2000
  26. load ramdisk
  27. => sata read 1000000 2000 8000
  28. load dtb
  29. => sata read 2000000 a000 1000
  30. boot
  31. => bootm 200000 1000000 2000000
  32. 1.3 How to load an image from an ext2 file system in U-Boot?
  33. U-Boot doesn't support writing to an ext2 file system, so the
  34. files must be written by other means (e.g. linux).
  35. => ext2ls sata 0:1 /
  36. <DIR> 4096 .
  37. <DIR> 4096 ..
  38. <DIR> 16384 lost+found
  39. 1352023 uImage.837x
  40. 3646377 ramdisk.837x
  41. 12288 mpc837xemds.dtb
  42. 12 hello.txt
  43. => ext2load sata 0:1 200000 /uImage.837x
  44. => ext2load sata 0:1 1000000 /ramdisk.837x
  45. => ext2load sata 0:1 2000000 /mpc837xemds.dtb
  46. => bootm 200000 1000000 2000000