Skip to main content

Launcher

In general, our customers want to cut startup time, customize the booting logo, boot OS from multiple devices, such as SD, SATA... This section will describe these operations on the RISC platform.

Quick boot

To reduce booting time, we use Falcon mode to load the kernel directly. You should optimize the kernel and rootfs. You can refer to the following steps:

Enter Falcon mode

  1. Replace zImage with uImage by uboot env:
    setenv image uImage        
    fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
    fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}
    setenv bootargs console=${console},${baudrate} ${smp} root=${mmcroot} ${bootargs}
    mmc write ${loadaddr} 0x5D87FF 0x4000
    mmc write 18000000 0x5D7FFF 0x800

2. Prepare arguments:

```bash
spl export fdt ${loadaddr} - ${fdt_addr}
setenv boot_os 1 && saveenv && reset
```

### Optimize kernel

1. Specify the root file system format in uboot env: `rootfstype=ext4`

2. Reduce debug messages in kernel booting by uboot env: `quiet`

3. Eliminate unneeded features/drivers by menuconfig.

### Optimize rootfs

1. Reduce partition size on SD card.

2. Stop unnecessary services.

3. Modify `/etc/inittab`:

```bash
S: single-user mode
id:S:initdefault:
s1::sysinit:mount -t proc proc /proc
s2::sysinit:mount -t sysfs sysfs /sys
s3:S:respawn:/bin/ash < /dev/ttymxc0 > /dev/ttymxc0
```

## Multi Boot

In general, the OS boots from eMMC, but in some special cases, you need to boot the OS from SD or SATA. Our system supports booting these devices by default. Just create an SD or SATA bootable disk, then insert it into the device slot. It will boot from the external device. Please refer to the following steps:

1. Prepare images in your host PC for the i.MX6 project. You can refer to the following URL:
[i.MX6 Yocto User Guide - Build Instructions](http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX6/Yocto_LBV9_User_Guide#Build_Instructions)

2. Insert SD or SATA devices into your host PC. You can refer to the following URL:
[Creating a Bootable SD Card](http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX6/Yocto_LBV9_User_Guide#To_create_one_boot-up_SD_card_2)

3. Remove SD or SATA from the host PC, then insert it into the target board, power on the board, and check the booting device.

![SD Boot](Sdboot.png)

## Customize logo

The system will show some pictures before entering the OS. These pictures are called booting logos. Some customers may want to customize the booting logo. You can modify the logo in uboot or kernel. Please refer to the following:

[i.MX6 Yocto Platform - Customize U-Boot/Kernel Logo](How_to_customize_u-boot/kernel_logo_for_i.MX6_Yocto_2.1)

## Splash Screen

Our OS has a default splash screen when booting up. If you want to remove it, there are two ways:

1. By uboot environment: add `psplash=false` to `bootargs`.

2. Remove the psplash service:

```bash
update-rc.d -f psplash.sh remove
```

## Autorun app

If your app needs to be autoloaded, please refer to the following:

* [Linux Platform Autorun](Linux_platform_autorun)
* [Android Platform Autorun](Android_platform_autorun)