This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
05-sysroot_debian11_base.sh
executable file
·69 lines (52 loc) · 2.54 KB
/
05-sysroot_debian11_base.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
show_current_task
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --
try_to_extract_sysroot "sysroot_debian11_base"
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -
preAuthRoot && sudo debootstrap --arch=armhf --foreign bullseye "${SYSROOT}" "http://deb.debian.org/debian"
preAuthRoot && sudo cp "/usr/bin/qemu-arm-static" "${SYSROOT}/usr/bin"
mount_sysroot
preAuthRoot && sudo chroot "${SYSROOT}" "/debootstrap/debootstrap" --second-stage
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -
if [ -f "${SYSROOT}/etc/apt/sources.list" ] ; then
preAuthRoot && sudo cp "${SYSROOT}/etc/apt/sources.list" "${SYSROOT}/etc/apt/sources.list.bck"
fi
preAuthRoot && echo "
deb http://httpredir.debian.org/debian bullseye main contrib non-free
deb-src http://httpredir.debian.org/debian bullseye main contrib non-free
deb http://httpredir.debian.org/debian bullseye-backports main contrib non-free
deb-src http://httpredir.debian.org/debian bullseye-backports main contrib non-free
" | sudo tee "${SYSROOT}/etc/apt/sources.list"
### raise backports priority
preAuthRoot && echo "
Package: *
Pin: release n=bullseye-backports
Pin-Priority: 500
" | sudo tee "${SYSROOT}/etc/apt/preferences.d/backports"
if ! (preAuthRoot && sudo chroot "${SYSROOT}" apt update ) ; then exit 1 ; fi
preAuthRoot && sudo chroot "${SYSROOT}" apt upgrade -y
preAuthRoot && sudo chroot "${SYSROOT}" apt autoremove -y
preAuthRoot && sudo chroot "${SYSROOT}" apt clean -y
preAuthRoot && sudo chroot "${SYSROOT}" apt remove linux-boundary* linux-headers-* linux-image-* -y
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -
install_deb_pkgs \
python2-minimal \
python3-minimal \
exfat-utils \
exfat-fuse \
pkg-config \
v4l-utils \
net-tools \
libc6-dev \
ifupdown \
systemd \
locales \
rfkill \
fbset \
nano \
lshw \
preAuthRoot && sudo chroot "${SYSROOT}" chmod +s "/sbin/mount.fuse"
preAuthRoot && sudo chroot "${SYSROOT}" chmod +s "/sbin/mount.exfat"
preAuthRoot && sudo chroot "${SYSROOT}" chmod +s "/sbin/mount.exfat-fuse"
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -
make_sysroot_package "sysroot_debian11_base"