blob: 976e643ea7e6ce6c82f3d59319d1c041cd638a72 [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
Nicolas Dechesned811d0a2022-09-23 13:49:51 +020011# Rebuild all initramfs/initrd
12rm -f $target/boot/initrd.img-*
13chroot $target /usr/sbin/update-initramfs -c -k all
Nicolas Dechesnef93e3082018-06-15 14:19:37 +000014
Riku Voipiod37f6c32017-10-11 21:59:06 +030015OUT=$FAI/out
16mkdir -p $OUT
Nicolas Dechesned811d0a2022-09-23 13:49:51 +020017cp $target/boot/vmlinuz-* $OUT/
18cp -a $target/usr/lib/linux-image-*/ $OUT/dtbs
19cp $target/boot/initrd.img-* $OUT/
20cp $target/boot/config-* $OUT/
21cp $target/boot/System.map-* $OUT/
Aníbal Limón23c8fc12020-06-02 15:49:58 -050022
23# Disable GDM3 suspend causes problems in DB845c
24# GDM provides PostLogin hook but dosen't set DISPLAY and dconf.
25# gsettings tools cannot be used.
26if [ -d $target/etc/gdm3 ]; then
27 mkdir -p $target/home/linaro/.config/autostart/
28 cat > $target/home/linaro/.config/autostart/nosuspend.desktop << EOF
29[Desktop Entry]
30Encoding=UTF-8
31Exec=/usr/bin/dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type "'nothing'"
32Name=Disable suspend
33Comment=Disable suspend on GNOME3
34Terminal=false
35OnlyShowIn=GNOME
36Type=Application
37StartupNotify=false
38X-GNOME-Autostart-enabled=true
39EOF
40
41 chroot $target chown -R linaro:linaro /home/linaro/.config
42fi