Riku Voipio | 0cc70ab | 2017-10-09 11:54:37 +0300 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -e |
| 3 | |
Riku Voipio | 6183062 | 2017-09-15 15:39:34 +0300 | [diff] [blame] | 4 | cat << EOF > $target/etc/fstab |
Niklas Cassel | b871333 | 2019-10-23 15:51:53 +0200 | [diff] [blame] | 5 | PARTLABEL=${ROOTFS_PARTLABEL} / ext4 rw,relatime,data=ordered 0 1 |
Riku Voipio | 6183062 | 2017-09-15 15:39:34 +0300 | [diff] [blame] | 6 | EOF |
Riku Voipio | a494298 | 2017-09-15 13:25:08 +0300 | [diff] [blame] | 7 | |
Aníbal Limón | ac500de | 2021-07-27 12:36:22 -0500 | [diff] [blame] | 8 | # Add symlink to trigger systemd start of ttyMSM0 console |
| 9 | ln -sf "/lib/systemd/system/serial-getty@.service" "$target/etc/systemd/system/getty.target.wants/serial-getty@${SERIAL_CONSOLE}.service" |
| 10 | |
Nicolas Dechesne | d811d0a | 2022-09-23 13:49:51 +0200 | [diff] [blame] | 11 | # Rebuild all initramfs/initrd |
| 12 | rm -f $target/boot/initrd.img-* |
| 13 | chroot $target /usr/sbin/update-initramfs -c -k all |
Nicolas Dechesne | f93e308 | 2018-06-15 14:19:37 +0000 | [diff] [blame] | 14 | |
Riku Voipio | d37f6c3 | 2017-10-11 21:59:06 +0300 | [diff] [blame] | 15 | OUT=$FAI/out |
| 16 | mkdir -p $OUT |
Nicolas Dechesne | d811d0a | 2022-09-23 13:49:51 +0200 | [diff] [blame] | 17 | cp $target/boot/vmlinuz-* $OUT/ |
| 18 | cp -a $target/usr/lib/linux-image-*/ $OUT/dtbs |
| 19 | cp $target/boot/initrd.img-* $OUT/ |
| 20 | cp $target/boot/config-* $OUT/ |
| 21 | cp $target/boot/System.map-* $OUT/ |
Aníbal Limón | 23c8fc1 | 2020-06-02 15:49:58 -0500 | [diff] [blame] | 22 | |
| 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. |
| 26 | if [ -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] |
| 30 | Encoding=UTF-8 |
| 31 | Exec=/usr/bin/dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type "'nothing'" |
| 32 | Name=Disable suspend |
| 33 | Comment=Disable suspend on GNOME3 |
| 34 | Terminal=false |
| 35 | OnlyShowIn=GNOME |
| 36 | Type=Application |
| 37 | StartupNotify=false |
| 38 | X-GNOME-Autostart-enabled=true |
| 39 | EOF |
| 40 | |
| 41 | chroot $target chown -R linaro:linaro /home/linaro/.config |
| 42 | fi |