Page 1 of 1

Re: Links and advice for new members

Posted: Wed Jun 17, 2020 12:26 am
by moonchild
Schol-R-LEA wrote: [x86] is notoriously quirky, especially regarding Memory Segmentation, and the sharp divisions between 16-bit Real Mode, 16-bit and 32-bit Protected Modes, and 64-bit Long Mode.
You don't have to worry so much about real/protected mode or segmentation if you use uefi to go straight to long mode.

Re: Links and advice for new members

Posted: Wed Jun 17, 2020 7:50 am
by nullplan
moonchild wrote:You don't have to worry so much about real/protected mode or segmentation if you use uefi to go straight to long mode.
Agreed, but you still need to know about them, and you do still need to deal with the last remnants of segmentation either way (namely setting up a GDT, or else you cannot set up an IDT, or load the task register). Plus, even then, you need to deal with FS and GS base addresses.
BTW, other architectures do thread pointers simply by reserving a register for them. No need for any spooky kernel mode transition to change that value or anything.

Re: Links and advice for new members

Posted: Fri Jun 19, 2020 10:02 am
by bzt
Please remove SFS from your template, and recommend USTAR instead to newcomers. Reasons:
  • SFS is abadoned now.
  • The wiki page has insufficient information, nowhere near enough to actually implement a driver.
  • The spec on the wiki describes a format that's incompatible with other file systems, as it's about v1.0
  • It does not describe BenLunt's v1.10 version which addresses these issues (and is incompatible with v1.0).
  • Brendan's bcos.org is long gone, no official spec available
  • So is the other "official specification" where the wiki points to, combuster's page gives HTTP 404.
  • There's no multiplatform tool to create file system images, so you can't verify or check if your driver does comply with the spec at all. The link for the original (Windows-only) tool gives 404 too.
  • It never gained popularity, as far as I know, BOOTBOOT is the ONLY loader that ever bothered to implemented it.
USTAR on the other hand is standardized, well established, used by millions of people every day; and has a file system creator on all mainstream OSes that newcomers can use out-of-the-box. There are numerous Open Source libraries to deal with USTAR, it is supported by newlib too for example.

(Ps. I can understand that web.archive links work, but do we really recommend those on the wiki?)

Cheers,
bzt

Re: Links and advice for new members

Posted: Fri Jun 19, 2020 10:49 am
by PeterX
I second that tar is a very good starting point for newbie FS-code writers.

What do you think about renaming the title USTAR to USTAR/tar?
It would make it more obvious that it is the same format the tool "tar" uses (which is mentioned in the second sentence, but anyway).

Greetings
Peter

Re: Links and advice for new members

Posted: Fri Jun 19, 2020 11:09 am
by iansjack
@bzt I'm concerned that you are perhaps being influenced by your past relationship with Brendan. You should certainly not be telling people what to post (although you might usefully suggest they consider something else).

Personally, I'd never suggest that anyone use any form of FAT. But I respect the right of others to suggest it.

Re: Links and advice for new members

Posted: Fri Jun 19, 2020 11:55 am
by bzt
iansjack wrote:@bzt I'm concerned that you are perhaps being influenced by your past relationship with Brendan. You should certainly not be telling people what to post (although you might usefully suggest they consider something else).
You can rest. I wanted to add SFS to my image creator, and I've faced the fact that there's no official specification available, the wiki page is insufficient to implement it, and I couldn't find any image creator that I could have used to create a reference image. That's why I suggested not to recommend it to newcomers.

Maybe SFS was started by Brendan, and like more members I might have had issues with that rouge moderator as well; however SFS was significantly improved by BenLunt and others, and I think of it as a community effort of this forum (the v1.10 version, not the v1.0 one, but I couldn't find any specification for v1.10 either).
iansjack wrote:Personally, I'd never suggest that anyone use any form of FAT. But I respect the right of others to suggest it.
I wouldn't recommend FAT either, but we must realize that it is THE file system for ESP, so we must support it whether we like it or not. It is also the de facto standard for file interchange, all mainstream OSes support it, and many devices (MP3 players, cameras, video recorders etc.) use that too for compatibility.

Cheers,
bzt

Re: Links and advice for new members

Posted: Fri Jun 19, 2020 12:11 pm
by Schol-R-LEA
I will leave SFS there for now (since I wasn't really making any specific recommendations), but I will add USTAR.

Re: Links and advice for new members

Posted: Fri Jun 19, 2020 12:28 pm
by bzt
Schol-R-LEA wrote:I will leave SFS there for now (since I wasn't really making any specific recommendations), but I will add USTAR.
Fine. But in this case may I ask you (or maybe BenLunt perphaps if he's willing to) to add an up-to-date and usable description on the wiki page? Right now it is insufficient (says by someone who tried to implement SFS using the said wiki page). I see no point in recommending something that's unimplementable and has no available FOSS tools.

Cheers,
bzt

Re: Links and advice for new members

Posted: Sat Jun 20, 2020 1:01 am
by iansjack
I haven't got a copy of the book, but doesn't Ben describe FYSFS in Vol.2 of his series (FYSOS: The Virtual File System)?

Re: Links and advice for new members

Posted: Sat Jun 20, 2020 8:37 am
by bzt
iansjack wrote:I haven't got a copy of the book, but doesn't Ben describe FYSFS in Vol.2 of his series (FYSOS: The Virtual File System)?
I don't know, I don't have it either, but it doesn't matter because Schol-R-LEA recommends the wiki page, not BenLunt's book. (And there's no link to that book on the wiki at all. Should be I think.)

FYI, I gave up on implementing SFS. If someone manages to create a v1.0 or v1.10 image somehow they should still be able to boot it with BOOTBOOT, but otherwise I've let SFS go. (In lack of a FOSS image creator I could do this because BenLunt was kind enough to provide me test images back then, which sadly got lost in the last couple of years...)

Cheers,
bzt

Re: Links and advice for new members

Posted: Sat Jun 20, 2020 12:33 pm
by eekee
Schol-R-LEA wrote:You need to consider what kind of File System to use. Common ones used when starting out in OS dev include:
I don't think I ever had any conflict with Brendan, but SFS doesn't fit the header of this list. ;) It's not commonly implemented at all, especially not by beginners. Perhaps that indicates the problems listed by bzt are real. For my part, I also thought the specification incomplete to the point where I wondered if it would be a good idea to take down the page. I struggle badly when information purports to be for beginners but omits or confuses crucial details. I wouldn't want to inflict that on other newcomers. Lesser grumbles I just noticed today: why is the superblock in the already overcrowded sector 0? It's small, but is there any reason it couldn't go in sector 1 or further in? Restricting the characters which may be used in a filename is a huge nuisance and unnecessary with a half-decent shell.

Re: Links and advice for new members

Posted: Sat Jun 20, 2020 3:54 pm
by pvc
Is it just me or you are arguing about filesystem stuff in 'Links and advice for new members' thread ? Great example… great…

Re: Links and advice for new members

Posted: Sun Jun 21, 2020 3:32 am
by eekee
Well maybe, but I'm really tired of bad advice.

Re: Links and advice for new members

Posted: Sun Jun 21, 2020 3:51 am
by klange
I would prefer that this discussion not be tacked onto the stickied thread, so I have split it off and locked the original sticky.