Commit 1831bc9 1 parent 2a27ead commit 1831bc9 Copy full SHA for 1831bc9
File tree 11 files changed +59
-7
lines changed
rootfs-overlay/etc/profile.d
rootfs-overlay/etc/profile.d
11 files changed +59
-7
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,18 @@ Attention:
23
23
- If a wpa_supplicant.conf file is present in /boot, the initial setup is skipped during first run.
24
24
- The Raspberry Pi 0 W doesn't support 5GHz networks!
25
25
26
+ ### Timezone configuration
27
+
28
+ The system time is automatically set with NTP and the default timezone is UTC.
29
+
30
+ - To set another timezone create a file named ` timezone ` in the root of this boot partition.
31
+ - Content is a single line containing the Linux TZ name.
32
+ See < https://en.wikipedia.org/wiki/List_of_tz_database_time_zones > for a list of valid TZ database names.
33
+ Examples:
34
+ - Europe/Copenhagen
35
+ - Asia/Hong_Kong
36
+ - America/Vancouver
37
+
26
38
### Bluetooth Serial Console
27
39
28
40
To enable a Bluetooth serial console, create a marker file ` btconsole ` in the root of this boot partition.
Original file line number Diff line number Diff line change
1
+ Europe/Zurich
Original file line number Diff line number Diff line change @@ -12,3 +12,4 @@ export YIO_OS_VERSION=$BUILD_VERSION
12
12
export YIO_OS_GITHASH=$GIT_HASH
13
13
export YIO_LOG_DIR=/var/log
14
14
export YIO_LOG_DIR_UPDATE=/boot/log
15
+ export YIO_CFG_OVERRIDE_DIR=/boot
Original file line number Diff line number Diff line change @@ -22,6 +22,18 @@ Attention:
22
22
- If a wpa_supplicant.conf file is present in /boot, the initial setup is skipped during first run.
23
23
- The Raspberry Pi 0 W doesn't support 5GHz networks!
24
24
25
+ ### Timezone configuration
26
+
27
+ The system time is automatically set with NTP and the default timezone is UTC.
28
+
29
+ - To set another timezone create a file named ` timezone ` in the root of this boot partition.
30
+ - Content is a single line containing the Linux TZ name.
31
+ See < https://en.wikipedia.org/wiki/List_of_tz_database_time_zones > for a list of valid TZ database names.
32
+ Examples:
33
+ - Europe/Copenhagen
34
+ - Asia/Hong_Kong
35
+ - America/Vancouver
36
+
25
37
### Bluetooth Serial Console
26
38
27
39
To enable a Bluetooth serial console, create a marker file ` btconsole ` in the root of this boot partition.
Original file line number Diff line number Diff line change
1
+ Europe/Zurich
Original file line number Diff line number Diff line change
1
+ # home directory is not freely changeable!
2
+ # systemd services don't support env variables in ExecStart!
3
+ export YIO_HOME=/opt/yio
4
+ export YIO_APP_DIR=${YIO_HOME} /app
5
+ export YIO_PLUGIN_DIR=${YIO_HOME} /app-plugins
6
+ export YIO_MEDIA_DIR=${YIO_HOME} /media
7
+ export YIO_SCRIPT_DIR=${YIO_HOME} /scripts
8
+ export YIO_WEB_CONFIGURATOR_DIR=${YIO_HOME} /web-configurator
9
+ # remote-os release, set during build
10
+ export YIO_OS_VERSION=$BUILD_VERSION
11
+ # Git hash of the remote-os repo, set during build
12
+ export YIO_OS_GITHASH=$GIT_HASH
13
+ export YIO_LOG_DIR=/var/log
14
+ export YIO_LOG_DIR_UPDATE=/boot/log
15
+ export YIO_CFG_OVERRIDE_DIR=/boot
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ BR2_TARGET_GENERIC_ISSUE="Welcome to YIO Remote"
15
15
BR2_INIT_SYSTEMD=y
16
16
BR2_TARGET_GENERIC_ROOT_PASSWD="yioremote"
17
17
BR2_GENERATE_LOCALE="en_US.UTF-8"
18
- BR2_TARGET_LOCALTIME="Europe/Copenhagen "
18
+ BR2_TARGET_LOCALTIME="UTC "
19
19
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_YIOS_PATH)/rootfs-overlay $(BR2_EXTERNAL_YIOS_PATH)/board/remote/rootfs-overlay"
20
20
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_YIOS_PATH)/scripts/post-build.sh"
21
21
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_YIOS_PATH)/scripts/post-image.sh"
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ BR2_TARGET_GENERIC_HOSTNAME="yio-dev"
17
17
BR2_TARGET_GENERIC_ISSUE="Welcome to YIO Developer Edition"
18
18
BR2_INIT_SYSTEMD=y
19
19
BR2_TARGET_GENERIC_ROOT_PASSWD="yioremote"
20
+ BR2_GENERATE_LOCALE="en_US.UTF-8"
21
+ BR2_TARGET_LOCALTIME="UTC"
20
22
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
21
23
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_YIOS_PATH)/rootfs-overlay $(BR2_EXTERNAL_YIOS_PATH)/board/raspberrypi/rootfs-overlay"
22
24
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_YIOS_PATH)/scripts/post-build.sh"
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ BR2_TARGET_GENERIC_HOSTNAME="yio-dev"
18
18
BR2_TARGET_GENERIC_ISSUE="Welcome to YIO Developer Edition"
19
19
BR2_INIT_SYSTEMD=y
20
20
BR2_TARGET_GENERIC_ROOT_PASSWD="yioremote"
21
+ BR2_GENERATE_LOCALE="en_US.UTF-8"
22
+ BR2_TARGET_LOCALTIME="UTC"
21
23
BR2_TARGET_GENERIC_GETTY_PORT="tty1"
22
24
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_YIOS_PATH)/rootfs-overlay $(BR2_EXTERNAL_YIOS_PATH)/board/raspberrypi/rootfs-overlay"
23
25
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL_YIOS_PATH)/scripts/post-build.sh"
Original file line number Diff line number Diff line change 4
4
. /etc/profile.d/yio.sh
5
5
. /etc/profile.d/qt.sh
6
6
7
+ if [[ -f ${YIO_CFG_OVERRIDE_DIR} /timezone ]]; then
8
+ export TZ=" $( cat ${YIO_CFG_OVERRIDE_DIR} /timezone) "
9
+ else
10
+ export TZ=" $( cat /etc/timezone) "
11
+ fi
12
+
7
13
${YIO_SCRIPT_DIR} /wifi-copy-config.sh
8
14
9
15
${YIO_SCRIPT_DIR} /firstrun.sh
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- if [ -e /boot /wpa_supplicant.conf ]
3
+ if [ -e ${YIO_CFG_OVERRIDE_DIR} /wpa_supplicant.conf ]
4
4
then
5
- if cmp -s /boot /wpa_supplicant.conf /var/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
5
+ if cmp -s ${YIO_CFG_OVERRIDE_DIR} /wpa_supplicant.conf /var/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
6
6
then
7
- echo " wpa_supplicant.conf in /boot already copied"
7
+ echo " wpa_supplicant.conf in ${YIO_CFG_OVERRIDE_DIR} already copied"
8
8
else
9
- echo " Using provided wpa_supplicant.conf in /boot "
9
+ echo " Using provided wpa_supplicant.conf in ${YIO_CFG_OVERRIDE_DIR} "
10
10
11
11
# stop wifi
12
12
systemctl stop wpa_supplicant@wlan0.service
13
13
# copy config file
14
- cp /boot /wpa_supplicant.conf /var/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
14
+ cp ${YIO_CFG_OVERRIDE_DIR} /wpa_supplicant.conf /var/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
15
15
# restart wifi
16
16
systemctl start wpa_supplicant@wlan0.service
17
17
sleep 3
18
18
19
19
touch /var/yio/wificopy
20
20
fi
21
21
else
22
- echo " No wpa_supplicant.conf in /boot "
22
+ echo " No wpa_supplicant.conf in ${YIO_CFG_OVERRIDE_DIR} "
23
23
rm -f /var/yio/wificopy
24
24
fi
You can’t perform that action at this time.
0 commit comments