Skip to content

Commit

Permalink
add dockerfile for weston upstream building
Browse files Browse the repository at this point in the history
  • Loading branch information
kfatehi committed Nov 21, 2021
1 parent 5e3de57 commit c48b470
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions weston/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-apt
41 changes: 41 additions & 0 deletions weston/Dockerfile.weston
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

22 changes: 22 additions & 0 deletions weston/build.sh
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 .
4 changes: 4 additions & 0 deletions weston/shell-last.sh
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

0 comments on commit c48b470

Please sign in to comment.