Blame view

doc/README.sata 1.55 KB
a187559e3   Bin Meng   Use correct spell...
1
  1. SATA usage in U-Boot
bede87f4c   Dave Liu   ata: add the read...
2

e8f7ba404   Dave Liu   doc: english poli...
3
  	There are two ways to operate the hard disk
bede87f4c   Dave Liu   ata: add the read...
4

e8f7ba404   Dave Liu   doc: english poli...
5
6
  	* Read/write raw blocks from/to SATA hard disk
  	* ext2load to read a file from ext2 file system
bede87f4c   Dave Liu   ata: add the read...
7

e8f7ba404   Dave Liu   doc: english poli...
8
  1.0 How to read the SATA hard disk's information?
bede87f4c   Dave Liu   ata: add the read...
9
10
  
  	=> sata info
d049cc7f7   Wolfgang Denk   Coding style clea...
11
12
13
14
  SATA device 0: Model: ST3320620AS Firm: 3.AAD Ser#:		4QF01ZTN
  	    Type: Hard Disk
  	    Supports 48-bit addressing
  	    Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
bede87f4c   Dave Liu   ata: add the read...
15

e8f7ba404   Dave Liu   doc: english poli...
16
  1.1 How to raw write the kernel, file system, dtb to a SATA hard disk?
bede87f4c   Dave Liu   ata: add the read...
17

e8f7ba404   Dave Liu   doc: english poli...
18
19
  	Notes: Hard disk sectors are normally 512 bytes, so
  		0x1000 sectors = 2 MBytes
bede87f4c   Dave Liu   ata: add the read...
20

e8f7ba404   Dave Liu   doc: english poli...
21
  	write kernel
bede87f4c   Dave Liu   ata: add the read...
22
23
24
25
26
27
28
29
30
31
  	=> tftp 40000 /tftpboot/uImage.837x
  	=> sata write 40000 0 2000
  
  	write ramdisk
  	=> tftp 40000 /tftpboot/ramdisk.837x
  	=> sata write 40000 2000 8000
  
  	write dtb
  	=> tftp 40000 /tftpboot/mpc837xemds.dtb
  	=> sata write 40000 a000 1000
e8f7ba404   Dave Liu   doc: english poli...
32
  1.2 How to raw read the kernel, file system, dtb from a SATA hard disk?
bede87f4c   Dave Liu   ata: add the read...
33
34
35
36
37
38
39
40
41
42
43
44
  
  	load kernel
  	=> sata read 200000 0 2000
  
  	load ramdisk
  	=> sata read 1000000 2000 8000
  
  	load dtb
  	=> sata read 2000000 a000 1000
  
  	boot
  	=> bootm 200000 1000000 2000000
a187559e3   Bin Meng   Use correct spell...
45
  1.3 How to load an image from an ext2 file system in U-Boot?
bede87f4c   Dave Liu   ata: add the read...
46

a187559e3   Bin Meng   Use correct spell...
47
  	U-Boot doesn't support writing to an ext2 file system, so the
e8f7ba404   Dave Liu   doc: english poli...
48
  	files must be written by other means (e.g. linux).
bede87f4c   Dave Liu   ata: add the read...
49
50
  
  	=> ext2ls sata 0:1 /
d049cc7f7   Wolfgang Denk   Coding style clea...
51
52
53
54
55
56
57
  	<DIR>	    4096 .
  	<DIR>	    4096 ..
  	<DIR>	   16384 lost+found
  		 1352023 uImage.837x
  		 3646377 ramdisk.837x
  		   12288 mpc837xemds.dtb
  		      12 hello.txt
bede87f4c   Dave Liu   ata: add the read...
58
59
60
61
62
63
64
65
  
  	=> ext2load sata 0:1 200000 /uImage.837x
  
  	=> ext2load sata 0:1 1000000 /ramdisk.837x
  
  	=> ext2load sata 0:1 2000000 /mpc837xemds.dtb
  
  	=> bootm 200000 1000000 2000000