mirror of
https://github.com/FunKey-Project/FunKey-OS.git
synced 2026-03-19 02:12:41 +01:00
now possible to make prod image (assembly tests at first boot) with make image-prod
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
## Check if tests must be run
|
||||
RUN_FILE=/mnt/.assembly_tests
|
||||
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
|
||||
if [ ! -f ${RUN_FILE} -a "x${RUN_ENV_VAR}" != "x1" ]; then
|
||||
#echo "${RUN_FILE} not present, not performing assembly tests."
|
||||
if [ "x${RUN_ENV_VAR}" != "x1" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -360,7 +358,7 @@ ro
|
||||
## Exit processes
|
||||
if ! $test_failed; then
|
||||
## Remove run file => no assembly tests on next run
|
||||
rm -f ${RUN_FILE}
|
||||
fw_setenv assembly_tests 0
|
||||
sync
|
||||
exit 0
|
||||
else
|
||||
|
||||
@@ -129,9 +129,10 @@ format_backing_store_partition () {
|
||||
}
|
||||
|
||||
copy_files_to_store_partition () {
|
||||
# Add file to force assembly tests
|
||||
# Add file to force assembly tests
|
||||
|
||||
|
||||
mount /mnt/ || die 18 "Cannot mount /mnt"
|
||||
#touch /mnt/.assembly_tests || die 19 "Cannot create assembly tests run file"
|
||||
unzip -q -o /usr/local/share/mnt_freware_games.zip -d /mnt/
|
||||
umount /mnt/ || die 20 "Cannot unmount /mnt"
|
||||
return 0
|
||||
|
||||
@@ -9,7 +9,7 @@ nb_secs_to_wait=$1
|
||||
|
||||
# Wait $nb_secs_to_wait seconds to catch signal USR2
|
||||
# If the signal is caught, then it means a process canceled this shutdown
|
||||
sleep ${nbl_secs_to_wait}
|
||||
sleep ${nb_secs_to_wait}
|
||||
|
||||
# Too late to cancel: init shutdown
|
||||
shutdown_funkey
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
# This should replaced by storing the correct PID before
|
||||
# launching an emulator and signaling only this one.
|
||||
|
||||
|
||||
if [[ -f /mnt/.assembly_tests ]]; then
|
||||
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
|
||||
if [ "x${RUN_ENV_VAR}" == "x1" ]; then
|
||||
# First this one
|
||||
killall -s USR1 assembly_tests > /dev/null 2>&1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user