Compare commits
10 commits
68ad88ce77
...
0499c3f0ef
Author | SHA1 | Date | |
---|---|---|---|
timoxa0 | 0499c3f0ef | ||
timoxa0 | b96306ca8f | ||
timoxa0 | 51df6cbce6 | ||
timoxa0 | 6d2aa96f44 | ||
timoxa0 | 3a32b3adb6 | ||
timoxa0 | 57f6c1027c | ||
timoxa0 | 056ac9efe9 | ||
timoxa0 | 2bc641aa22 | ||
timoxa0 | 563466c887 | ||
timoxa0 | f9a39959cb |
|
@ -87,6 +87,9 @@ gen_fstab "$rootdir"
|
|||
log "Adding %wheel to sudoers"
|
||||
cp ./drop/00_image_builder "$rootdir/etc/sudoers.d/00_image_builder"
|
||||
|
||||
# Enable zram
|
||||
log "Enabling zram"
|
||||
cp ./drop/99-zram.rules "$rootdir/etc/udev/rules.d/99-zram.rules"
|
||||
|
||||
# +++ Rotate gdm
|
||||
log "Configuring gdm and gnome"
|
||||
|
|
|
@ -67,6 +67,10 @@ chroot "$rootdir" systemctl enable qrtr-ns pd-mapper tqftpserv rmtfs
|
|||
|
||||
gen_fstab "$rootdir"
|
||||
|
||||
# Enable zram
|
||||
log "Enabling zram"
|
||||
cp ./drop/99-zram.rules "$rootdir/etc/udev/rules.d/99-zram.rules"
|
||||
|
||||
# +++ Rotate gdm
|
||||
log "Configuring gdm and gnome"
|
||||
mkdir -p "$rootdir/etc/skel/.config"
|
||||
|
|
25
cleanup.sh
25
cleanup.sh
|
@ -8,16 +8,19 @@ fi
|
|||
|
||||
source common.sh
|
||||
|
||||
# Begin script
|
||||
|
||||
# shellcheck disable=SC2162
|
||||
if find ./tmp/ -mindepth 1 -maxdepth 1 | read; then
|
||||
for d in ./tmp/*/; do
|
||||
log "Unmounting $d"
|
||||
detach_chroot "$d"
|
||||
umount "$d/boot/simpleinit" 2> /dev/null
|
||||
umount "$d/boot/efi" 2> /dev/null
|
||||
umount ./tmp/tmp.* 2> /dev/null
|
||||
rm -d "$d"
|
||||
done
|
||||
else
|
||||
find ./tmp/ -mindepth 1 -maxdepth 1 | read || {
|
||||
log_err "Nothing to clean"
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
|
||||
for d in ./tmp/*/; do
|
||||
log "Unmounting $d"
|
||||
detach_chroot "$d"
|
||||
umount "$d/boot/simpleinit" 2> /dev/null
|
||||
umount "$d/boot/efi" 2> /dev/null
|
||||
umount ./tmp/tmp.* 2> /dev/null
|
||||
rm -d "$d"
|
||||
done
|
|
@ -5,10 +5,19 @@ SIMPLEINIT_CMDLINE="root=PARTLABEL=linux loglevel=3 fbcon=rotate:1"
|
|||
function log() {
|
||||
printf "\e[1m\e[92m==>\e[0m \e[1m%s\e[0m\n" "$*"
|
||||
}
|
||||
|
||||
function log_err() {
|
||||
printf "\e[1m\e[31m==>\e[0m \e[1m%s\e[0m\n" "$*"
|
||||
}
|
||||
|
||||
function sigterm_handler() {
|
||||
printf "\e[1m\e[31m>\e[0m \e[1m%s\e[0m\n" "Shutdown signal received."
|
||||
exit 1
|
||||
}
|
||||
|
||||
trap 'trap " " SIGINT SIGTERM SIGHUP; kill 0; wait; sigterm_handler' SIGINT SIGTERM SIGHUP
|
||||
|
||||
|
||||
function create_image() {
|
||||
name="$(realpath "./raw/${1}.img")"
|
||||
if [ -z "$2" ]; then
|
||||
|
|
33
compress.sh
Executable file
33
compress.sh
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source common.sh
|
||||
|
||||
# Ensure that lon-tool installed
|
||||
which lon-tool > /dev/null 2>&1 || {
|
||||
log_err "lon-tool not found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2162
|
||||
find ./raw/ -mindepth 1 -maxdepth 1 | read || {
|
||||
log_err "Nothing to compress"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Settings
|
||||
DATE=$(date +"%d-%m-%y")
|
||||
|
||||
# Begin script
|
||||
log "Start compressing images"
|
||||
log "Current date: ${DATE}"
|
||||
|
||||
for image in raw/*; do
|
||||
full_image_path=$(realpath "$image")
|
||||
image_name=$(basename "$full_image_path")
|
||||
lni_name="${image_name/.img/""}"
|
||||
full_lni_path=$(realpath "./out/${image_name/.img/".lni"}")
|
||||
log "Compressing $lni_name"
|
||||
lon-tool image create -n "$lni_name" -v "$DATE" "$full_image_path" "$full_lni_path"
|
||||
done
|
||||
|
||||
log "Stop compressing images"
|
2
drop/00_image_builder
Normal file
2
drop/00_image_builder
Normal file
|
@ -0,0 +1,2 @@
|
|||
# /etc/sudoers.d/00_image_builder
|
||||
%wheel ALL=(ALL:ALL) ALL
|
2
drop/99-zram.rules
Normal file
2
drop/99-zram.rules
Normal file
|
@ -0,0 +1,2 @@
|
|||
# /etc/udev/rules.d/99-zram.rules
|
||||
ACTION=="add", KERNEL=="zram0", ATTR{comp_algorithm}="zstd", ATTR{disksize}="4G", RUN="/usr/bin/mkswap -U clear /dev/%k", TAG+="systemd"
|
10
drop/fstab
10
drop/fstab
|
@ -1,3 +1,7 @@
|
|||
PARTLABEL=linux / ext4 errors=remount-ro,x-systemd.growfs 0 1
|
||||
PARTLABEL=esp /boot/efi/ vfat umask=0022 0 1
|
||||
PARTLABEL=logfs /boot/simpleinit/ vfat umask=0022 0 1
|
||||
# /etc/fstab: static file system information.
|
||||
#
|
||||
# <file system> <mount point> <type> <options> <dump> <pass>
|
||||
PARTLABEL=linux / ext4 errors=remount-ro,x-systemd.growfs 0 1
|
||||
PARTLABEL=esp /boot/efi/ vfat defaults,umask=0022 0 1
|
||||
PARTLABEL=logfs /boot/simpleinit/ vfat defaults,umask=0022 0 1
|
||||
/dev/zram0 none swap defaults,pri=100,nofail 0 0
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#!/bin/bash
|
||||
# /opt/nabu/postinstall
|
||||
tar -xf /opt/nabu/efi.tar -C / || true
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
packages/linux-nabu-firmware-1.0.0-1-aarch64.deb
Executable file → Normal file
0
packages/linux-nabu-firmware-1.0.0-1-aarch64.deb
Executable file → Normal file
0
packages/linux-nabu-firmware-1.0.0-1-aarch64.pkg.tar.zst
Executable file → Normal file
0
packages/linux-nabu-firmware-1.0.0-1-aarch64.pkg.tar.zst
Executable file → Normal file
0
packages/linux-nabu-firmware-1.0.0-1.aarch64.rpm
Executable file → Normal file
0
packages/linux-nabu-firmware-1.0.0-1.aarch64.rpm
Executable file → Normal file
0
packages/qcom-services-1.0.0-1-aarch64.deb
Executable file → Normal file
0
packages/qcom-services-1.0.0-1-aarch64.deb
Executable file → Normal file
0
packages/qcom-services-1.0.0-1-aarch64.pkg.tar.zst
Executable file → Normal file
0
packages/qcom-services-1.0.0-1-aarch64.pkg.tar.zst
Executable file → Normal file
0
packages/qcom-services-1.0.0-1.aarch64.rpm
Executable file → Normal file
0
packages/qcom-services-1.0.0-1.aarch64.rpm
Executable file → Normal file
Loading…
Reference in a new issue