blob: 6c30d6ae1b06cafa201eb3d9051918da03fa8493 [file] [log] [blame]
Riku Voipio0cc70ab2017-10-09 11:54:37 +03001#!/bin/bash
2set -e
3
Riku Voipio61830622017-09-15 15:39:34 +03004cat << EOF > $target/etc/fstab
Niklas Casselb8713332019-10-23 15:51:53 +02005PARTLABEL=${ROOTFS_PARTLABEL} / ext4 rw,relatime,data=ordered 0 1
Riku Voipio61830622017-09-15 15:39:34 +03006EOF
Riku Voipioa4942982017-09-15 13:25:08 +03007
Aníbal Limónac500de2021-07-27 12:36:22 -05008# Add symlink to trigger systemd start of ttyMSM0 console
9ln -sf "/lib/systemd/system/serial-getty@.service" "$target/etc/systemd/system/getty.target.wants/serial-getty@${SERIAL_CONSOLE}.service"
10
Aníbal Limón63494262019-11-22 13:39:22 -060011# Add tsched=0 on module-udev-detect to fix distorted sound
12sed -i "s|^load-module module-udev-detect|load-module module-udev-detect tsched=0|" $target/etc/pulse/default.pa
13
Nicolas Dechesned811d0a2022-09-23 13:49:51 +020014# Rebuild all initramfs/initrd
15rm -f $target/boot/initrd.img-*
16chroot $target /usr/sbin/update-initramfs -c -k all
Nicolas Dechesnef93e3082018-06-15 14:19:37 +000017
Riku Voipiod37f6c32017-10-11 21:59:06 +030018OUT=$FAI/out
19mkdir -p $OUT
Nicolas Dechesned811d0a2022-09-23 13:49:51 +020020cp $target/boot/vmlinuz-* $OUT/
21cp -a $target/usr/lib/linux-image-*/ $OUT/dtbs
22cp $target/boot/initrd.img-* $OUT/
23cp $target/boot/config-* $OUT/
24cp $target/boot/System.map-* $OUT/
Aníbal Limón23c8fc12020-06-02 15:49:58 -050025
26# Disable GDM3 suspend causes problems in DB845c
27# GDM provides PostLogin hook but dosen't set DISPLAY and dconf.
28# gsettings tools cannot be used.
29if [ -d $target/etc/gdm3 ]; then
30 mkdir -p $target/home/linaro/.config/autostart/
31 cat > $target/home/linaro/.config/autostart/nosuspend.desktop << EOF
32[Desktop Entry]
33Encoding=UTF-8
34Exec=/usr/bin/dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type "'nothing'"
35Name=Disable suspend
36Comment=Disable suspend on GNOME3
37Terminal=false
38OnlyShowIn=GNOME
39Type=Application
40StartupNotify=false
41X-GNOME-Autostart-enabled=true
42EOF
43
44 chroot $target chown -R linaro:linaro /home/linaro/.config
45fi