diff --git a/Dockerfile.agnos b/Dockerfile.agnos index 2f15f7d..0c65441 100644 --- a/Dockerfile.agnos +++ b/Dockerfile.agnos @@ -16,7 +16,7 @@ RUN set -xe ENV USERNAME=comma ENV PASSWD=comma -ENV HOST=tici +ENV HOST=comma # Base system setup RUN echo "resolvconf resolvconf/linkify-resolvconf boolean false" | debconf-set-selections diff --git a/agnos-kernel-sdm845 b/agnos-kernel-sdm845 index de1e2dc..b9a7dce 160000 --- a/agnos-kernel-sdm845 +++ b/agnos-kernel-sdm845 @@ -1 +1 @@ -Subproject commit de1e2dced75d17e3c00ccf28989dbda9130bf443 +Subproject commit b9a7dcefc1188038464cb56a938238442cea2225 diff --git a/build_system.sh b/build_system.sh index 0d5f5f6..f8fda71 100755 --- a/build_system.sh +++ b/build_system.sh @@ -67,8 +67,8 @@ sudo tar -xf $BUILD_DIR/filesystem.tar > /dev/null # Add hostname and hosts. This cannot be done in the docker container... echo "Setting network stuff" -HOST=tici -sudo bash -c "echo $HOST > etc/hostname" +HOST=comma +sudo bash -c "ln -sf /proc/sys/kernel/hostname etc/hostname" sudo bash -c "echo \"127.0.0.1 localhost.localdomain localhost\" > etc/hosts" sudo bash -c "echo \"127.0.0.1 $HOST\" >> etc/hosts" diff --git a/load_kernel.sh b/load_kernel.sh index e4b41bb..73202f2 100755 --- a/load_kernel.sh +++ b/load_kernel.sh @@ -1,7 +1,7 @@ #!/bin/bash -e cd "$(dirname "$0")" -DEVICE=tici-ethernet +DEVICE=${DEVICE:-comma-ethernet} scp output/boot.img $DEVICE:/tmp/ ssh $DEVICE "sudo dd if=/tmp/boot.img of=/dev/disk/by-partlabel/boot_a && sudo dd if=/tmp/boot.img of=/dev/disk/by-partlabel/boot_b && sudo reboot" diff --git a/load_kernel_headers.sh b/load_kernel_headers.sh index 337966d..f8b7ec6 100755 --- a/load_kernel_headers.sh +++ b/load_kernel_headers.sh @@ -1,4 +1,4 @@ #!/bin/bash -scp output/linux-headers*.deb tici:/tmp/ -ssh tici "sudo apt install -yq /tmp/linux-headers*.deb" +scp output/linux-headers*.deb comma:/tmp/ +ssh comma "sudo apt install -yq /tmp/linux-headers*.deb" diff --git a/userspace/base_setup.sh b/userspace/base_setup.sh index f7780eb..28ef1cf 100755 --- a/userspace/base_setup.sh +++ b/userspace/base_setup.sh @@ -2,7 +2,7 @@ USERNAME=comma PASSWD=comma -HOST=tici +HOST=comma # Create identification file touch /TICI diff --git a/userspace/files/serial-hostname.service b/userspace/files/serial-hostname.service index 6c59594..29f309d 100644 --- a/userspace/files/serial-hostname.service +++ b/userspace/files/serial-hostname.service @@ -1,6 +1,7 @@ [Unit] Description=Sets the hostname to the device's serial number -After=NetworkManager.service +After=basic.target +Before=network.target [Service] User=root diff --git a/userspace/services.sh b/userspace/services.sh index e5cf6d6..33836b2 100755 --- a/userspace/services.sh +++ b/userspace/services.sh @@ -8,7 +8,7 @@ systemctl enable cdsprpcd # Enable our services systemctl enable fs_setup.service -#systemctl enable serial-hostname.service +systemctl enable serial-hostname.service systemctl enable comma.service systemctl enable gpio.service systemctl enable lte.service @@ -28,7 +28,6 @@ systemctl enable set_time.service systemctl enable phantom_touch_logger.service # Disable some of our services -systemctl disable serial-hostname.service systemctl disable agnos-tests.service # Disable third party services diff --git a/userspace/usr/comma/set-hostname.sh b/userspace/usr/comma/set-hostname.sh index 46b4b2a..187ec9d 100755 --- a/userspace/usr/comma/set-hostname.sh +++ b/userspace/usr/comma/set-hostname.sh @@ -3,4 +3,4 @@ set -e SERIAL="$(cat /proc/cmdline | sed -e 's/^.*androidboot.serialno=//' -e 's/ .*$//')" echo "serial: '$SERIAL'" -hostnamectl set-hostname --transient "tici-$SERIAL" +sysctl kernel.hostname="comma-$SERIAL"