Open main menu

DAVE Developer's Wiki β

Changes

DESK-MX6-L/Development/How to create a bootable microSD card

1,760 bytes added, 09:32, 23 October 2020
no edit summary
[1] In case you have a different size, you'll need to change the <code>sfdisk</code> parameters accordingly.
 
===Binary images on SD card - bootscr ===
 
Once you got the new binaries compiled from your modified sources, they have to be installed on first SD partition preserving the original file names used into <i>boot.scr</i> u-boot bootscript.
 
Here below there is an example on how to create a <code>boot.scr</code> file from the '''bootscript.txt''' for booting from SD card:
 
''TBD: bootscript.txt dump''
 
<pre>
echo 'bootscript generated with command "mkimage -A ARM -T script -C none -n AXEL-Lite-DESK-SBCX -d bootscript.txt boot.scr"'
 
setenv desk_release 'desk-mx6-l-1.0.0'
 
if test 0x${cb_configid#} = 0x00000012;
then
if test ${cpu} = 6DL; then
setenv fdtfile ${desk_release}_imx6dl-sbcx-cb0012.dtb
else
setenv fdtfile ${desk_release}_imx6q-sbcx-cb0012.dtb
fi
elif test 0x${cb_configid#} = 0x00000013;
then
if test ${cpu} = 6DL; then
setenv fdtfile ${desk_release}_imx6dl-sbcx-cb0013.dtb
else
setenv fdtfile ${desk_release}_imx6q-sbcx-cb0013.dtb
fi
elif test 0x${cb_configid#} = 0xffffffff;
then
if test ${cpu} = 6DL; then
setenv fdtfile ${desk_release}_imx6dl-desk-l-2.0.0.dtb
else
setenv fdtfile ${desk_release}_imx6q-desk-l-2.0.0.dtb
fi
else
echo Invalid CB! Autoreset ...
sleep 30
reset
fi
 
setenv bootfile ${desk_release}_uImage
 
setenv mmc_loadk 'fatload mmc ${mmcdev}:1 ${loadaddr} ${bootfile}'
setenv mmc_loadfdt 'fatload mmc ${mmcdev}:1 ${fdtaddr} ${fdtfile}'
 
echo Booting AxelLite-DESK-SBCX via mmcboot with ${fdtfile} as device tree
 
run mmcboot
 
echo mmcboot FAILURE
</pre>
 
and compile it using:
 
<pre>
mkimage -A ARM -T script -C none -n AXEL-Lite-DESK-SBCX -d bootscript.txt boot.scr
</pre>
 
Then copy the ''boot.scr'' into the <code><binaries_dir></code> directories used by the script to create the SD card.
----
[[Category:AXEL Lite]]
8,226
edits