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

VFS additions #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

VFS additions #12

wants to merge 1 commit into from

Conversation

phatpaul
Copy link
Collaborator

Adding a vfs_upload example GUI. Depends on chmorgan/libesphttpd#48 (already merged)

Also add helper script to generate filesystem images (stolen from loboris/MicroPython_ESP32_psRAM_LoBo).
(I only got FatFS to work so far, and I don't have time right now to troubleshoot SPIFFS and LittleFS. I put a disclaimer in the readme to this effect)

The example still builds and runs fine without any of this VFS stuff turned on. (the filesystem upload functions just fail if used)

image

Copy link
Owner

@chmorgan chmorgan left a comment

Choose a reason for hiding this comment

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

Love the concept here but the second commit, the one that pulls in a ton of files from other repositories would be much smaller if we made use of submodules instead. Is that possible?

main/user_main.c Outdated Show resolved Hide resolved
main/user_main.c Outdated Show resolved Hide resolved
@@ -0,0 +1,165 @@
Apache License
Copy link
Owner

Choose a reason for hiding this comment

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

possible to add littlefs as a submodule vs. copying all of the files into the repository?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would love to, can you help figure out how?

.gitmodules Outdated
@@ -1,3 +1,7 @@
[submodule "components/libesphttpd"]
path = components/libesphttpd
url = https://github.com/chmorgan/libesphttpd.git
[submodule "components/mkspiffs"]
path = components/mkspiffs
url = https://github.com/phatpaul/mkspiffs.git
Copy link
Owner

Choose a reason for hiding this comment

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

any reason not to use the main GitHub repository for mkspiffs? Igrr's?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I modified that project to get it to work as a submodule in ESP-IDF. I don't know if there is a cleaner way.
phatpaul/mkspiffs@04d419f
Thoughts?

Copy link
Owner

Choose a reason for hiding this comment

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

@phatpaul maybe reach out to igrr to see what he thinks? It may be that we can perform the configuration parts as a part of the build inside of this repository.

Copy link

Choose a reason for hiding this comment

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

The commit linked above seems to be the correct approach, if you want to include mkspiffs as a submodule.

Copy link
Owner

Choose a reason for hiding this comment

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

@igrr @phatpaul had to add this commit, phatpaul/mkspiffs@04d419f

Would that commit be accepted into your tree if submitted as a PR?

Copy link

Choose a reason for hiding this comment

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

Yes, it would.

Copy link
Owner

Choose a reason for hiding this comment

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

@phatpaul can you submit that commit as a PR? I tried but GitHub is reporting an error, probably because it requires some permissions on your fork.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rebased and created PR. See igrr/mkspiffs#57

@@ -0,0 +1,156 @@
// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD
Copy link
Owner

Choose a reason for hiding this comment

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

can we use mkfatfs via a submodule as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I would love to. I looked at doing that but couldn't figure out how.
The problem is that the source directory for that project is several layers deep.
https://github.com/jkearins/ESP32_mkfatfs/tree/master/components/mkfatfs/src

And it is my understanding that you can't check-out a sub-directory of a repo as a submodule.

Ideas?

Copy link
Owner

Choose a reason for hiding this comment

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

@phatpaul thoughts about asking jkearins to split that off into a separate repository so other people can reuse it? You are correct that git doesn't allow what we need because he embedded his component into the subdirectory. There are some hacks to make it work like add a submodule to another directory like repos/ and then symlink from repos/mkfatfs/components/mkfatfs/src to components/mkfatfs but that seems kind of blah.

@chmorgan
Copy link
Owner

@phatpaul it may take a little while to discuss with igrr and jkearins but lets see how that goes first. If there is some impasse then we can discuss working around it. Does that sound ok?

@chmorgan
Copy link
Owner

chmorgan commented Dec 9, 2018

@phatpaul have you had any luck with those guys? To clarify my concerns if we merge back changes here we'll be copying or relying on forks of external repositories. If we can get those repositories adjusted then we can include them directly and won't have to worry about maintaining forks or copied files. Would it help if I reached out to them? I'd like to do what I can to facilitate getting your PR merged in as soon as possible.

@phatpaul
Copy link
Collaborator Author

phatpaul commented Dec 9, 2018 via email

@chmorgan
Copy link
Owner

chmorgan commented Dec 9, 2018

@jkearns, @igrr, can you take a look at the comments above? We are trying to integrate mkspiffs and mkfatfs in this project as submodules but we are having trouble doing so. Are we missing something?

@chmorgan
Copy link
Owner

@jkearns have you see the request here to split the mkfatfs into a separate repository so it can be included as a component of another project? (As least that’s what I think the request was, @phatpaul can correct me)

@chmorgan
Copy link
Owner

@phatpaul ahh ok this PR from a while back. The changes to mkspiffs were integrated by igrr right?

@jkearns just pinging again to see if you saw the request about splitting things up.

@phatpaul
Copy link
Collaborator Author

@chmorgan I will split this up to leave out the building local fs stuff.

I would like to merge this in - The UI for VFS is in here and it does not depend on the mkfatfs.

@phatpaul
Copy link
Collaborator Author

Actually it is already split into 2 commits. What's the best way to merge in just the first commit? Do I need to update the pull-request? Or rewind the branch? I would like to leave the 2nd commit in this or another pull-request.

@chmorgan
Copy link
Owner

Hi @phatpaul. I'd do something like:

git branch vfs_upload_full
git rebase -i master
git push --force

The branch makes a copy of your current branch and during the rebase you'd drop the commit you'd like to lose. The rebased branch with the single commit should show up here replacing the previous commits after the force push.

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.

3 participants