Limitation:
Linux system is needed when using SDK in a volume;
No Qt develop environment, yet.
Steps:
1. new folder, edit dockerfile
2. Build docker image
3. Download and extract Lyra SDK
4. run a container with interactive shell
5. follow steps in wiki (repo sync, build.sh lunch, build.sh)
Images build is in local SDK folder. When container is running, one can remote into container using vscode. (extension installed will loss after container removal)
dockerfile:
Code: Select all
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive TZ=Asia/Shanghai
RUN apt-get update && apt-get install -y git ssh make gcc libssl-dev \
liblz4-tool expect expect-dev g++ patchelf chrpath gawk texinfo chrpath \
diffstat binfmt-support qemu-user-static live-build bison flex fakeroot \
cmake gcc-multilib g++-multilib unzip device-tree-compiler ncurses-dev \
libgucharmap-2-90-dev bzip2 expat gpgv2 cpp-aarch64-linux-gnu libgmp-dev \
libmpc-dev bc python-is-python3 python2 rsync curl file bsdmainutils \
python3-six python3-setuptools python3-tomli
RUN ln -sf /usr/bin/python2 /usr/bin/python
# Create user 'lyrauser', set password, add to sudo group
RUN useradd -m -s /bin/bash lyrauser && \
echo 'lyrauser:lyrapass' | chpasswd
# Set default user
USER lyrauser
WORKDIR /lyra
ENTRYPOINT ["echo"]
CMD ["Dependency install complete"]
Code: Select all
docker build . -t lyra_buildroot:latest &> build.log
Code: Select all
docker run -it --rm -v /<Lyra SDK folder>/lyra_1.5:/lyra --entrypoint /bin/bash lyra_buildroot:latest
Code: Select all
lyrauser@aedb222752fc:/lyra$ ls -l
total 138
lrwxrwxrwx 1 lyrauser lyrauser 31 Aug 18 15:16 Makefile -> device/rockchip/common/Makefile
lrwxrwxrwx 1 lyrauser lyrauser 32 Aug 18 15:39 README.md -> device/rockchip/common/README.md
drwxr-xr-x 4 lyrauser lyrauser 4 Aug 18 15:15 app
lrwxrwxrwx 1 lyrauser lyrauser 39 Aug 18 15:16 build.sh -> device/rockchip/common/scripts/build.sh
drwxr-xr-x 19 lyrauser lyrauser 37 Aug 18 16:06 buildroot
lrwxrwxrwx 1 lyrauser lyrauser 22 Aug 18 15:39 common -> device/rockchip/common
drwxr-xr-x 3 lyrauser lyrauser 3 Aug 18 15:15 device
drwxr-xr-x 8 lyrauser lyrauser 11 Aug 18 15:16 docs
drwxr-xr-x 16 lyrauser lyrauser 16 Aug 18 15:16 external
drwxr-xr-x 11 lyrauser lyrauser 16 Aug 18 15:16 hal
lrwxrwxrwx 1 lyrauser lyrauser 10 Aug 18 15:16 kernel -> kernel-6.1
drwxr-xr-x 27 lyrauser lyrauser 86 Aug 18 17:03 kernel-6.1
drwxr-xr-x 7 lyrauser lyrauser 17 Aug 18 17:04 output
lrwxrwxrwx 1 lyrauser lyrauser 50 Aug 18 17:00 overlay -> device/rockchip/common/overlays/rootfs/custom/root
drwxr-xr-x 3 lyrauser lyrauser 3 Aug 18 15:16 prebuilts
drwxr-xr-x 10 lyrauser lyrauser 14 Aug 18 16:03 rkbin
lrwxrwxrwx 1 lyrauser lyrauser 41 Aug 18 15:16 rkflash.sh -> device/rockchip/common/scripts/rkflash.sh
lrwxrwxrwx 1 lyrauser lyrauser 15 Aug 18 17:04 rockdev -> output/firmware
drwxr-xr-x 15 lyrauser lyrauser 26 Aug 18 15:16 rtos
drwxr-xr-x 6 lyrauser lyrauser 7 Aug 18 15:16 tools
drwxr-xr-x 28 lyrauser lyrauser 70 Aug 18 16:03 u-boot
drwxr-xr-x 8 lyrauser lyrauser 13 Aug 18 15:16 yocto
lyrauser@aedb222752fc:/lyra$
