Premier battement d’Orin.
La forge est allumée, la roche est chauffée, les outils sont prêts. Sous l’œil du goéland et le souffle de l’hermine, la première pierre d’Erminig est posée. Ce n’est qu’un début. Le vent tourne, la mer se lève.
This commit is contained in:
commit
c8ea69ef55
8 changed files with 2885 additions and 0 deletions
9
Dockerfile
Executable file
9
Dockerfile
Executable file
|
|
@ -0,0 +1,9 @@
|
||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
RUN apt -y update && apt -y upgrade && apt -y dist-upgrade
|
||||||
|
RUN apt -y install binutils bison gawk g++ m4 make patch python3 texinfo pigz pixz zstd wget sudo xz-utils
|
||||||
|
|
||||||
|
RUN apt -y clean
|
||||||
|
RUN rm /bin/sh && ln -s bash /bin/sh
|
||||||
|
COPY lfs-12.2.sh /
|
||||||
|
|
||||||
3
DockerfileErminig
Executable file
3
DockerfileErminig
Executable file
|
|
@ -0,0 +1,3 @@
|
||||||
|
FROM scratch
|
||||||
|
ADD orin-rootfs.tar /
|
||||||
|
CMD ["/bin/bash"]
|
||||||
33
INSTRUCTIONS.md
Normal file
33
INSTRUCTIONS.md
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
# Contruction de l'image
|
||||||
|
```
|
||||||
|
docker build -t build-lfs:0.1 .
|
||||||
|
```
|
||||||
|
|
||||||
|
# Creation d'un système temporaire
|
||||||
|
```
|
||||||
|
docker run -it --rm --privileged -v ./build:/mnt/lfs build-lfs:0.1 /bin/bash /lfs-12.2.sh`
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
# Compilation de Orin
|
||||||
|
```
|
||||||
|
docker run -it --rm --privileged -v ./build:/mnt/lfs build-lfs:0.1 /bin/bash
|
||||||
|
mkdir /mnt/lfs/dev/pts
|
||||||
|
mount -t devpts none /mnt/lfs/dev/pts
|
||||||
|
mknod -m 666 /mnt/lfs/dev/ptmx
|
||||||
|
chroot /mnt/lfs
|
||||||
|
cd /root
|
||||||
|
bash post-chroot
|
||||||
|
```
|
||||||
|
|
||||||
|
# On prépare l'archive
|
||||||
|
# Commencer par sortir du chroot
|
||||||
|
```
|
||||||
|
tar --xattrs -cpf /tmp/erminig-rootfs.tar -C /mnt/lfs .
|
||||||
|
```
|
||||||
|
|
||||||
|
# Hors du conteneur
|
||||||
|
```
|
||||||
|
sudo docker build -t orin:0.1 -f ./DockerfileErminig .
|
||||||
|
```
|
||||||
|
|
||||||
32
README.md
Normal file
32
README.md
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
Erminig-Orin
|
||||||
|
|
||||||
|
La forge d’Erminig
|
||||||
|
|
||||||
|
Ici, c’est pas une distro, c’est une toolchain.
|
||||||
|
La première pierre d’Erminig, celle qui a coûté du café, des insultes et quelques années de santé mentale.
|
||||||
|
|
||||||
|
Si t’es là par accident, fuis.
|
||||||
|
Si t’es là par curiosité, tu peux regarder.
|
||||||
|
Si t’es là pour comprendre, t’es probablement déjà trop loin.
|
||||||
|
|
||||||
|
Orin, c’est la base minimale, posée à la main, destinée à engendrer le système complet.
|
||||||
|
Sans Orin, pas d’Erminig.
|
||||||
|
|
||||||
|
Philosophie
|
||||||
|
• Minimal à l’extrême – juste de quoi compiler, tester, et redémarrer.
|
||||||
|
• Zéro concession – chaque paquet, chaque binaire est là pour une raison.
|
||||||
|
• Pas pour toi – Si t’as besoin d’un guide, regarde ailleurs.
|
||||||
|
• Pas une distro, une base – Les paquets, c’est Govel et Pak qui les gèrent. Ici, c’est juste le socle.
|
||||||
|
|
||||||
|
Licence
|
||||||
|
|
||||||
|
Sous licence DOUARN – Défi Ouvert Utilisable Avec Risques Notables.
|
||||||
|
En gros : si ça casse, c’est ta faute. Et ça cassera.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Histoire
|
||||||
|
|
||||||
|
Erminig-Orin est née d’une obsession vieille de plusieurs années.
|
||||||
|
Compiler sa propre base, poser chaque brique, comprendre chaque putain de fichier.
|
||||||
|
C’est pas une distro clé en main. C’est une déclaration d’indépendance numérique.
|
||||||
BIN
assets/licence-douarn.png
Normal file
BIN
assets/licence-douarn.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1 MiB |
34
install.sh
Executable file
34
install.sh
Executable file
|
|
@ -0,0 +1,34 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
LFS=/home/lomig/dev/lfs
|
||||||
|
sudo umount -Rl $LFS/*
|
||||||
|
sudo rm -rf $LFS/*
|
||||||
|
mkdir -pv $LFS/{dev/{pts,shm},proc,sys,run}
|
||||||
|
|
||||||
|
podman build -t build-lfs:0.1 .
|
||||||
|
|
||||||
|
sudo mount -v --bind /dev $LFS/dev
|
||||||
|
sudo mount -vt devpts devpts -o gid=5,mode=0620 $LFS/dev/pts
|
||||||
|
sudo mount -vt proc proc $LFS/proc
|
||||||
|
sudo mount -vt sysfs sysfs $LFS/sys
|
||||||
|
sudo mount -vt tmpfs tmpfs $LFS/run
|
||||||
|
if [ -h $LFS/dev/shm ]; then
|
||||||
|
install -v -d -m 1777 $LFS$(realpath /dev/shm)
|
||||||
|
else
|
||||||
|
sudo mount -vt tmpfs -o nosuid,nodev tmpfs $LFS/dev/shm
|
||||||
|
fi
|
||||||
|
podman run --rm -it --privileged -v /home/lomig/dev/lfs:/mnt/lfs build-lfs:0.1 /bin/bash /lfs-12.2.sh
|
||||||
|
|
||||||
|
sudo cp /etc/resolv.conf $LFS/etc/resolv.conf
|
||||||
|
sudo mkdir -p $LFS/etc/ssl/certs
|
||||||
|
sudo wget https://curl.se/ca/cacert.pem -O $LFS/etc/ssl/certs/ca-certificates.crt
|
||||||
|
sudo cp ../Govel/govel $LFS/usr/bin/govel
|
||||||
|
sudo chroot "$LFS" /usr/bin/env -i \
|
||||||
|
HOME=/root \
|
||||||
|
TERM="$TERM" \
|
||||||
|
PS1='(lfs chroot) \u:\w\$ ' \
|
||||||
|
PATH=/usr/bin:/usr/sbin \
|
||||||
|
MAKEFLAGS="-j$(nproc)" \
|
||||||
|
TESTSUITEFLAGS="-j$(nproc)" \
|
||||||
|
/bin/bash /root/post-chroot
|
||||||
|
umount -Rl $LFS/* >> /dev/null 2>&1
|
||||||
2684
lfs-12.2.sh
Executable file
2684
lfs-12.2.sh
Executable file
File diff suppressed because it is too large
Load diff
90
version-check.sh
Normal file
90
version-check.sh
Normal file
|
|
@ -0,0 +1,90 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# A script to list version numbers of critical development tools
|
||||||
|
|
||||||
|
# If you have tools installed in other directories, adjust PATH here AND
|
||||||
|
# in ~lfs/.bashrc (section 4.4) as well.
|
||||||
|
|
||||||
|
LC_ALL=C
|
||||||
|
PATH=/usr/bin:/bin
|
||||||
|
|
||||||
|
bail() { echo "FATAL: $1"; exit 1; }
|
||||||
|
grep --version > /dev/null 2> /dev/null || bail "grep does not work"
|
||||||
|
sed '' /dev/null || bail "sed does not work"
|
||||||
|
sort /dev/null || bail "sort does not work"
|
||||||
|
|
||||||
|
ver_check()
|
||||||
|
{
|
||||||
|
if ! type -p $2 &>/dev/null
|
||||||
|
then
|
||||||
|
echo "ERROR: Cannot find $2 ($1)"; return 1;
|
||||||
|
fi
|
||||||
|
v=$($2 --version 2>&1 | grep -E -o '[0-9]+\.[0-9\.]+[a-z]*' | head -n1)
|
||||||
|
if printf '%s\n' $3 $v | sort --version-sort --check &>/dev/null
|
||||||
|
then
|
||||||
|
printf "OK: %-9s %-6s >= $3\n" "$1" "$v"; return 0;
|
||||||
|
else
|
||||||
|
printf "ERROR: %-9s is TOO OLD ($3 or later required)\n" "$1";
|
||||||
|
return 1;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
ver_kernel()
|
||||||
|
{
|
||||||
|
kver=$(uname -r | grep -E -o '^[0-9\.]+')
|
||||||
|
if printf '%s\n' $1 $kver | sort --version-sort --check &>/dev/null
|
||||||
|
then
|
||||||
|
printf "OK: Linux Kernel $kver >= $1\n"; return 0;
|
||||||
|
else
|
||||||
|
printf "ERROR: Linux Kernel ($kver) is TOO OLD ($1 or later required)\n" "$kver";
|
||||||
|
return 1;
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Coreutils first because --version-sort needs Coreutils >= 7.0
|
||||||
|
ver_check Coreutils sort 8.1 || bail "Coreutils too old, stop"
|
||||||
|
ver_check Bash bash 3.2
|
||||||
|
ver_check Binutils ld 2.13.1
|
||||||
|
ver_check Bison bison 2.7
|
||||||
|
ver_check Diffutils diff 2.8.1
|
||||||
|
ver_check Findutils find 4.2.31
|
||||||
|
ver_check Gawk gawk 4.0.1
|
||||||
|
ver_check GCC gcc 5.2
|
||||||
|
ver_check "GCC (C++)" g++ 5.2
|
||||||
|
ver_check Grep grep 2.5.1a
|
||||||
|
ver_check Gzip gzip 1.3.12
|
||||||
|
ver_check M4 m4 1.4.10
|
||||||
|
ver_check Make make 4.0
|
||||||
|
ver_check Patch patch 2.5.4
|
||||||
|
ver_check Perl perl 5.8.8
|
||||||
|
ver_check Python python3 3.4
|
||||||
|
ver_check Sed sed 4.1.5
|
||||||
|
ver_check Tar tar 1.22
|
||||||
|
ver_check Texinfo texi2any 5.0
|
||||||
|
ver_check Xz xz 5.0.0
|
||||||
|
ver_kernel 4.19
|
||||||
|
|
||||||
|
if mount | grep -q 'devpts on /dev/pts' && [ -e /dev/ptmx ]
|
||||||
|
then echo "OK: Linux Kernel supports UNIX 98 PTY";
|
||||||
|
else echo "ERROR: Linux Kernel does NOT support UNIX 98 PTY"; fi
|
||||||
|
|
||||||
|
alias_check() {
|
||||||
|
if $1 --version 2>&1 | grep -qi $2
|
||||||
|
then printf "OK: %-4s is $2\n" "$1";
|
||||||
|
else printf "ERROR: %-4s is NOT $2\n" "$1"; fi
|
||||||
|
}
|
||||||
|
echo "Aliases:"
|
||||||
|
alias_check awk GNU
|
||||||
|
alias_check yacc Bison
|
||||||
|
alias_check sh Bash
|
||||||
|
|
||||||
|
echo "Compiler check:"
|
||||||
|
if printf "int main(){}" | g++ -x c++ -
|
||||||
|
then echo "OK: g++ works";
|
||||||
|
else echo "ERROR: g++ does NOT work"; fi
|
||||||
|
rm -f a.out
|
||||||
|
|
||||||
|
if [ "$(nproc)" = "" ]; then
|
||||||
|
echo "ERROR: nproc is not available or it produces empty output"
|
||||||
|
else
|
||||||
|
echo "OK: nproc reports $(nproc) logical cores are available"
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue