Update kernel; remove hacky rotation fix

This commit is contained in:
timoxa0 2024-10-14 08:33:07 +05:00
parent f69a86baf5
commit 2ec39cff27
9 changed files with 98 additions and 97 deletions

View file

@ -91,38 +91,38 @@ chroot "$rootdir" locale-gen
echo "LANG=en_US.UTF-8" > "$rootdir/etc/locale.conf"
# +++ Rotate user desktop and gdm
log "Configuring gdm and gnome"
mkdir -p "$rootdir/etc/skel/.config"
echo '<monitors version="2">
<configuration>
<logicalmonitor>
<x>0</x>
<y>0</y>
<scale>2</scale>
<primary>yes</primary>
<transform>
<rotation>right</rotation>
<flipped>no</flipped>
</transform>
<monitor>
<monitorspec>
<connector>DSI-1</connector>
<vendor>unknown</vendor>
<product>unknown</product>
<serial>unknown</serial>
</monitorspec>
<mode>
<width>1600</width>
<height>2560</height>
<rate>104.000</rate>
</mode>
</monitor>
</logicalmonitor>
</configuration>
</monitors>
' > "$rootdir/etc/skel/.config/monitors.xml"
chroot "$rootdir" bash -c 'cp /etc/skel/.config/monitors.xml ~gdm/.config/'
chroot "$rootdir" bash -c 'chown gdm: ~gdm/.config/'
#log "Configuring gdm and gnome"
#mkdir -p "$rootdir/etc/skel/.config"
#echo '<monitors version="2">
# <configuration>
# <logicalmonitor>
# <x>0</x>
# <y>0</y>
# <scale>2</scale>
# <primary>yes</primary>
# <transform>
# <rotation>right</rotation>
# <flipped>no</flipped>
# </transform>
# <monitor>
# <monitorspec>
# <connector>DSI-1</connector>
# <vendor>unknown</vendor>
# <product>unknown</product>
# <serial>unknown</serial>
# </monitorspec>
# <mode>
# <width>1600</width>
# <height>2560</height>
# <rate>104.000</rate>
# </mode>
# </monitor>
# </logicalmonitor>
# </configuration>
#</monitors>
#' > "$rootdir/etc/skel/.config/monitors.xml"
#chroot "$rootdir" bash -c 'cp /etc/skel/.config/monitors.xml ~gdm/.config/'
#chroot "$rootdir" bash -c 'chown gdm: ~gdm/.config/'
# ---
# Restore resolv.conf symlink

View file

@ -93,37 +93,37 @@ cp ./drop/zram-generator.conf "$rootdir/etc/systemd/zram-generator.conf"
# +++ Rotate gdm
log "Configuring gdm and gnome"
mkdir -p "$rootdir/etc/skel/.config"
echo '<monitors version="2">
<configuration>
<logicalmonitor>
<x>0</x>
<y>0</y>
<scale>2</scale>
<primary>yes</primary>
<transform>
<rotation>right</rotation>
<flipped>no</flipped>
</transform>
<monitor>
<monitorspec>
<connector>DSI-1</connector>
<vendor>unknown</vendor>
<product>unknown</product>
<serial>unknown</serial>
</monitorspec>
<mode>
<width>1600</width>
<height>2560</height>
<rate>104.000</rate>
</mode>
</monitor>
</logicalmonitor>
</configuration>
</monitors>
' > "$rootdir/etc/skel/.config/monitors.xml"
chroot "$rootdir" bash -c 'cp /etc/skel/.config/monitors.xml ~gdm/.config/'
chroot "$rootdir" bash -c 'chown gdm: ~gdm/.config/'
#mkdir -p "$rootdir/etc/skel/.config"
#echo '<monitors version="2">
# <configuration>
# <logicalmonitor>
# <x>0</x>
# <y>0</y>
# <scale>2</scale>
# <primary>yes</primary>
# <transform>
# <rotation>right</rotation>
# <flipped>no</flipped>
# </transform>
# <monitor>
# <monitorspec>
# <connector>DSI-1</connector>
# <vendor>unknown</vendor>
# <product>unknown</product>
# <serial>unknown</serial>
# </monitorspec>
# <mode>
# <width>1600</width>
# <height>2560</height>
# <rate>104.000</rate>
# </mode>
# </monitor>
# </logicalmonitor>
# </configuration>
#</monitors>
#' > "$rootdir/etc/skel/.config/monitors.xml"
#chroot "$rootdir" bash -c 'cp /etc/skel/.config/monitors.xml ~gdm/.config/'
#chroot "$rootdir" bash -c 'chown gdm: ~gdm/.config/'
# ---
# Finish image

View file

@ -21,12 +21,13 @@ IMAGE_NAME="UbuntuDesktop_$VERSION"
# Begin script
log "Start creating image: $IMAGE_NAME"
create_image "$IMAGE_NAME"
create_image "$IMAGE_NAME" 20
rootdir="$(mount_image "$IMAGE_NAME")"
# Fetch base system
log "Fetching base system"
debootstrap --arch arm64 "$VERSION" "$rootdir" http://ports.ubuntu.com/ubuntu-ports || {
debootstrap --arch arm64 --components=main,universe \
"$VERSION" "$rootdir" http://ports.ubuntu.com/ubuntu-ports || {
detach_chroot "$rootdir"
umount_image "$rootdir"
rm "$IMAGE_NAME"
@ -48,7 +49,7 @@ echo "127.0.0.1 localhost
log "Updating system and installing needed packages"
chroot "$rootdir" apt update
chroot "$rootdir" apt upgrade -y
chroot "$rootdir" apt install -y ubuntu-desktop bash-completion sudo ssh nano rust-zram-generator
chroot "$rootdir" apt install -y ubuntu-desktop bash-completion sudo ssh nano systemd-zram-generator
# Install nabu specific packages
log "Installing nabu kernel, modules, firmwares and userspace daemons"
@ -73,37 +74,37 @@ cp ./drop/zram-generator.conf "$rootdir/etc/systemd/zram-generator.conf"
# +++ Rotate gdm
log "Configuring gdm and gnome"
mkdir -p "$rootdir/etc/skel/.config"
echo '<monitors version="2">
<configuration>
<logicalmonitor>
<x>0</x>
<y>0</y>
<scale>2</scale>
<primary>yes</primary>
<transform>
<rotation>right</rotation>
<flipped>no</flipped>
</transform>
<monitor>
<monitorspec>
<connector>DSI-1</connector>
<vendor>unknown</vendor>
<product>unknown</product>
<serial>unknown</serial>
</monitorspec>
<mode>
<width>1600</width>
<height>2560</height>
<rate>104.000</rate>
</mode>
</monitor>
</logicalmonitor>
</configuration>
</monitors>
' > "$rootdir/etc/skel/.config/monitors.xml"
chroot "$rootdir" bash -c 'cp /etc/skel/.config/monitors.xml ~gdm/.config/'
chroot "$rootdir" bash -c 'chown gdm: ~gdm/.config/'
#mkdir -p "$rootdir/etc/skel/.config"
#echo '<monitors version="2">
# <configuration>
# <logicalmonitor>
# <x>0</x>
# <y>0</y>
# <scale>2</scale>
# <primary>yes</primary>
# <transform>
# <rotation>right</rotation>
# <flipped>no</flipped>
# </transform>
# <monitor>
# <monitorspec>
# <connector>DSI-1</connector>
# <vendor>unknown</vendor>
# <product>unknown</product>
# <serial>unknown</serial>
# </monitorspec>
# <mode>
# <width>1600</width>
# <height>2560</height>
# <rate>104.000</rate>
# </mode>
# </monitor>
# </logicalmonitor>
# </configuration>
#</monitors>
#' > "$rootdir/etc/skel/.config/monitors.xml"
#chroot "$rootdir" bash -c 'cp /etc/skel/.config/monitors.xml ~gdm/.config/'
#chroot "$rootdir" bash -c 'chown gdm: ~gdm/.config/'
# ---
# Finish image