Difference between revisions of "IoTGateway/BSP/Linux/iMX6/FAQ"

From ESS-WIKI
Jump to: navigation, search
Line 58: Line 58:
 
*#prewritten script, mksd-linux.sh (extracted from [[Media:mksd-linux.sh.gz|mksd-linux.sh.gz]])
 
*#prewritten script, mksd-linux.sh (extracted from [[Media:mksd-linux.sh.gz|mksd-linux.sh.gz]])
 
*#the built sdcard image <sub>([[IoTGateway/BSP/Linux/iMX6/Yocto_LBV3_User_Guide#To_build_sdcard_image|LBV3]]) ([[IoTGateway/BSP/Linux/iMX6/Yocto_LBV5_User_Guide#To_build_sdcard_image|LBV5]]) ([[IoTGateway/BSP/Linux/iMX6/Yocto_LBV6_User_Guide#To_build_sdcard_image|LBV6]])</sub> (e.g. fsl-image-qt5-imx6qrsb4410a1.sdcard)
 
*#the built sdcard image <sub>([[IoTGateway/BSP/Linux/iMX6/Yocto_LBV3_User_Guide#To_build_sdcard_image|LBV3]]) ([[IoTGateway/BSP/Linux/iMX6/Yocto_LBV5_User_Guide#To_build_sdcard_image|LBV5]]) ([[IoTGateway/BSP/Linux/iMX6/Yocto_LBV6_User_Guide#To_build_sdcard_image|LBV6]])</sub> (e.g. fsl-image-qt5-imx6qrsb4410a1.sdcard)
*#3700MB more available disk space for LIV disk image (e.g. 4410A1LIV6000.img)
+
*#5GB more available disk space for LIV disk image (e.g. 4410A1LIV6000.img & 4410A1LIV6000.img.gz)
 
 
 
*Commands
 
*Commands
 
<div style="margin-left: 3em"><syntaxhighlight lang="bash">
 
<div style="margin-left: 3em"><syntaxhighlight lang="bash">
Line 77: Line 76:
 
w
 
w
 
EOF
 
EOF
$ sudo e2fsck -f ${LODEV}p2
+
$ sudo losetup -d ${LODEV}
$ sudo resize2fs ${LODEV}p2
+
$ sudo losetup -o $((24576*512)) ${LODEV} ${LIV}
$ mkdir -p ~/mnt/p2
+
 
$ sudo mount ${LODEV}p2 ~/mnt/p2
+
$ sudo e2fsck ${LODEV}
$ sudo mkdir ~/mnt/p2/{mk_inand,image}
+
$ sudo resize2fs ${LODEV}
$ sudo cp ${MKSD} ~/mnt/p2/mk_inand/
+
$ mkdir -p ~/mnt
$ sudo chmod +x ~/mnt/p2/mk_inand/${MKSD}
+
$ sudo mount ${LODEV} ~/mnt
$ sudo cp ${SDCARD} ~/mnt/p2/image/
+
$ sudo mkdir ~/mnt/{mk_inand,image}
$ sudo umount ~/mnt/p2
+
$ sudo cp ${MKSD} ~/mnt/mk_inand/; sudo chmod +x ~/mnt/mk_inand/${MKSD}
 +
$ sudo cp ${SDCARD} ~/mnt/image/
 +
$ sudo umount ~/mnt
 
$ sudo losetup -d ${LODEV}
 
$ sudo losetup -d ${LODEV}
 
$ gzip -c9 ${LIV} > ${LIV}.gz
 
$ gzip -c9 ${LIV} > ${LIV}.gz

Revision as of 06:20, 3 November 2016


Compiling

U-boot

Please refer to the following sections for details

  • Getting Started / Build Instructions / To build u-boot (LBV3) (LBV5) (LBV6)
  • Customization / Building & updating u-boot manually (LBV3) (LBV5) (LBV6)

Kernel

Please refer to the following sections for details

  • Getting Started / Build Instructions / To build linux kernel (LBV3) (LBV5) (LBV6)
  • Customization / Building & updating kernel/modules/dtb manually (LBV3) (LBV5) (LBV6)

U-boot

Kernel

In Yocto Project, it is called "boot splashscreen", please refer to the each BSP's corresponding official Yocto website (list as below) for details

  • Yocto Project Reference Manual / Other Tips. (LBV3) (LBV5) (LBV6)

SDcard image

To build from prebuilt image, please refer to the following sections for details.

  • Getting Started / Introducing BSP / Prebuilt image (LBV3) (LBV5) (LBV6)

To build from BSP, please refer to the following sections for details.

  • Getting Started / Build Instructions / To build sdcard image (LBV3) (LBV5) (LBV6)

How To Stress Test On a Linux

Perform the command as below:

stress -c 4 -i 4  -d 1 --hdd-bytes 512


How To Create One LIV Disk Image of SD Card

The LIV disk image of SD card is used to boot target device up and to install the entire system to on-baord eMMC.

  • Prerequisites
    1. one free loop device with partition support
    2. prewritten script, mksd-linux.sh (extracted from mksd-linux.sh.gz)
    3. the built sdcard image (LBV3) (LBV5) (LBV6) (e.g. fsl-image-qt5-imx6qrsb4410a1.sdcard)
    4. 5GB more available disk space for LIV disk image (e.g. 4410A1LIV6000.img & 4410A1LIV6000.img.gz)
  • Commands
$ LODEV=$(sudo losetup -f)
$ MKSD=mksd-linux.sh; gunzip -c mksd-linux.sh.gz > ${MKSD}
$ SDCARD=fsl-image-qt5-imx6qrsb4410a1.sdcard
$ LIV=4410A1LIV6000.img; cp ${SDCARD} ${LIV}; dd if=/dev/zero of=${LIV} bs=1M seek=3700 count=0
$ sudo losetup ${LODEV} ${LIV}
$ cat << EOF | sudo fdisk -u ${LODEV}
d
2
n
p
2
24576

w
EOF
$ sudo losetup -d ${LODEV}
$ sudo losetup -o $((24576*512)) ${LODEV} ${LIV}

$ sudo e2fsck ${LODEV}
$ sudo resize2fs ${LODEV}
$ mkdir -p ~/mnt
$ sudo mount ${LODEV} ~/mnt
$ sudo mkdir ~/mnt/{mk_inand,image}
$ sudo cp ${MKSD} ~/mnt/mk_inand/; sudo chmod +x ~/mnt/mk_inand/${MKSD}
$ sudo cp ${SDCARD} ~/mnt/image/
$ sudo umount ~/mnt
$ sudo losetup -d ${LODEV}
$ gzip -c9 ${LIV} > ${LIV}.gz

Other Features