Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
resources:tools-software:linuxdsp:docs:quickstartguide:quickstart_sc573_3_0_0 [25 May 2023 11:31] Vasileios Bimpikasresources:tools-software:linuxdsp:docs:quickstartguide:quickstart_sc573_3_0_0 [10 Jul 2023 15:22] (current) – Added SD card instructions Vasileios Bimpikas
Line 476: Line 476:
  
 The default username is **root** and the password is **adi**. The default username is **root** and the password is **adi**.
 +
 +==== Booting Linux Using SD Card ====
 +=== Formatting the SD Card ===
 +In order to use an SD Card with Linux we need to prepare it by formatting it in the correct format. 
 +This section of instructions requires you to correctly identify the SD Card and format the card. If you select the wrong drive you may cause irreversible damage to you Host PC. 
 +To format the SD Card, follow the commands below. The example code in this section assumes that the SD Card device is reported to be /dev/sdb. Ensure that you change these commands to use your device. 
 +<code bash>
 +$ sudo fdisk /dev/sdb
 +/* Create primary partition 1, 256M size*/
 +Command (m for help): n
 +Select (default p): p
 +Partition number (1-4, default 1): 1
 +First sector (2048-3887103, default 2048): PRESS ENTER
 +Last sector, +sectors or +size{K,M,G} (2048-3887103, default 3887103): PRESS ENTER
 +
 +/* Save partition */
 +Command (m for help): w
 +</code>
 +
 +Format the SD card to EXT filesystem
 +<code bash>
 +$ sudo mkfs.ext2 /dev/sdb1
 +</code>
 +
 +\\
 +=== Writing the kernel and file system to the SD Card ===
 +Next, we need to copy the Linux file system and kernel image to the SD Card. We install this on to the SD Card by mounting the file system on to the local Host PC and copying the contents on to the SD Card.  To allow the choice of booting using ramboot and sdcard boot we copy the ramboot image to the SD card as well as extract the minimal image to the SD card.
 +<code bash>
 +$ mkdir ~/mnt
 +$ sudo mount -t ext2 /dev/sdb1 ~/mnt
 +$ sudo mkdir ~/mnt/boot
 +$ sudo cp tmp/deploy/images/adsp-sc573-ezkit/adsp-sc5xx-ramdisk-adsp-sc573-ezkit.cpio.xz ~/mnt/boot/ramdisk.cpio.xz.u-boot
 +$ sudo cp tmp/deploy/images/adsp-sc573-ezkit/sc573-ezkit.dtb ~/mnt/boot/
 +$ sudo cp tmp/deploy/images/adsp-sc573-ezkit/fitImage ~/mnt/boot/
 +$ sudo tar -xf tmp/deploy/images/adsp-sc573-ezkit/adsp-sc5xx-minimal-adsp-sc573-ezkit.tar.xz -C ~/mnt
 +$ sudo umount ~/mnt
 +</code>
 +
 +The file system and kernel image are now installed on to the SD Card. The SD Card can now be safely removed from the Host PC.
 +
 +\\
 +=== Booting Linux from the SD card ===
 +Insert the SD card to target board, and reset the board and enter into U-Boot
 +<code bash>
 +=> run sdcardboot
 +or 
 +=> run ramboot_emmc
 +</code>
 +
 +The linux kernel will then boot up using the file system stored in SD card.
 +
 +\\
  
resources/tools-software/linuxdsp/docs/quickstartguide/quickstart_sc573_3_0_0.txt · Last modified: 10 Jul 2023 15:22 by Vasileios Bimpikas