forked from commaai/agnos-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dockerfile for weston upstream building
ref commaai#16
- Loading branch information
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
enable-apt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM agnos-builder-rw as weston-builder | ||
|
||
RUN curl https://bootstrap.pypa.io/get-pip.py | python3 | ||
RUN pip install meson ninja | ||
|
||
COPY enable-apt/var/lib/apt /var/lib/apt | ||
COPY enable-apt/etc/apt /etc/apt | ||
RUN sudo apt update | ||
RUN apt install -y libpam0g-dev:armhf libdrm-dev:armhf wayland-protocols:armhf | ||
|
||
|
||
#Create a workspace | ||
RUN mkdir /root/workspace | ||
RUN mkdir /weston-prefix | ||
|
||
# clone latest DRM | ||
RUN git clone https://gitlab.freedesktop.org/mesa/drm.git /root/workspace/libdrm | ||
WORKDIR /root/workspace/libdrm | ||
RUN meson builddir/ | ||
RUN ninja -C builddir/ install | ||
|
||
# RUN git clone https://gitlab.freedesktop.org/wayland/wayland-protocols.git /root/workspace/wayland-protocols | ||
# WORKDIR /root/workspace/wayland-protocols | ||
# RUN meson builddir/ | ||
# RUN ninja -C builddir/ install | ||
|
||
RUN git clone https://github.com/linux-pam/linux-pam.git /root/workspace/linux-pam | ||
WORKDIR /root/workspace/linux-pam | ||
RUN apt install -y autopoint:armhf gettext:armhf | ||
RUN ./autogen.sh | ||
RUN ./configure --disable-regenerate-docu --disable-doc | ||
RUN apt install -y byacc | ||
RUN apt install -y flex | ||
RUN make -j | ||
|
||
# clone latest Weston | ||
RUN git clone https://gitlab.freedesktop.org/wayland/weston /root/workspace/weston | ||
WORKDIR /root/workspace/weston | ||
RUN meson -Dimage-webp=false builddir/ --prefix=/weston-prefix | ||
RUN ninja -C builddir/ install | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
roimgtag=agnos-builder | ||
rwimgtag=agnos-builder-rw | ||
if ! docker images | grep -q $rwimgtag; then | ||
if ! docker images | grep -q $roimgtag; then | ||
echo "you need to build the system first to get docker image $roimgtag" 1>&2 | ||
exit 1; | ||
fi | ||
rwimglayerid=$(docker history agnos-builder | grep 'tmptmp' | grep 0B | awk '{print$1}') | ||
docker tag $rwimglayerid $rwimgtag | ||
fi | ||
|
||
ubtarball=../ubuntu-base-20.04.1-base-arm64.tar.gz | ||
if [[ ! -d enable-apt ]]; then | ||
if [[ ! -f $ubtarball ]]; then | ||
echo "you need to build the system first to get $utarball" 1>&2 | ||
exit 1; | ||
fi | ||
mkdir enable-apt | ||
tar -C ./enable-apt -zxf $ubtarball {etc,var/lib}/apt | ||
fi | ||
docker build -f Dockerfile.weston -t weston-builder . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
lastimg=$(docker images | head -n2 | tail -n1 | awk '{print $3}') | ||
|
||
docker run --rm -it $lastimg bash |