diff options
Diffstat (limited to 'docs/README.booting.storage.md')
-rw-r--r-- | docs/README.booting.storage.md | 52 |
1 files changed, 38 insertions, 14 deletions
diff --git a/docs/README.booting.storage.md b/docs/README.booting.storage.md index 4d33600d..d9689712 100644 --- a/docs/README.booting.storage.md +++ b/docs/README.booting.storage.md | |||
@@ -22,7 +22,7 @@ This section describes how to manually prepare and populate an SD card image. | |||
22 | There are automation tools in OpenEmbedded that can generate disk images already | 22 | There are automation tools in OpenEmbedded that can generate disk images already |
23 | formatted and prepared such that they can be written directly to a disk. Refer | 23 | formatted and prepared such that they can be written directly to a disk. Refer |
24 | to the Yocto Project Manual for more details: | 24 | to the Yocto Project Manual for more details: |
25 | https://docs.yoctoproject.org/4.1.2/singleindex.html#creating-partitioned-images-using-wic | 25 | https://docs.yoctoproject.org/4.1.4/singleindex.html#creating-partitioned-images-using-wic |
26 | 26 | ||
27 | ## Writing image to SD or eMMC device | 27 | ## Writing image to SD or eMMC device |
28 | 28 | ||
@@ -33,11 +33,17 @@ There are two ways to write the images to SD card or eMMC device. | |||
33 | 2. To write image to eMMC device make sure you need to boot Linux from JTAG or | 33 | 2. To write image to eMMC device make sure you need to boot Linux from JTAG or |
34 | SD or QSPI first, then copy the wic image to `<target_rootfs>/tmp` directory. | 34 | SD or QSPI first, then copy the wic image to `<target_rootfs>/tmp` directory. |
35 | 35 | ||
36 | > **Note:** `<target-image>` refers to core-image-minimal or petalinux-image-minimal | ||
37 | |||
36 | ### Using Wic file | 38 | ### Using Wic file |
37 | 39 | ||
38 | Write wic image file to the SD card or eMMC device. | 40 | Write wic image file to the SD card or eMMC device. Use dd command or balena |
41 | etcher to flash the wic image file to SD card. WIC image will be | ||
42 | build/tmp/deploy/${MACHINE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.wic, See | ||
43 | [Flashing Images Using bmaptool](https://docs.yoctoproject.org/singleindex.html#flashing-images-using-bmaptool) | ||
44 | for fast and easy way to flash the image | ||
39 | ``` | 45 | ``` |
40 | $ sudo dd if=xilinx-default-sd-${DATETIME}-sda.direct of=/dev/mmcblk<devnum> bs=4M | 46 | $ sudo dd if=<target-image>-${MACHINE}-${DATETIME}.rootfs.wic of=/dev/mmcblk<devnum> bs=4M |
41 | ``` | 47 | ``` |
42 | 48 | ||
43 | ### Using Yocto images | 49 | ### Using Yocto images |
@@ -55,22 +61,40 @@ $ sudo lsblk /dev/mmcblk<devnum> -o NAME,FSTYPE,LABEL,PARTLABEL | |||
55 | $ sudo mount -L boot /mnt/boot; sudo mount -L root /mnt/rootfs` | 61 | $ sudo mount -L boot /mnt/boot; sudo mount -L root /mnt/rootfs` |
56 | ``` | 62 | ``` |
57 | 3. Copy the boot images to the SD card or eMMC device FAT32 partition. | 63 | 3. Copy the boot images to the SD card or eMMC device FAT32 partition. |
64 | |||
65 | * Linux | ||
58 | * boot.bin | 66 | * boot.bin |
59 | * boot.scr | 67 | * boot.scr |
60 | * Image or uImage (For Zynq7000 only) | 68 | * Image or uImage (For Zynq7000 only) |
61 | * system.dtb | 69 | * system.dtb |
62 | * rootfs.cpio.gz.u-boot (If using a ramdisk) | 70 | * rootfs.cpio.gz.u-boot (If using a ramdisk) |
63 | ``` | 71 | ``` |
64 | $ cp ${DEPLOY_DIR_IMAGE}/boot.bin /mnt/boot/boot.bin | 72 | $ cp ${DEPLOY_DIR_IMAGE}/boot.bin /mnt/boot/boot.bin |
65 | $ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr | 73 | $ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr |
66 | $ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image | 74 | $ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image |
67 | $ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb | 75 | $ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb |
68 | $ cp ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot /mnt/boot/rootfs.cpio.gz.u-boot | 76 | $ cp ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot /mnt/boot/rootfs.cpio.gz.u-boot |
69 | ``` | 77 | ``` |
70 | 4. Extract `core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content to the SD | 78 | * Xen |
79 | * boot.bin | ||
80 | * boot.scr | ||
81 | * Image | ||
82 | * xen | ||
83 | * system.dtb | ||
84 | * rootfs.cpio.gz (If using a ramdisk) | ||
85 | ``` | ||
86 | $ cp ${DEPLOY_DIR_IMAGE}/boot.bin /mnt/boot/boot.bin | ||
87 | $ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr | ||
88 | $ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image | ||
89 | $ cp ${DEPLOY_DIR_IMAGE}/xen /mnt/boot/xen | ||
90 | $ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb | ||
91 | $ cp ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.cpio.gz /mnt/boot/rootfs.cpio.gz | ||
92 | ``` | ||
93 | |||
94 | 4. Extract `<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content to the SD | ||
71 | card or eMMC device EXT4 partition. | 95 | card or eMMC device EXT4 partition. |
72 | ``` | 96 | ``` |
73 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs | 97 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs |
74 | $ sync | 98 | $ sync |
75 | ``` | 99 | ``` |
76 | 5. Unmount the SD Card or eMMC device and boot from SD or eMMC boot modes. | 100 | 5. Unmount the SD Card or eMMC device and boot from SD or eMMC boot modes. |
@@ -97,10 +121,10 @@ $ sudo lsblk /dev/sd<X> -o NAME,FSTYPE,LABEL,PARTLABEL | |||
97 | ``` | 121 | ``` |
98 | $ sudo mount -L root /mnt/rootfs` | 122 | $ sudo mount -L root /mnt/rootfs` |
99 | ``` | 123 | ``` |
100 | 3. Extract `core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content | 124 | 3. Extract `<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content |
101 | to the USB or SATA device EXT4 partition. | 125 | to the USB or SATA device EXT4 partition. |
102 | ``` | 126 | ``` |
103 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs | 127 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs |
104 | $ sync | 128 | $ sync |
105 | ``` | 129 | ``` |
106 | 4. Unmount the USB or SATA device. | 130 | 4. Unmount the USB or SATA device. |