Open main menu

DAVE Developer's Wiki β

Changes

How to create a bootable microSD card (XUELK)

211 bytes added, 08:47, 11 March 2021
no edit summary
This article shows how to create a bootable microSD card for the [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)|XUELK]] kit by using a simple bash script. The procedure has been tested on a Linux PC running Ubuntu LTS (>=12 .04) distribution with
*a 16 GB microSD card [1]
*the binary files delivered along with the [[AXEL_ULite_and_SBC_Lynx_Embedded_Linux_Kit_(XUELK)#Downloadable_binary_images|XUELK 1.1.3]].
CYLINDERS=`echo $SIZE/255/63/512 | bc`
# check if we're running an old (e.g. 2.20.x) or new (e.g. 2.24.x) sfdisk
sfdisk --help | grep -- -H
 
if [ "$?" -eq "0" ]
then
{
echo 10,1380,0x0c,*
echo 1390,,83,-
} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
else
{
echo 1010M,13804086M,0x0c,* echo 13904096M,,83,-} | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVEsudo fi partprobe 
echo "[Making filesystems...]"
<pre>
sysadmin@stagesw:~/devel/sbclynx/uSD$ sudo ./mksd.sh /dev/sdc xuelk-1.1.3/xuelk-1.1.2_mx6ul_lynx_u-boot.imx xuelk-1.1.3 xuelk-1.1.3/xuelk-1.1.3_lynx-image-networking-sbc-lynx.tar.bz2
[sudo] password for sysadmin:
All data on /dev/sdc now will be destroyed! Continue? [y/n]
[Done]
</pre>
 
[1] In case you have a different size, you'll need to change the <code>sfdisk</code> parameters accordingly.
8,226
edits