Changes

Jump to: navigation, search

Standalone boot (SDVX)

2,718 bytes added, 12:37, 1 October 2018
Program root file system into ...
=== ...eMMC flash ===
* Boot the system via SD or NFS as described in the e [[SDV04 Embedded Linux Kit (SDVX)#Quick_start_guide|Quick start guide]]
* eMMC device has to be partitioned and properly formatted choosing a the <code>file system</code> for each partition* an example of SD partitioning script is the following one: <pre>#!/bin/sh node=$1 # partition size in MBBOOTLOAD_RESERVE=8BOOT_ROM_SIZE=128RFS_SIZE=2048 # format the SDCARD/DATA/CACHE partitionpart=""echo ${node} | grep mmcblk > /dev/nullif [ "$?" -eq "0" ]; then part="p"fi # call sfdisk to create partition tabletotal_size=`sfdisk -s ${node}`total_size=`expr ${total_size} / 1024`echo SD total size: ${total_size}KB boot_start=`expr ${BOOTLOAD_RESERVE} \\* 1024 \\* 1024 / 512`boot_size=`expr ${BOOT_ROM_SIZE} \\* 1024 \\* 1024 / 512`rfs_start=`expr ${boot_size} + ${boot_start}`rfs_size=`expr ${RFS_SIZE} \\* 1024 \\* 1024 / 512` { echo ${boot_start},${boot_size},0c,-; echo ${rfs_start},${rfs_size},83,-; } | sfdisk --force ${node} echo "formatting boot"mkfs.vfat -F 32 -n boot ${node}${part}1echo "formatting rfs"mkfs.ext4 -F ${node}${part}2 -Lrfs</pre> E.g. <pre class="workstation-terminal">root@sdvx-lite:~# ./sdcard-partition.sh /dev/mmcblk2SD total size: 3776KB[ 1341.905014] mmcblk2: p1 p2Checking that no-one is using this disk right now ... OK Disk /dev/mmcblk2: 3.7 GiB, 3959422976 bytes, 7733248 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical):[ 1341.922729] mmcblk2: p1 p2 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0xa77eb3f0 Old situation: Device Boot Start End Sectors Size Id Type/dev/mmcblk2p1 2048 264191 262144 128M c W95 FAT32 (LBA)/dev/mmcblk2p2 264192 4458495 4194304 2G 83 Linux >>> Created a new DOS disklabel with disk identifier 0xcce0c36f.Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 128 MiB./dev/mmcblk2p2: Created a new partition 2 of type 'Linux' and of size 2 GiB./dev/mmcblk2p3:New situation: Device Boot Start End Sectors Size Id Type/dev/mmcblk2p1 16384 278527 262144 128M c W95 FAT32 (LBA)/dev/mmcblk2p2 278528 4472831 4194304 2G 83 Linux The partition table has been altered.Calling ioctl() to re-read partition table.Syncing disks.formatting bootmkfs.fat 3.0.28 (2015-05-16)mkfs.fat: warning - lowercase labels might not work properly with DOS or Windowsformatting rfsmke2fs 1.43-WIP (18-May-2015)Discarding device blocks: doneCreating filesystem with 524288 4k blocks and 131072 inodesFilesystem UUID: 9a685543-1af2-4e39-83f3-b8a32248c021Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Allocating group tables: doneWriting inode tables: doneCreating journal (16384 blocks): doneWriting superblocks and filesystem accounting information: done root@sdvx-lite:~#</pre>
== Program boot images ...==
8,154
edits

Navigation menu