Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Z180DMA uzero causes regression: login fails with error message #904

Open
nkoch61 opened this issue Feb 17, 2022 · 9 comments
Open

Z180DMA uzero causes regression: login fails with error message #904

nkoch61 opened this issue Feb 17, 2022 · 9 comments

Comments

@nkoch61
Copy link

nkoch61 commented Feb 17, 2022

I've built a diskimage for sc126 under Ubuntu 18.04.

When logging in as root I see:

Welcome to FUZIX.
: is not an identifier

This is an error message from sh.
My guess is that it comes from setname(),
called by sh_getenv().

Single user boot works.

The pre-built image does not show this error.

@nkoch61
Copy link
Author

nkoch61 commented Feb 18, 2022

I've put some print statements into sh and init. It seems like init produces empty environment entries which sh does not accept.

@EtchedPixels
Copy link
Owner

I changed the Z180 code to use DMA for the user memory transfers. Does reverting commit 861ed42 fix it ?

@EtchedPixels
Copy link
Owner

Not sure what that is trying to say/show ?

We know that

  1. init never adds more than 9 variables (not that a sanity check isn't a bad idea)
  2. entries never get blanked or duplicated so the loops should have no effect
  3. the array starts zeroed so setting an end NULL is not needed

If that does make a difference it would mostly suggest env[] isn't clear (which would be perhaps a bug in the DMA changes although I can't duplicate it here at the moment), or a compiler specific problem (either a bug in the code elsewhere the compiler happens to show up or a compiler bug).

@nkoch61
Copy link
Author

nkoch61 commented Feb 19, 2022

My knowledge is not deep enough to understand in which contextes (forked, exec'd) this environment is used. It's just that after these changes my login problems went away.
I had modified init and sh to print their environments. And I saw empty strings at different places in the environment.
But I will follow your suggestion above and write about the results.

@EtchedPixels
Copy link
Owner

What sdcc version is in your Ubuntu (sdcc -v) ?

@nkoch61
Copy link
Author

nkoch61 commented Feb 19, 2022

After lots of syntax errors with "standard" sdcc as installed via apt, I've installed https://github.com/EtchedPixels/sdcc280.
Version is 3.9.1.

@nkoch61
Copy link
Author

nkoch61 commented Feb 19, 2022

I changed the Z180 code to use DMA for the user memory transfers. Does reverting commit 861ed42 fix it ?

Yes, it works.

@EtchedPixels EtchedPixels changed the title login fails with error message Z180DMA uzero causes regression: login fails with error message Feb 19, 2022
@EtchedPixels
Copy link
Owner

Thanks. I will go back over that and try and reproduce it here.

@nkoch61
Copy link
Author

nkoch61 commented Feb 20, 2022

I forgot to mention two things:

  • My board is an SC130, not an SC126.
  • I have an RTC board DS1302 installed, with address set to 0x10.

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

No branches or pull requests

2 participants