blob: 168dc7f540d0f572910e75f3a617910d374802ee [file] [log] [blame]
Dave Liubede87f2008-03-26 22:54:44 +080011. SATA usage in U-boot
2
3 Two ways to operate the hard disk
4
5 * Raw read/write block from/to SATA hard disk;
6 * ext2load read file from ext2 filesytem in hard disk
7
81.0 How to know the information of SATA hard disk?
9
10 => sata info
11
Wolfgang Denkd049cc72008-03-27 00:03:57 +010012SATA device 0: Model: ST3320620AS Firm: 3.AAD Ser#: 4QF01ZTN
13 Type: Hard Disk
14 Supports 48-bit addressing
15 Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
Dave Liubede87f2008-03-26 22:54:44 +080016
171.1 How to save the kernel, filesystem, dtb to SATA hard disk with raw?
18
19 Notes: 0x1000 sectors = 2 MBytes
20
21 wirte kernel
22 => tftp 40000 /tftpboot/uImage.837x
23 => sata write 40000 0 2000
24
25 write ramdisk
26 => tftp 40000 /tftpboot/ramdisk.837x
27 => sata write 40000 2000 8000
28
29 write dtb
30 => tftp 40000 /tftpboot/mpc837xemds.dtb
31 => sata write 40000 a000 1000
32
331.2 How to read the kernel, filesystem, dtb from SATA hard disk with raw?
34
35 load kernel
36 => sata read 200000 0 2000
37
38 load ramdisk
39 => sata read 1000000 2000 8000
40
41 load dtb
42 => sata read 2000000 a000 1000
43
44 boot
45 => bootm 200000 1000000 2000000
46
471.3 How to load image from ext2 filesystem in U-boot?
48
49 U-boot doesn't support ext2 write to hard disk, so
50 you have to write the image to hard disk under Linux env,
Wolfgang Denkd049cc72008-03-27 00:03:57 +010051 before you load image from ext2 filesystem.
Dave Liubede87f2008-03-26 22:54:44 +080052
53 => ext2ls sata 0:1 /
Wolfgang Denkd049cc72008-03-27 00:03:57 +010054 <DIR> 4096 .
55 <DIR> 4096 ..
56 <DIR> 16384 lost+found
57 1352023 uImage.837x
58 3646377 ramdisk.837x
59 12288 mpc837xemds.dtb
60 12 hello.txt
Dave Liubede87f2008-03-26 22:54:44 +080061
62 => ext2load sata 0:1 200000 /uImage.837x
63
64 => ext2load sata 0:1 1000000 /ramdisk.837x
65
66 => ext2load sata 0:1 2000000 /mpc837xemds.dtb
67
68 => bootm 200000 1000000 2000000