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_ubuntu1804_create_base.sh
executable file
·53 lines (37 loc) · 2.2 KB
/
05-sysroot_ubuntu1804_create_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
#!/bin/bash
show_current_task
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --
try_to_extract_sysroot "sysroot_ubuntu1804_base"
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -
preAuthRoot && sudo debootstrap --arch=armhf --foreign bionic "${SYSROOT}" "http://ports.ubuntu.com"
preAuthRoot && sudo cp "/usr/bin/qemu-arm-static" "${SYSROOT}/usr/bin"
mount_sysroot
preAuthRoot && sudo chroot "${SYSROOT}" "/debootstrap/debootstrap" --second-stage
#--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -
preAuthRoot && echo "deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe multiverse" | sudo tee "${SYSROOT}/etc/apt/sources.list"
preAuthRoot && echo "deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe multiverse" | sudo tee -a "${SYSROOT}/etc/apt/sources.list"
preAuthRoot && echo "deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse" | sudo tee -a "${SYSROOT}/etc/apt/sources.list"
preAuthRoot && sudo chroot "${SYSROOT}" apt update
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 \
libc6-dev \
locales \
systemd \
rfkill \
nano \
lshw \
ifupdown \
net-tools \
fbset \
python-minimal \
exfat-fuse \
exfat-utils
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_ubuntu1804_base"