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

Permit fburn for esp8266 #1115

Merged
merged 4 commits into from
Dec 5, 2024
Merged

Conversation

palainp
Copy link
Contributor

@palainp palainp commented Nov 24, 2024

Dear @ermiah, @EtchedPixels,
This PR want to continue the work #1090 and now make fburn should works fine (it needs an additional call to ld to generate the segment headers, maybe there is a clever way to add them).
As I don't use anymore the SD card reader for the root filesystem, and as now fburn works fine, I've booted correctly without the panic in #1091. @ermiah would you mind to try to boot on the flash drive? (it requires to recompile the kernel with a new option after an updating config.h)
Best.

palainp and others added 2 commits November 24, 2024 14:32
- add a macro to allow selecting the root device at the kernel compile time
- remove blkdiscard as it does not compile
@EtchedPixels
Copy link
Owner

Can you stick some info in on the blkdiscard build fail and lets deal with that separately not quietly lose it in an unrelated pull. Otherwise looks good to me at first glance.

@palainp
Copy link
Contributor Author

palainp commented Nov 24, 2024

Of course, would you mind if I squash/rebase to keep only one commit?
The compile failure is about absent macros, and I'm unsure why this happens now with esp8266 :(

@palainp
Copy link
Contributor Author

palainp commented Nov 24, 2024

I needed to update the default boot device selection because it was broken before, sorry for that. I also removed the blkdiscard part of the PR.

In the meantime I also found that blkdiscard.c compiles fine, but as it is absent from the Makefile.common file in Application/util, we can't upload it into our flash image. So I wonder if the best path is to remove it from update-flash.sh or if we can use Makefile.generic in Makefile.esp8266 for the applications, or if we can add it to Makefile.common. The later cases can have impact for other platforms but I'm not aware of the consequences.

@EtchedPixels EtchedPixels merged commit 445ce9a into EtchedPixels:master Dec 5, 2024
13 checks passed
@EtchedPixels
Copy link
Owner

thanks

@palainp palainp deleted the fix-flash branch December 11, 2024 09:30
@ermiah
Copy link

ermiah commented Dec 16, 2024

@palainp Hi.
I've tried git pull and these commands to rebuild the Kernel and Image, and reprogram the device (I'm using an SD Card for the file system):

$ sudo make TARGET=esp8266 kernel diskimage
$ sudo make -C Kernel/platform/platform-esp8266 burn
$ sudo dd if=Images/esp8266/disk.img of=/dev/sda
$ minicom -D /dev/ttyUSB0

I'm still getting a Kernel Panic. Am I missing a step? should I do "fburn" instead?

Devboot
Allocated 27 disk buffers.
128KiB total RAM, 96KiB available to processes (15 processes max)
Enabling interrupts ... ok.
NAND flash, 1421kB: hda:
SD drive 0: hdb: hdb1 hdb2 (swap)
Mounting root fs (root_dev=17, ro): OK
Starting /init
 _---,_   FATAL EXCEPTION 29 @ 402141FA with 00000200:
|     ||   a0=9FFFFEBC  sp=3FFF8608  a2=6000011C  a3=0001FF00
| RIP ||   a4=60000120  a5=00040000  a6=3FFFE5A4  a7=00000200
|     ||   a8=10000000  a9=00000200 a10=60000144 a11=3FFFA2CC
|.,~||/|. a12=00476206 a13=00000001 a14=3FFF893C a15=3FFF894E

panic: fatal

@palainp
Copy link
Contributor Author

palainp commented Dec 16, 2024

Dear @ermiah , I don't use the SD card since the PR which allows me to put the file system on the flash part of my device. So yes, what I do is use fburn (flash the file system) in addition to burn (flash the kernel), but this requires a change to the default device used to boot, in Kernel/platform/platform-esp8266/config.h you need to uncomment

//#define BOOTDEVICE 0x0000 /* hda */
and then recompile the kernel (which will use the esp8266 flash instead of the SD card as the root fs).

Now, back to your issue, it seems that the kernel is unable to run /init properly, and as it works fine in the flash (at least for me), I suspect that the root problem is around the SD card.

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