IPC PE100A - longge-lee/doc_test GitHub Wiki

PE100A - Yocto 2.5 Kernel 4.14.98

Flash image

  • ASUS PE100A - Yocto 2.5 BSP flash image SOP
  1. Getting an image

    1. Get Yocto-2.5 pre-release image from ASUS contact window

    2. Build an image from source code:

      Please refer to "PE100A Yocto-2.5 BSP build SOP" for instructions

    • Note:

      • If you build from build.sh, then you can find bootloader, raw image, and flash boot in Image-imx8mq-pe100a_DEBUG folder.

      • If you build from manual command, you can find image and tool in below folder:

        1. Bootloader:

          build_imx8mq-pe100a/tmp/deploy/images/imx8mq-pe100a/imx-boot-imx8mq-pe100a-4G.bin-flash_evk
          
        2. Raw Image:

          build_imx8mq-pe100a/tmp/deploy/images/imx8mq-pe100a/ fsl-image-qt5-validation-imx-imx8mq-pe100a.sdcard.bz2
          
        3. flash tool:

          sources/meta-asus-local/tools/flash_tool/*
          

          Please copy all of them to another folder and rename
           

  2. Flash image to eMMC

  • Case 1. Device without an OS image (Open Box)

    Although PE100A is shipped without any OS by default, it enters into fastboot mode when it’s booted up.

    Flash image:

    1. Power the device with an adaptor.

    2. The device will stay in fastboot mode as shown below.

      image

    3. Connect the device and host computer (PC or NB) with USB Type-C® cable.

    4. Enter image folder and double click flashall.cmd (Windows) / flashall.sh (Linux) to start image flashing.

      image

      If you use Ubuntu and flashall.sh to download image, your Ubuntu server may encounter this problem:

      error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory
      
    5. The device will reboot to Yocto OS automatically once the process is completed.

      image

 

  • Case 2. Flash an image in fastboot mode

    Use “reboot-bootloader” command to make device enter fastboot mode so then the OS image can be flashed directly.

    Flash image:

    1. Power the device with an adaptor, and wait for the device to boot into Debian OS.

    2. Open a terminal windows and enter reboot-bootloader command

      image

    3. The device will stay in fastboot mode

      image

    4. Connect the device and host computer (PC or NB) with USB Type-C® cable.

    5. Enter image folder and double click flashall.cmd (Windows) / flashall.sh (Linux) to start image flashing.

      image

      If you use Ubuntu and flashall.sh to download image, your Ubuntu server may encounter this problem:

      error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory
      

 

  • Case 3. Flash an image in serial download mode (For unbricking)

    If device is in brick state or is with an empty eMMC, we can use “serial download mode” to flash an image.

    Flash image

    1. Toggle boot_mode switch to “Serial downloader” + “eMMC boot ”

      DIP 1 2 3 4
      ON/OFF OFF ON OFF ON

      image

      image

    2. Power the device with an adapter.

    3. Connect the device and host computer (PC or NB) with USB Type-C® cable

    4. Enter image folder and double click flashall.cmd (Windows) / flashall.sh (Linux) to start image flashing.

      image

      If you use Ubuntu and flashall.sh to download image, your Ubuntu server may encounter this problem:

      error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory
      
    5. Remove the power adapter and toggle boot mode switch to “Internal boot” + “eMMC boot”

      DIP 1 2 3 4
      ON/OFF ON OFF OFF ON

      image

    6. The device will reboot to Debian OS automatically once the process is completed.

      image

 

Build image SOP

  • ASUS PE100A - Yocto 2.5 BSP build SOP
  1. Create an Ubuntu machine environment

    Using one of the following versions is recommended: 16.04/18.04/20.04

  2. Download Yocto source code from github (https://github.com/ASUS-IPC/manifest)

    $ git config --global user.name "Your Name"
    $ git config --global user.email "Your Email"
    

    this step may not be needed if the bin folder already exists

    $ mkdir ~/bin
    
    $ curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo
    $ export PATH=~/bin:$PATH
    $ mkdir ~/asus-yocto-sumo
    $ cd ~/asus-yocto-sumo
    
    $ repo init -u https://github.com/ASUS-IPC/manifest.git -m $manifest_name
    

    ex. for asus-pe100a-4.14.98-1.0.15.xml

    $ repo init -u https://github.com/ASUS-IPC/manifest.git -m asus-pe100a-4.14.98-1.0.15.xml
    $ repo sync -j4
    
  3. Setup Docker

    • Uninstall old versions

      $ sudo apt-get remove docker docker-engine docker.io containerd runc
      
    • Install Docker Engine - Community https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/

      $ sudo apt-get update
      $ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
      $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
      $ sudo apt-key fingerprint 0EBFCD88
      $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
      $ sudo apt-get update
      $ sudo apt-get install docker-ce docker-ce-cli containerd.io
      $ sudo docker run hello-world
      
    • Manage Docker as a non-root user https://docs.docker.com/install/linux/linux-postinstall/

      If you don’t want to preface the docker command with sudo, create a Unix group called docker and add users to it.

      $ sudo groupadd docker
      $ sudo usermod -aG docker $USER
      $ sudo reboot
        
      $ docker run hello-world
      
  4. Docker build:

    • Go to to the directory where the downloaded the code base is located in, and execute the script. This will take a while as it installs the necessary packages on the host and builds the Docker image.

      $ cd ~/asus-yocto-sumo
      $ ./docker_builder/docker-builder-run.sh
      
    • Once the step above is finished, you are in the shell of the newly started Docker container. You can issue the following command to build all the images for yocto. Below was sample command for ASUS PE100A, If you want to build image for other HW device, please change the MACHINE name (ex. imx8mq-pv100a for ASUS PV100A)

      $ DISTRO=fsl-imx-xwayland MACHINE=imx8mq-pe100a EULA=1 source fsl-setup-release.sh -b build_imx8mq-pe100a
      $ bitbake fsl-image-qt5-validation-imx
      
  5. After build successfully, you can find all image at below path

    Bootloader Image:

    $ build_imx8mq-pe100a/tmp/deploy/images/imx8mq-pe100a/imx-boot-imx8mq-pe100a-sd.bin
    

    Full Raw Image:

    $ build_imx8mq-pe100a/tmp/deploy/images/imx8mq-pe100a/fsl-image-qt5-validation-imx-imx8mq-pe00a.sdcard.bz2
    

 

PE100A - Yocto 3.2 Kernel 5.10.9

Flash image

  • ASUS PE100A - Yocto 3.2 BSP flash image SOP
  1. Getting an image

    1. Get a published Yocto image from AIoT official webpage

    2. Build an image from source code:

      Please refer to "PE100A Yocto-3.2 BSP build SOP" for instructions

    • Note:

      • If you build from build.sh, then you can find bootloader, raw image, and flash boot in Image-imx8mq-pe100a_DEBUG folder.

      • If you build from manual command, you can find image and tool in below folder:

        1. Bootloader:

          build_imx8mq-pe100a/tmp/deploy/images/imx8mq-pe100a/imx-boot-imx8mq-pe100a-4G.bin-flash_evk
          
        2. Raw Image:

          build_imx8mq-pe100a/tmp/deploy/images/imx8mq-pe100a/imx-image-full-imx8mq-pe100a.wic.bz2
          
        3. flash tool:

          sources/meta-asus-local/tools/flash_tool/*
          

          Please copy all of them to another folder and rename

 

  1. Flash image to eMMC
  • Case 1. Device without an OS image (Open Box)

    Although PE100A is shipped without any OS by default, it enters into fastboot mode when it’s booted up.

    Flash image:

    1. Power the device with an adaptor.

    2. The device will stay in fastboot mode as shown below.

      image

    3. Connect the device and host computer (PC or NB) with USB Type-C® cable.

    4. Enter image folder and double click flashall.cmd (Windows) / flashall.sh (Linux) to start image flashing.

      image

      If you use Ubuntu and flashall.sh to download image, your Ubuntu server may encounter this problem:

      error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory
      
    5. The device will reboot to Yocto OS automatically once the process is completed.

      image

 

  • Case 2. Flash an image in fastboot mode

    Use "reboot-bootloader" command to make device enter fastboot mode so then the OS image can be flashed directly.

    Flash image:

    1. Power the device with an adaptor, and wait for the device to boot into Debian OS.

    2. Open a terminal windows and enter reboot-bootloader command

      image

    3. The device will stay in fastboot mode

      image

    4. Connect the device and host computer (PC or NB) with USB Type-C® cable.

    5. Enter image folder and double click flashall.cmd (Windows) / flashall.sh (Linux) to start image flashing.

      If you use Ubuntu and flashall.sh to download image, your Ubuntu server may encounter this problem:

      error while loading shared libraries: libssl.so.10: cannot open shared object file: No such file or directory
      

 

  • Case 3. Flash an image in serial download mode (For unbricking)

    If device is in brick state or is with an empty eMMC, we can use "serial download mode" to flash an image.

    Flash image

    1. Toggle boot_mode switch to “Serial downloader” + “eMMC boot ”

      DIP 1 2 3 4
      ON/OFF OFF ON OFF ON

      image

      image

    2. Power the device with an adapter.

    3. Connect the device and host computer (PC or NB) with USB Type-C® cable

    4. Enter image folder and double click flashall.cmd (Windows) / flashall.sh (Linux) to start image flashing.

      image

      If you use Ubuntu and flashall.sh to download image, your Ubuntu server may encounter this problem:

      error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
      
    5. Remove the power adapter and toggle boot mode switch to “Internal boot” + “eMMC boot”

      DIP 1 2 3 4
      ON/OFF ON OFF OFF ON

      image

    6. The device will reboot to Debian OS automatically once the process is completed.

      image

 

Build image SOP

  • ASUS PE100A - Yocto 3.2 BSP build SOP
  1. Create an Ubuntu machine environment

    Using one of the following versions is recommended: 16.04/18.04/20.04

  2. Download Yocto source code from github (https://github.com/ASUS-IPC/manifest)

    $ git config --global user.name "Your Name"
    $ git config --global user.email "Your Email"
    

    this step may not be needed if the bin folder already exists

    $ mkdir ~/bin
    
    $ curl https://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo
    $ export PATH=~/bin:$PATH
    $ mkdir ~/asus-yocto-3.2
    $ cd ~/asus-yocto-3.2
    
    $ repo init -u https://github.com/ASUS-IPC/manifest.git -m $manifest_name
    

    Ex. for asus-pe100a-5.10.9-1.0.5.xml

    $ repo init -u https://github.com/ASUS-IPC/manifest.git -m asus-pe100a-5.10.9-1.0.5.xml
    $ repo sync -j4
    
  3. Setup Docker

    • Uninstall old versions

      $ sudo apt-get remove docker docker-engine docker.io containerd runc
      
    • Install Docker Engine - Community https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/

      $ sudo apt-get update
      $ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
      $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
      $ sudo apt-key fingerprint 0EBFCD88
      $ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
      $ sudo apt-get update
      $ sudo apt-get install docker-ce docker-ce-cli containerd.io
      $ sudo docker run hello-world
      
    • Manage Docker as a non-root user https://docs.docker.com/install/linux/linux-postinstall/

      If you don’t want to preface the docker command with sudo, create a Unix group called docker and add users to it.

      $ sudo groupadd docker
      $ sudo usermod -aG docker $USER
      $ sudo reboot
        
      $ docker run hello-world
      
  4. Docker build:

    • Go to to the directory where the downloaded the code base is located in, and execute the script. This will take a while as it installs the necessary packages on the host and builds the Docker image.

      $ cd ~/asus-yocto-3.2
      $ ./docker_builder/docker-builder-run.sh
      
    • Once the step above is finished, you are in the shell of the newly started Docker container. You can issue the following command to build all the images for yocto. Below was sample command for ASUS PE100A, If you want to build image for other HW device, please change the MACHINE name (ex. imx8mq-pv100a for ASUS PV100A)

      $ DISTRO=fsl-imx-xwayland MACHINE=imx8mq-pe100a EULA=1 source imx-setup-release.sh -b build_imx8mq-pe100a
      $ bitbake imx-image-full
      
  5. After build successfully, you can find all image at below path

    Bootloader Image:

    $ build_imx8mq-pe100a/tmp/deploy/images/imx8mq-pe100a/imx-boot-imx8mq-pe100a-4G.bin-flash_evk
    

    Full Raw Image:

    $ build_imx8mq-pe100a/tmp/deploy/images/imx8mq-pe100a/imx-image-full-imx8mq-pe100a.wic.bz2
    

 

LTE module function for PE100A

SIM hot-plug function

  • For PE100A

  • To enable the hot-plug function of your LTE module, click the weston-terminal icon in the upper left corner of your screen, and type the first command below when prompted:

    • Enable hot-plug function
      mm_cli sim-detect 1
      
    • Disable hot-plug function
      mm_cli sim-detect 0
      
    • Display current setting
      mm_cli sim-detect 
      

 

ASUS IoT API for PE100A