Skip to content

Fix #486, Update location of simulated EEPROM file path#487

Open
dmolock-NASA wants to merge 5 commits into
nasa:devfrom
dmolock-NASA:486-update-simulated-eeprom-location
Open

Fix #486, Update location of simulated EEPROM file path#487
dmolock-NASA wants to merge 5 commits into
nasa:devfrom
dmolock-NASA:486-update-simulated-eeprom-location

Conversation

@dmolock-NASA

@dmolock-NASA dmolock-NASA commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Checklist (Please check before submitting)

Describe the contribution

Fixes #486 by updating the location of the simulated EEPROM.DAT file to always be created/opened based on PSP_CONFIG_SIMULATED_EEPROM_FILE_PATH parameter.

Testing performed
Steps taken to test the contribution:

  1. Linux Build steps
    • Configure PSP_CONFIG_SIMULATED_EEPROM_FILE_PATH to ./cf
    • make native_std.distclean
    • make native_std.prep
    • make native_std.install
    • make native_std.runtest
  2. QNX Build steps
    • Configure PSP_CONFIG_SIMULATED_EEPROM_FILE_PATH to /temp/cfs/cpu1/cf
    • make aarch64le_qnx_gnu.distclean
    • make aarch64le_qnx_gnu.prep
    • make aarch64le_qnx_gnu.install
  3. Linux Execution steps
    • cd build-native_std/exe/cpu1/
    • ./core-cpu1
    • Verify cFS boots and simulated EEPROM.DAT file is located in CF directory.
    • ls build-native_std/exe/cpu1/cf
  4. QNX Execution steps
    • Build QNX IFS Image including cFS
    • Boot QNX IFS Image on Raspberry Pi 4 via U-boot and TFTP
    • cd /temp/cfs/cpu1/
    • ./core-cpu1
    • Verify cFS boots and simulated EEPROM.DAT file is located in CF directory.
    • ls /temp/cfs/cpu1/cf/

Expected behavior changes

The cFS applications operates as normal but now the simulated EEPROM.DAT file is located in directory specified by PSP_CONFIG_SIMULATED_EEPROM_FILE_PATH parameter.

System(s) tested on

  • Hardware: PC/VM, Raspberry Pi 4
  • OS: RHEL 9, QNX 8.x

Additional context

N/A

Third party code

N/A

Contributor Info - All information REQUIRED for consideration of pull request

Dwaine Molock, NASA/GSFC, Code 534

@dmolock-NASA dmolock-NASA requested review from dzbaker and jphickey June 4, 2026 22:46
@dmolock-NASA dmolock-NASA requested a review from alanc-gsfc June 8, 2026 14:07
@dmolock-NASA dmolock-NASA marked this pull request as ready for review June 8, 2026 20:02

@jphickey jphickey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some commentary about why this change is needed? This file is just for testing (a real target would presumably have a real eeprom) and its not clear to me in this PR or in the original ticket what was wrong that prompted this change

@dmolock-NASA

Copy link
Copy Markdown
Contributor Author

Can we add some commentary about why this change is needed? This file is just for testing (a real target would presumably have a real eeprom) and its not clear to me in this PR or in the original ticket what was wrong that prompted this change

@jphickey I noticed this issue on QNX and it depends on how/where the cFS processes are started. On QNX the cFS process was started from the root directory which doesn't have permissions to write/create files. This also happens when cFS is started by another process and cFS doesn't have write permissions for the launching directory. This change will ensure that the EEPROM.DAT file is always located in the CF directory which the cFS process should have full read/write access.

@jphickey

jphickey commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Can we add some commentary about why this change is needed? This file is just for testing (a real target would presumably have a real eeprom) and its not clear to me in this PR or in the original ticket what was wrong that prompted this change

@jphickey I noticed this issue on QNX and it depends on how/where the cFS processes are started. On QNX the cFS process was started from the root directory which doesn't have permissions to write/create files. This also happens when cFS is started by another process and cFS doesn't have write permissions for the launching directory. This change will ensure that the EEPROM.DAT file is always located in the CF directory which the cFS process should have full read/write access.

I'm not so sure about that actually -- there are some deployments where /cf is also mounted read-only. What if we simply gave the user more control over where the file is created? Such as making a CONFIG option with the full pathname to the file?

@dmolock-NASA

dmolock-NASA commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Can we add some commentary about why this change is needed? This file is just for testing (a real target would presumably have a real eeprom) and its not clear to me in this PR or in the original ticket what was wrong that prompted this change

@jphickey I noticed this issue on QNX and it depends on how/where the cFS processes are started. On QNX the cFS process was started from the root directory which doesn't have permissions to write/create files. This also happens when cFS is started by another process and cFS doesn't have write permissions for the launching directory. This change will ensure that the EEPROM.DAT file is always located in the CF directory which the cFS process should have full read/write access.

I'm not so sure about that actually -- there are some deployments where /cf is also mounted read-only. What if we simply gave the user more control over where the file is created? Such as making a CONFIG option with the full pathname to the file?

@jphickey I updated simulated EEPROM to use a new PSP CONFIG parameter for file path.

@dmolock-NASA dmolock-NASA changed the title Fix #486, Update location of simulated EEPROM file to CF directory Fix #486, Update location of simulated EEPROM file path Jun 9, 2026

@jphickey jphickey left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update location of simulated EEPROM file to CF directory

3 participants