Open main menu

DAVE Developer's Wiki β

Changes

no edit summary
! colspan="4" style="width:100%; text-align:left" ; border-bottom:solid 2px #ededed" |History
|-
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Version
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Issue Date
! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#73B2C7; padding:5px; color:white" |Notes
|-
| 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{{oldid| 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" 14119|Jun 2021/07/16}}
| 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
|-
| 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" |{{oldid|16989|2022/03/04}}| 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" |DESK-MX6-L 3.0.0release| -! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fbededed; padding:5px; color:#000000" |Feb 20222023/04/27| ! style="border-left:solid 2px #73B2C7; border-right:solid 2px #73B2C7;border-top:solid 2px #73B2C7; border-bottom:solid 2px #73B2C7; background-color:#edf8fbededed; padding:5px; color:#000000" |3DESK-MX6-L 4.0.0 DESK release|-
|}
<section end="History" />
'''Note:''' Starting from '''DESK-MX6-L 1.0.0''' release the support for the SPL has been introduced in U-Boot. Previous versions of this script will no longer produce a fully functional and bootable microSD card. <br>
The procedure has been tested on a MVM released with '''DESK-MX6-L 34.0.0''' release with *a 16 32 GB microSD card [1]
*a USB SD card reader
*the binary files delivered along with the [[DESK-MX6-L/General/Release_Notes#Downloadable_binary_images_2Downloadable_binary_images|DESK-MX6-L 34.0.0]].
The resulting card is partitioned as depicted here below:
mkfs.vfat -F 32 -n BOOT "$DRIVE$PART"1 #> /dev/null
mkfs.ext3 -F -L ROOTFS "$DRIVE$PART"2 #> /dev/null
 
# wait for the VM to recognize the uSD
sleep 60
echo "[Copying files...]"
Here is an example that shows how to use this script. We use here files delivered with [[DESK-MX6-L/General/Release_Notes#Downloadable_binary_images_2Downloadable_binary_images|DESK-MX6-L 34.0.0]] release. Before invoking the script, the following files has to be renamed in order to make them compatible with the default U-Boot environment variables:
* bootscript: <code>boot.scr</code>
* splash image: <code>splash_image.bmp</code>
* Linux kernel: <code>desk-mx6-l-34.0.0_uImage</code>* Device tree blob: <code>desk-mx6-l-34.0.0_imx6dl-sbcx-cb0012.dtb</code>. In the case of you don't have some file on MVM, please download it from [https://mirror.dave.eu/desk-mx-l/ mirror.dave.eu].
We will copy them into <code>~/desk-mx-l/desk</code> directory. Needed binary files can be found on <code>MVM</code> in the following location:
<pre>
dvdk@vagrant:~$ ll /tftpboot/desk-mxmx6-l/total 1161611360drwxr-xr-x 2 dvdk root 4096 Feb 24 13Apr 3 17:11 57 ./drwxr-xr-x 3 dvdk root 4096 Feb 24 13Apr 4 07:08 16 ../-rw-r--r-- 1 dvdk root 51910 Feb 24 1352247 Apr 3 17:10 38 desk-mx6-l-34.0.0_imx6dl-sbcx-cb0012.dtb-rw-r--r-- 1 dvdk root 52223 Feb 24 1352560 Apr 3 17:10 38 desk-mx6-l-34.0.0_imx6dl-sbcx-cb0013.dtb-rw-r--r-- 1 dvdk root 51824 Feb 24 1352161 Apr 3 17:10 38 desk-mx6-l-34.0.0_imx6dl-sbcx-cb0018.dtb-rw-r--r-- 1 dvdk root 52894 Feb 24 1353231 Apr 3 17:10 38 desk-mx6-l-34.0.0_imx6dl-sbcx-cb0050.dtb-rw-r--r-- 1 dvdk root 52199 Feb 24 1352536 Apr 3 17:10 38 desk-mx6-l-34.0.0_imx6dl-sbcx-cb0055.dtb-rw-r--r-- 1 dvdk root 48399 Feb 24 1348736 Apr 3 17:10 38 desk-mx6-l-34.0.0_imx6dl-xelk-l.dtb-rw-r--r-- 1 dvdk root 53187 Feb 24 1353524 Apr 3 17:10 38 desk-mx6-l-34.0.0_imx6q-sbcx-cb0012.dtb-rw-r--r-- 1 dvdk root 53496 Feb 24 1353833 Apr 3 17:10 38 desk-mx6-l-34.0.0_imx6q-sbcx-cb0013.dtb-rw-r--r-- 1 dvdk root 49840 Feb 24 1350177 Apr 3 17:10 38 desk-mx6-l-34.0.0_imx6q-xelk-l-2-0-0.dtb-rw-r--r-- 1 dvdk root 49672 Feb 24 1350009 Apr 3 17:11 38 desk-mx6-l-34.0.0_imx6q-xelk-l.dtb-rw-r--r-- 1 dvdk root 60416 Feb 24 1356320 Apr 3 17:08 38 desk-mx6-l-34.0.0_mx6qdldesk_nand_SPL0_mx6qdldesk_SPL-rw-r--r-- 1 dvdk root 56320 Apr 625300 Feb 24 133 17:08 38 desk-mx6-l-34.0.0_mx6qdldesk_nand_u-boot.img0_mx6qdldesk_nand_SPL-rw-r--r-- 1 dvdk root 60416 Feb 24 13 576288 Apr 3 17:08 38 desk-mx6-l-34.0.0_mx6qdldesk_spi_SPL0_mx6qdldesk_nand_u-boot.img-rw-r--r-- 1 dvdk root 56320 Apr 602668 Feb 24 133 17:08 38 desk-mx6-l-34.0.0_mx6qdldesk_spi_u-boot.img0_mx6qdldesk_spi_SPL-rw-r--r-- 1 dvdk root 60416 Feb 24 13 554004 Apr 3 17:08 38 desk-mx6-l-34.0.0_mx6qdldesk_SPL0_mx6qdldesk_spi_u-boot.img-rw-r--r-- 1 dvdk root 624932 Feb 24 13576000 Apr 3 17:08 38 desk-mx6-l-34.0.0_mx6qdldesk_u-boot.img-rw-r--r-- 1 dvdk root 8154280 Feb 24 138038640 Apr 3 17:10 38 desk-mx6-l-34.0.0_uImage-rw-r--r-- 1 dvdk root 1152054 Feb 24 13Apr 3 17:08 38 splash_image.bmpdvdk@vagrant:~$ ll ~/desk-mx-l/desk-mx6-l-34.0.0_boot.scr -rw-rw-r-- 1 dvdk dvdk 1556 Feb 24 14Apr 3 17:43 57 /home/dvdk/desk-mx-l/desk-mx6-l-34.0.0_boot.scrdvdk@vagrant:~$ mkdir -p ~/desk-mx-l/desk/dvdk@vagrant:~$ cp /tftpboot/desk-mxmx6-l/desk-mx6-l-34.0.0_uImage ~/desk-mx-l/desk/desk-mx6-l-34.0.0_uImagedvdk@vagrant:~$ cp /tftpboot/desk-mxmx6-l/desk-mx6-l-34.0.0_imx6dl-sbcx-cb0012.dtb ~/desk-mx-l/desk/desk-mx6-l-34.0.0_imx6dl-sbcx-cb0012.dtbdvdk@vagrant:~$ cp ~/desk-mx-l/desk-mx6-l-34.0.0_boot.scr ~/desk-mx-l/desk/boot.scrdvdk@vagrant:~$ cp /tftpboot/desk-mxmx6-l/splash_image.bmp ~/desk-mx-l/desk/dvdk@vagrant:~$ cp ~/desk-mx-l/rfs/desk-mx6-l-4.0.0_modules.tar.gz ~/desk-mx-l/desk/
</pre>
*Archive of the target's root file system (compressed as <code>.tar.bz2</code> file).
<pre>
dvdk@vagrant:~/desk-mx-l$ umount /dev/sdb*dvdk@vagrant:~/desk-mx-l$ sudo ./desk-mx6-l-34.0.0_mksd.sh /dev/sdb /tftpboot/desk-mxmx6-l/desk-mx6-l-34.0.0_mx6qdldesk_u-boot.img /tftpboot/desk-mxmx6-l/desk-mx6-l-34.0.0_mx6qdldesk_SPL ~/desk-mx-l/desk ./rfs/desk-mx6-l-3.0.0_desk-image-qt5qt6-desk-mx6.tar.bz2
All data on /dev/sdb now will be destroyed! Continue? [y/n]
y
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 20.01554 228364 s, 520 kB4.6 MB/sDISK SIZE - 15931539456 31914983424 bytes
Checking that no-one is using this disk right now ... OK
Disk /dev/sdb: 1429.86 74 GiB, 15931539456 31914983424 bytes, 31116288 62333952 sectors
Disk model: Transcend
Units: sectors of 1 * 512 = 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
>>> Created a new DOS disklabel with disk identifier 0x40f56c1d0xeba9791f.
/dev/sdb1: Created a new partition 1 of type 'W95 FAT32 (LBA)' and of size 8 GiB.
/dev/sdb2: Created a new partition 2 of type 'Linux' and of size 621.9 7 GiB.
/dev/sdb3: Done.
New situation:
Disklabel type: dos
Disk identifier: 0xe38701f10xeba9791f
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 32768 16777215 16744448 8G c W95 FAT32 (LBA)
/dev/sdb2 16777216 62333951 45556736 21.7G 83 Linux
 
New situation:
Disklabel type: dos
Disk identifier: 0x40f56c1d
 
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.
mkfs.fat 4.1 (2017-01-24)
mke2fs 1.45.5 (07-Jan-2020)
Creating filesystem with 1792384 5694592 4k blocks and 448800 1425408 inodesFilesystem UUID: 969ecf692b7edb0e-e872b75b-47094685-b32587b9-627b3d1c92011933bfd0c8f0
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 32768 blocks): doneWriting superblocks and filesystem accounting information: done
[Copying files...]
'/home/dvdk/desk-mx-l/desk/boot.scr' -> '/mnt/boot.scr'
'/home/dvdk/desk-mx-l/desk/desk-mx6-l-34.0.0_imx6dl-sbcx-cb0012.dtb' -> '/mnt/desk-mx6-l-34.0.0_imx6dl-sbcx-cb0012.dtb''/home/dvdk/desk-mx-l/desk/desk-mx6-l-34.0.0_uImage' -> '/mnt/desk-mx6-l-34.0.0_uImage'
'/home/dvdk/desk-mx-l/desk/splash_image.bmp' -> '/mnt/splash_image.bmp'
[Extracting rfs (this may take a while...)]
[Programming SPL]
118110+0 records in118110+0 records out60416 56320 bytes (60 56 kB, 59 55 KiB) copied, 0.129522 0340295 s, 466 kB1.7 MB/s
[Programming u-boot.img]
610562+1 records in610562+1 records out624932 576000 bytes (625 576 kB, 610 562 KiB) copied, 10.84936 201931 s, 338 kB2.9 MB/s
[Done]
</pre>
<pre>
'V��3Fb���6"�DESK-MX6-L�echo echo 'bootscript generated with command "mkimage -A ARM -T script -C none -n DESK-MX6-L -d bootscript.txt boot.scr"'
setenv desk_release 'desk-mx6-l-34.0.0'
if test 0x${cb_configid#} = 0x000000120x00000002;
then
if test ${cpu} = 6DL; then setenv fdtfile ${desk_release}_imx6dl-sbcx-cb0012.dtb else setenv fdtfile ${desk_release}_imx6q-sbcx-cb0012.dtb fielif test 0x${cb_configid#} = 0x000000130x00000003;
then
if test ${cpu} = 6DL; then setenv fdtfile ${desk_release}_imx6dl-sbcx-cb0013cb0003.dtb else setenv fdtfile ${desk_release}_imx6q-sbcx-cb0013cb0003.dtb fielif test 0x${cb_configid#} = 0x000000010x00000012;
then
if test ${cpu} = 6DL; then setenv fdtfile ${desk_release}_imx6dl-xelksbcx-lcb0012.dtb else setenv fdtfile ${desk_release}_imx6q-xelksbcx-lcb0012.dtb fielif test 0x${cb_configid#} = 0x000000180x00000013;
then
if test ${cpu} = 6DL; then setenv fdtfile ${desk_release}_imx6dl-sbcx-cb0018cb0013.dtb else setenv fdtfile ${desk_release}_imx6q-sbcx-cb0013.dtb fielif test 0x${cb_configid#} = 0x000000500x00000077;
then
if test ${cpu} = 6DL; then setenv fdtfile ${desk_release}_imx6dl-sbcx-cb0050cb0077.dtb else setenv fdtfile ${desk_release}_imx6q-sbcx-cb0077.dtb fielif test 0x${cb_configid#} = 0x000000550x00000001;
then
if test ${cpu} = 6DL; then setenv fdtfile ${desk_release}_imx6dl-sbcxxelk-l.dtb else setenv fdtfile ${desk_release}_imx6q-xelk-cb0055l.dtb fi
elif test 0x${cb_configid#} = 0xffffffff;
then
setenv fdtfile ${desk_release}_imx6q-xelk-l-2-0-0.dtb
else
echo Invalid CB! Autoreset ...
sleep 30
reset
fi
setenv bootfile ${desk_release}_uImageuImage
setenv mmc_loadk 'fatload mmc ${mmcdev}:1 ${loadaddr} ${bootfile}'
setenv mmc_loadfdt 'fatload mmc ${mmcdev}:1 ${fdtaddr} ${fdtfile}'
echo Booting DESK-MX6-L via mmcboot with ${fdtfile} as device tree
run mmcboot
Then copy the ''boot.scr'' into the <code><binaries_dir></code> directories used by the script to create the SD card.
 
===Install Module===
 
To install kernel modules, follow the steps below.
 
<pre>
root@desk-mx6:~# sudo mount /dev/mmcblk0p1 /media
root@desk-mx6:~# tar xvzf /media/desk-mx6-l-4.0.0_modules.tar.gz -C /
</pre>
 
After installation, run the following command to verify that the installation was successful:
 
<pre>
root@desk-mx6:~# ls -l /lib/modules/$(uname -r)
total 304
lrwxrwxrwx 1 541 502 63 Apr 3 2023 build -> /home/jenkins/workspace/workspace/DESK-MX6-L-4.x.x_Linux-kernel
drwxr-xr-x 6 541 502 4096 Apr 3 2023 kernel
-rw-r--r-- 1 541 502 2812 Apr 3 2023 modules.alias
-rw-r--r-- 1 541 502 4926 Apr 3 2023 modules.alias.bin
-rw-r--r-- 1 541 502 15368 Apr 3 2023 modules.builtin
-rw-r--r-- 1 541 502 35496 Apr 3 2023 modules.builtin.alias.bin
-rw-r--r-- 1 541 502 17986 Apr 3 2023 modules.builtin.bin
-rw-r--r-- 1 541 502 107589 Apr 3 2023 modules.builtin.modinfo
-rw-r--r-- 1 541 502 10767 Apr 3 2023 modules.dep
-rw-r--r-- 1 541 502 21773 Apr 3 2023 modules.dep.bin
-rw-r--r-- 1 541 502 0 Apr 3 2023 modules.devname
-rw-r--r-- 1 541 502 8733 Apr 3 2023 modules.order
-rw-r--r-- 1 541 502 85 Apr 3 2023 modules.softdep
-rw-r--r-- 1 541 502 16970 Apr 3 2023 modules.symbols
-rw-r--r-- 1 541 502 23964 Apr 3 2023 modules.symbols.bin
lrwxrwxrwx 1 541 502 63 Apr 3 2023 source -> /home/jenkins/workspace/workspace/DESK-MX6-L-4.x.x_Linux-kernel
</pre>
 
=== Attention !===
* <code>/home/dvdk/desk-mx-l/desk-mx6-l-34.0.0_boot.scr</code> has been generated using the images available at the moment of VM creation: please, use the previous indication as an example on how to create a '''proper''' bootscript for your own purposes* <code>/home/dvdk/desk-mx-l/desk-mx6-l-34.0.0_mksd.sh</code> bash script has been validated using a single SD card version: the size of the partitions and the related ''sfdisk'' parameters have to be properly modified according to your own SD card used and to your partitions specification. You can use it an an example to be modified according your use case
----
[[Category:AXEL Lite]]
8,226
edits