레이블이 SoC-Sitara인 게시물을 표시합니다. 모든 게시물 표시
레이블이 SoC-Sitara인 게시물을 표시합니다. 모든 게시물 표시

4/12/2017

AM437x-EVM-GP HDMI 설정

1. AM437x-EVM 관련정보

AM437x-EVM을 빌려서 , 집에서 가지고 놀게 되었지만, TI에서 제공되는 자료가 거의 오픈이 되어서 너무 좋고, 설정하기도 편하다.
역시 BeagleBone Board에 보다 성능이 좋다.

  • AM437x EVM 
  http://processors.wiki.ti.com/index.php/AM437X_EVM_Boards


1.1 AM437x-EVM 의 HDMI 설정 및 분석

AM437x인 경우 기본적으로 HDMI Host controller 가 존재하지 않아 Silicon Image사의Chip 인 Sil9022A을 이용하여
HDMI를 전송을 하고 있으며, 이를 설정하기 위해서는 Device Tree 설정파일인 DTB만 변경하면된다.



  • DSS( Display Subsystem)의 역할 
AM437x 에서 Video Display 관련부분의 Hardware Interface이며, Pin Description을 보면
기존에 사용하던 모든이 Hsync와 Vsync, Pixel Clock 및 Data0~23, En 로 기본구성이 되어있다.

많이 사용되어지고 있는 MIPI DSI는 구현이 되어있지 않다고 되어있다.
ERRATA에 보면 DSS에 많은 제약이 있음을 알게된다. (해상도 및 memory bandwidth )

관련자료
  http://www.ti.com/lit/ug/spruhl7f/spruhl7f.pdf

1.2 AM437x EVM  HDMI HW 관련 정보 
VIDEO는 현재 24bit가 아닌 16Bit만을 사용하고 있으며, AUDIO를 구조도 동일하다.
VIDEO 같은 경우는 LCD모드와 크게 별반 차이가 없다고 생각하면 되겠다.

  1. DSS, 영상 Data(AM437X_LCD_DATA0~15) -> Buffer Chip(SN74LVC32244ZKE,SN74LVC244A )  전압 3.3V변화 및 Buffer
  2. 변경된 DATA -> Sil9022A 연결 
  3. McASP -> Buffer Chip 전압 변경 
  4. 변경된 DATA -> Sil9022A 연결 

관련자료 
  http://processors.wiki.ti.com/images/9/95/Am437x_gp_evm_3k0006_schematic_rev1_4a.pdf
  http://processors.wiki.ti.com/index.php/AM437X_EVM_Boards



1.2 AM437x의 EVM Software 및 관련 설명서 
TI에서 EVM의 간단한 설명서 및 사용법 쉽게 파악가능하다
BSP를 Download 가능하며, Image를 가지고 쉽게 Write를 하여 SD Boot로 TEST 가능.

관련자료
  http://www.ti.com/tool/tmdsevm437x#descriptionArea

처음 회로도를 보고, LCD와 HDMI 동시 출력이 가능할 것이라고 생각을 했지만,
지원이 되지 않는다고 TI에서 명시를 해주고 있다. 이부분은 시간이 나면 다시 확인해봐야겠지만,
현재 시간이 없어 추후 회로도에서 TI Buffer chip 3개 부분을 다시 잘 보면 되겠다.

Memory bandwidth 제한으로 인하여 HD급 영상만 720p@60 재생이 되며,
AM437x 현재 Sigle output으로  LCD or HDMI 를 동시에 출력이 불가능하다고 한다.


  • 일반적인 HDMI 설정변경

 Device Tree인 *.dtb를 이용하여 변경을 하면된다고 한다.

관련자료
  http://processors.wiki.ti.com/index.php/Linux_Core_DSS_User%27s_Guide#AM4_Boards


1.3 AM437x EVM GP HDMI 설정 

위에서 설명했듯이 기본으로 제공해주는 Device Tree 인 파일인 DTB 파일을 찾아 변경을 해주면된다.

  • prebuilt-Image 의 Device Tree 설정확인 
    아래의 두개의 Device Tree 설정을 쉽게 확인가능, 이를 적용하자

$ ./board-support/prebuilt-images
$ ls 
MLO-am437x-evm          am437x-gp-evm.dtb  am43x-epos-evm-hdmi.dtb  u-boot-am437x-evm.img      uEnv.txt
am437x-gp-evm-hdmi.dtb  am437x-sk-evm.dtb  am43x-epos-evm.dtb       u-boot-spl.bin-am437x-evm  zImage-am437x-evm.bin


  • Kernel Device Tree 설정 확인 
     Device Tree 좀 더 변경하고자 한다면 아래에서 확인

$ cd ./board-support/linux*
$ vi arch/arm/boot/dts/am437x-gp-evm-hdmi.dts // device tree 설정확인 
....


  • AM437x Device Tree 관련내용 
  AM437x Device Tree MMC BOOT관련내용. (UBoot의 환경설정에서 변경)

Uboot Script 과 Kernel Device Tree
  http://ahyuo79.blogspot.kr/2015/08/am437x-kernel-device-tree.html


2. UBOOT 설정 변경

현재 AM437x는 bootz라는 command를 이용하여 zImage와 *.dtb 을 booting한다.
uboot에서 findfdt 에서 fdtfile을 직접 변경하거나, board_name을 변경한다면
dtb 설정이 변경이 된다.

이 부분은 상위  device tree 부분을 참조


3. Sys File 변경 및 Uboot 설정변경


$ fbset  // display 해상도 확인 
$ fbset -i // display 해상도 확인 


  http://e2e.ti.com/support/arm/sitara_arm/f/791/p/551865/2017650
  http://processors.wiki.ti.com/index.php/Matrix_Users_Guide#I_don.27t_want_Matrix_to_run_on_boot_up
  https://e2e.ti.com/support/arm/sitara_arm/f/791/p/358458/1258352#1258352
  http://processors.wiki.ti.com/index.php/DSS2_SYSFS_Examples#SYSFS_Entries_for_FB


4. AM437x EVM Devic 확인사항 

 ....
omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 100 kHz  // 아래 driver 는 I2C로 설정 
sii9022 1-003b: sil9022 HDMI Chip version = b0
....

4/09/2017

Linux systemd 구조분석 (AM335x-SK)

1 TI-Sitara(AM335x-SK)

AM335x-SK, Start Kit 관련하여 File system을 간단히 분석을 해보고, 이를 최적화를 하려고 한다.
분석을 해보면, /sbin/init 을 systemd로 이용하고 SysVinit의 bootscript 을 혼용해서 사용하고 있다.
TI의 경우는 변화 도중 인지 몰라도 /lib/systemd/systemd boot 후 SysVInit Script모드를 사용한다.
현재의 추세가 SysVInit 에서 systemd로 변환되어지는 구조이며, 혼용해서 사용하는 독특한 구조이다.

Systemd 와 SysVInit 혼용
  https://ahyuo79.blogspot.com/2017/04/linux-init-script.html

1.1 기본동작분석

boot parameter 확인하고, file system의 구조를 파악을 하자

  • PID 1의 boot parameter 확인 
Kernel은 Filesystem이 존재하지 않으면 Booting이 되지 않기때문에 아래의 두개의 중요
  1. root= filesystem
  2. init=  init program ( 현재 설정하지 않았기 때문에 기본설정 /sbin/init)

root@am335x-evm:~# cat /proc/cmdline 
console=ttyO0,115200n8 root=PARTUUID=000390f5-02 rw rootfstype=ext4 rootwait

root@am335x-evm:~# cat /proc/1/cmdline  // init args 확인 
root@am335x-evm:~# ls /proc/1/fd     // 관련 FD 확인 부모 Process / 자식 Process
or
root@am335x-evm:~# ls /proc/1/fdinfo 

상위 커널 Argument를 보면 현재 /sbin/init로 기반으로 동작

/sbin/init ->  /lib/systemd/systemd  (현재 /sbin/init 은 /lib/systemd/systemd에 link)

  • /sin/init 와 runlevel 존재 확인 
root@am335x-evm:~# ls /sbin      
agetty                  e2fsck                  fsck.minix              ifup                    losetup                 mkswap.util-linux       route                   switch_root.util-linux
arp                     e2image                 fsck.minix.util-linux   init                    losetup.util-linux      modinfo                 routef                  sysctl
badblocks               e2label                 fsck.msdos              insmod                  lsmod                   modinfo.kmod            routel                  sysctl.procps
blkid                   e2undo                  fsck.util-linux         insmod.kmod             mkdosfs                 modprobe                rtmon                   syslogd
blockdev                e4crypt                 fsck.vfat               ip                      mke2fs                  modprobe.kmod           rtpr                    tc
blockdev.util-linux     e4defrag                fstrim                  ip.iproute2             mkfs.ext2               mount-copybind          runlevel                tune2fs
bridge                  fatlabel                fw_printenv             iwconfig                mkfs.ext3               mount.nfs               setconsole              udevd
cfdisk                  fdisk                   fw_setenv               iwgetid                 mkfs.ext4               mount.nfs4              shutdown                udhcpc
ctrlaltdel              fdisk.util-linux        getty                   iwlist                  mkfs.ext4dev            nologin                 start-stop-daemon       uevent
debugfs                 filefrag                halt                    iwpriv                  mkfs.fat                pivot_root              sulogin                 umount.nfs
depmod                  fsck                    hdparm                  iwspy                   mkfs.minix              pivot_root.util-linux   sulogin.util-linux      umount.nfs4
depmod.kmod             fsck.ext2               hdparm.hdparm           klogd                   mkfs.minix.util-linux   populate-extfs.sh       swapoff                 vconfig
dosfsck                 fsck.ext3               hwclock                 ldconfig                mkfs.msdos              poweroff                swapoff.util-linux      vigr
dosfslabel              fsck.ext4               ifcfg                   loadkmap                mkfs.vfat               reboot                  swapon                  vigr.shadow
dumpe2fs                fsck.ext4dev            ifconfig                logread                 mklost+found            rmmod                   swapon.util-linux       vipw
e2freefrag              fsck.fat                ifdown                  logsave                 mkswap                  rmmod.kmod              switch_root             vipw.shadow


  • runlevel 0~6까지 존재하며, init를 통해 다시 확인가능
  1. init 0 : Halt 
  2. init 1 : Single-user Mode 
  3. init 2 : Multi-user Mode  (Not support network)
  4. init 3 : Multi-user Mode with Networking
  5. init 4 : Not used/User-definable  (For special purposes)
  6. init 5 : Graphic-user Mode ( As runlevel 3 + display manager)
  7. init 6 : Reboot  (Reboots the system)

  https://wiki.kldp.org/KoreanDoc/html/Boot_Process-KLDP/iterateinittab.html

  • systemd 관련 명령어 (system damon)
systemd 명령어와 관련 명령어 검색

root@am335x-evm:~# find / -name systemd
/var/lib/systemd
/lib/systemd
/lib/systemd/systemd   // 실제 user를 위한 system daemon 이며 이동작을 확인 (systemctl) 
/etc/systemd
/etc/xdg/systemd
/sys/fs/cgroup/systemd
/run/user/0/systemd
/run/udev/tags/systemd
/run/systemd
/usr/lib/systemd
/usr/share/systemd
/usr/include/systemd
/tmp/0-runtime-dir/systemd

다양한 systemd의 실행이며 각각의 역할이 있으며, 이 부분은 좀 더 자세히 알아보자

root@am335x-evm:~# ls /lib/systemd/ 
network                       systemd-ac-power              systemd-initctl               systemd-networkd-wait-online  systemd-shutdown              systemd-udevd
system                        systemd-backlight             systemd-journald              systemd-quotacheck            systemd-sleep                 systemd-update-done
system-generators             systemd-bootchart             systemd-localed               systemd-random-seed           systemd-socket-proxyd         systemd-update-utmp
system-preset                 systemd-cgroups-agent         systemd-logind                systemd-remount-fs            systemd-sysctl                systemd-user-sessions
system-shutdown               systemd-fsck                  systemd-machined              systemd-reply-password        systemd-sysv-install          systemd-vconsole-setup
system-sleep                  systemd-hibernate-resume      systemd-modules-load          systemd-resolved              systemd-timedated
systemd                       systemd-hostnamed             systemd-networkd              systemd-rfkill                systemd-timesyncd

root@am335x-evm:~# /lib/systemd/systemd --help

systemd [OPTIONS...]

Starts up and maintains the system or user services.

  -h --help                      Show this help
     --test                      Determine startup sequence, dump it and exit
     --no-pager                  Do not pipe output into a pager
     --dump-configuration-items  Dump understood unit configuration items
     --unit=UNIT                 Set default unit
     --system                    Run a system instance, even if PID != 1
     --user                      Run a user instance
     --dump-core[=BOOL]          Dump core on crash
     --crash-vt=NR               Change to specified VT on crash
     --crash-reboot[=BOOL]       Reboot on crash
     --crash-shell[=BOOL]        Run shell on crash
     --confirm-spawn[=BOOL]      Ask for confirmation when spawning processes
     --show-status[=BOOL]        Show status updates on the console during bootup
     --log-target=TARGET         Set log target (console, journal, kmsg, journal-or-kmsg, null)
     --log-level=LEVEL           Set log level (debug, info, notice, warning, err, crit, alert, emerg)
     --log-color[=BOOL]          Highlight important log messages
     --log-location[=BOOL]       Include code location in log messages
     --default-standard-output=  Set default standard output for services
     --default-standard-error=   Set default standard error output for services


systemd의 설명
  https://www.freedesktop.org/software/systemd/man/systemd.html#


  • systemd의 설정 (system/user 설정 값확인)
  1. /etc/systemd/system.conf
  2. /etc/systemd/user.conf
  https://www.freedesktop.org/software/systemd/man/systemd-system.conf.html#


1.2 systemd-x program들 

각 systemd-xxx program 설치는 옵션이므로, 대부분 필요한 것들을 별도설치

root@am335x-evm:~# ls -al /usr/bin/systemd-*
-rwxr-xr-x    1 root     root         26160 Dec 15 00:09 /usr/bin/systemd-cat
-rwxr-xr-x    1 root     root        256116 Dec 15 00:09 /usr/bin/systemd-cgls
-rwxr-xr-x    1 root     root        268436 Dec 15 00:09 /usr/bin/systemd-cgtop
-rwxr-xr-x    1 root     root         54932 Dec 15 00:09 /usr/bin/systemd-delta
-rwxr-xr-x    1 root     root         30256 Dec 15 00:09 /usr/bin/systemd-detect-virt
-rwxr-xr-x    1 root     root        535036 Dec 15 00:09 /usr/bin/systemd-nspawn
-rwxr-xr-x    1 root     root         34348 Dec 15 00:09 /usr/bin/systemd-path
-rwxr-xr-x    1 root     root        292980 Dec 15 00:09 /usr/bin/systemd-resolve
-rwxr-xr-x    1 root     root        334168 Dec 15 00:09 /usr/bin/systemd-run
-rwxr-xr-x    1 root     root         46672 Dec 15 00:09 /usr/bin/systemd-socket-activate
-rwxr-xr-x    1 root     root        239724 Dec 15 00:09 /usr/bin/systemd-stdio-bridge
...


systemd-cat
  https://www.freedesktop.org/software/systemd/man/systemd-cat.html#

systemd-cgls
  https://www.freedesktop.org/software/systemd/man/systemd-cgls.html#

systemd-cgtop
  https://www.freedesktop.org/software/systemd/man/systemd-cgtop.html#

systemd-run
  https://www.freedesktop.org/software/systemd/man/systemd-run.html

systemd-nspanwn
  https://www.freedesktop.org/software/systemd/man/systemd-nspawn.html

systemd-xxx 검색
  https://www.freedesktop.org/software/systemd/man/index.html

systemd-analyze가 없음 (추후 설치)
  https://www.freedesktop.org/software/systemd/man/systemd-analyze.html

systemd의 service 등록방법
  https://chhanz.github.io/linux/2019/01/18/linux-how-to-create-custom-systemd-service/
  https://fmd1225.tistory.com/93

systemd의 Yocto service 등록방법
  https://community.nxp.com/thread/472820

systemd-analyze 못찾을 경우
  https://stackoverflow.com/questions/34501611/systemd-apparently-not-finding-service-file

backup
  https://stackoverflow.com/questions/50354012/systemctl-failing-with-unknown-section-timer

1.3 Process 의 PID 분석 

Process의 PID를 보고 현재 실행되는 순서를 역분석을 해보면, 아래와 같이 /sbin/init 가 PID가 1 지만, link만 존재하므로 systemd가 실행이 되어있다.

확인할 경우 아래와 같이 ps -ax or ps -aux 전체사항을 확인하고 필요한 사항이 있다면, grep or head or tail 사용하자.

root@am335x-evm:~# ps -aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  9.9  1.7   5232  4384 ?        Ss   23:15   0:08 /sbin/init
root         2  0.0  0.0      0     0 ?        S    23:15   0:00 [kthreadd]
root         3  0.1  0.0      0     0 ?        S    23:15   0:00 [ksoftirqd/0]
root         4  0.0  0.0      0     0 ?        S    23:15   0:00 [kworker/0:0]
root         5  0.0  0.0      0     0 ?        S<   23:15   0:00 [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        S    23:15   0:00 [kworker/u2:0]
root         7  0.2  0.0      0     0 ?        S    23:15   0:00 [rcu_preempt]
root         8  0.0  0.0      0     0 ?        S    23:15   0:00 [rcu_sched]
root         9  0.0  0.0      0     0 ?        S    23:15   0:00 [rcu_bh]
root        10  0.0  0.0      0     0 ?        S    23:15   0:00 [kdevtmpfs]
root        11  0.0  0.0      0     0 ?        S<   23:15   0:00 [netns]
root        12  0.0  0.0      0     0 ?        S<   23:15   0:00 [perf]
root        13  0.0  0.0      0     0 ?        S    23:15   0:00 [kworker/0:1]
root        14  0.0  0.0      0     0 ?        S<   23:15   0:00 [writeback]
root        15  0.0  0.0      0     0 ?        S<   23:15   0:00 [crypto]
root        16  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
root        17  0.0  0.0      0     0 ?        S<   23:15   0:00 [kblockd]
root        18  0.0  0.0      0     0 ?        S<   23:15   0:00 [edac-poller]
root        19  0.0  0.0      0     0 ?        S<   23:15   0:00 [rpciod]
root        20  0.0  0.0      0     0 ?        S    23:15   0:00 [kswapd0]
root        21  0.0  0.0      0     0 ?        S    23:15   0:00 [fsnotify_mark]
root        22  0.0  0.0      0     0 ?        S<   23:15   0:00 [nfsiod]
root        31  0.0  0.0      0     0 ?        S<   23:15   0:00 [dma_wq]
root        32  0.7  0.0      0     0 ?        S    23:15   0:00 [kworker/u2:1]
root        33  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
root        34  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
root        35  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
root        36  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
root        37  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
root        38  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
root        39  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
root        40  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
root        43  0.0  0.0      0     0 ?        S<   23:15   0:00 [kpsmoused]
root        44  0.0  0.0      0     0 ?        S    23:15   0:00 [irq/180-4803c00]
root        45  0.0  0.0      0     0 ?        S    23:15   0:00 [irq/179-4803c00]
root        46  0.0  0.0      0     0 ?        S<   23:15   0:00 [ipv6_addrconf]
root        47  0.0  0.0      0     0 ?        S<   23:15   0:00 [deferwq]
root        48  0.0  0.0      0     0 ?        S    23:15   0:00 [irq/159-44e0b00]
root        49  0.1  0.0      0     0 ?        S    23:15   0:00 [kworker/u2:2]
root        50  0.0  0.0      0     0 ?        S    23:15   0:00 [irq/33-48060000]
root        51  0.0  0.0      0     0 ?        S    23:15   0:00 [kworker/u2:3]
root        52  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
root        53  1.6  0.0      0     0 ?        S    23:15   0:01 [mmcqd/0]
root        54  0.1  0.0      0     0 ?        S<   23:15   0:00 [kworker/0:1H]
root        55  0.0  0.0      0     0 ?        S    23:15   0:00 [jbd2/mmcblk0p2-]
root        56  0.0  0.0      0     0 ?        S<   23:15   0:00 [ext4-rsv-conver]
root        68  0.0  0.0      0     0 ?        S    23:15   0:00 [kworker/0:2]
root        76  0.0  0.0      0     0 ?        S<   23:15   0:00 [cryptodev_queue]
root        98  2.3  0.7   3616  1908 ?        Ss   23:15   0:01 /lib/systemd/systemd-journald // log를 위해 시작 
root       121  0.1  0.0      0     0 ?        S    23:15   0:00 [kworker/0:3]
root       127  1.6  1.0  10524  2528 ?        Ss   23:15   0:01 /lib/systemd/systemd-udevd  //udevd 시작 
root       325  0.0  0.0      0     0 ?        S<   23:15   0:00 [pvr_timer]
systemd+   398  0.2  0.6  12136  1608 ?        Ssl  23:15   0:00 /lib/systemd/systemd-timesyncd
root       432  0.0  0.0      0     0 ?        S    23:15   0:00 [irq/195-remotep]
root       437  0.0  0.0      0     0 ?        S    23:15   0:00 [irq/197-remotep]
root       456  0.0  0.0      0     0 ?        S    23:15   0:00 [scsi_eh_0]
root       457  0.0  0.0      0     0 ?        S<   23:15   0:00 [scsi_tmf_0]
root       458  0.0  0.0      0     0 ?        S    23:15   0:00 [usb-storage]
root       460  0.0  0.5   1956  1300 ?        Ss   23:15   0:00 /sbin/klogd -n
root       469  2.5  2.5   8864  6408 ?        Ss   23:15   0:01 /usr/sbin/ofonod -n
root       471  0.1  0.7   2600  1812 ?        Ss   23:15   0:00 /lib/systemd/systemd-logind
root       475  0.1  0.5   1908  1440 ?        Ss   23:15   0:00 /usr/libexec/ipsec/starter --daemon charon --nofork
root       480  0.1  0.4   1972  1244 ?        Ss   23:15   0:00 /sbin/syslogd -n -C
avahi      483  0.0  0.9   4660  2484 ?        Ss   23:15   0:00 avahi-daemon: running [am335x-evm.local]
message+   492  0.5  0.9   4320  2496 ?        Ss   23:15   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
root       494  0.0  0.0      0     0 ?        S<   23:15   0:00 [bioset]
avahi      501  0.0  0.7   4660  1792 ?        S    23:15   0:00 avahi-daemon: chroot helper
root       513  0.0  0.0      0     0 ?        S    23:15   0:00 [file-storage]
systemd+   535  0.2  0.8   2776  2056 ?        Ss   23:15   0:00 /lib/systemd/systemd-networkd
root       562  0.2  1.8 142008  4528 ?        Ssl  23:15   0:00 /usr/libexec/ipsec/charon
systemd+   677  0.0  0.7   2984  1904 ?        Ss   23:15   0:00 /lib/systemd/systemd-resolved
root       682  0.0  0.4   1780  1184 tty1     Ss+  23:15   0:00 /sbin/agetty --noclear tty1 linux
root       688  0.1  0.8   4864  2132 ttyS0    Ss   23:15   0:00 /bin/login --
root       689  0.0  0.4   1780  1196 ttyGS0   Ss+  23:15   0:00 /sbin/agetty -8 -L ttyGS0 115200 xterm
root       691  0.2  1.1   5160  2984 ?        Ss   23:15   0:00 /usr/sbin/lighttpd -D -f /etc/lighttpd.conf
root       773  0.0  0.0      0     0 ?        S<   23:15   0:00 [pvr_workqueue]
root       807  0.0  0.7   2664  1776 tty4     Ss+  23:15   0:00 /bin/sh /usr/bin/runWeston
root       810  0.5  5.0  19144 12556 tty4     S+   23:15   0:00 weston --idle-time=0
root       815  0.0  0.3   1956   868 ?        Ss   23:15   0:00 /usr/sbin/telnetd
root       822  0.2  2.0   7008  5096 tty4     S+   23:15   0:00 /usr/libexec/weston-keyboard
root       823  0.2  2.0   7016  5024 tty4     S+   23:15   0:00 /usr/libexec/weston-desktop-shell
nobody     829  0.0  0.6   2448  1632 ?        Ss   23:15   0:00 /usr/sbin/thttpd -d /srv/www -p 8080
root       835  0.0  0.3   2292   928 ?        Ss   23:15   0:00 /usr/sbin/rngd -r /dev/urandom
root       843  8.3 24.3 176048 60924 ?        Sl   23:15   0:04 /usr/bin/matrix_browser http://localhost:80/
root       860  0.0  0.0      0     0 ?        S    23:15   0:00 [kworker/0:4]
root       863  0.0  0.0      0     0 ?        S    23:15   0:00 [kworker/0:5]
root       867  0.4  0.0      0     0 ?        S    23:15   0:00 [kworker/0:6]
root       894  1.3  1.7   5348  4388 ?        Ss   23:15   0:00 /lib/systemd/systemd --user  //user용 systemd 실행 (일반서비스) 
root       898  0.0  0.9   7492  2352 ?        S    23:15   0:00 (sd-pam)
root       901  0.0  0.8   2668  2044 ttyS0    S    23:15   0:00 -sh
root       918  0.2  0.4   1780  1212 ?        Ss   23:16   0:00 /sbin/agetty -8 -L ttyS3 115200 xterm
root       922  0.0  0.5   2612  1272 ttyS0    R+   23:16   0:00 ps -aux


2 systemd 와 init script 혼합 (telinit) 

/sbin/telinit  확인필요

  • run level 3 확인 (init.d link)
root@am335x-evm:~# runlevel 
N 3   // multi-user mode 

root@am335x-evm:/etc# ls -al  rc3.d    // Runlevel 3 분석 
drwxr-xr-x    2 root     root          4096 Dec 15  2016 .
drwxr-xr-x   46 root     root          4096 Dec 14 23:15 ..
lrwxrwxrwx    1 root     root            20 Dec 15  2016 S01networking -> ../init.d/networking
lrwxrwxrwx    1 root     root            16 Dec 15  2016 S02dbus-1 -> ../init.d/dbus-1
lrwxrwxrwx    1 root     root            19 Dec 15  2016 S03uim-sysfs -> ../init.d/uim-sysfs
lrwxrwxrwx    1 root     root            16 Dec 15  2016 S08rc.pvr -> ../init.d/rc.pvr
lrwxrwxrwx    1 root     root            18 Dec 15  2016 S10dropbear -> ../init.d/dropbear
lrwxrwxrwx    1 root     root            17 Dec 15  2016 S10telnetd -> ../init.d/telnetd
lrwxrwxrwx    1 root     root            17 Dec 15  2016 S12rpcbind -> ../init.d/rpcbind
lrwxrwxrwx    1 root     root            21 Dec 14 23:36 S15mountnfs.sh -> ../init.d/mountnfs.sh
lrwxrwxrwx    1 root     root            19 Dec 15  2016 S19nfscommon -> ../init.d/nfscommon
lrwxrwxrwx    1 root     root            24 Dec 15  2016 S20busybox-udhcpd -> ../init.d/busybox-udhcpd
lrwxrwxrwx    1 root     root            20 Dec 15  2016 S20hwclock.sh -> ../init.d/hwclock.sh
lrwxrwxrwx    1 root     root            16 Dec 15  2016 S20syslog -> ../init.d/syslog
lrwxrwxrwx    1 root     root            16 Dec 15  2016 S20thttpd -> ../init.d/thttpd
lrwxrwxrwx    1 root     root            22 Dec 15  2016 S21avahi-daemon -> ../init.d/avahi-daemon
lrwxrwxrwx    1 root     root            15 Dec 15  2016 S22ofono -> ../init.d/ofono
lrwxrwxrwx    1 root     root            19 Dec 15  2016 S30rng-tools -> ../init.d/rng-tools
lrwxrwxrwx    1 root     root            18 Dec 15  2016 S70lighttpd -> ../init.d/lighttpd
lrwxrwxrwx    1 root     root            24 Dec 15  2016 S97matrix-gui-2.0 -> ../init.d/matrix-gui-2.0
lrwxrwxrwx    1 root     root            18 Dec 15  2016 S98parse-ip -> ../init.d/parse-ip
lrwxrwxrwx    1 root     root            27 Dec 15  2016 S98thermal-zone-init -> ../init.d/thermal-zone-init
lrwxrwxrwx    1 root     root            22 Dec 15  2016 S99gplv3-notice -> ../init.d/gplv3-notice
lrwxrwxrwx    1 root     root            22 Dec 14 23:36 S99rmnologin.sh -> ../init.d/rmnologin.sh


  • /etc/init.d  확인 
root@am335x-evm:/etc# ls -al init.d/
drwxr-xr-x    2 root     root          4096 Dec 15  2016 .
drwxr-xr-x   46 root     root          4096 Dec 14 23:15 ..
-rw-r--r--    1 root     root          1150 Dec 15 00:09 README
-rwxr-xr-x    1 root     root           250 Dec 14 23:23 alignment.sh
-rwxr-xr-x    1 root     root           811 Dec 14 23:45 alsa-state
-rwxr-xr-x    1 root     root          4491 Dec 15 00:13 avahi-daemon
-rwxr-xr-x    1 root     root           492 Dec 14 23:23 banner.sh
-rwxr-xr-x    1 root     root          1922 Dec 14 23:23 bootmisc.sh
-rwxr-xr-x    1 root     root          1042 Dec 14 23:50 busybox-udhcpd
-rwxr-xr-x    1 root     root          3581 Dec 14 23:23 checkroot.sh
-rwxr-xr-x    1 root     root          2887 Dec 15 00:11 dbus-1
-rwxr-xr-x    1 root     root           526 Dec 14 23:23 devpts.sh
-rwxr-xr-x    1 root     root           353 Dec 14 23:23 dmesg.sh
-rwxr-xr-x    1 root     root          3002 Dec 15 00:00 dropbear
lrwxrwxrwx    1 root     root            33 Dec 15  2016 functions -> /etc/init.d/functions.initscripts
-rw-r--r--    1 root     root          2141 Dec 14 23:23 functions.initscripts
-rwxr-xr-x    1 root     root          2389 Dec 14 23:48 gplv3-notice
-rwxr-xr-x    1 root     root           510 Dec 14 23:23 halt
-rwxr-xr-x    1 root     root           546 Dec 15 00:00 hostapd
-rwxr-xr-x    1 root     root           580 Dec 14 23:23 hostname.sh
-rwxr-xr-x    1 root     root          2541 Dec 14 23:50 hwclock.sh
-rwxr-xr-x    1 root     root           579 Dec 14 23:50 inetd.busybox
-rwxr-xr-x    1 root     root           632 Dec 14 23:52 lighttpd
-rwxr-xr-x    1 root     root          1102 Dec 14 23:51 matrix-gui-2.0
-rwxr-xr-x    1 root     root          1223 Dec 14 23:48 modutils.sh
-rwxr-xr-x    1 root     root           859 Dec 14 23:23 mountall.sh
-rwxr-xr-x    1 root     root          1522 Dec 14 23:23 mountnfs.sh
-rwxr-xr-x    1 root     root          2124 Dec 14 23:48 networking
-rwxr-xr-x    1 root     root          1609 Dec 14 23:49 nfscommon
-rwxr-xr-x    1 root     root           516 Dec 15 00:15 ofono
-rwxr-xr-x    1 root     root          1950 Dec 15 00:00 parse-ip
-rwxr-xr-x    1 root     root          6721 Dec 14 23:23 populate-volatile.sh
-rwxr-xr-x    1 root     root           521 Dec 14 23:50 psplash.sh
-rwxr-xr-x    1 1001     1001          3203 Dec 14 23:15 rc.pvr
-rwxr-xr-x    1 root     root           968 Dec 14 23:23 read-only-rootfs-hook.sh
-rwxr-xr-x    1 root     root           289 Dec 14 23:23 reboot
-rwxr-xr-x    1 root     root           585 Dec 14 23:23 rmnologin.sh
-rwxr-xr-x    1 root     root          1098 Dec 14 23:48 rng-tools
-rwxr-xr-x    1 root     root          1827 Dec 15 00:12 rpcbind
-rwxr-xr-x    1 root     root            25 Dec 14 23:47 run-postinsts
-rwxr-xr-x    1 root     root           336 Dec 14 23:23 save-rtc.sh
-rwxr-xr-x    1 root     root           438 Dec 14 23:23 sendsigs
-rwxr-xr-x    1 root     root           578 Dec 14 23:23 single
-rwxr-xr-x    1 root     root           782 Dec 14 23:23 sysfs.sh
lrwxrwxrwx    1 root     root            26 Dec 15  2016 syslog -> /etc/init.d/syslog.busybox
-rwxr-xr-x    1 root     root          1715 Dec 14 23:50 syslog.busybox
-rwxr-xr-x    1 root     root          3183 Dec 15 00:09 systemd-udevd
-rwxr-xr-x    1 root     root          1455 Dec 14 23:48 telnetd
-rwxr-xr-x    1 root     root           414 Dec 14 23:48 thermal-zone-init
-rwxr-xr-x    1 root     root          1033 Dec 14 23:48 thttpd
-rwxr-xr-x    1 root     root           663 Dec 15 00:00 uim-sysfs
-rwxr-xr-x    1 root     root           516 Dec 14 23:23 umountfs
-rwxr-xr-x    1 root     root           711 Dec 14 23:23 umountnfs.sh
-rwxr-xr-x    1 root     root          1473 Dec 14 23:23 urandom
-rwxr-xr-x    1 root     root          2750 Dec 15 00:00 weston


2.1 systemctl 확인 사항 

상위 init script에 대해 알아봤으니, 이제 systemd의 기본 명령어인 systemctl 을 이용하여 기본설정과 현재 동작하는 순서에 대해서 알아보자.

  • systemctl 명령어
root@am335x-evm:/# systemctl get-default // default mode 확인

root@am335x-evm:/# systemctl list-dependencies multi-user.target  // default-mode 관련부분 list 확인 
.......
root@am335x-evm:/# systemctl list-unit-files // unit 관련 list 전부확인
........


2.2 systemd unit 기능 확인 (AM335x-SK)

  • 현재 boot mode 확인
# systemctl get-default  // 현재 boot mode 3 
multi-user.target

상위 runlevel과 동일하며, 3에 해당하는 유저로, 만약 X Server를 이용한다면, graphical. target으로 나올 것이다.

default.target -> /lib/systemd/system/multi-user.target



  • Unit 분석 방법

이런식으로 현재 분석을 하고 있으며, 추후 더 시간이 있을 경우 다시 분석

$ grep WantedBy=multi-user.target -r /lib/systemd/system  // 확인 
$ grep WantedBy=multi-user.target -r /etc/systemd/system  // 확인
$ grep WantedBy=sysinit.target -r /lib/systemd/system 
$ ls multi-user.target.wants // 확인 

Unit 문법확인
  https://www.freedesktop.org/software/systemd/man/systemd.unit.html

일반적인 사용되는 Unit 전체구조 설명
  https://www.freedesktop.org/software/systemd/man/systemd.special.html#

*. slice 의 부분설명 (machine.slice, system.slice, user.slice )
  https://www.freedesktop.org/software/systemd/man/systemd.special.html#Special%20Slice%20Units

sysinit.target : 기본적으로 실행되는 곳
  https://www.freedesktop.org/software/systemd/man/systemd.special.html#sysinit.target


  • 각 unit 확인 (/etc/systemd/system)
/etc/systemd/system 의 unit은 대부분 link로 구성이 되며 사용되는것은 /lib/systemd/system 에 연결 or 사용되지 않는다면 /dev/null 연결
별도로 추가한다면 이곳에 추가
root@am335x-evm:/# cd /etc/systemd/system  // 사용하는 service는 /lib or /etc/systemd/system 
root@am335x-evm:/etc/systemd/system# ls -al
drwxr-xr-x   11 root     root          4096 Dec 15 02:24 .
drwxr-xr-x    5 root     root          4096 Dec 14 23:43 ..
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 banner.service -> /dev/null  // 사용하지 않는다면, /dev/null link 하며, 사용한다면, /lib/systemd/system link 
drwxr-xr-x    2 root     root          4096 Dec 14 23:15 basic.target.wants
drwxr-xr-x    2 root     root          4096 Dec 15 02:23 bluetooth.target.wants
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 bootmisc.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 busybox-udhcpc.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 checkfs.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 checkroot.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 dbus-1.service -> /dev/null
lrwxrwxrwx    1 root     root            37 Dec 15 02:23 dbus-org.bluez.service -> /lib/systemd/system/bluetooth.service
lrwxrwxrwx    1 root     root            40 Dec 15 02:23 dbus-org.freedesktop.Avahi.service -> /lib/systemd/system/avahi-daemon.service
lrwxrwxrwx    1 root     root            37 Dec 15 02:24 default.target -> /lib/systemd/system/multi-user.target
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 devpts.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 dmesg.service -> /dev/null
drwxr-xr-x    2 root     root          4096 Dec 15 02:22 getty.target.wants
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 hostname.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 hwclock.service -> /dev/null
drwxr-xr-x    2 root     root          4096 Dec 15 02:23 local-fs.target.wants
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 modutils.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 mountall.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 mountnfs.service -> /dev/null
drwxr-xr-x    2 root     root          4096 Dec 15 02:23 multi-user.target.wants
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 network-online.target.wants
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 networking.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 nfscommon.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 nfsserver.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 populate-volatile.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 psplash.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 read-only-rootfs-hook.service -> /dev/null
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 rmnologin.service -> /dev/null
drwxr-xr-x    2 root     root          4096 Dec 15 02:23 sockets.target.wants
-rw-r--r--    1 root     root           327 Dec 15 00:09 sync-clocks.service
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 sysfs.service -> /dev/null
drwxr-xr-x    2 root     root          4096 Dec 14 23:15 sysinit.target.wants
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 syslog.busybox.service -> /dev/null
lrwxrwxrwx    1 root     root            42 Dec 15 02:23 syslog.service -> /lib/systemd/system/busybox-syslog.service
-rw-r--r--    1 root     root           709 Dec 15 00:09 systemd-hostnamed.service
drwxr-xr-x    2 root     root          4096 Dec 15 02:23 systemd-random-seed.service.wants
-rw-r--r--    1 root     root           843 Dec 15 00:09 systemd-udevd.service
lrwxrwxrwx    1 root     root             9 Dec 15 02:23 urandom.service -> /dev/null

  • 각 unit 확인 (/lib/systemd/system)
기본으로 제공되는 unit으로 많이사용하는 것을 이곳에 넣어 보관

root@am335x-evm:/# cd /lib/systemd/system
root@am335x-evm:/lib/systemd/system# ls -al
-rw-r--r--    1 root     root           403 Dec 15 00:09 -.slice
drwxr-xr-x   19 root     root         12288 Dec 15 02:23 .
drwxr-xr-x    8 root     root          4096 Dec 14 23:50 ..
-rw-r--r--    1 root     root           506 Dec 15 00:10 alsa-restore.service
-rw-r--r--    1 root     root           410 Dec 15 00:10 alsa-state.service
lrwxrwxrwx    1 root     root            14 Dec 15 00:09 autovt@.service -> getty@.service
-rw-r--r--    1 root     root          1044 Dec 15 00:13 avahi-daemon.service
-rw-r--r--    1 root     root           874 Dec 15 00:13 avahi-daemon.socket
-rw-r--r--    1 root     root           879 Dec 15 00:09 basic.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:10 basic.target.wants
-rw-r--r--    1 root     root           176 Dec 15 00:13 bluetooth.service
-rw-r--r--    1 root     root           379 Dec 15 00:09 bluetooth.target
-rw-r--r--    1 root     root           358 Dec 15 00:09 busnames.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 busnames.target.wants
-rw-r--r--    1 root     root           116 Dec 14 23:50 busybox-klogd.service
-rw-r--r--    1 root     root           270 Dec 14 23:50 busybox-syslog.service
-rw-r--r--    1 root     root           770 Dec 15 00:09 console-getty.service
-rw-r--r--    1 root     root           752 Dec 15 00:09 console-shell.service
-rw-r--r--    1 root     root           791 Dec 15 00:09 container-getty@.service
lrwxrwxrwx    1 root     root            13 Dec 15 00:09 ctrl-alt-del.target -> reboot.target
lrwxrwxrwx    1 root     root            25 Dec 15 00:09 dbus-org.freedesktop.hostname1.service -> systemd-hostnamed.service
lrwxrwxrwx    1 root     root            23 Dec 15 00:09 dbus-org.freedesktop.locale1.service -> systemd-localed.service
lrwxrwxrwx    1 root     root            22 Dec 15 00:09 dbus-org.freedesktop.login1.service -> systemd-logind.service
lrwxrwxrwx    1 root     root            24 Dec 15 00:09 dbus-org.freedesktop.machine1.service -> systemd-machined.service
lrwxrwxrwx    1 root     root            24 Dec 15 00:09 dbus-org.freedesktop.network1.service -> systemd-networkd.service
lrwxrwxrwx    1 root     root            24 Dec 15 00:09 dbus-org.freedesktop.resolve1.service -> systemd-resolved.service
lrwxrwxrwx    1 root     root            25 Dec 15 00:09 dbus-org.freedesktop.timedate1.service -> systemd-timedated.service
-rw-r--r--    1 root     root           366 Dec 15 00:11 dbus.service
-rw-r--r--    1 root     root           106 Dec 15 00:11 dbus.socket
drwxr-xr-x    2 root     root          4096 Dec 15 00:11 dbus.target.wants
-rw-r--r--    1 root     root          1008 Dec 15 00:09 debug-shell.service
lrwxrwxrwx    1 root     root            16 Dec 15 00:09 default.target -> graphical.target
-rw-r--r--    1 root     root           670 Dec 15 00:09 dev-hugepages.mount
-rw-r--r--    1 root     root           624 Dec 15 00:09 dev-mqueue.mount
-rw-r--r--    1 root     root           131 Dec 15 00:00 dropbear.socket
-rw-r--r--    1 root     root           384 Dec 15 00:00 dropbear@.service
-rw-r--r--    1 root     root           453 Dec 15 00:00 dropbearkey.service
-rw-r--r--    1 root     root           995 Dec 15 00:09 emergency.service
-rw-r--r--    1 root     root           431 Dec 15 00:09 emergency.target
-rw-r--r--    1 root     root           501 Dec 15 00:09 exit.target
-rw-r--r--    1 root     root           440 Dec 15 00:09 final.target
-rw-r--r--    1 root     root           420 Dec 15 00:00 gadget-init.service
-rw-r--r--    1 root     root           460 Dec 15 00:09 getty.target
-rw-r--r--    1 root     root          1536 Dec 15 00:09 getty@.service
-rw-r--r--    1 root     root           198 Dec 14 23:48 gplv3-notice.service
-rw-r--r--    1 root     root           558 Dec 15 00:09 graphical.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 graphical.target.wants
-rw-r--r--    1 root     root           565 Dec 15 00:09 halt-local.service
-rw-r--r--    1 root     root           487 Dec 15 00:09 halt.target
-rw-r--r--    1 root     root           447 Dec 15 00:09 hibernate.target
-rw-r--r--    1 root     root           468 Dec 15 00:09 hybrid-sleep.target
-rw-r--r--    1 root     root           630 Dec 15 00:09 initrd-cleanup.service
-rw-r--r--    1 root     root           553 Dec 15 00:09 initrd-fs.target
-rw-r--r--    1 root     root           790 Dec 15 00:09 initrd-parse-etc.service
-rw-r--r--    1 root     root           526 Dec 15 00:09 initrd-root-fs.target
-rw-r--r--    1 root     root           640 Dec 15 00:09 initrd-switch-root.service
-rw-r--r--    1 root     root           691 Dec 15 00:09 initrd-switch-root.target
-rw-r--r--    1 root     root           664 Dec 15 00:09 initrd-udevadm-cleanup-db.service
-rw-r--r--    1 root     root           671 Dec 15 00:09 initrd.target
-rw-r--r--    1 root     root           501 Dec 15 00:09 kexec.target
-rw-r--r--    1 root     root           677 Dec 15 00:09 kmod-static-nodes.service
-rw-r--r--    1 root     root           658 Dec 15 00:09 ldconfig.service
-rw-r--r--    1 root     root           292 Dec 14 23:52 lighttpd.service
-rw-r--r--    1 root     root           395 Dec 15 00:09 local-fs-pre.target
-rw-r--r--    1 root     root           507 Dec 15 00:09 local-fs.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 local-fs.target.wants
-rw-r--r--    1 root     root           405 Dec 15 00:09 machine.slice
-rw-r--r--    1 root     root           531 Dec 15 00:09 machines.target
-rw-r--r--    1 root     root           492 Dec 15 00:09 multi-user.target
drwxr-xr-x    2 root     root          4096 Dec 15 02:22 multi-user.target.wants
-rw-r--r--    1 root     root           464 Dec 15 00:09 network-online.target
-rw-r--r--    1 root     root           461 Dec 15 00:09 network-pre.target
-rw-r--r--    1 root     root           480 Dec 15 00:09 network.target
-rw-r--r--    1 root     root           250 Dec 14 23:49 nfs-statd.service
-rw-r--r--    1 root     root           514 Dec 15 00:09 nss-lookup.target
-rw-r--r--    1 root     root           473 Dec 15 00:09 nss-user-lookup.target
-rw-r--r--    1 root     root           183 Dec 15 00:15 ofono.service
-rw-r--r--    1 root     root           521 Dec 14 23:50 opkg-configure.service
-rw-r--r--    1 root     root           554 Dec 15 00:09 org.freedesktop.hostname1.busname
-rw-r--r--    1 root     root           550 Dec 15 00:09 org.freedesktop.locale1.busname
-rw-r--r--    1 root     root           598 Dec 15 00:09 org.freedesktop.login1.busname
-rw-r--r--    1 root     root           549 Dec 15 00:09 org.freedesktop.machine1.busname
-rw-r--r--    1 root     root           675 Dec 15 00:09 org.freedesktop.network1.busname
-rw-r--r--    1 root     root           763 Dec 15 00:09 org.freedesktop.resolve1.busname
-rw-r--r--    1 root     root           480 Dec 15 00:09 org.freedesktop.systemd1.busname
-rw-r--r--    1 root     root           538 Dec 15 00:09 org.freedesktop.timedate1.busname
-rw-r--r--    1 root     root           354 Dec 15 00:09 paths.target
-rw-r--r--    1 root     root           552 Dec 15 00:09 poweroff.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 poweroff.target.wants
-rw-r--r--    1 root     root           377 Dec 15 00:09 printer.target
-rw-r--r--    1 root     root           178 Dec 15 00:16 ptpd.service
-rw-r--r--    1 root     root           576 Dec 15 00:09 quotaon.service
-rw-r--r--    1 root     root           612 Dec 15 00:09 rc-local.service
-rw-r--r--    1 root     root           543 Dec 15 00:09 reboot.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 reboot.target.wants
-rw-r--r--    1 root     root           396 Dec 15 00:09 remote-fs-pre.target
-rw-r--r--    1 root     root           482 Dec 15 00:09 remote-fs.target
-rw-r--r--    1 root     root           988 Dec 15 00:09 rescue.service
-rw-r--r--    1 root     root           486 Dec 15 00:09 rescue.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 rescue.target.wants
-rw-r--r--    1 root     root           212 Dec 15 00:12 rpcbind.service
-rw-r--r--    1 root     root           132 Dec 15 00:12 rpcbind.socket
-rw-r--r--    1 root     root           500 Dec 15 00:09 rpcbind.target
-rw-r--r--    1 root     root           385 Dec 14 23:47 run-postinsts.service
lrwxrwxrwx    1 root     root            15 Dec 15 00:09 runlevel0.target -> poweroff.target
lrwxrwxrwx    1 root     root            13 Dec 15 00:09 runlevel1.target -> rescue.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 runlevel1.target.wants
lrwxrwxrwx    1 root     root            17 Dec 15 00:09 runlevel2.target -> multi-user.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 runlevel2.target.wants
lrwxrwxrwx    1 root     root            17 Dec 15 00:09 runlevel3.target -> multi-user.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 runlevel3.target.wants
lrwxrwxrwx    1 root     root            17 Dec 15 00:09 runlevel4.target -> multi-user.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 runlevel4.target.wants
lrwxrwxrwx    1 root     root            16 Dec 15 00:09 runlevel5.target -> graphical.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 runlevel5.target.wants
lrwxrwxrwx    1 root     root            13 Dec 15 00:09 runlevel6.target -> reboot.target
-rw-r--r--    1 root     root          1059 Dec 14 23:23 serial-getty@.service
-rw-r--r--    1 root     root           402 Dec 15 00:09 shutdown.target
-rw-r--r--    1 root     root           362 Dec 15 00:09 sigpwr.target
-rw-r--r--    1 root     root           420 Dec 15 00:09 sleep.target
-rw-r--r--    1 root     root           409 Dec 15 00:09 slices.target
-rw-r--r--    1 root     root           380 Dec 15 00:09 smartcard.target
-rw-r--r--    1 root     root           356 Dec 15 00:09 sockets.target
drwxr-xr-x    2 root     root          4096 Dec 15 02:22 sockets.target.wants
-rw-r--r--    1 root     root           380 Dec 15 00:09 sound.target
-rw-r--r--    1 root     root           204 Dec 15 00:03 strongswan.service
-rw-r--r--    1 root     root           441 Dec 15 00:09 suspend.target
-rw-r--r--    1 root     root           353 Dec 15 00:09 swap.target
-rw-r--r--    1 root     root           715 Dec 15 00:09 sys-fs-fuse-connections.mount
-rw-r--r--    1 root     root           719 Dec 15 00:09 sys-kernel-config.mount
-rw-r--r--    1 root     root           662 Dec 15 00:09 sys-kernel-debug.mount
-rw-r--r--    1 root     root           518 Dec 15 00:09 sysinit.target
drwxr-xr-x    2 root     root          4096 Dec 15 02:22 sysinit.target.wants
lrwxrwxrwx    1 root     root             9 Dec 14 23:50 syslog.service -> /dev/null
-rw-r--r--    1 root     root          1235 Dec 15 00:09 syslog.socket
-rw-r--r--    1 root     root           585 Dec 15 00:09 system-update.target
-rw-r--r--    1 root     root           436 Dec 15 00:09 system.slice
-rw-r--r--    1 root     root           646 Dec 15 00:09 systemd-ask-password-console.path
-rw-r--r--    1 root     root           653 Dec 15 00:09 systemd-ask-password-console.service
-rw-r--r--    1 root     root           574 Dec 15 00:09 systemd-ask-password-wall.path
-rw-r--r--    1 root     root           681 Dec 15 00:09 systemd-ask-password-wall.service
-rw-r--r--    1 root     root           724 Dec 15 00:09 systemd-backlight@.service
-rw-r--r--    1 root     root           650 Dec 15 00:09 systemd-bootchart.service
-rw-r--r--    1 root     root           497 Dec 15 00:09 systemd-exit.service
-rw-r--r--    1 root     root           755 Dec 15 00:09 systemd-firstboot.service
-rw-r--r--    1 root     root           574 Dec 15 00:09 systemd-fsck-root.service
-rw-r--r--    1 root     root           600 Dec 15 00:09 systemd-fsck@.service
-rw-r--r--    1 root     root           544 Dec 15 00:09 systemd-halt.service
-rw-r--r--    1 root     root           631 Dec 15 00:09 systemd-hibernate-resume@.service
-rw-r--r--    1 root     root           501 Dec 15 00:09 systemd-hibernate.service
-rw-r--r--    1 root     root           710 Dec 15 00:09 systemd-hostnamed.service
-rw-r--r--    1 root     root           778 Dec 15 00:09 systemd-hwdb-update.service
-rw-r--r--    1 root     root           519 Dec 15 00:09 systemd-hybrid-sleep.service
-rw-r--r--    1 root     root           480 Dec 15 00:09 systemd-initctl.service
-rw-r--r--    1 root     root           524 Dec 15 00:09 systemd-initctl.socket
-rw-r--r--    1 root     root           667 Dec 15 00:09 systemd-journal-catalog-update.service
-rw-r--r--    1 root     root           731 Dec 15 00:09 systemd-journal-flush.service
-rw-r--r--    1 root     root           607 Dec 15 00:09 systemd-journald-audit.socket
-rw-r--r--    1 root     root          1090 Dec 15 00:09 systemd-journald-dev-log.socket
-rw-r--r--    1 root     root          1293 Dec 15 00:09 systemd-journald.service
-rw-r--r--    1 root     root           842 Dec 15 00:09 systemd-journald.socket
-rw-r--r--    1 root     root           557 Dec 15 00:09 systemd-kexec.service
-rw-r--r--    1 root     root           691 Dec 15 00:09 systemd-localed.service
-rw-r--r--    1 root     root          1126 Dec 15 00:09 systemd-logind.service
-rw-r--r--    1 root     root           693 Dec 15 00:09 systemd-machine-id-commit.service
-rw-r--r--    1 root     root           948 Dec 15 00:09 systemd-machined.service
-rw-r--r--    1 root     root           967 Dec 15 00:09 systemd-modules-load.service
-rw-r--r--    1 root     root           685 Dec 15 00:09 systemd-networkd-wait-online.service
-rw-r--r--    1 root     root          1339 Dec 15 00:09 systemd-networkd.service
-rw-r--r--    1 root     root           591 Dec 15 00:09 systemd-networkd.socket
-rw-r--r--    1 root     root          1378 Dec 15 00:09 systemd-nspawn@.service
-rw-r--r--    1 root     root           553 Dec 15 00:09 systemd-poweroff.service
-rw-r--r--    1 root     root           618 Dec 15 00:09 systemd-quotacheck.service
-rw-r--r--    1 root     root           717 Dec 15 00:09 systemd-random-seed.service
-rw-r--r--    1 root     root           548 Dec 15 00:09 systemd-reboot.service
-rw-r--r--    1 root     root           757 Dec 15 00:09 systemd-remount-fs.service
-rw-r--r--    1 root     root           907 Dec 15 00:09 systemd-resolved.service
-rw-r--r--    1 root     root           696 Dec 15 00:09 systemd-rfkill.service
-rw-r--r--    1 root     root           617 Dec 15 00:09 systemd-rfkill.socket
-rw-r--r--    1 root     root           497 Dec 15 00:09 systemd-suspend.service
-rw-r--r--    1 root     root           649 Dec 15 00:09 systemd-sysctl.service
-rw-r--r--    1 root     root           655 Dec 15 00:09 systemd-timedated.service
-rw-r--r--    1 root     root          1032 Dec 15 00:09 systemd-timesyncd.service
-rw-r--r--    1 root     root           598 Dec 15 00:09 systemd-tmpfiles-clean.service
-rw-r--r--    1 root     root           450 Dec 15 00:09 systemd-tmpfiles-clean.timer
-rw-r--r--    1 root     root           703 Dec 15 00:09 systemd-tmpfiles-setup-dev.service
-rw-r--r--    1 root     root           683 Dec 15 00:09 systemd-tmpfiles-setup.service
-rw-r--r--    1 root     root           823 Dec 15 00:09 systemd-udev-settle.service
-rw-r--r--    1 root     root           743 Dec 15 00:09 systemd-udev-trigger.service
-rw-r--r--    1 root     root           578 Dec 15 00:09 systemd-udevd-control.socket
-rw-r--r--    1 root     root           570 Dec 15 00:09 systemd-udevd-kernel.socket
-rw-r--r--    1 root     root           842 Dec 15 00:09 systemd-udevd.service
-rw-r--r--    1 root     root           630 Dec 15 00:09 systemd-update-done.service
-rw-r--r--    1 root     root           757 Dec 15 00:09 systemd-update-utmp-runlevel.service
-rw-r--r--    1 root     root           754 Dec 15 00:09 systemd-update-utmp.service
-rw-r--r--    1 root     root           573 Dec 15 00:09 systemd-user-sessions.service
-rw-r--r--    1 root     root           613 Dec 15 00:09 systemd-vconsole-setup.service
-rw-r--r--    1 root     root           395 Dec 15 00:09 time-sync.target
-rw-r--r--    1 root     root           405 Dec 15 00:09 timers.target
drwxr-xr-x    2 root     root          4096 Dec 15 00:09 timers.target.wants
-rw-r--r--    1 root     root           625 Dec 15 00:09 tmp.mount
-rw-r--r--    1 root     root           417 Dec 15 00:09 umount.target
-rw-r--r--    1 root     root           392 Dec 15 00:09 user.slice
-rw-r--r--    1 root     root           528 Dec 15 00:09 user@.service
-rw-r--r--    1 root     root           475 Dec 15 00:09 var-lib-machines.mount
-rw-r--r--    1 root     root           496 Dec 14 23:22 var-volatile-lib.service



root@am335x-evm:/lib/systemd/system# cd /usr/lib/systemd // system 이 존재하지 않음 
root@am335x-evm:/usr/lib/systemd# ls -al
drwxr-xr-x    6 root     root          4096 Dec 15  2016 .
drwxr-xr-x   56 root     root         53248 Dec 15  2016 ..
drwxr-xr-x    2 root     root          4096 Dec 15  2016 catalog
drwxr-xr-x    2 root     root          4096 Dec 15  2016 network
drwxr-xr-x    2 root     root          4096 Dec 15  2016 user
drwxr-xr-x    2 root     root          4096 Dec 15  2016 user-generators


  • 전체 service status 확인 및 기본분석 
방향키가 상 아래가 동작이 되며, 실시간으로 반영이 되기 때문에 확인가능
서비스 종료를 원한다면 q를 사용
  1. /etc/systemd/system.conf  : /lib/systemd/systemd --system 설정 : Consol에서만 가능  
  2. /etc/systemd/user.conf : /lib/systemd/systemd --user 설정 : SSH로 로그인시 확인가능


#systemctl status  // 현재 전체 service 확인 
?? am335x-evm
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Thu 1970-01-01 00:00:02 UTC; 46 years 11 months ago
   CGroup: /
           ???€init.scope  // init.scope 영역 , 만약 ssh를 사용하여 login을 한다면, user.slice가 존재 
           ?? ???€1 /sbin/init  // PID 1 /sbin/init
           ???€system.slice  //systemd 로 실행되는 각 service들 
           ?? ???€avahi-daemon.service
           ?? ?? ???€502 avahi-daemon: running [am335x-evm.local  // 502는 PID, init scirpt도 존재 
           ?? ?? ???€524 avahi-daemon: chroot helpe
           ?? ???€dbus.service
           ?? ??  ???€475 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
           ?? ???€lighttpd.service
           ?? ?? ???€695 /usr/sbin/lighttpd -D -f /etc/lighttpd.conf
           ?? ???€matrix-gui-2.0.service
           ?? ?? ???€857 /usr/bin/matrix_browser http://localhost:80/
           ?? ???€weston.service
           ?? ?? ???€811 /bin/sh /usr/bin/runWeston
           ?? ?? ???€814 weston --idle-time=0
           ?? ?? ???€826 /usr/libexec/weston-keyboard
           ?? ?? ???€828 /usr/libexec/weston-desktop-shell
           ?? ???€busybox-klogd.service
           ?? ?? ???€506 /sbin/klogd -n
           ?? ???€telnetd.service
           ?? ?? ???€819 /usr/sbin/telnetd
           ?? ???€system-serial\x2dgetty.slice
           ?? ?? ???€serial-getty@ttyS3.service
           ?? ?? ?? ???€1018 /sbin/agetty -8 -L ttyS3 115200 xterm
           ?? ?? ???€serial-getty@ttyGS0.service
           ?? ??   ???€685 /sbin/agetty -8 -L ttyGS0 115200 xterm
           ?? ???€systemd-journald.service
           ?? ?? ???€99 /lib/systemd/systemd-journald
           ?? ???€busybox-udhcpd.service
           ?? ?? ???€833 /usr/sbin/udhcpd -S /etc/udhcpd_usb0.conf
           ?? ???€thttpd.service
           ?? ?? ???€831 /usr/sbin/thttpd -d /srv/www -p 8080
           ?? ???€systemd-resolved.service
           ?? ?? ???€687 /lib/systemd/systemd-resolved
           ?? ???€systemd-timesyncd.service
           ?? ?? ???€396 /lib/systemd/systemd-timesyncd
           ?? ???€systemd-logind.service
           ?? ?? ???€465 /lib/systemd/systemd-logind
           ?? ???€systemd-networkd.service
           ?? ?? ???€496 /lib/systemd/systemd-networkd
           ?? ???€system-getty.slice
           ?? ?? ???€getty@tty1.service
           ?? ??   ???€682 /sbin/agetty --noclear tty1 linux
           ?? ???€ofono.service
           .......



  • systemd 관련 관리
  https://wiki.archlinux.org/index.php/systemd
  https://websetnet.com/ko/manage-systemd-services-and-units/
  http://www.phytec.eu/fileadmin/user_upload/downloads/Manuals/L-818e_1.pdf

  • Frame buffer Console 기능
  https://e2e.ti.com/support/embedded/linux/f/354/t/324198

2/27/2017

TI-Sitara FFmpeg Codec과 SDK 구조 및 성능 (참고용)

1. Sitara에서 제공해주는 FFmepg Codec

Sitara인 경우, Hardware Codec이 존재하지 않기 때문에, Soft Codec인 FFmpeg을 사용을 한다.
OpenMax에 FFmpeg을 추상적으로 연결하여, 한번더 걸쳐 사용도 가능하게지만,
Gstreamer에서 FFmpeg도 직접 지원되는 것 같다.

FFmpeg을 보니, LGPL, GPLv2, GPLv3 그리고, 다른 licenese를 가지고 있어 좀 복잡한것 같다.
법적인 Lincese는 아래를 참조하자
(사실 Chip 업체에 물어보는것이 제일 빠른것 같다, 골치 아프다)

  http://ffmpeg.org/legal.html

GPLv2+ codecs list

CodecDescription
ffenc_a64multiFFmpeg Multicolor charset for Commodore 64 encoder
ffenc_a64multi5FFmpeg Multicolor charset for Commodore 64, extended with 5th color (colram) encoder
ffenc_asv1FFmpeg ASUS V1 encoder
ffenc_asv2FFmpeg ASUS V2 encoder
ffenc_bmpFFmpeg BMP image encoder
ffenc_dnxhdFFmpeg VC3/DNxHD encoder
ffenc_dvvideoFFmpeg DV (Digital Video) encoder
ffenc_ffv1FFmpeg FFmpeg video codec #1 encoder
ffenc_ffvhuffFFmpeg Huffyuv FFmpeg variant encoder
ffenc_flashsvFFmpeg Flash Screen Video encoder
ffenc_flvFFmpeg Flash Video (FLV) / Sorenson Spark / Sorenson H.263 encoder
ffenc_h261FFmpeg H.261 encoder
ffenc_h263FFmpeg H.263 / H.263-1996 encoder
ffenc_h263pFFmpeg H.263+ / H.263-1998 / H.263 version 2 encoder
ffenc_huffyuvFFmpeg Huffyuv / HuffYUV encoder
ffenc_jpeglsFFmpeg JPEG-LS encoder
ffenc_ljpegFFmpeg Lossless JPEG encoder
ffenc_mjpegFFmpeg MJPEG (Motion JPEG) encoder
ffenc_mpeg1videoFFmpeg MPEG-1 video encoder
ffenc_mpeg4FFmpeg MPEG-4 part 2 encoder
ffenc_msmpeg4v1FFmpeg MPEG-4 part 2 Microsoft variant version 1 encoder
ffenc_msmpeg4v2FFmpeg MPEG-4 part 2 Microsoft variant version 2 encoder
ffenc_msmpeg4FFmpeg MPEG-4 part 2 Microsoft variant version 3 encoder
ffenc_pamFFmpeg PAM (Portable AnyMap) image encoder
ffenc_pbmFFmpeg PBM (Portable BitMap) image encoder
ffenc_pcxFFmpeg PC Paintbrush PCX image encoder
ffenc_pgmFFmpeg PGM (Portable GrayMap) image encoder
ffenc_pgmyuvFFmpeg PGMYUV (Portable GrayMap YUV) image encoder
ffenc_pngFFmpeg PNG image encoder
ffenc_ppmFFmpeg PPM (Portable PixelMap) image encoder
ffenc_qtrleFFmpeg QuickTime Animation (RLE) video encoder
ffenc_roqvideoFFmpeg id RoQ video encoder
ffenc_rv10FFmpeg RealVideo 1.0 encoder
ffenc_rv20FFmpeg RealVideo 2.0 encoder
ffenc_sgiFFmpeg SGI image encoder
ffenc_snowFFmpeg Snow encoder
ffenc_svq1FFmpeg Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1 encoder
ffenc_targaFFmpeg Truevision Targa image encoder
ffenc_tiffFFmpeg TIFF image encoder
ffenc_wmv1FFmpeg Windows Media Video 7 encoder
ffenc_wmv2FFmpeg Windows Media Video 8 encoder
ffenc_zmbvFFmpeg Zip Motion Blocks Video encoder
ffenc_aacFFmpeg Advanced Audio Coding encoder
ffenc_ac3FFmpeg ATSC A/52A (AC-3) encoder
ffenc_alacFFmpeg ALAC (Apple Lossless Audio Codec) encoder
ffenc_mp2FFmpeg MP2 (MPEG audio layer 2) encoder
ffenc_nellymoserFFmpeg Nellymoser Asao encoder
ffenc_real_144FFmpeg RealAudio 1.0 (14.4K) encoder encoder
ffenc_sonicFFmpeg Sonic encoder
ffenc_soniclsFFmpeg Sonic lossless encoder
ffenc_wmav1FFmpeg Windows Media Audio 1 encoder
ffenc_wmav2FFmpeg Windows Media Audio 2 encoder
ffenc_roq_dpcmFFmpeg id RoQ DPCM encoder
ffenc_adpcm_adxFFmpeg SEGA CRI ADX ADPCM encoder
ffenc_g722FFmpeg G.722 ADPCM encoder
ffenc_g726FFmpeg G.726 ADPCM encoder
ffenc_adpcm_ima_qtFFmpeg ADPCM IMA QuickTime encoder
ffenc_adpcm_ima_wavFFmpeg ADPCM IMA WAV encoder
ffenc_adpcm_msFFmpeg ADPCM Microsoft encoder
ffenc_adpcm_swfFFmpeg ADPCM Shockwave Flash encoder
ffenc_adpcm_yamahaFFmpeg ADPCM Yamaha encoder
ffenc_assFFmpeg Advanced SubStation Alpha subtitle encoder
ffenc_dvbsubFFmpeg DVB subtitles encoder
ffenc_dvdsubFFmpeg DVD subtitles encoder
ffenc_xsubFFmpeg DivX subtitles (XSUB) encoder
ffdec_aascFFmpeg Autodesk RLE decoder
ffdec_amvFFmpeg AMV Video decoder
ffdec_anmFFmpeg Deluxe Paint Animation decoder
ffdec_ansiFFmpeg ASCII/ANSI art decoder
ffdec_asv1FFmpeg ASUS V1 decoder
ffdec_asv2FFmpeg ASUS V2 decoder
ffdec_auraFFmpeg Auravision AURA decoder
ffdec_aura2FFmpeg Auravision Aura 2 decoder
ffdec_avsFFmpeg AVS (Audio Video Standard) video decoder
ffdec_bethsoftvidFFmpeg Bethesda VID video decoder
ffdec_bfiFFmpeg Brute Force & Ignorance decoder
ffdec_binkvideoFFmpeg Bink video decoder
ffdec_bmpFFmpeg BMP image decoder
ffdec_c93FFmpeg Interplay C93 decoder
ffdec_cavsFFmpeg Chinese AVS video (AVS1-P2, JiZhun profile) decoder
ffdec_cdgraphicsFFmpeg CD Graphics video decoder
ffdec_cinepakFFmpeg Cinepak decoder
ffdec_cljrFFmpeg Cirrus Logic AccuPak decoder
ffdec_camstudioFFmpeg CamStudio decoder
ffdec_cyuvFFmpeg Creative YUV (CYUV) decoder
ffdec_dnxhdFFmpeg VC3/DNxHD decoder
ffdec_dpxFFmpeg DPX image decoder
ffdec_dsicinvideoFFmpeg Delphine Software International CIN video decoder
ffdec_dvvideoFFmpeg DV (Digital Video) decoder
ffdec_dxaFFmpeg Feeble Files/ScummVM DXA decoder
ffdec_eacmvFFmpeg Electronic Arts CMV video decoder
ffdec_eamadFFmpeg Electronic Arts Madcow Video decoder
ffdec_eatgqFFmpeg Electronic Arts TGQ video decoder
ffdec_eatgvFFmpeg Electronic Arts TGV video decoder
ffdec_eatqiFFmpeg Electronic Arts TQI Video decoder
ffdec_8bpsFFmpeg QuickTime 8BPS video decoder
ffdec_8svx_expFFmpeg 8SVX exponential decoder
ffdec_8svx_fibFFmpeg 8SVX fibonacci decoder
ffdec_escape124FFmpeg Escape 124 decoder
ffdec_ffv1FFmpeg FFmpeg video codec #1 decoder
ffdec_ffvhuffFFmpeg Huffyuv FFmpeg variant decoder
ffdec_flashsvFFmpeg Flash Screen Video v1 decoder
ffdec_flicFFmpeg Autodesk Animator Flic video decoder
ffdec_flvFFmpeg Flash Video (FLV) / Sorenson Spark / Sorenson H.263 decoder
ffdec_4xmFFmpeg 4X Movie decoder
ffdec_frapsFFmpeg Fraps decoder
ffdec_FRWUFFmpeg Forward Uncompressed decoder
ffdec_h261FFmpeg H.261 decoder
ffdec_h263FFmpeg H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2 decoder
ffdec_h263iFFmpeg Intel H.263 decoder
ffdec_h264FFmpeg H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder
ffdec_huffyuvFFmpeg Huffyuv / HuffYUV decoder
ffdec_idcinvideoFFmpeg id Quake II CIN video decoder
ffdec_iff_byterun1FFmpeg IFF ByteRun1 decoder
ffdec_iff_ilbmFFmpeg IFF ILBM decoder
ffdec_indeo2FFmpeg Intel Indeo 2 decoder
ffdec_indeo3FFmpeg Intel Indeo 3 decoder
ffdec_indeo5FFmpeg Intel Indeo Video Interactive 5 decoder
ffdec_interplayvideoFFmpeg Interplay MVE video decoder
ffdec_jpeglsFFmpeg JPEG-LS decoder
ffdec_kgv1FFmpeg Kega Game Video decoder
ffdec_kmvcFFmpeg Karl Morton's video codec decoder
ffdec_locoFFmpeg LOCO decoder
ffdec_mdecFFmpeg Sony PlayStation MDEC (Motion DECoder) decoder
ffdec_mimicFFmpeg Mimic decoder
ffdec_mjpegFFmpeg MJPEG (Motion JPEG) decoder
ffdec_mjpegbFFmpeg Apple MJPEG-B decoder
ffdec_mmvideoFFmpeg American Laser Games MM Video decoder
ffdec_motionpixelsFFmpeg Motion Pixels video decoder
ffdec_mpeg4FFmpeg MPEG-4 part 2 decoder
ffdec_mpegvideoFFmpeg MPEG-1 video decoder
ffdec_msmpeg4v1FFmpeg MPEG-4 part 2 Microsoft variant version 1 decoder
ffdec_msmpeg4v2FFmpeg MPEG-4 part 2 Microsoft variant version 2 decoder
ffdec_msmpeg4FFmpeg MPEG-4 part 2 Microsoft variant version 3 decoder
ffdec_msrleFFmpeg Microsoft RLE decoder
ffdec_msvideo1FFmpeg Microsoft Video 1 decoder
ffdec_mszhFFmpeg LCL (LossLess Codec Library) MSZH decoder
ffdec_nuvFFmpeg NuppelVideo/RTJPEG decoder
ffdec_pamFFmpeg PAM (Portable AnyMap) image decoder
ffdec_pbmFFmpeg PBM (Portable BitMap) image decoder
ffdec_pcxFFmpeg PC Paintbrush PCX image decoder
ffdec_pgmFFmpeg PGM (Portable GrayMap) image decoder
ffdec_pgmyuvFFmpeg PGMYUV (Portable GrayMap YUV) image decoder
ffdec_pictorFFmpeg Pictor/PC Paint decoder
ffdec_pngFFmpeg PNG image decoder
ffdec_ppmFFmpeg PPM (Portable PixelMap) image decoder
ffdec_ptxFFmpeg V.Flash PTX image decoder
ffdec_qdrawFFmpeg Apple QuickDraw decoder
ffdec_qpegFFmpeg Q-team QPEG decoder
ffdec_qtrleFFmpeg QuickTime Animation (RLE) video decoder
ffdec_r10kFFmpeg AJA Kona 10-bit RGB Codec decoder
ffdec_rl2FFmpeg RL2 video decoder
ffdec_roqvideoFFmpeg id RoQ video decoder
ffdec_rpzaFFmpeg QuickTime video (RPZA) decoder
ffdec_rv10FFmpeg RealVideo 1.0 decoder
ffdec_rv20FFmpeg RealVideo 2.0 decoder
ffdec_rv30FFmpeg RealVideo 3.0 decoder
ffdec_rv40FFmpeg RealVideo 4.0 decoder
ffdec_sgiFFmpeg SGI image decoder
ffdec_smackvidFFmpeg Smacker video decoder
ffdec_smcFFmpeg QuickTime Graphics (SMC) decoder
ffdec_snowFFmpeg Snow decoder
ffdec_sp5xFFmpeg Sunplus JPEG (SP5X) decoder
ffdec_sunrastFFmpeg Sun Rasterfile image decoder
ffdec_svq1FFmpeg Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1 decoder
ffdec_svq3FFmpeg Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3 decoder
ffdec_targaFFmpeg Truevision Targa image decoder
ffdec_thpFFmpeg Nintendo Gamecube THP video decoder
ffdec_tiertexseqvideoFFmpeg Tiertex Limited SEQ video decoder
ffdec_tiffFFmpeg TIFF image decoder
ffdec_tmvFFmpeg 8088flex TMV decoder
ffdec_truemotion1FFmpeg Duck TrueMotion 1.0 decoder
ffdec_truemotion2FFmpeg Duck TrueMotion 2.0 decoder
ffdec_camtasiaFFmpeg TechSmith Screen Capture Codec decoder
ffdec_txdFFmpeg Renderware TXD (TeXture Dictionary) image decoder
ffdec_ultimotionFFmpeg IBM UltiMotion decoder
ffdec_vbFFmpeg Beam Software VB decoder
ffdec_vc1FFmpeg SMPTE VC-1 decoder
ffdec_vcr1FFmpeg ATI VCR1 decoder
ffdec_vmdvideoFFmpeg Sierra VMD video decoder
ffdec_vmncFFmpeg VMware Screen Codec / VMware Video decoder
ffdec_vp3FFmpeg On2 VP3 decoder
ffdec_vp5FFmpeg On2 VP5 decoder
ffdec_vp6FFmpeg On2 VP6 decoder
ffdec_vp6aFFmpeg On2 VP6 (Flash version, with alpha channel) decoder
ffdec_vp6fFFmpeg On2 VP6 (Flash version) decoder
ffdec_vp8FFmpeg On2 VP8 decoder
ffdec_vqavideoFFmpeg Westwood Studios VQA (Vector Quantized Animation) video decoder
ffdec_wmv1FFmpeg Windows Media Video 7 decoder
ffdec_wmv2FFmpeg Windows Media Video 8 decoder
ffdec_wmv3FFmpeg Windows Media Video 9 decoder
ffdec_wnv1FFmpeg Winnov WNV1 decoder
ffdec_xan_wc3FFmpeg Wing Commander III / Xan decoder
ffdec_xlFFmpeg Miro VideoXL decoder
ffdec_yopFFmpeg Psygnosis YOP Video decoder
ffdec_zlibFFmpeg LCL (LossLess Codec Library) ZLIB decoder
ffdec_zmbvFFmpeg Zip Motion Blocks Video decoder
ffdec_aacFFmpeg Advanced Audio Coding decoder
ffdec_aac_latmFFmpeg AAC LATM (Advanced Audio Codec LATM syntax) decoder
ffdec_ac3FFmpeg ATSC A/52A (AC-3) decoder
ffdec_alacFFmpeg ALAC (Apple Lossless Audio Codec) decoder
ffdec_alsFFmpeg MPEG-4 Audio Lossless Coding (ALS) decoder
ffdec_amrnbFFmpeg Adaptive Multi-Rate NarrowBand decoder
ffdec_apeFFmpeg Monkey's Audio decoder
ffdec_atrac1FFmpeg Atrac 1 (Adaptive TRansform Acoustic Coding) decoder
ffdec_atrac3FFmpeg Atrac 3 (Adaptive TRansform Acoustic Coding 3) decoder
ffdec_binkaudio_dctFFmpeg Bink Audio (DCT) decoder
ffdec_binkaudio_rdftFFmpeg Bink Audio (RDFT) decoder
ffdec_cookFFmpeg COOK decoder
ffdec_dcaFFmpeg DCA (DTS Coherent Acoustics) decoder
ffdec_dsicinaudioFFmpeg Delphine Software International CIN audio decoder
ffdec_eac3FFmpeg ATSC A/52B (AC-3, E-AC-3) decoder
ffdec_flacFFmpeg FLAC (Free Lossless Audio Codec) decoder
ffdec_gsmFFmpeg GSM decoder
ffdec_gsm_msFFmpeg GSM Microsoft variant decoder
ffdec_imcFFmpeg IMC (Intel Music Coder) decoder
ffdec_mace3FFmpeg MACE (Macintosh Audio Compression/Expansion) 3
ffdec_mace6FFmpeg MACE (Macintosh Audio Compression/Expansion) 6
ffdec_mlpFFmpeg MLP (Meridian Lossless Packing) decoder
ffdec_mp1floatFFmpeg MP1 (MPEG audio layer 1) decoder
ffdec_mp2floatFFmpeg MP2 (MPEG audio layer 2) decoder

ffdec_mpc7FFmpeg Musepack SV7 decoder
ffdec_mpc8FFmpeg Musepack SV8 decoder
ffdec_nellymoserFFmpeg Nellymoser Asao decoder
ffdec_qcelpFFmpeg QCELP / PureVoice decoder
ffdec_qdm2FFmpeg QDesign Music Codec 2 decoder
ffdec_real_144FFmpeg RealAudio 1.0 (14.4K) decoder
ffdec_real_288FFmpeg RealAudio 2.0 (28.8K) decoder
ffdec_shortenFFmpeg Shorten decoder
ffdec_siprFFmpeg RealAudio SIPR / ACELP.NET decoder
ffdec_smackaudFFmpeg Smacker audio decoder
ffdec_sonicFFmpeg Sonic decoder
ffdec_truehdFFmpeg TrueHD decoder
ffdec_truespeechFFmpeg DSP Group TrueSpeech decoder
ffdec_ttaFFmpeg True Audio (TTA) decoder
ffdec_twinvqFFmpeg VQF TwinVQ decoder
ffdec_vmdaudioFFmpeg Sierra VMD audio decoder
ffdec_wmaproFFmpeg Windows Media Audio 9 Professional decoder
ffdec_wmav1FFmpeg Windows Media Audio 1 decoder
ffdec_wmav2FFmpeg Windows Media Audio 2 decoder
ffdec_wmavoiceFFmpeg Windows Media Audio Voice decoder
ffdec_ws_snd1FFmpeg Westwood Audio (SND1) decoder
ffdec_pcm_lxfFFmpeg PCM signed 20-bit little-endian planar decoder
ffdec_interplay_dpcmFFmpeg DPCM Interplay decoder
ffdec_roq_dpcmFFmpeg DPCM id RoQ decoder
ffdec_sol_dpcmFFmpeg DPCM Sol decoder
ffdec_xan_dpcmFFmpeg DPCM Xan decoder
ffdec_adpcm_4xmFFmpeg ADPCM 4X Movie decoder
ffdec_adpcm_adxFFmpeg SEGA CRI ADX ADPCM decoder
ffdec_adpcm_ctFFmpeg ADPCM Creative Technology decoder
ffdec_adpcm_eaFFmpeg ADPCM Electronic Arts decoder
ffdec_adpcm_ea_maxis_xaFFmpeg ADPCM Electronic Arts Maxis CDROM XA decoder
ffdec_adpcm_ea_r1FFmpeg ADPCM Electronic Arts R1 decoder
ffdec_adpcm_ea_r2FFmpeg ADPCM Electronic Arts R2 decoder
ffdec_adpcm_ea_r3FFmpeg ADPCM Electronic Arts R3 decoder
ffdec_adpcm_ea_xasFFmpeg ADPCM Electronic Arts XAS decoder
ffdec_g722FFmpeg G.722 ADPCM decoder
ffdec_g726FFmpeg G.726 ADPCM decoder
ffdec_adpcm_ima_amvFFmpeg ADPCM IMA AMV decoder
ffdec_adpcm_ima_dk3FFmpeg ADPCM IMA Duck DK3 decoder
ffdec_adpcm_ima_dk4FFmpeg ADPCM IMA Duck DK4 decoder
ffdec_adpcm_ima_ea_eacsFFmpeg ADPCM IMA Electronic Arts EACS decoder
ffdec_adpcm_ima_ea_seadFFmpeg ADPCM IMA Electronic Arts SEAD decoder
ffdec_adpcm_ima_issFFmpeg ADPCM IMA Funcom ISS decoder
ffdec_adpcm_ima_qtFFmpeg ADPCM IMA QuickTime decoder
ffdec_adpcm_ima_smjpegFFmpeg ADPCM IMA Loki SDL MJPEG decoder
ffdec_adpcm_ima_wavFFmpeg ADPCM IMA WAV decoder
ffdec_adpcm_ima_wsFFmpeg ADPCM IMA Westwood decoder
ffdec_adpcm_msFFmpeg ADPCM Microsoft decoder
ffdec_adpcm_sbpro_2FFmpeg ADPCM Sound Blaster Pro 2-bit decoder
ffdec_adpcm_sbpro_3FFmpeg ADPCM Sound Blaster Pro 2.6-bit decoder
ffdec_adpcm_sbpro_4FFmpeg ADPCM Sound Blaster Pro 4-bit decoder
ffdec_adpcm_swfFFmpeg ADPCM Shockwave Flash decoder
ffdec_adpcm_thpFFmpeg ADPCM Nintendo Gamecube THP decoder
ffdec_adpcm_xaFFmpeg ADPCM CDROM XA decoder
ffdec_adpcm_yamahaFFmpeg ADPCM Yamaha decoder
ffdec_assFFmpeg Advanced SubStation Alpha subtitle decoder
ffdec_dvbsubFFmpeg DVB subtitles decoder
ffdec_dvdsubFFmpeg DVD subtitles decoder
ffdec_pgssubFFmpeg HDMV Presentation Graphic Stream subtitles decoder
ffdec_xsubFFmpeg XSUB decoder


2. Sitara SDK 구조(FFmpeg과 Gstremer)







  • AM335x의 성능
The following results are obtained on an AM335X EVM (DDR2) and an AM335X Starter Kit (DDR3) using pre-built SDK MLO, u-boot, kernel and file-system on an SD Card setup.
Audio/Video CodecCPU FrequencyDDR2DDR3
 %MEMWQVGA480pWVGA %MEMWQVGA480pWVGA
 %CPU %CPU %CPU %CPU %CPU %CPU
MPEG4 + AAC
WQVGA Clip: HistoryOfTIAV-WQVGA.mp4
Video: mpeg4, yuv420p, 480x272, 1326 kb/s, 24 fps
Audio: aac, 48000 Hz, stereo, s16, 69 kb/s
480p Clip: HistoryOfTIAV-480p.mp4
Video: mpeg4, yuv420p, 720x405, 1778 kb/s, 24 fps
Audio: aac, 48000 Hz, stereo, s16, 79 kb/s
WVGA Clip: HistoryOfTIAV-WVGA.mp4
Video: mpeg4, yuv420p, 800x450, 1326 kb/s, 24 fps
Audio: aac, 48000 Hz, stereo, s16, 69 kb/s
720M2344869122417380
600M529897498887
500M589797619796
275M95NANA96NANA
MPEG4
WQVGA Clip: HistoryOfTI-WQVGA.m4v
Video: mpeg4, yuv420p, 480x272, 24 fps
Audio: NA
480p Clip: HistoryOfTI-480p.m4v
Video: mpeg4, yuv420p, 720x405, 28 fps
Audio: NA
WVGA Clip: HistoryOfTI-WVGA.m4v
Video: mpeg4, yuv420p, 800x450, 24 fps
Audio: NA
720M1642887115427660
600M459878468869
500M559788539779
275M889695879696
H.264
WQVGA Clip: HistoryOfTI-WQVGA.264
Video: h264, yuv420p, 480x272, 29.97 fps
Audio: NA
480p Clip: HistoryOfTI-480p.264
Video: h264, yuv420p, 720x406, 29.97 fps
Audio: NA
WVGA Clip: HistoryOfTI-WVGA.264
Video: h264, yuv420p, 800x450, 29.97 fps
Audio: NA
720M1662989816639898
600M739897709898
500M819797799897
275M959692969693
AAC
Clip: HistoryOfTI.aac
Video: NA
Audio: aac, 48000 Hz, stereo, s16, 76 kb/s
720M109Same as VGASame as VGA102Same as VGASame as VGA
600M24
500M32
275M2625


  • 상위 정보에 대해서 

상위 정보는 아래의 사이트에서 가져왔지만, TI가 wiki를 최신정보로 인해 삭제하고 있는것 같아,
언제 삭제할지 몰라 그대로 많은 부분을 가져왔다. TI에서도 언급을 했지만, 참고용으로만 사용하라고 했으며,
성능도 역시 신뢰를 할수가 없다.
그리고, Gstreamer 사용법도 소개가 되었지만 역시 SDK가 변경이 되면서 version 달라지면서 동작이 제대로 안되는 부분이 있다.

  http://processors.wiki.ti.com/index.php/ARM_Multimedia_Users_Guide

  • gsteamer decoder 확인 

$ gst-inspect-0.10 | grep decode

  • 기본 동영상 TEST
아래와 같이 TEST를 하면 동영상은 동작은 하지만, scale을 조절을 할수가 없다.

$ gst-play-1.0 The_Power_of_Teamwork_-_Funny_Animation.mp4 
$ gst-play-1.0 The_Power_of_Teamwork_-_Funny_Animation.mp4 


  • Gstreamer 사용법 
  https://gstreamer.freedesktop.org/documentation/
  http://labs.isee.biz/index.php/Example_GStreamer_Pipelines


  • videoscale 사용법
  https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-videoscale.html


  • AM335x USB Camera Gsteamer 예제
  http://e2e.ti.com/support/arm/sitara_arm/f/791/p/462001/1662230