Open main menu

DAVE Developer's Wiki β

Changes

no edit summary
[[File:TBD.png|thumb|center|200px|Work in progress]]
 
<section begin=History/>
{| style="border-collapse:collapse; "
|-
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|1.0.0
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|Oct 2020Jun 2021
|style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fb; padding:5px; color:#000000"|First DESK release
|}
The procedure has been tested on a Linux PC running Ubuntu LTS (>=''TBD'') distribution with
*a 16 GB microSD card [1]
*the binary files delivered along with the [[Axel_Embedded_Linux_Kit_(XELK)AXEL_Lite_SOM/DESK-MX6-L/General/Release_Notes#Downloadable_binary_images|DESKMX6-L ''1.x0.x0'']].The resulting card is partitioned as depicted [[Axel_Embedded_Linux_Kit_(XELK)#XELK_microSD_Layout|here]].below:
* bootable partition (mmcblk0p1, vfat) containing:** binary images (u-boot and kernel images)* root file system partition (mmcblk0p2, ext3)** root file system binaries and init scripts The script - named <code>mksd.sh</code> - looks like thiscan be realized with the following code:
<pre>
#!/bin/bash
then
{
echo 1040,1380,0x0c,* echo 13901420,,83,-
} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
else
{
echo 1016M,4086M8176M,0x0c,* echo 4096M8192M,,83,-
} | sfdisk $DRIVE
fi
echo "[Making filesystems...]"
mkfs.vfat -F 32 -n BOOT "$DRIVE$PART"1 #> /dev/null
mkfs.ext3 -F -L ROOTFS "$DRIVE$PART"2 #> /dev/null
echo "[Copying files...]"
echo "[Done]"
 
</pre>
* bootscript: <code>boot.scr</code>
* Linux kernel: <code>uImage</code>
* Device tree blob: <code>imx6qdesk-xelkmx6-l-21.0.0_imx6dl-0sbcx-0cb0012.dtb</code>.
This is the list of the binary files that will be used by the script:
<pre>
dvdk@vagrant:~/desk-mx-l$ ls ll /tftpboot/desk-mx-la deskl/total 754810388drwxrwxrdrwxr-xr-x 2 dvdk root 4096 Jul 1 14:53 ./drwxr-xr-x 3 dvdk root 4096 Oct Apr 9 1615:22 52 ../drwxrwxr-x 6 rw-r--r-- 1 dvdk dvdk 4096 Oct 1556 Jul 1 14:53 boot.scr-rw-r--r-- 1 dvdk root 52939 Apr 9 15:53 desk-mx6-l-1.0.0_imx6dl-sbcx-cb0012.dtb-rw-r--r-- 1 dvdk root 53252 Apr 9 15:53 desk-mx6-l-1.0.0_imx6dl-sbcx-cb0013.dtb-rw-r--r-- 1 dvdk root 52837 Apr 9 15:53 desk-mx6-l-1.0.0_imx6dl-sbcx-cb0018.dtb-rw-r--r-- 1 dvdk root 53939 Apr 9 1615:22 53 desk-mx6-l-1.0.0_imx6dl-sbcx-cb0050.dtb-rw-r--r-- 1 dvdk root 53212 Apr 9 15:53 desk-mx6-l-1.0.0_imx6dl-sbcx-cb0055.dtb-rw-r--r-- 1 dvdk root 49142 Apr 9 15:53 desk-mx6-l-1.0.0_imx6dl-xelk-l.dtb-rw-r--r-- 1 dvdk root 53760 Oct Apr 9 1615:22 imx6q53 desk-mx6-l-1.0.0_imx6q-sbcx-cb0012.dtb-rw-r--r-- 1 dvdk root 54069 Apr 9 15:53 desk-mx6-l-1.0.0_imx6q-sbcx-cb0013.dtb-rw-r--r-- 1 dvdk root 50131 Apr 9 15:53 desk-mx6-l-1.0.0_imx6q-xelk-l-2-0-0.dtb-rw-r--r-- 1 dvdk root 49959 Apr 9 15:53 desk-mx6-l-1.0.0_imx6q-xelk-l.dtb-rw-r--r-- 1 dvdk root 56320 Oct Apr 9 1615:22 SPL52 desk-mx6-l-1.0.0_mx6qdldesk_nand_SPL-rw-r--r-- 1 dvdk root 570224 Apr 9 15:52 desk-mx6-l-1.0.0_mx6qdldesk_nand_u-boot.img-rw-r--r-- 1 dvdk root 56320 Apr 9 15:52 desk-mx6-l-1.0.0_mx6qdldesk_spi_SPL-rw-r--r-- 1 dvdk root 569984 Apr 9 15:52 desk-mx6-l-1.0.0_mx6qdldesk_spi_u-boot.img-rw-r--r-- 1 dvdk root 56320 Apr 9 15:52 desk-mx6-l-1.0.0_mx6qdldesk_SPL-rw-r--r-- 1 dvdk root 569864 Oct Apr 9 1615:22 u52 desk-mx6-l-1.0.0_mx6qdldesk_u-boot.img-rw-r--r-- 1 dvdk root 7031584 Apr 9 15:53 desk-mx6-l-1.0.0_uImage-rw-r--r-- 1 dvdk 7031520 Oct root 1152054 Apr 9 1615:22 uImage52 splash_image.bmp
dvdk@vagrant:~/desk-mx-l$
</pre>
*Archive of the target's root file system (compressed as <code>.tar.bz2</code> file).
<pre>
dvdk@vagrant:~/desk-mx-l$ sudo ./mksddesk-mx6-l-1.0.0_mksd.sh /dev/sdb /tftpboot/desk-mx-l/desk-mx6-l-1.0.0_mx6qdldesk_u-boot.img /tftpboot/desk-mx-l/desk-mx6-l-1.0.0_mx6qdldesk_SPL /tftpboot/desk-mx-l/ ./rfs/dave-image-devel-desk-mx6.tar.bz2 All data on /dev/sdb now will be destroyed! Continue? [y/n]y[Partitioning /dev/sdb...]1024+0 records in1024+0 records out1048576 bytes (1.0 MB, 1.0 MiB) copied, 3.0706 s, 341 kB/sDISK SIZE - 15931539456 bytesChecking that no-one is using this disk right now ... OK Disk /dev/sd<xsdb: 14.9 GiB, 15931539456 bytes, 31116288 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes > <u>> Created a new DOS disklabel with disk identifier 0x2c61a4d6.Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 8 GiB./dev/sdb2: Sector 16384000 is already allocated.Created a new partition 2 of type 'Linux' and of size 6.9 GiB./dev/sdb3: New situation: Device Boot Start End Sectors Size Id Type/dev/sdb1 * 32768 16777215 16744448 8G c W95 FAT32 (LBA)/dev/sdb2 16777216 31116287 14339072 6.9G 83 Linux The partition table has been altered.Calling ioctl() to re-read partition table.Syncing disks.Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only.[Making filesystems...]mkfs.fat 3.0.28 (2015-05-16)mke2fs 1.42.13 (17-May-2015)/dev/sdb2 contains a ext3 file system labelled 'ROOTFS' last mounted on /mnt on Thu Jul 1 14:57:17 2021Creating filesystem with 1792384 4k blocks and 448800 inodesFilesystem UUID: 330007bc-831c-4c5d-b51e-626bbac325daSuperblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Allocating group tables: done Writing inode tables: done Creating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: done  [Copying files...]'/tftpboot/desk-mx-l/boot.scr' -> '/mnt/boot.scr''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_imx6dl-sbcx-cb0012.dtb' -> '/mnt/desk-mx6-l-1.0.0_imx6dl-sbcx-cb0012.dtb''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_imx6dl-sbcx-cb0013.dtb' -> '/mnt/desk-mx6-l-1.0.0_imx6dl-sbcx-cb0013.dtb''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_imx6dl-sbcx-cb0018.dtb' -> '/mnt/desk-mx6-l-1.0.0_imx6dl-sbcx-cb0018.dtb''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_imx6dl-sbcx-cb0050.dtb' -> '/mnt/desk-mx6-l-1.0.0_imx6dl-sbcx-cb0050.dtb''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_imx6dl-sbcx-cb0055.dtb' -> '/mnt/desk-mx6-l-1.0.0_imx6dl-sbcx-cb0055.dtb''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_imx6dl-xelk-l.dtb' -> '/mnt/desk-mx6-l-1.0.0_imx6dl-xelk-l.dtb''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_imx6q-sbcx-cb0012.dtb' -> '/mnt/desk-mx6-l-1.0.0_imx6q-sbcx-cb0012.dtb''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_imx6q-sbcx-cb0013.dtb' -> '/mnt/desk-mx6-l-1.0.0_imx6q-sbcx-cb0013.dtb''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_imx6q-xelk-l-2-0-0.dtb' -> '/mnt/desk-mx6-l-1.0.0_imx6q-xelk-l-2-0-0.dtb''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_imx6q-xelk-l.dtb' -> '/mnt/desk-mx6-l-1.0.0_imx6q-xelk-l.dtb''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_mx6qdldesk_nand_SPL' -> '/mnt/desk-mx6-l-1.0.0_mx6qdldesk_nand_SPL''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_mx6qdldesk_nand_u-boot.img' -> <SPL'/mnt/desk-mx6-l-1.0.0_mx6qdldesk_nand_u-boot.img''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_mx6qdldesk_spi_SPL' -> '/mnt/desk-mx6-l-1.0.0_mx6qdldesk_spi_SPL''/tftpboot/desk-mx-l/ <rfs_filenamedesk-mx6-l-1.0.0_mx6qdldesk_spi_u-boot.img' ->'/mnt/desk-mx6-l-1.0.0_mx6qdldesk_spi_u-boot.img''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_mx6qdldesk_SPL' -> '/mnt/desk-mx6-l-1.0.0_mx6qdldesk_SPL''/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_mx6qdldesk_u-boot.img' -> '/mnt/desk-mx6-l-1.0.0_mx6qdldesk_u-boot.img'TBD '/tftpboot/desk-mx-l/desk-mx6-l-1.0.0_uImage' -> '/mnt/desk-mx6-l-1.0.0_uImage''/tftpboot/desk-mx-l/splash_image.bmp' -> '/mnt/splash_image.bmp'[Extracting rfs (this may take a while...)][Programming SPL]110+0 records in110+0 records out56320 bytes (56 kB, 55 KiB) copied, 0.181772 s, 310 kB/s[Programming u-boot.img]556+1 records in556+1 records out569864 bytes (570 kB, 557 KiB) copied, 2.31068 s, 247 kB/s[Done]
</pre>
 
[1] In case you have a different size, you'll need to change the <code>sfdisk</code> parameters accordingly.
<pre>
mkimage -A ARM -T script -C none -n AXELDESK-Lite-DESKMX6-SBCX L -d bootscript.txt boot.scr
</pre>
8,226
edits