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 | |
Aníbal Limón | 6349426 | 2019-11-22 13:39:22 -0600 | [diff] [blame] | 11 | # Add tsched=0 on module-udev-detect to fix distorted sound |
| 12 | sed -i "s|^load-module module-udev-detect|load-module module-udev-detect tsched=0|" $target/etc/pulse/default.pa |
| 13 | |
Nicolas Dechesne | d811d0a | 2022-09-23 13:49:51 +0200 | [diff] [blame^] | 14 | # Rebuild all initramfs/initrd |
| 15 | rm -f $target/boot/initrd.img-* |
| 16 | chroot $target /usr/sbin/update-initramfs -c -k all |
Nicolas Dechesne | f93e308 | 2018-06-15 14:19:37 +0000 | [diff] [blame] | 17 | |
Riku Voipio | d37f6c3 | 2017-10-11 21:59:06 +0300 | [diff] [blame] | 18 | OUT=$FAI/out |
| 19 | mkdir -p $OUT |
Nicolas Dechesne | d811d0a | 2022-09-23 13:49:51 +0200 | [diff] [blame^] | 20 | cp $target/boot/vmlinuz-* $OUT/ |
| 21 | cp -a $target/usr/lib/linux-image-*/ $OUT/dtbs |
| 22 | cp $target/boot/initrd.img-* $OUT/ |
| 23 | cp $target/boot/config-* $OUT/ |
| 24 | cp $target/boot/System.map-* $OUT/ |
Aníbal Limón | 23c8fc1 | 2020-06-02 15:49:58 -0500 | [diff] [blame] | 25 | |
| 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. |
| 29 | if [ -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] |
| 33 | Encoding=UTF-8 |
| 34 | Exec=/usr/bin/dconf write /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type "'nothing'" |
| 35 | Name=Disable suspend |
| 36 | Comment=Disable suspend on GNOME3 |
| 37 | Terminal=false |
| 38 | OnlyShowIn=GNOME |
| 39 | Type=Application |
| 40 | StartupNotify=false |
| 41 | X-GNOME-Autostart-enabled=true |
| 42 | EOF |
| 43 | |
| 44 | chroot $target chown -R linaro:linaro /home/linaro/.config |
| 45 | fi |