Difference between revisions of "Linux BSP build User Guide (LSDK20.12)"

From ESS-WIKI
Jump to: navigation, search
(Build Images)
 
(59 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
 
== Linux BSP Version ==
 
== Linux BSP Version ==
  
Line 7: Line 8:
 
== Released Image ==
 
== Released Image ==
  
*[[OS_Support_List_(based_on_Ubutu_18.04)|OS Support List (based on Ubuntu 18.04)]]
+
*[[OS_Support_List_(based_on_Ubutu_18.04)|OS Support List (based on Ubuntu 18.04)]]  
  
 
== Download flex-installer ==
 
== Download flex-installer ==
Line 15: Line 16:
  
 
<span style="font-size:larger;">'''If you don't have docker in your system, then you can follow the below &nbsp;steps to install docker and run it first.'''</span>
 
<span style="font-size:larger;">'''If you don't have docker in your system, then you can follow the below &nbsp;steps to install docker and run it first.'''</span>
 
'''Log in to a Docker registry'''
 
<pre>  $ docker login -u advcus -p iTk7Sy9OQVQCkN2FPKw=Om8mfwfZQqKi riscswacr.azurecr.io</pre>
 
  
 
'''Pull Ubuntu 18.04 from Azure Container Registry'''
 
'''Pull Ubuntu 18.04 from Azure Container Registry'''
Line 23: Line 21:
  
 
'''Run/Create&nbsp;Docker Container'''
 
'''Run/Create&nbsp;Docker Container'''
<pre>  $ docker run -it --name ${CONTAINER_NAME} --privileged -v ${WORK_SPACE}:/home/adv/flexbuild_lsdk2012:rw riscswacr.azurecr.io/u18.04-ls1046albv1 /bin/bash</pre>
+
<pre>  $ docker run -it --name ${CONTAINER_NAME} --privileged -v ${WORK_SPACE}:/home/adv/flexbuild_lsdk2012:rw riscswacr.azurecr.io/u18.04-ls1046albv1 /bin/bash
 +
</pre>
  
 +
&nbsp;
  
 +
&nbsp;
 +
 +
&nbsp;
  
 
== Get BSP ==
 
== Get BSP ==
Line 36: Line 39:
 
<pre>    $ cd adv-release-bsp
 
<pre>    $ cd adv-release-bsp
 
     $ git clone https://AIM-Linux@dev.azure.com/AIM-Linux/flexbuild_lsdk2012/_git/flexbuild_lsdk2012
 
     $ git clone https://AIM-Linux@dev.azure.com/AIM-Linux/flexbuild_lsdk2012/_git/flexbuild_lsdk2012
</pre>
+
    $ cd flexbuild_lsdk2012
 +
    $ git checkout ${MACH_TAG}</pre>
 +
 
 +
&nbsp; &nbsp; ${MACH_TAG} can refer the field '''"Download TAG"''' in [[OS_Support_List_(based_on_Ubutu_18.04)|LS1046/OS_Support_List_(based_on_Ubuntu 18.04)]]
 +
 
 +
&nbsp; &nbsp; For example '''"git checkout ls1046aLBA8720P100011"'''
 +
 
 +
== Product ==
 +
 
 +
ROM-8720S1
 +
 
 +
ROM-8720P1
 +
 
 +
*Following we will take ROM-8720S1 as an example in Build/Flash Image sections.
 +
 
 +
== Boot Mode ==
 +
 
 +
{| border="1" cellpadding="1" cellspacing="1" style="width:500px;"
 +
|-
 +
| style="text-align: center;" | QSPI Mode
 +
| style="text-align: center;" | MMC mode
 +
|-
 +
| style="text-align: center;" | [[File:LS1046A bootmode qspi.jpg|RTENOTITLE]]
 +
| style="text-align: center;" | [[File:LS1046A bootmode emmc.jpg|RTENOTITLE]]
 +
|}
 +
 
 +
 
 +
== Build Images ==
 +
 
 +
These commands are execute in Docker environment.
 +
 
 +
'''Available Machine Name'''
 +
 
 +
ls1046arom8720_s1
 +
 
 +
ls1046arom8720_p1
 +
 
 +
ls1046arom8720_s1_16G
 +
 
 +
ls1046arom8720_p1_16G
  
'''Build Images'''
+
'''Composite Firmware'''
  
&nbsp; &nbsp; These commands are execute in Docker environment.
+
Type with&nbsp;QSPI, eMMC and&nbsp;SD
 
<pre>    $ cd flexbuild_lsdk2012
 
<pre>    $ cd flexbuild_lsdk2012
 
     $ source setup.env
 
     $ source setup.env
     $ flex-builder -i mkfw -m ls1046ardb -b sd
+
     $ flex-builder -i mkfw -m ls1046arom8720_s1 -b qspi
     $ flex-builder -i mkrfs -a arm64
+
     $ flex-builder -i mkfw -m ls1046arom8720_s1 -b emmc
     $ flex-builder -i mkbootpartition -a arm64</pre>
+
     $ flex-builder -i mkfw -m ls1046arom8720_s1 -b sd
 +
</pre>
  
 +
'''Root File System'''
 +
<pre>    $ flex-builder -i mkrfs -m ls1046arom8720_s1 -r ubuntu:main -a arm64</pre>
  
 +
'''Boot Partition'''
 +
<pre>    $ flex-builder -i mkbootpartition -a arm64</pre>
  
'''Flash&nbsp; Images (In Local Host)'''
+
&nbsp;
  
'''&nbsp; &nbsp;&nbsp;'''The&nbsp;following example&nbsp;is for sd card&nbsp;:
+
&nbsp;
 +
 
 +
&nbsp;
 +
 
 +
== Build Failed Case ==
 +
 
 +
{| border="1" cellpadding="1" cellspacing="1" style="width: 1596px;"
 +
|-
 +
| style="width: 40px;" | #
 +
| style="width: 181px;" | Issue&nbsp;description
 +
| style="width: 273px;" | Solution
 +
| style="width: 1293px;" | Notes
 +
|-
 +
| style="width: 40px;" | 1
 +
| style="width: 181px;" | NXP change repository from codeaurora to github
 +
| style="width: 273px;" | Add correct repo url to configs/build_lsdk.cfg
 +
| style="width: 1293px;" |
 +
[[File:LS1046a-CST-build-failed.png|1000x100px|RTENOTITLE]]
 +
 
 +
[[File:LS1046a-CST-build-failed-Solve.png|1200x150px|LS1046a-CST-build-failed-Solve.png]]
 +
 
 +
|-
 +
| style="width: 40px;" | &nbsp;
 +
| style="width: 181px;" | &nbsp;
 +
| style="width: 273px;" | &nbsp;
 +
| style="width: 1293px;" | &nbsp;
 +
|}
 +
 
 +
&nbsp;
 +
 
 +
== Flash Images to SD/USB ==
 +
 
 +
These operations process in linux local host
 +
 
 +
'''Bootable SD card&nbsp;:'''
 
<pre>    $ cd adv-release-bsp/flexbuild_lsdk2012/build/images/
 
<pre>    $ cd adv-release-bsp/flexbuild_lsdk2012/build/images/
 
     $ flex-installer -i pf -d /dev/sda
 
     $ flex-installer -i pf -d /dev/sda
     $ flex-installer -f firmware_ls1046ardb_uboot_sdboot.img -b bootpartition_LS_arm64_lts_5.4_xxxxxxxxxxxx.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.tgz -d /dev/sda
+
     $ flex-installer -f firmware_ls1046arom8720_s1_uboot_sdboot.img -b bootpartition_LS_arm64_lts_5.4_xxxxxxxxxxxx.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.tgz -d /dev/sda
 +
    $ sync</pre>
 +
 
 +
'''Rootfs and Boot-Partition in USB'''
 +
<pre>    $ cd adv-release-bsp/flexbuild_lsdk2012/build/images/
 +
    $ flex-installer -i pf -d /dev/sdx
 +
    $ flex-installer -b bootpartition_LS_arm64_lts_5.4_xxxxxxxxxxxx.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.tgz -d /dev/sdx
 +
&nbsp;  $ sync
 
</pre>
 
</pre>
  
 +
&nbsp;
 +
 +
== Flash Image to&nbsp;eMMC ==
  
 +
'''Step 1. Burn In Boot-Loader to QSPI Flash'''
  
 +
&nbsp; &nbsp; You need a bootable SD card&nbsp;(follow above section), and&nbsp;switch boot mode&nbsp;to SD&nbsp;mode.
  
 +
&nbsp; &nbsp; Insert your SD card and follow below flow&nbsp;in U-boot console.
  
== How to Flash eMMC ==
+
&nbsp; &nbsp;'''Set FTP Server IP'''
 +
<pre>  $ setenv serverip 172.22.31.153</pre>
  
'''Boot Mode'''
+
&nbsp; &nbsp; '''Request IP Address'''
 +
<pre>    $ dhcp</pre>
  
{| border="1" cellspacing="1" cellpadding="1" style="width:500px;"
+
&nbsp; &nbsp; '''Try to Ping FTP Server'''
|-
+
<pre>    $ ping 172.22.31.153</pre>
| style="text-align: center;" | QSPI Mode
+
 
| style="text-align: center;" | MMC mode
+
&nbsp; &nbsp; '''Load U-boot Firmware Image'''
|-
+
<pre>    $ tftp $load_addr firmware_ls1046arom8720_s1_uboot_qspiboot.img</pre>
| style="text-align: center;" | <br/>
+
 
| <br/>
+
&nbsp; &nbsp; '''Install Image to QSPI (32MB)'''
|}
+
<pre>    $ sf probe 0:0
 +
    $ sf erase 0 0x2000000 && sf write $load_addr 0 0x2000000</pre>
 +
 
 +
&nbsp; &nbsp; Shutdown, unplug SD card, switch to QSPI mode, plugin the prepared USB disk&nbsp;and power on the board again.
 +
 
 +
&nbsp; &nbsp; '''Boot into U-boot console again and flush the eMMC'''
 +
<pre>    $ mmc erase 0 0x8000
 +
    $ boot
 +
</pre>
 +
 
 +
&nbsp; &nbsp; Boot into rootfs with&nbsp;USB disk
 +
 
 +
&nbsp; &nbsp; '''Create FTP Temp Folder'''
 +
<pre>    $ mkdir /media/mytftp
 +
    $ cd /media/mytftp</pre>
 +
 
 +
&nbsp; &nbsp; '''Request IP Address'''
 +
 
 +
'''&nbsp; &nbsp; '''The network interface in here is fml-mac9&nbsp;:
 +
<pre>    $ ifconfig fm1-mac9 up
 +
    $ dhclient -i fm1-mac9
 +
    $ ping 172.22.31.153</pre>
 +
 
 +
&nbsp; &nbsp; '''Download Images from FTP'''
 +
<pre>    $ tftp -m binary 172.22.31.153 -c get "bootpartition_LS_arm64_lts_5.4_xxxxxxxxxxxx.tgz"
 +
    $ tftp -m binary 172.22.31.153 -c get "firmware_ls1046arom8720_s1_uboot_emmcboot.img"
 +
    $ tftp -m binary 172.22.31.153 -c get "rootfs_lsdk2012_ubuntu_main_arm64.tgz"
 +
</pre>
 +
 
 +
&nbsp; &nbsp;'''Initial eMMC Partitions'''
 +
<pre>    $ flex-installer -i pf -d /dev/mmcblk0</pre>
 +
 
 +
&nbsp; &nbsp;'''Install Images'''
 +
<pre>    $ flex-installer -f firmware_ls1046arom8720_s1_uboot_emmcboot.img -b bootpartition_LS_arm64_lts_5.4_xxxxxxxxxxxx.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.tgz -d /dev/mmcblk0
 +
    $ sync
 +
</pre>
 +
 
 +
&nbsp; &nbsp; *&nbsp;'''Finally, shutdown and restart after switch boot mode back to SD mode.'''
 +
 
 +
&nbsp;
 +
 
 +
== Program Boot-Loader ==
 +
 
 +
After flash eMMC complete&nbsp;(by flex-installer).&nbsp;If you want to&nbsp;update boot-loader only, just put composite firmware image in your tftp path and execute following commands.
 +
<pre>    $ tftp $load_addr firmware_ls1046arom8720_s1_uboot_emmcboot.img
 +
    $ mmc dev 0
 +
    $ mmc write $load_addr 8 $IMAGE_SIZE</pre>
 +
 
 +
&nbsp; &nbsp;'''* IMAGE_SIZE = tftp-download-size&nbsp;/ 512 (block size)'''
 +
 
 +
== Linux Kernel and Device Tree Update ==
 +
 
 +
Compile kernel and device tree first&nbsp;:
 +
<pre>    $ flex-builder -c linux -a arm64</pre>
 +
 
 +
Copy image and dtb file to boot partition mount point&nbsp;:
 +
<pre>    $ cp linux/arch/arm64/boot/Image ${boot_partition}
 +
    $ cp linux/arch/arm64/boot/Image.gz ${boot_partition}
 +
    $ cp linux/arch/arm64/boot/dts/freescale/fsl-ls1046a-rom8720-s1.dtb ${boot_partition}
 +
    $ sync
 +
</pre>
 +
 
 +
&nbsp;
 +
 
 +
== Ethernet Phys Setting ==
 +
 
 +
'''Uboot Command&nbsp;:'''
 +
<pre>    $ setenv dtb xxxx.dtb
 +
    $ saveenv
 +
    $ boot</pre>
 +
 
 +
'''DTB File List ''':
 +
 
 +
&nbsp; &nbsp; AQR107&nbsp;:
 +
 
 +
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;fsl-ls1046a-rom8720-p1.dtb
 +
 
 +
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;fsl-ls1046a-rom8720-p1_16G.dtb
 +
 
 +
&nbsp; &nbsp; &nbsp; &nbsp; fsl-ls1046a-rom8720-s1.dtb
 +
 
 +
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;fsl-ls1046a-rom8720-s1_16G.dtb
 +
 
 +
&nbsp; &nbsp; AQR113C&nbsp;:
 +
 
 +
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;fsl-ls1046a-rom8720-p1-aqr-113c.dtb
 +
 
 +
&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;fsl-ls1046a-rom8720-s1-aqr-113c.dtb
 +
 
 +
&nbsp;
 +
 
 +
== System Recovery ==
 +
 
 +
This section provides detail procedures of restoring the eMMC image.
 +
 
 +
If you destroy the onboard flash image by accident, you can recover a system following these steps.
 +
 
 +
*<span style="font-size:larger;"><span style="color:#2980b9;">'''Recovery by SD card & USB disk'''</span></span>
 +
 
 +
&nbsp; 1. Copy&nbsp;8720S1AIM30UIV00009_2022-08-12_img.tar.gz package to&nbsp; your desktop.
 +
 
 +
&nbsp; 2. Insert SD card to PC
 +
 
 +
&nbsp; 3. Make a bootable sd card
 +
<pre>    $ tar xzvf 8720P1AIM30UIV00009_2022-08-12_img.tar.gz
 +
    $ cd ls1046arom8720_p1.out/
 +
    $ sudo flex-installer -i pf -d /dev/sdg
 +
    $ sudo flex-installer -f firmware_ls1046arom8720_p1_uboot_sdboot.img -b bootpartition_LS_arm64_lts_5.4_202208120200.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.sdcard.tgz -d /dev/sdg
 +
    $ sync
 +
 
 +
</pre>
 +
 
 +
&nbsp; 4. Insert USB disk to PC
 +
 
 +
&nbsp; 5. Burn root filesytem in&nbsp;USB disk
 +
<pre>    $ sudo flex-installer -i pf -d /dev/sdh
 +
    $ sudo flex-installer -b bootpartition_LS_arm64_lts_5.4_202208120200.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.sdcard.tgz -d /dev/sdh
 +
    $ sync
 +
</pre>
 +
 
 +
&nbsp; 6. Insert SD card and <span style="color:#c0392b;">Boot from SD</span>.
 +
 
 +
&nbsp; 7. Burn bootloader to QSPI
 +
<pre>    $ /usr/bin/flash_qspi.sh
 +
    $ sync</pre>
 +
 
 +
&nbsp; 8. Power down
 +
 
 +
&nbsp; 9. <span style="color:#2980b9;">Unplug SD card & Insert USB disk</span>
 +
 
 +
10. <span style="color:#c0392b;">Boot on QSPI mode</span>
 +
 
 +
11. Enter&nbsp;U-Boot console and&nbsp;force into USB root filesystem
 +
<pre>    $ (U-BOOT Console)
 +
    $ run bootcmd_usb0</pre>
 +
 
 +
12. Burn image&nbsp; to eMMC
 +
<pre>   $ /usr/bin/flash_emmc.sh
 +
    $ sync</pre>
 +
 
 +
13. Reboot by MMC mode (End)
 +
 
 +
&nbsp;

Latest revision as of 08:35, 2 June 2023

Linux BSP Version

Ubuntu 18.04

Kernel 5.4.47

Released Image

Download flex-installer

    $ wget https://www.nxp.com/lgfiles/sdk/lsdk2012/flex-installer && chmod +x flex-installer && sudo mv flex-installer /usr/bin

Build Environment on Host

If you don't have docker in your system, then you can follow the below  steps to install docker and run it first.

Pull Ubuntu 18.04 from Azure Container Registry

   $ docker pull riscswacr.azurecr.io/u18.04-ls1046albv1:latest

Run/Create Docker Container

   $ docker run -it --name ${CONTAINER_NAME} --privileged -v ${WORK_SPACE}:/home/adv/flexbuild_lsdk2012:rw riscswacr.azurecr.io/u18.04-ls1046albv1 /bin/bash

 

 

 

Get BSP

Download BSP from Azure DevOps

    The following example shows how to download the Advantech LSDK flexbuilder from DevOps. (Execute in Docker container)

    For this example, a directory called adv-release-bsp is created for the project.

    $ cd adv-release-bsp
    $ git clone https://AIM-Linux@dev.azure.com/AIM-Linux/flexbuild_lsdk2012/_git/flexbuild_lsdk2012
    $ cd flexbuild_lsdk2012
    $ git checkout ${MACH_TAG}

    ${MACH_TAG} can refer the field "Download TAG" in LS1046/OS_Support_List_(based_on_Ubuntu 18.04)

    For example "git checkout ls1046aLBA8720P100011"

Product

ROM-8720S1

ROM-8720P1

  • Following we will take ROM-8720S1 as an example in Build/Flash Image sections.

Boot Mode

QSPI Mode MMC mode
RTENOTITLE RTENOTITLE


Build Images

These commands are execute in Docker environment.

Available Machine Name

ls1046arom8720_s1

ls1046arom8720_p1

ls1046arom8720_s1_16G

ls1046arom8720_p1_16G

Composite Firmware

Type with QSPI, eMMC and SD

    $ cd flexbuild_lsdk2012
    $ source setup.env
    $ flex-builder -i mkfw -m ls1046arom8720_s1 -b qspi
    $ flex-builder -i mkfw -m ls1046arom8720_s1 -b emmc
    $ flex-builder -i mkfw -m ls1046arom8720_s1 -b sd

Root File System

    $ flex-builder -i mkrfs -m ls1046arom8720_s1 -r ubuntu:main -a arm64

Boot Partition

    $ flex-builder -i mkbootpartition -a arm64

 

 

 

Build Failed Case

# Issue description Solution Notes
1 NXP change repository from codeaurora to github Add correct repo url to configs/build_lsdk.cfg

RTENOTITLE

LS1046a-CST-build-failed-Solve.png

       

 

Flash Images to SD/USB

These operations process in linux local host

Bootable SD card :

    $ cd adv-release-bsp/flexbuild_lsdk2012/build/images/
    $ flex-installer -i pf -d /dev/sda
    $ flex-installer -f firmware_ls1046arom8720_s1_uboot_sdboot.img -b bootpartition_LS_arm64_lts_5.4_xxxxxxxxxxxx.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.tgz -d /dev/sda
    $ sync

Rootfs and Boot-Partition in USB

    $ cd adv-release-bsp/flexbuild_lsdk2012/build/images/
    $ flex-installer -i pf -d /dev/sdx
    $ flex-installer -b bootpartition_LS_arm64_lts_5.4_xxxxxxxxxxxx.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.tgz -d /dev/sdx
    $ sync

 

Flash Image to eMMC

Step 1. Burn In Boot-Loader to QSPI Flash

    You need a bootable SD card (follow above section), and switch boot mode to SD mode.

    Insert your SD card and follow below flow in U-boot console.

   Set FTP Server IP

   $ setenv serverip 172.22.31.153

    Request IP Address

    $ dhcp

    Try to Ping FTP Server

    $ ping 172.22.31.153

    Load U-boot Firmware Image

    $ tftp $load_addr firmware_ls1046arom8720_s1_uboot_qspiboot.img

    Install Image to QSPI (32MB)

    $ sf probe 0:0
    $ sf erase 0 0x2000000 && sf write $load_addr 0 0x2000000

    Shutdown, unplug SD card, switch to QSPI mode, plugin the prepared USB disk and power on the board again.

    Boot into U-boot console again and flush the eMMC

    $ mmc erase 0 0x8000
    $ boot

    Boot into rootfs with USB disk

    Create FTP Temp Folder

    $ mkdir /media/mytftp
    $ cd /media/mytftp

    Request IP Address

    The network interface in here is fml-mac9 :

    $ ifconfig fm1-mac9 up
    $ dhclient -i fm1-mac9
    $ ping 172.22.31.153

    Download Images from FTP

    $ tftp -m binary 172.22.31.153 -c get "bootpartition_LS_arm64_lts_5.4_xxxxxxxxxxxx.tgz"
    $ tftp -m binary 172.22.31.153 -c get "firmware_ls1046arom8720_s1_uboot_emmcboot.img"
    $ tftp -m binary 172.22.31.153 -c get "rootfs_lsdk2012_ubuntu_main_arm64.tgz"

   Initial eMMC Partitions

    $ flex-installer -i pf -d /dev/mmcblk0

   Install Images

    $ flex-installer -f firmware_ls1046arom8720_s1_uboot_emmcboot.img -b bootpartition_LS_arm64_lts_5.4_xxxxxxxxxxxx.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.tgz -d /dev/mmcblk0
    $ sync

    * Finally, shutdown and restart after switch boot mode back to SD mode.

 

Program Boot-Loader

After flash eMMC complete (by flex-installer). If you want to update boot-loader only, just put composite firmware image in your tftp path and execute following commands.

    $ tftp $load_addr firmware_ls1046arom8720_s1_uboot_emmcboot.img
    $ mmc dev 0
    $ mmc write $load_addr 8 $IMAGE_SIZE

   * IMAGE_SIZE = tftp-download-size / 512 (block size)

Linux Kernel and Device Tree Update

Compile kernel and device tree first :

    $ flex-builder -c linux -a arm64

Copy image and dtb file to boot partition mount point :

    $ cp linux/arch/arm64/boot/Image ${boot_partition}
    $ cp linux/arch/arm64/boot/Image.gz ${boot_partition}
    $ cp linux/arch/arm64/boot/dts/freescale/fsl-ls1046a-rom8720-s1.dtb ${boot_partition}
    $ sync

 

Ethernet Phys Setting

Uboot Command :

    $ setenv dtb xxxx.dtb
    $ saveenv
    $ boot

DTB File List :

    AQR107 :

        fsl-ls1046a-rom8720-p1.dtb

        fsl-ls1046a-rom8720-p1_16G.dtb

        fsl-ls1046a-rom8720-s1.dtb

        fsl-ls1046a-rom8720-s1_16G.dtb

    AQR113C :

        fsl-ls1046a-rom8720-p1-aqr-113c.dtb

        fsl-ls1046a-rom8720-s1-aqr-113c.dtb

 

System Recovery

This section provides detail procedures of restoring the eMMC image.

If you destroy the onboard flash image by accident, you can recover a system following these steps.

  • Recovery by SD card & USB disk

  1. Copy 8720S1AIM30UIV00009_2022-08-12_img.tar.gz package to  your desktop.

  2. Insert SD card to PC

  3. Make a bootable sd card

    $ tar xzvf 8720P1AIM30UIV00009_2022-08-12_img.tar.gz
    $ cd ls1046arom8720_p1.out/
    $ sudo flex-installer -i pf -d /dev/sdg
    $ sudo flex-installer -f firmware_ls1046arom8720_p1_uboot_sdboot.img -b bootpartition_LS_arm64_lts_5.4_202208120200.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.sdcard.tgz -d /dev/sdg
    $ sync

  4. Insert USB disk to PC

  5. Burn root filesytem in USB disk

    $ sudo flex-installer -i pf -d /dev/sdh
    $ sudo flex-installer -b bootpartition_LS_arm64_lts_5.4_202208120200.tgz -r rootfs_lsdk2012_ubuntu_main_arm64.sdcard.tgz -d /dev/sdh
    $ sync

  6. Insert SD card and Boot from SD.

  7. Burn bootloader to QSPI

    $ /usr/bin/flash_qspi.sh
    $ sync

  8. Power down

  9. Unplug SD card & Insert USB disk

10. Boot on QSPI mode

11. Enter U-Boot console and force into USB root filesystem

    $ (U-BOOT Console)
    $ run bootcmd_usb0

12. Burn image  to eMMC

    $ /usr/bin/flash_emmc.sh
    $ sync

13. Reboot by MMC mode (End)