How to flash image into SD Card
johnchewyy edited this page Jun 23, 2023
·
3 revisions
This section is optional. Skip to "Load pre-build disk image into SD Card" section to populate the SD Card using tools.
- Locate your SD Card
> sudo fdisk -l
Take note that your SD Card path might be different than /dev/sdb shown in example above.
- Format SD Card into the following format:
Device | Start | End | Sectors | Size | Type |
---|---|---|---|---|---|
/dev/sd*1 | 4096 | 8191 | 4096 | 2M | HiFive BBL |
/dev/sd*2 | 8192 | 40959 | 32769 | 16M | HiFive FSBL |
/dev/sd*3 | 40960 | 245760 | 204800 | 100M | EFI System |
Format SD Card to GPT format
> sudo parted /dev/sd* mklabel gpt
/dev/sd* – Replace “*” with the actual character of your sd card
Create partition in SD Card
> sudo sgdisk -g --clear --set-alignment=1 \
--new=1:4096:+2M: --change-name=1:'spl' --typecode=1:2e54b353-1271-4842-806f-e436d6af6985 \
--new=2:8192:+16M: --change-name=2:'opensbi-uboot' --typecode=2:5b193300-fc78-40cd-8002-e86c45580b47 \
--new=3:40961:+100M --change-name=3:'linux' --typecode=3:C12A7328-F81F-11D2-BA4B-00A0C93EC93B \
/dev/sd*
Verify partitions
> sudo fdisk -l
Result:
Skip this section if created the SD Card partition manually.
- Locate your SD Card
> sudo fdisk -l
Take note that your SD Card path might be different than /dev/sdb shown in example above.
- Execute the following command:
> sudo dd if=u-boot-spl.bin.normal.out of=/dev/sd*1 bs=4096 oflag=direct
> sudo dd if=JH7110.fd of=/dev/sd*2 bs=4096 oflag=direct
> sudo dd if=linux.iso of=/dev/sd*3 bs=4096 oflag=direct
Latest image files can build from quick start guide here or download from release page here
Replace "*" with the character of your SD Card path