From e54f6f8019d03dc3f66e68b6442a23ddb820cc32 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Jan 1970 09:04:36 +0900 Subject: fix rs232 and flash initialization --- device-functions.c | 2 ++ flash.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/device-functions.c b/device-functions.c index 061f759..20918a8 100644 --- a/device-functions.c +++ b/device-functions.c @@ -4402,6 +4402,7 @@ void Main_update_shift_registers() int IO_Setup_RS232(int baud, char hardhand) { + remount_root_as_writeable (); FILE* configfile = fopen("/tmp/instgettyopts", "w"); if(configfile) { fprintf(configfile, "OPTS=-L %s\n", hardhand ? "-h" : ""); @@ -4409,6 +4410,7 @@ int IO_Setup_RS232(int baud, char hardhand) fclose(configfile); system("systemctl --no-block restart inst-getty@ttyO5.service"); } + remount_root_as_not_writeable(); globals.Flash.baud = baud; globals.Flash.hardhand = hardhand; diff --git a/flash.c b/flash.c index d371c39..69cb09f 100644 --- a/flash.c +++ b/flash.c @@ -1045,6 +1045,9 @@ void fixFlash(FlashStruct *mem) eprom_loc = (char *) &(mem->model_num) - (char *) &(mem->flash_start); writeUserBlock(&globals.Flash, eprom_loc, sizeof(mem->model_num)); + + eprom_loc = (char *) &(mem->fix_pw_dac_val) - (char *) &(mem->flash_start); + writeUserBlock(&globals.Flash, eprom_loc, sizeof(mem->fix_pw_dac_val)); } } -- cgit