Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX8M-L/Deployment/Standalone boot

1,927 bytes added, 15:29, 16 February 2022
Partitioning
# partition size in MB
BOOTLOAD_RESERVE=8
BOOT_ROM_SIZEBOOT_SIZE=1282048RFS_SIZE=20484096
# create the SDCARD partition
# calculate partition sizes
boot_start=`expr ${BOOTLOAD_RESERVE} \\* 1024 \\* 1024 / 512`
boot_size=`expr ${BOOT_ROM_SIZEBOOT_SIZE} \\* 1024 \\* 1024 / 512`
rfs_start=`expr ${boot_size} + ${boot_start}`
rfs_size=`expr ${RFS_SIZE} \\* 1024 \\* 1024 / 512`
<pre class="workstation-terminal">
root@sdvxdesk-litemx8mp:~# ./sdcard-partitionemmc_partition.sh /dev/mmcblk2SD total size: 7457KB[ 238...978157] mmcblk2: p1 p2 p3Checking that no-one is using this disk right now ...OK
Disk /dev/mmcblk2: 7.29 GiB, 7820083200 bytes, 15273600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xbe0f0cf6
 
Old situation:
 
Device Boot Start End Sectors Size Id Type
/dev/mmcblk2p1 32768 524288 491521 240M c W95 FAT32 (LBA)
/dev/mmcblk2p2 524289 12058623 11534335 5.5G 83 Linux
/dev/mmcblk2p3 12058624 15273599 3214976 1.5G 83 Linux
 
>>> Created a new DOS disklabel with disk identifier 0x7b310a69.
/dev/mmcblk2p1: Created a new partition 1 of type 'Linux' and of size 2 GiB.
/dev/mmcblk2p2: Created a new partition 2 of type 'Linux' and of size 4 GiB.
/dev/mmcblk2p3: Done.
 
New situation:
Disklabel type: dos
Disk identifier: 0x7b310a69
 
Device Boot Start End Sectors Size Id Type
/dev/mmcblk2p1 16384 4210687 4194304 2G 83 Linux
/dev/mmcblk2p2 4210688 12599295 8388608 4G 83 Linux
 
The partition table has been altered.
Calling ioctl() to re-read partition table.
[ 239.419641] mmcblk2: p1 p2
Syncing disks.
formatting boot
mke2fs 1.45.3 (14-Jul-2019)
Discarding device blocks: done
Creating filesystem with 524288 4k blocks and 131072 inodes
Filesystem UUID: 48ad5de1-5ffe-4ed9-b7e0-bdc05d0b8052
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
 
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
 
formatting rfs
mke2fs 1.45.3 (14-Jul-2019)
Discarding device blocks: done
Creating filesystem with 1048576 4k blocks and 262144 inodes
Filesystem UUID: aacf8195-ddbd-4fdc-a83e-99f57659367e
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
 
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
root@desk-mx8mp:~#
</pre>
</pre>
* copy kernel, dtb and splash_image filesfrom SD card
<pre class="workstation-terminal">
root@sdvx-lite:~# mount /dev/mmcblk2p1 /mnt/emmc
[ 40 314.988575432392] FATEXT4-fs (mmcblk2p1): Volume was not properly unmounted. Some mounted filesystem with ordered data may be corrupt. Please run fsckmode.Opts: (null)root@sdvxdesk-litemx8mp:~# cd mkdir -p /mnt/emmcsdroot@sdvxdesk-litemx8mp:/mnt/emmc~# cp mount /tftpbootdev/desk-mx-l/*dtb .root@sdvx-lite:mmcblk1p1 /mnt/emmc# cp /tftpboot/desk-mx-l/Image .sdroot@sdvxdesk-litemx8mp:/mnt/emmc~# cp /tftpbootmnt/desk-mx-lsd/splash_image.bmp .root@sdvx-lite:* /mnt/emmc# cd/root@sdvxdesk-litemx8mp:~# umount /mnt/emmc
</pre>
<pre class="workstation-terminal">
root@desk-mx8mp:~# mount /dev/mmcblk2p2 /mnt/emmc
[ 27 433.437492] EXT4-fs (mmcblk2p2): mounting ext3 file system using the ext4 subsystem[ 27.455201481899] EXT4-fs (mmcblk2p2): mounted filesystem with ordered data mode. Opts: (null)
root@desk-mx8mp:~# cd /mnt/emmc/
root@desk-mx8mp:/mnt/emmc#
8,256
edits