====== SD Card Creation ======
This section of the Wiki describes how to create an SD card for Oxygen by formatting the card, creating disk partitions, and copying the file systems.
===== Format the SD card =====
In Linux, start fdisk by running
sudo fdisk /dev/mmcblk0
where // /dev/mmcblk0 // is the base device of the SD card in the computer.
In fdisk, complete the following steps in numerical order:
- Press //''p''// and then //''Enter''// to print the partition table and make sure the device is the SD card.
- Press //''n''// and then //''Enter''// to add a new partition.
- Press //''p''// and then //''Enter''// to designate the new partition as the primary partition.
- At the //''Partition number''// prompt, press //''Enter''// to use the default partition number 1.
- At the //''First sector''// prompt, press //''Enter''// to use the default first sector size of 2048.
- At the //''Last sector''// prompt, enter //''+1G''// and press //''Enter''// to set the partition size as 1 GB.
- Press //''t''// and then //''Enter''// to change the partition type.
- Press //''c''// and then //''Enter''// to select vfat32 as the partition type.
- Press //''n''// and then //''Enter''// to create another partition.
- Press //''Enter''// to select the default partition type of primary.
- At the //''Partition number''// prompt, press //''Enter''// to use the default partition number 2.
- At the //''First sector''// prompt, press //''Enter''// to use the default first sector size of 2099200.
- At the //''Last sector''// prompt, press //''Enter''// to use the default last sector size.
- Press //''w''// and then //''Enter''// to write the new partitions to the SD card.
===== Create the file systems =====
First, create the boot file system on the 1 GB partition by running the following:
sudo mkfs.vfat -n BOOT /dev/mmcblk0p1
Then, create the main file system on the main partition by running:
sudo mkfs.ext4 -L root /dev/mmcblk0p2
Next, eject the SD card, remove it, and then put it back in the computer. This step is important to get the OS to enumerate the card with these new file systems.
===== Copy data to the SD card =====
Change directory to //''buildarea/temp/deploy/images/oxygen''//, or where you have downloaded the image. Then, run the following:
cp download.* /media/user/BOOT/
cp boot.bin /media/user/BOOT/
cp Image /media/user/BOOT/
cp oxygen.dtb /media/user/BOOT/
sudo tar -xf rwt-sdr-image-oxygen.tar.gz -C /media/user/root/
sudo tar -xf