Homebrew Proposed SD directory restructuring for homebrew

MsMidnight

part time fe modder
Member
Joined
Oct 12, 2015
Messages
1,753
Trophies
0
Location
kys
Website
camilla.hostfree.pw
XP
1,437
Country
I think that's starting to over-engineer it. /3ds/boot/ sounds good for cfw, but not general arm9 utilities. And /etc/ would make linux users think more about configuration files and not resources or general output files. You'd have to use like /usr/local/ or /usr/share/, and it's just starting to look like adopting a verbose organizational model where it doesn't belong. And it's expecting way too much from devs.

The main things needed are 1) opening up the /3ds/ directory for non-3dsx homebrew by migrating to a subdir like /3ds/apps/ and 2) having a standard subdir (like /3ds/appdata) to store data of non-3dsx homebrew and maybe 3) having a standard arm9 subdir of some kind.
/3ds/kernel9 or arm9 for all cfw things or arm9 tools ?
 

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
@MsMidnight I think it's just ignorance. I'm not trying to sound rude when I say that nor trying to provoke anything. The average user as it's put would be able to figure it out without needing to know the Linux filesystem since it is all clearly labeled. Doing as @Drakia said as a direct way through POSIX would screw them over.
It's not ignorance, I just understand what will and won't be confusing to a normal end user. Take into account that most end users will have had zero experience with POSIX, and not have ever seen a "bin" folder before.

We should use something descriptive such as "apps", not something obscure like "bin". "etc" is another one users won't have seen before, and for people used to Linux will mean "configuration", but you're trying to say general files will go in it.
 

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
If anything, we could just have apps, appdata, boot, and logs.
Same principal as before but different names. Just branch off of it a bit.
... So the same thing the first post of this thread says, then? With the addition of "logs", which I'm not personally a fan of, but whatever.

--------------------- MERGED ---------------------------

most homebrews do not utilize logs though. why not a configuration directory ?
Configuration is application data, and so should go with the other data in appdata.
 

MsMidnight

part time fe modder
Member
Joined
Oct 12, 2015
Messages
1,753
Trophies
0
Location
kys
Website
camilla.hostfree.pw
XP
1,437
Country
... So the same thing the first post of this thread says, then? With the addition of "logs", which I'm not personally a fan of, but whatever.

--------------------- MERGED ---------------------------


Configuration is application data, and so should go with the other data in appdata.
boot doesn't make sense to me. i get its for cfw/kernel9 tools but couldn't be named cfw-only ?

--------------------- MERGED ---------------------------

... So the same thing the first post of this thread says, then? With the addition of "logs", which I'm not personally a fan of, but whatever.

--------------------- MERGED ---------------------------


Configuration is application data, and so should go with the other data in appdata.
but why logs
 

TheCruel

Developer
OP
Banned
Joined
Dec 6, 2013
Messages
1,350
Trophies
2
XP
3,131
Country
United States
If anything, we could just have apps, appdata, boot, and logs.
Same principal as before but different names. Just branch off of it a bit.
I'd probably defer to arm9 devs, most of them seem to hang out in #cakey, and see what they'd prefer (I'd guess /3ds/arm9/). It's ultimately active devs that have the power to get the standard changed.

As for other subdirectories, I could see myself using /3ds/log/ or similar, but not much else.
 
Last edited by TheCruel,

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States
So after some discussion on the discord channel of 3DS Hacking, a few of us came up with a format and want to know what you guys would think of it. I understand that /Homebrew/ is great and all, but the main issue with it is that while it is easy to identify, there's no guarantee the Wii U or Wii scenes will pick up on this, and only fair to assume they will not for now until they've shown interest in a possible merge. We came up with the following, based on the Linux file system:

Code:
sdmc:/
    3DS/
      bin/
      boot/
      etc/
      log/

Now here's the explanation: /bin/ is for homebrew binaries which are just going to be a 3dsx file alongside their smdh meta. It'd be simplified if we have those who use this homebrew format embed the smdh to the 3dsx since that can be done now. Furthermore, /boot/ is for arm9-based stuff. luma/payloads/ could be in there for Luma's executable boot payload files. The config would be placed inside of /etc/ under the folder labeled /luma/config.txt as it plainly is etc and would not fit in any other folder. Homebrews that have external files such as JKSM could plop output in there under /etc/JKSM/ or applications that rely on external data like Love Potion would place the game files inside of /etc/{appname}/{files}. Finally, /log/ is where any 3dsx or cia application logs would be placed. Luma3DS could dump its register error information in a format close to Luma_2-7-16_01:27.log.

If anyone needs more examples I will gladly provide them. Yes, this does not fix the minor issue that some use the same SD card, but it would clean up the mess they have from the scene.

This guy gets it. I think you have the best suggestion yet, personally.

Why actually do we have this weird console-named root path clutter? Is it dating back to the PSP where that was sony's doing, and somehow carried over into other scenes, or...? Eh.

Either way, the PSP was better organized than the 3DS folder. Reminder of sony/cfw layout:

Code:
ms0:/
  PSP/
    GAME/
      Game_Folder/
        ..
    GAME150/
    GAME3XX/
    THEME/
    SAVEDATA/
    COMMON/
    SYSTEM/

This is an official layout and it's still better than the current mess.
 
Last edited by chaoskagami,
  • Like
Reactions: Joel16 and TurtleP

TurtleP

Well-Known Member
Member
Joined
Oct 7, 2015
Messages
140
Trophies
0
Age
28
Website
TurtleP.github.io
XP
308
Country
United States
I also agree with Cruel's layout. Even though how I said just renaming the folders with the same concepts wouldn't change much, it still is noob-friendly.

Code:
/3DS/
    apps/
    appdata/
    boot/

We can remove logs/ unless a cfw dev or other devs agree to have that anyways. Most users won't even need that folder, but if you do have crashes it's nice to know where they would be instead of on root.
 

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
I also agree with Cruel's layout. Even though how I said just renaming the folders with the same concepts wouldn't change much, it still is noob-friendly.

Code:
/3DS/
    apps/
    appdata/
    boot/

We can remove logs/ unless a cfw dev or other devs agree to have that anyways. Most users won't even need that folder, but if you do have crashes it's nice to know where they would be instead of on root.
Now that's a layout I can get behind (From the app perspective, I dunno what the CFW devs will agree to), just like the first post of the topic ;)
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States
Can I offer another suggestion, since none of us seem to agree?

Why not have one confguration file treated like environment vars that applications should interpret to know where to read from and put shit? If they don't read it, fine, same as before. This would allow people to use whatever layout suits them, and apps that are non-compliant don't break.
 
  • Like
Reactions: a9lh-1user

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
Can I offer another suggestion, since none of us seem to agree?

Why not have one confguration file treated like environment vars that applications should interpret to know where to read from and put shit? If they don't read it, fine, same as before. This would allow people to use whatever layout suits them, and apps that are non-compliant don't break.
You'd end up with the same issue as outright using /homebrew/3ds/, the current hbl wouldn't be compatible, and once it is old apps become a pain to access. A subdir of 3ds is the way to go
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States
You'd end up with the same issue as outright using /homebrew/3ds/, the current hbl wouldn't be compatible, and once it is old apps become a pain to access. A subdir of 3ds is the way to go

This would allow people to use whatever layout suits them, and apps that are non-compliant don't break.

Fallback behavior would be the /3DS folder. I don't get why you're complaining. Should we continue dumping stuff on the SD root and /3DS, then?

--------------------- MERGED ---------------------------

Right now, I'd think that this is how it'd work:

Code:
/3DS/
    arm9loaderhax.bin
    apps/
    appdata/
    boot/ (handles chainloading for arm9loaderhax, basically cfw stuff)
    logs/ (only if dumps happen, etc)

I can't personally agree with the name 'logs' since a crash dump or a file written for debug purposes isn't a log. Name it 'debug' or something. This is actually relevant because my CFW does produce logs.
 

Drakia

Well-Known Member
Member
Joined
Mar 15, 2008
Messages
1,644
Trophies
2
Age
36
XP
2,596
Country
Canada
Fallback behavior would be the /3DS folder. I don't get why you're complaining. Should we continue dumping stuff on the SD root and /3DS, then?

--------------------- MERGED ---------------------------



I can't personally agree with the name 'logs' since a crash dump or a file written for debug purposes isn't a log. Name it 'debug' or something. This is actually relevant because my CFW does produce logs.
What? No, I think we should go with /3ds/apps/ and /3ds/appdata/ (or just data, not picky) like I've been saying this whole time. I don't understand why you're so hell bent on using a directory other than /3ds/ honestly.

In regards to logs from a crash or for debug, those are still logs, just FYI. Look at pretty much any desktop program logging location.
 

TurtleP

Well-Known Member
Member
Joined
Oct 7, 2015
Messages
140
Trophies
0
Age
28
Website
TurtleP.github.io
XP
308
Country
United States
Not to be picky either, but /data/ over /appdata/ also sounds better since it's less to read and makes it apparent that data goes there at first glance. Some might accidentally confuse them otherwise.
 

chaoskagami

G̷̘̫̍̈́̊̓̈l̴̙͔̞͠i̵̳͊ţ̸̙͇͒̓c̵̬̪̯̥̳͒͌̚h̵̹̭͛̒̊̽̚
Developer
Joined
Mar 26, 2016
Messages
1,365
Trophies
1
Location
↑↑↓↓←→←→BA
Website
github.com
XP
2,287
Country
United States
What? No, I think we should go with /3ds/apps/ and /3ds/appdata/ (or just data, not picky) like I've been saying this whole time. I don't understand why you're so hell bent on using a directory other than /3ds/ honestly.

Considering that's what this very topic is about - figuring out a better way to handle this - any suggestion is worth discussing, IMO. :P

In regards to logs from a crash or for debug, those are still logs, just FYI. Look at pretty much any desktop program logging location.

Crash dumps are crash dumps and logs are logs. They're not the same thing. One is actual data from within the program's memory and one is information the program writes while functioning normally. Logs can be binary, sure - look at systemd.

Either way, that directory is something most users will never need to touch, anyways. It would be mainly meant for developers. I just don't like the misnomer.

Not to be picky either, but /data/ over /appdata/ also sounds better since it's less to read and makes it apparent that data goes there at first glance. Some might accidentally confuse them otherwise.

Here's the next problem though - WHAT data? All data? Read-only data? If so, how are users supposed to tell a save file apart from the game if they only want to remove a save?

I hate to say this, but this is all a topic with no correct answer. *sigh* We all need to just pick something and run with it.
 
Last edited by chaoskagami,
  • Like
Reactions: a9lh-1user

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: 24,000 hmmmm lol