recovery build

Signed-off-by: Michel-FK <michel.stempin@funkey-project.com>
This commit is contained in:
Michel-FK
2020-10-20 23:26:28 +02:00
parent 5b164e465b
commit 4d8b81a40e
69 changed files with 3075 additions and 38 deletions

124
docker/Dockerfile Normal file
View File

@@ -0,0 +1,124 @@
FROM debian:buster-20200514-slim
LABEL \
maintainer="Michel Stempin <michel.stempin@funkey-project.com>" \
vendor="FunKey Project" \
description="Container with everything needed to build FunKey-OS"
# Setup environment
ENV DEBIAN_FRONTEND noninteractive
# This repository can be a bit slow at times. Don't panic...
COPY apt-sources.list /etc/apt/sources.list
RUN \
# Install dependencies
# See https://buildroot.org/downloads/manual/manual.html#requirement
apt-get update && \
apt-get install -y -q --no-install-recommends \
# MANDATORY build tools
#which \
#sed \
make \
binutils \
build-essential \
gcc \
g++ \
#bash \
patch \
#gzip \
bzip2 \
perl \
#tar \
cpio \
unzip \
rsync \
file \
bc \
# MANDATORY source fetching tools
wget \
# OPTIONAL recommended dependencies
python \
# OPTIONAL configuration interface dependencies
libncurses5-dev \
#libqt5-dev \
#libglib2.0-dev libgtk2.0-dev libglade2-dev \
# OPTIONAL source fetching tools
#bazaar \
# bzr \
cvs \
git \
mercurial \
rsync \
liblscp-dev \
subversion \
# OPTIONAL java related packages
#javacc \
#jarwrapper \
# OPTIONAL documentation generation tools
#asciidoc \
#w3m \
#python3 \
#dblatex \
# OPTIONAL graph generation tools
#graphviz \
#python-matplotlib \
#
# ADDITIONAL dependency to get root certificates
ca-certificates \
# ADDITIONAL dependency to get client ssh
openssh-client \
# ADDITIONAL dependency to get unbuffer
expect \
# ADDITIONAL dependency to get locale-gen
locales \
# ADDITIONAL nice to have dependencies
sudo \
procps \
&& \
apt-get -y autoremove && \
apt-get -y clean && \
rm -rf /var/lib/apt/lists/* && \
#
# Set locale
sed -i 's/# \(en_US.UTF-8\)/\1/' /etc/locale.gen && \
locale-gen --purge --lang en_US.UTF-8 && \
#
# Add user
useradd -ms /bin/bash funkey && \
usermod -a -G sudo funkey && \
echo "funkey:funkey" | chpasswd && \
#
# Create skeleton directories
# mkdir -p /home/funkey/.buildroot-ccache \
# /home/funkey/FunKey-OS/buildroot \
# /home/funkey/FunKey-OS/FunKey/dl \
# /home/funkey/FunKey-OS/FunKey/output/build \
# /home/funkey/FunKey-OS/FunKey/output/host \
# /home/funkey/FunKey-OS/FunKey/output/target && \
#
# Set file ownership
chown -R funkey:funkey /home/funkey
# Set user
USER funkey
# Set environment
ENV \
HOME=/home/funkey \
LC_ALL=en_US.UTF-8 \
BR2_EXTERNAL=../FunKey \
O=../FunKey/output
# Set working directory
WORKDIR /home/funkey/
#WORKDIR /home/funkey/FunKey-OS
# VOLUME ["/home/funkey/.buildroot-ccache", \
# "/home/funkey/FunKey-OS/buildroot", \
# "/home/funkey/FunKey-OS/FunKey/dl", \
# "/home/funkey/FunKey-OS/FunKey/output/build", \
# "/home/funkey/FunKey-OS/FunKey/output/host", \
# "/home/funkey/FunKey-OS/FunKey/output/target"]
#CMD ["/bin/bash"]

36
docker/README_FR Normal file
View File

@@ -0,0 +1,36 @@
Installer Docker si pas déjà fait
Avoir 11.4GB de libre sur le disque (!)
Décompresser le ZIP et lancer une CLI dans le répertoire "FunKey-OS-docker" résultant
Construire l'image Docker (attention au "." final) :
docker build -t funkey-project/funkey-os .
Lancer le container :
docker run -d -it --name funkey-os funkey-project/funkey-os
En attendant d'être publics, pour pouvoir accéder à nos repositories privés sur Github, il faut configurer SSH correctement dans le container :
docker exec funkey-os mkdir .ssh
for i in id_rsa_funkey* config known_hosts; do docker cp $i funkey-os:/home/funkey/.ssh/;done
Se rattacher au container qui tourne :
docker attach funkey-os
Cloner notre repository FunKey-OS :
git clone --recurse-submodules git@fk:FunKey-Project/FunKey-OS.git
Là, il faut lancer les commandes habituelles pour compiler FunKey-OS :
cd FunKey-OS
./fun funkey_defconfig
./have fun
Et au bout d'1h47 (contre 10 min sur ma machine non virtuelle avec ccache...) la compilation est enfin terminée (Ctrl-P + Ctrl-Q pour sortir du container sans le stopper) et tu peux récupérer l'image de la carte SD sur la machine hôte :
docker cp funkey-os:/home/funkey/FunKey-OS/FunKey/output/images/sdcard.img ./

4
docker/apt-sources.list Normal file
View File

@@ -0,0 +1,4 @@
# Latest just before 20200514T000000Z:
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20200513T204247Z/ buster main
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20200513T204247Z/ buster-updates main
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/20200513T204247Z/ buster/updates main

13
docker/config Normal file
View File

@@ -0,0 +1,13 @@
Host FunKey
hostname FunKey
User root
Host funkey
hostname funkey
User root
Host fk
HostName github.com
User Michel-FK
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa_funkey

5
docker/known_hosts Normal file
View File

@@ -0,0 +1,5 @@
|1|BuNvANzfO2zw1w0eg8eyiJLbhgY=|24taKCdTsqHCi0/2Mwc1UxSHxog= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJ9WoqmYiRDqcgZbhuvCJOdAaCJ9mPXeg3rnJxfKL078Lr+aTKyANT8l5wGu3UX03zDzUm7MJNwfAWv3XPXHmp0=
|1|dwNzOK8zDIRKu45XvdfbpHJ3BC0=|iRQPqlaZndUL42KXy6kyLwOlap8= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBJ9WoqmYiRDqcgZbhuvCJOdAaCJ9mPXeg3rnJxfKL078Lr+aTKyANT8l5wGu3UX03zDzUm7MJNwfAWv3XPXHmp0=
|1|muZDgtm4oU973IiPGnq/FYcbLt8=|FtWXsc8ImVkAvOItIus22Xwv/Os= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjI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