MISTer Samba codepage CP850 missing

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

Locked
SerErris
Atariator
Atariator
Posts: 24
Joined: Sun Apr 19, 2020 9:18 am

MISTer Samba codepage CP850 missing

Post by SerErris »

Hi,

is there any easy way I can add the missing CP850 codepage to mister samba, so that I can use special characters in my windows authentication (e.g. root password?).

After troubleshooting why I could not logon with the root user via Samba I recognized, that it is the special character that does not translate as SAMBA converts CP850 to pure ASCII:

Code: Select all

[2020/05/01 14:03:43.249524,  0] ../../lib/util/charset/codepoints.c:16656(get_conv_handle)
  dos charset 'CP850' unavailable - using ASCII
So first learning if you have a german windows - do not use special chars. Now I will identify how to add the missing CP850..
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Samba codepage CP850 missing

Post by Sorgelig »

NLS support is in Kernel.
Kernel needs to be re-compiled with CP850 support
SerErris
Atariator
Atariator
Posts: 24
Joined: Sun Apr 19, 2020 9:18 am

Re: MISTer Samba codepage CP850 missing

Post by SerErris »

I also found out that SAMBA is not compile with "have libiconv". That would be a solution as well to use the libc6 libraries.

I could not find the sources for the linux.img. How do you create the linux image and where do you get the sources for the distribution from? It looks like a pretty special version of a linux OS.

I would love to contribute to it, but have no idea where you store the config of the kernel for compilation and how you actuially built the linux.img.
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Samba codepage CP850 missing

Post by Sorgelig »

Kernel has separate repository in MiSTer-devel. There must be instruction in Wiki how to build it.
Linux is buildroot.
In your case you just need the Kernel sources to change the config and build.
If you aren't in hurry, then wait for next Linux release - i will include CP850.
Beware, MiSTer has been built around ASCII charset (32-127)! While other languages code pages are available, you may get problem to access non-ASCII folders/files from MiSTer menu.
SerErris
Atariator
Atariator
Posts: 24
Joined: Sun Apr 19, 2020 9:18 am

Re: MISTer Samba codepage CP850 missing

Post by SerErris »

I can even do it if you like and put something back to the project. I just was not able to find the linux sources... I only found the sources for the MISTer binary, not for the linux.img and the build scripts.

I will doublecheck.
/EDIT: Found it.
/EDIT2: I will setup a development VM for that and start compiling as is and build a linux.img. Then I see how I can be of help.

Thanks for your input and all the work that has been done.

Is there any formal process to sign up as a developer and giving back to the community?
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Samba codepage CP850 missing

Post by Sorgelig »

You don't need to sign up besides registration on github where you can provide pull requests.

You need to understand that MiSTer is not a generic computer, not even about Linux. Patches for kernel are welcome if there are bugs or some tweaks are required. Linux.img changes are generally not accepted. It's carefully built with balance between quick boot, minimized writes to disk and minimum CPU load. Features can be discussed but there need to be a valuable benefit of proposed addition.
SerErris
Atariator
Atariator
Posts: 24
Joined: Sun Apr 19, 2020 9:18 am

Re: MISTer Samba codepage CP850 missing

Post by SerErris »

Okay,

This is a painful process for someone that wants to get into the ARM Linux kernel world ...

I swear I will write a howto for that to get published on the wiki.

I managed to get the kernel compiling and running on my mister (without any change jet).

Next step will be to check the CP850 NLM.
SerErris
Atariator
Atariator
Posts: 24
Joined: Sun Apr 19, 2020 9:18 am

Re: MISTer Samba codepage CP850 missing

Post by SerErris »

Sorgelig wrote:You don't need to sign up besides registration on github where you can provide pull requests.

You need to understand that MiSTer is not a generic computer, not even about Linux. Patches for kernel are welcome if there are bugs or some tweaks are required. Linux.img changes are generally not accepted. It's carefully built with balance between quick boot, minimized writes to disk and minimum CPU load. Features can be discussed but there need to be a valuable benefit of proposed addition.
I agree and do not want to add anything to the kernel itself. I just want to help to get one behaviour fixed, which is complex passwords and SAMBA do not work great together in Germany right now. The fix is pretty easy to do and I just would do it to help you guys. I am now trying it out, will submit a pull request later and then you can still decide.

Hope that helps.
SerErris
Atariator
Atariator
Posts: 24
Joined: Sun Apr 19, 2020 9:18 am

Re: MISTer Samba codepage CP850 missing

Post by SerErris »

And finally ... there is no change needed ...

ARG

I just forgot, that changing the root password on mister will not change the root password in samba.

Besides all that I learned now how to compile the kernel for Mister ... maybe I will need it in the future.

So thanks for your support @Sorgelig, but no action required any longer.
SerErris
Atariator
Atariator
Posts: 24
Joined: Sun Apr 19, 2020 9:18 am

Re: MISTer Samba codepage CP850 missing

Post by SerErris »

Okay, I now created a documentation in the wiki on how to compile the Linux kernel for MiSTer for anyone who wants to integrate custom stuff.

As written in the first section: You are on your own - no support whatsoever and you normally should not need it at all.

It is more meant for people that want to get into the development for MiSTer than for any end user of the MiSTer platform.

https://github.com/MiSTer-devel/Main_Mi ... for-MiSTer
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Samba codepage CP850 missing

Post by Sorgelig »

Linux.img part is redundant step.
Compiling the kernel is completely independent from Linux.img procedure.
Just compile the kernel and keep Linux.img as is.
SerErris
Atariator
Atariator
Posts: 24
Joined: Sun Apr 19, 2020 9:18 am

Re: MISTer Samba codepage CP850 missing

Post by SerErris »

I do not understand the last point.

The zImage is compiled into the linux.img right? So would I not need to create a new linux.img?

What would be your process of exchanging the kernel on the SD card if it is not part of the linux.img? Maybe I am overlooking something here?
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Samba codepage CP850 missing

Post by Sorgelig »

zImage is not included in Linux.img. It's separate file. Kernel is loaded even before linux.img is accessible.
All you need is build zImage_dtb and then put it to SD card into linux folder.
SerErris
Atariator
Atariator
Posts: 24
Joined: Sun Apr 19, 2020 9:18 am

Re: MISTer Samba codepage CP850 missing

Post by SerErris »

Ah okay I see. I thought it is part of the linux.img as it is also sitting with the Linux_Image_creator repository.

Okay then I never booted my kernel and something is missing. How do I integrate the dtb? I am getting the error message

ERROR: Did not find a cmdline Flattened Device Tree

Any idea, what I missed?
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: MISTer Samba codepage CP850 missing

Post by Sorgelig »

SerErris wrote:Ah okay I see. I thought it is part of the linux.img as it is also sitting with the Linux_Image_creator repository.

Okay then I never booted my kernel and something is missing. How do I integrate the dtb? I am getting the error message

ERROR: Did not find a cmdline Flattened Device Tree

Any idea, what I missed?
it's simple concatenation of zImage and dtb
SerErris
Atariator
Atariator
Posts: 24
Joined: Sun Apr 19, 2020 9:18 am

Re: MISTer Samba codepage CP850 missing

Post by SerErris »

Okay, thanks got it running. will update the documentation tomorrow. Some more steps to be done and to remove the linux.img thing.

Thanks for your support on this.
Locked

Return to “MiSTer”