EtchedPixels / FUZIX

FuzixOS: Because Small Is Beautiful
Other
2.15k stars 271 forks source link

Using esp8266 diskimage #944

Closed palainp closed 1 year ago

palainp commented 1 year ago

Hi, thanks for the work done with esp8266! I correctly build the flash image targeting esp8266 (and it boots)! But I have some troubles with the SD Card image. The image creation seems to be ok, and I have the same data on the card and in the disk.img file. I burn the sd card with the following:

make TARGET=esp8266 diskimage && \
sudo dd if=Images/esp8266/disk.img of=/dev/xvdm bs=512

I checked the content of the sd card against the disk.img with:

xxd /dev/xvdm > data1.hex # ^C at some point because the sd card is largely greater than the image file
xxd Images/esp8266/disk.img > data2.hex
diff data1.hex data2.hex | head -n 2

The first difference is beyond the last byte of data2.hex and is due to the larger sd card size. When I try to boot I have the following:

FUZIX version 0.4pre1
Copyright (c) 1988-2002 by H.F.Bower, D.Braun, S.Nitschke, H.Peraza
Copyright (c) 1997-2001 by Arcady Schekochikhin, Adriano C. R. da Cunha
Copyright (c) 2013-2015 Will Sowerbutts <will@sowerbutts.com>
Copyright (c) 2014-2022 Alan Cox <alan@etchedpixels.co.uk>
Devboot
Allocated 27 disk buffers.
80kB total RAM, 64kB available to processes (15 processes max)
Enabling interrupts ... ok.
NAND flash, 2591kB: hda: 
SD drive 0: hdb: 
Mounting root fs (root_dev=17, ro): failed

panic: no root

This seems to indicate that the sd card is correctly detected (presence of hdb:) but the partition table is not correctly read (no hdb1 hdb2). I'm not sure about the image, when I try to cfdisk /dev/xvdm I can see a first partition of 32MB and a second of 5.2M whereas the README in https://github.com/EtchedPixels/FUZIX/tree/master/Kernel/platform-esp8266 indicates that the first partition is the swap partition and should be at least 2MB and the second partition is the fs (and my disk.img is not correct so far).

My setup for image creation is probably wrong? or maybe cfdisk is misguided somewhere with the partition table?

palainp commented 1 year ago

Update: This is a similar issue to https://github.com/EtchedPixels/FUZIX/issues/842. I tried with another SD Card and it works like a charm. Sorry for the next one reading this, I have no clue how to carefully choose a working SD card. :(