# Tutorial for bootstrapping Debian Bookworm (12) from source.
-Useful Links (External):
+**This project is part of [NLnet NGI0 Entrust](https://nlnet.nl/entrust)
+and has received funding from the European Union’s Horizon Europe research and innovation programme under grant agreement No 101069594.**
+
+Useful Links:
* [Read about sbuild and understand how it works](https://wiki.debian.org/sbuild)
* [dpkg-buildflags man page](https://manpages.debian.org/bookworm/dpkg-dev/dpkg-buildflags.1.en.html) (optional, in case some flags need to be changed)
* [apt-ftparchive man page](https://manpages.debian.org/bookworm/apt-utils/apt-ftparchive.1.en.html) (optional, in case you want to customize the repo)
* [debootstrap wiki page](https://wiki.debian.org/Debootstrap) (optional,
in case you want to customize your chroot)
+* please note this tarball contains executable binaries and it is 100% your responsibility to check them or take appropriate measures. we take no responsibility and accept no liability <https://ftp.libre-soc.org/sffs/debian-12-sffs.2023sep01.tar.xz>. downloading this file constitutes your agreement to these terms.
Useful links (Libre-SOC):
* bugreport <https://bugs.libre-soc.org/show_bug.cgi?id=1130>
-* Devscripts Libre-SOC page: [[devscripts]]
+* Devscripts Libre-SOC page: [[HDL_workflow/devscripts]]
* [Libre-SOC devscripts repo](https://git.libre-soc.org/?p=dev-env-setup.git;a=tree)
## Video Tutorial
You can approach this in two ways: either build the full base Debian
chroot packages yourself using Debian's build tools, optionally automated
with our [scripts](https://git.libre-soc.org/?p=dev-env-setup.git;a=tree),
-or use the [prebuilt rootfs] in a compressed tar archive.
+or use the [prebuilt rootfs for which you accept full liability and responsibility](https://ftp.libre-soc.org/sffs/debian-12-sffs.2023sep01.tar.xz) in a compressed tar archive.
## System requirements
Debian's defaults
* `mk-schroot-bookworm` for creating the bookworm schroot used by sbuild
and adding our dpkg-buildflags to build for sffs
+* `build-glibc-debian` to build glibc, currently has to be standalone because of [this](https://bugs.libre-soc.org/show_bug.cgi?id=1130#c8)
+* `add-sffs-flags-debian` to add the SFFS CFLAGS
* `build-bookworm-sffs` to build the packages needed for a debootstrap
chroot directory
* `create-deb-repo` to create a local dpkg repository of the built packages
# ./install-sbuild-apt-reqs
# ./mk-schroot-bookworm
# exit
+ $ ./build-glibc-debian
+ $ sudo bash
+ # ./add-sffs-flags-debian
+ # exit
$ ./build-bookworm-sffs
$ ./create-deb-repo
$ ./mk-sffs-chroot
responsibility when downloading arbitrary binaries, and we accept no
liability whatsoever for anything arising by you downloading them.
- $ curl -O [link to be added]
+ $ curl -O https://ftp.libre-soc.org/sffs/debian-12-sffs.2023sep01.tar.xz
$ mkdir bookworm-sffs && cd bookworm-sffs
$ tar xpvf bookworm-sffs.tar.xz --xattrs-include='*.*' --numeric-owner
$ cd ..