Difference between revisions of "AIMLinux/AddOn/Launcher"

From ESS-WIKI
Jump to: navigation, search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Launcher[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=AIMLinux/AddOn/DeviceOn&action=edit&section=1 edit]] =
+
= Launcher =
  
 
In general,our customers want to cut startup time,customize booting logo, boot OS from multile devices,such as SD,SATA... ,This section will describes these informations on RISC platform.
 
In general,our customers want to cut startup time,customize booting logo, boot OS from multile devices,such as SD,SATA... ,This section will describes these informations on RISC platform.
  
== Qucik boot[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=AIMLinux/AddOn/DeviceOn&action=edit&section=2 edit]] ==
+
== Qucik boot ==
 +
 
 +
To reduce booting time,we use falcon mode to load kernel directly,should optimize kernel and rootfs, you can refer following steps:
 +
 
 +
=== Enter falcon mode ===
 +
 
 +
1: replace zImage with uImage by uboot env:
 +
<pre>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
 +
</pre>
 +
 
 +
2:&nbsp;prepare args
 +
<pre>spl export fdt ${loadaddr} - ${fdt_addr}
 +
setenv boot_os 1 && saveenv && reset</pre>
 +
 
 +
=== Optimize kernel ===
 +
 
 +
1:&nbsp;Specifies the root file system format in uboot env:&nbsp;rootfstype=ext4
 +
 
 +
2: reduce debug message in kernel booting by uboot env:&nbsp;quiet
 +
 
 +
3:&nbsp;eliminate unneeded features/drivers by menuconfig
 +
 
 +
=== Optimize rootfs ===
 +
 
 +
1:&nbsp;reduce partition size on SDcard
 +
 
 +
2:&nbsp;stop the unessential services
 +
 
 +
3: change /etc/inittab
 +
 
 +
S: single-user mode<br/>id:S:initdefault:<br/>s1::sysinit:mount -t proc proc /proc<br/>s2::sysinit:mount -t sysfs sysfs /sys<br/>s3:S:respawn:/bin/ash &lt; /dev/ttymxc0 &gt; /dev/ttymxc0
  
 
== Multi Boot ==
 
== Multi Boot ==
  
== Customize logo[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=AIMLinux/AddOn/DeviceOn&action=edit&section=2 edit]] ==
+
In general, the OS boot from eMMC,but in some special cases, need booting OS from SD or SATA, our system support booting these devices by default,just create a&nbsp;SD or SATA bootable disk,then insert it to device slot, it will boot from external devices,please reference following steps:
 +
 
 +
1: Prepare images in your host PC&nbsp;for i.MX6 project,you can refer following URL:
 +
 
 +
[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX6/Yocto_LBV9_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 following URL:
 +
 
 +
[http://ess-wiki.advantech.com.tw/view/IoTGateway/BSP/Linux/iMX6/Yocto_LBV9_User_Guide#To_create_one_boot-up_SD_card_2 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&nbsp;SD or SATA from host PC,then insert it to target board, power on the board, check booting device
 +
 
 +
[[File:Sdboot.png]]
 +
 
 +
== Customize logo ==
 +
 
 +
The system will show some pictures before&nbsp;entering OS,these pictures be called booting logo, maybe some customers&nbsp;want to customize booting&nbsp; logo,&nbsp;you can modify logo in uboot or kernel,please reference following:
  
 
[[How_to_customize_u-boot/kernel_logo_for_i.MX6_Yocto_2.1|i.MX6 Yocto platform]]
 
[[How_to_customize_u-boot/kernel_logo_for_i.MX6_Yocto_2.1|i.MX6 Yocto platform]]
Line 19: Line 70:
 
2&nbsp; removing psplash service: update-rc.d -f psplash.sh remove&nbsp;
 
2&nbsp; removing psplash service: update-rc.d -f psplash.sh remove&nbsp;
  
== Autorun app[[http://ess-wiki.advantech.com.tw/wiki/index.php?title=AIMLinux/AddOn/DeviceOn&action=edit&section=2 edit]] ==
+
== Autorun app ==
  
 
if your app needs to be autoloaded,please reference following:&nbsp;
 
if your app needs to be autoloaded,please reference following:&nbsp;

Latest revision as of 09:16, 30 March 2020

Launcher

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

Qucik boot

To reduce booting time,we use falcon mode to load kernel directly,should optimize kernel and rootfs, you can refer 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 args

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

Optimize kernel

1: Specifies the root file system format in uboot env: rootfstype=ext4

2: reduce debug message in kernel booting by uboot env: quiet

3: eliminate unneeded features/drivers by menuconfig

Optimize rootfs

1: reduce partition size on SDcard

2: stop the unessential services

3: change /etc/inittab

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 boot from eMMC,but in some special cases, need booting OS from SD or SATA, our system support booting these devices by default,just create a SD or SATA bootable disk,then insert it to device slot, it will boot from external devices,please reference following steps:

1: Prepare images in your host PC for i.MX6 project,you can refer following URL:

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 following URL:

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 host PC,then insert it to target board, power on the board, check booting device

Sdboot.png

The system will show some pictures before entering OS,these pictures be called booting logo, maybe some customers want to customize booting  logo, you can modify logo in uboot or kernel,please reference following:

i.MX6 Yocto platform

Splash  Screen

Our OS default has splashing screen when booting up,if you want to remove it, there are 2 ways:

1  by uboot environment: add psplash=false to bootargs

2  removing psplash service: update-rc.d -f psplash.sh remove 

Autorun app

if your app needs to be autoloaded,please reference following: 

Linux platform autorun

Android platform autorun