now possible to make prod image (assembly tests at first boot) with make image-prod

This commit is contained in:
Vincent-FK
2020-11-20 17:19:16 +01:00
parent 311a200581
commit 29697c75cb
8 changed files with 28 additions and 21 deletions

View File

@@ -22,5 +22,11 @@ mv ${TARGET_DIR}/etc/init.d/S50dropbear ${TARGET_DIR}/etc/init.d/S42dropbear
rm -rf ${TARGET_DIR}/etc/dropbear
ln -s /tmp ${TARGET_DIR}/etc/dropbear
# Generate U-Boot environment
# Generate U-Boot environment for app
${HOST_DIR}/bin/mkenvimage -p 0x0 -s 0x20000 -o ${BINARIES_DIR}/u-boot-env.img ${TARGET_DIR}/etc/u-boot.env
# Generate U-Boot environment for production
cp ${TARGET_DIR}/etc/u-boot.env ${TARGET_DIR}/etc/u-boot-prod.env
echo "assembly_tests=1" >> ${TARGET_DIR}/etc/u-boot-prod.env
${HOST_DIR}/bin/mkenvimage -p 0x0 -s 0x20000 -o ${BINARIES_DIR}/u-boot-env-prod.img ${TARGET_DIR}/etc/u-boot-prod.env
rm ${TARGET_DIR}/etc/u-boot-prod.env

View File

@@ -53,7 +53,7 @@
7+13, SHELL_COMMAND, quick_action_volume_down, Fn+A, Volume--
7+11, SHELL_COMMAND, quick_action_bright_up, Fn+B, Brightness++
7+14, SHELL_COMMAND, quick_action_bright_down, Fn+X, Brightness--
10, SHELL_COMMAND, sched_shutdown 1 & signal_usr1_to_emulators, N_OE, Quick save and Poweroff because of N_OE
10, SHELL_COMMAND, shutdown_funkey, N_OE, Poweroff because of N_OE
7+15+2, SHELL_COMMAND, display_notif_system_stats, Fn+L1+L2, display system cpu and ram usage
#7+12, KEYBOARD, KEY_G, KEY_G, Brightness++

View File

@@ -62,9 +62,9 @@ menu_display () {
# Factory tests enable/disable
if [ -e /mnt/.assembly_tests ]; then
message=" FACTORY TESTS DISABLE"
message=" FACTORY TESTS DISABLE"
else
message=" FACTORY TESTS ENABLE"
message=" FACTORY TESTS ENABLE"
fi
;;
@@ -223,21 +223,15 @@ menu_run () {
6)
# Factory tests enable/disable
mount | grep -q /dev/mmcblk0p4
if [ $? -eq 0 ]; then
if [ -e /mnt/.assembly_tests ]; then
rm -f /mnt/.assembly_tests
RUN_ENV_VAR=$(fw_printenv -n assembly_tests 2>/dev/null)
if [ "x${RUN_ENV_VAR}" == "x1" ]; then
fw_setenv assembly_tests 0
message=" FACTORY TESTS ENABLE"
else
#touch /mnt/.assembly_tests
fw_setenv assembly_tests 1
message=" FACTORY TESTS DISABLE"
fi
notif "${message}"
else
notif "${message}...^CANNOT TEST IF MOUNTED!"
fi
;;
7)