우분투 RDK 개발환경

RDK 권장 개발환경은 우분투 14.04 버전 사용하지만, 이미 우분투 14.04 LTS 버전은 지원이 중단된 상태이기 때문에 최신버전의 우분투 20.04 버전에서 RDK 개발환경 구성하였으며, RDK Central Wiki에서 Ubuntu 18.04 개발환경을 구성한 문서를 참고하여 정리하였다.

 

RDKB - Yocto 3.1 Migration for Turris-Omnia Reference platform - User manual - M4 - 2020 - RDK - RDK Central Wiki

Introduction Upgrading Turris-Omnia Reference Platform for Yocto 3.1 ie., from morty to dunfell Considerations for broadband & extender build: OpenEmbedded and Yocto Dunfell.Linux kernel 4.14.Version upgrades for bitbake and other oe recipes(if needed). En

wiki.rdkcentral.com

 

1. 빌드환경 구성

RDK 빌드시 필요한 개발 라이브러리 및 패키지 등을 설치하도록 한다.

$ sudo apt install build-essential gcc-multilib gcc++-multilib
$ sudo apt install git-core gawk wget texinfo diffstat texinfo chrpath socat cpio unzip xz-utils debianutils iputils-ping libegl1-mesa libsdl1.2-dev bison
$ sudo apt install phtyon3 python3-pip python3-pexpect python3-git python3-jinja2 pylint

 

2. Repo 설치

RDK 소스는 repo tool을 사용하여 받을수 있고, repo tool은 우분투 버전에 상관없이 아래 스크립트로 설치가 가능하다.

Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow. Repo is not meant to replace Git, only to make it easier to work with Git. The repo command is an executable Python script that you can put anywhere in your path.
$ sudo apt install curl
$ curl https://storage.googleapis.com/git-repo-downloads/repo > repo
$ chmod 755 repo
$ sudo mv repo /usr/bin

아래의 repo 명령어를 이용하여 RDK 소스를 다운 받을 수 있으나, 2020년 12월 현재 수 많은 daily update 인해 RDK가 매우 불안정한 상태이다.

$ repo init -u https://code.rdkcentral.com/r/manifests -b rdk-next -m rdkv-extsrc.xml
$ repo sync -j`nproc` --no-clone-bundle

RDK 소스를 받는 과정에서 code.rdkcentral.com 사이트의 인증정보를 요청하기 때문에, .netrc 파일에 로그인 정보를 생성하도록 한다.

$ vi ~/.netrc

machine code.rdkcentral.com login <ID> password <PASSWORD>


3. RDK 빌드

RDK 빌드는 bitbake를 사용하며, 빌드할 플랫폼을 설정하고 빌드를 진행하면 된다. 아래 명령어의 선택한 플랫폼은 라즈베리파이 선택하여 빌드를 진행한 것이다.

$ MACHINE=raspberrypi-rdk-hybrid source meta-cmf-raspberrypi/setup-environment
$ bitbake rdk-generic-hybrid-wpe-image