README.sata 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. 1. SATA usage in U-boot
  2. Two ways to operate the hard disk
  3. * Raw read/write block from/to SATA hard disk;
  4. * ext2load read file from ext2 filesytem in hard disk
  5. 1.0 How to know the information of SATA hard disk?
  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 save the kernel, filesystem, dtb to SATA hard disk with raw?
  12. Notes: 0x1000 sectors = 2 MBytes
  13. wirte kernel
  14. => tftp 40000 /tftpboot/uImage.837x
  15. => sata write 40000 0 2000
  16. write ramdisk
  17. => tftp 40000 /tftpboot/ramdisk.837x
  18. => sata write 40000 2000 8000
  19. write dtb
  20. => tftp 40000 /tftpboot/mpc837xemds.dtb
  21. => sata write 40000 a000 1000
  22. 1.2 How to read the kernel, filesystem, dtb from SATA hard disk with raw?
  23. load kernel
  24. => sata read 200000 0 2000
  25. load ramdisk
  26. => sata read 1000000 2000 8000
  27. load dtb
  28. => sata read 2000000 a000 1000
  29. boot
  30. => bootm 200000 1000000 2000000
  31. 1.3 How to load image from ext2 filesystem in U-boot?
  32. U-boot doesn't support ext2 write to hard disk, so
  33. you have to write the image to hard disk under Linux env,
  34. before you load image from ext2 filesystem.
  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