Transclusion: CL-SOM-AM57x: Linux: Manual Installation: Install Images: SATA

From Compulab Mediawiki
Jump to: navigation, search
Admolition note.png The below procedure will work only on empty SATA drive. If you have already used the drive, please delete all the partitions before proceeding.
  • Identify SATA drive special device file
export SATA_DRIVE=/dev/`basename /sys/devices/platform/44000000.ocp/4a140000.sata/ata1/host0/target0\:0\:0/0\:0\:0\:0/block/sd?`
  • Create two partitions for the Linux kernel (FAT32 100M) and root file system (EXT4 the rest of the disk) on SATA drive:
root@compulab:~# echo -e "o\nn\np\n1\n\n+100M\nn\np\n2\n\n\nw\neof\n" | fdisk -u ${SATA_DRIVE}
root@compulab:~# mdev -s 1>&- 2>&-; umount ${SATA_DRIVE}1; umount ${SATA_DRIVE}2
Admolition note.png In the below procedure the first (boot) partition can be either FAT32 or EXT2/3/4, only FAT32 file system is demonstrated.
  • Format the first partition with FAT32 file system:
root@compulab:~# mkfs.ext2 -L boot ${SATA_DRIVE}1
  • Format the second partition with EXT4 file system:
root@compulab:~# mkfs.ext4 ${SATA_DRIVE}2
  • Mount both partitions:
root@compulab:~# mkdir -p /media/boot && mount ${SATA_DRIVE}1 /media/boot
root@compulab:~# mkdir -p /media/rootfs && mount ${SATA_DRIVE}2 /media/rootfs
  • Copy the kernel images to the first (FAT) partition:
root@compulab:~# cp /media/install/zImage-cl-som-am57x /media/install/am57?x-sbc-am57x.dtb /media/boot && sync
  • Extract the content of rootfs.tar.bz2 onto the second partition:
root@compulab:~# tar --numeric-owner -xvpjf /media/install/rootfs.tar.bz2 -C /media/rootfs && sync
  • Unmount both partitions:
root@compulab:~# umount ${SATA_DRIVE}?