Difference between revisions of "Sd boot rootfs"

From ElphelWiki
Jump to: navigation, search
(Created page with "==Notes== * The micro SD card/adapter must be modified for this boot mode (to keep CD pin high with the card inserted) - only then the camera will boot. * EXT4 partition mounted ...")
 
(Format micro SD card (command line, can be done in the booted from NAND flash camera))
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Notes==
 
==Notes==
* The micro SD card/adapter must be modified for this boot mode (to keep CD pin high with the card inserted) - only then the camera will boot.
+
 
 +
* The micro SD card/adapter has to be modified or the USB cable with appropriate host computer driver is needed to boot from the uSD card - see [[Tmp_manual#Boot]] for instructions.
 
* EXT4 partition mounted as /.
 
* EXT4 partition mounted as /.
  
Line 11: Line 12:
 
** '''uImage'''
 
** '''uImage'''
 
** '''rootfs.tar.gz'''
 
** '''rootfs.tar.gz'''
* Format into 2 partitions: FAT32 and EXT4 (use gparted or command line instructions below), the order of partitions is important or change bootargs in the device tree accordingly.
+
* Partition table: '''msdos''' ('''gpt''' won't work) Format into 2 partitions: FAT32 and EXT4 (use gparted or command line instructions below), the order of partitions is important or change bootargs in the device tree accordingly.
 
* FAT32: copy the following files:
 
* FAT32: copy the following files:
 
*** '''boot.bin'''
 
*** '''boot.bin'''
Line 25: Line 26:
 
* Insert, power on
 
* Insert, power on
  
==Format micro SD card (command line)==
+
==Format micro SD card (command line, can be done in the booted from camera's NAND flash)==
Example for '''/dev/sda''':
+
Example for '''/dev/sdX''':
* create partitions with fdisk  
+
* create partitions with fdisk , gparted or any other program:
* mkfs.vfat -F 32 /dev/sda1
+
** the 1st partition is to be formatted to FAT32 - 1GB is more than enough
* mkfs.ext4 /dev/sda2
+
** the 2nd partition is to be formatted to EXT4 - 2+GB
 +
formatting with mkfs:
 +
* mkfs.vfat -F 32 /dev/sdX1
 +
----
 +
 
 +
* mkfs.ext4 /dev/sdX2
  
 
[[Category:Elphel393]]
 
[[Category:Elphel393]]

Latest revision as of 10:47, 12 January 2017

Notes

  • The micro SD card/adapter has to be modified or the USB cable with appropriate host computer driver is needed to boot from the uSD card - see Tmp_manual#Boot for instructions.
  • EXT4 partition mounted as /.

Prepare the card

PC:

  • After all of the targets are built in poky use files from .../poky/build/tmp/deploy/images/elphel393/mmc/:
    • boot.bin
    • u-boot-dtb.img
    • devicetree.dtb
    • uImage
    • rootfs.tar.gz
  • Partition table: msdos (gpt won't work) Format into 2 partitions: FAT32 and EXT4 (use gparted or command line instructions below), the order of partitions is important or change bootargs in the device tree accordingly.
  • FAT32: copy the following files:
      • boot.bin
      • u-boot-dtb.img
      • devicetree.dtb
      • uImage
  • If EXT4 is not empty - format it or delete old contents
  • Mount EXT4 to some <mountpoint>
    • unpack the rootfs.tar.gz, console:
tar -C <mountpoint> -xzpf rootfs.tar.gz

Boot

  • Insert, power on

Format micro SD card (command line, can be done in the booted from camera's NAND flash)

Example for /dev/sdX:

  • create partitions with fdisk , gparted or any other program:
    • the 1st partition is to be formatted to FAT32 - 1GB is more than enough
    • the 2nd partition is to be formatted to EXT4 - 2+GB

formatting with mkfs:

  • mkfs.vfat -F 32 /dev/sdX1

  • mkfs.ext4 /dev/sdX2