Skip to content

Commit

Permalink
fix default boot device selection and revert blkdiscard
Browse files Browse the repository at this point in the history
  • Loading branch information
palainp committed Nov 24, 2024
1 parent 099a37f commit 905b8a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 16 deletions.
14 changes: 4 additions & 10 deletions Kernel/platform/platform-esp8266/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,11 @@ for further file storage and swap.
## Building

The kernel needs to know the boot device, therefore, depending on your setup,
you will need to run one of the following. If your root device is the flash:
you will need to run one of the following. If your root device is the flash,
you must edit Kernel/platform/platform-esp8266/config.h.
Otherwise, if your root device is the SD card, the default is fine for you.
```
make TARGET=esp866 DEFAULT_BOOT=hda kernel
```
If your root device in the SD card:
```
make TARGET=esp866 DEFAULT_BOOT=hdb1 kernel
```
Then you can build the application and the filesystem:
```
make TARGET=esp866 diskimage
make TARGET=esp866 kernel diskimage
```

You need the `xtensa-lx106-elf` gcc toolchain --- install the
Expand Down
7 changes: 3 additions & 4 deletions Kernel/platform/platform-esp8266/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ extern uint8_t _code_top[];
/* We need a tidier way to do this from the loader */
#define CMDLINE NULL /* Location of root dev name */

#if DEFAULT_BOOT==hda
#define BOOTDEVICE 0x0000 /* hda */
#elif DEFAULT_BOOT==hdb1
//#define BOOTDEVICE 0x0011 /* hdb1 */
#ifndef BOOTDEVICE
#define BOOTDEVICE 0x0011 /* hdb1 */
#else
#error "You must call make with either DEFAULT_BOOT=hda or DEFAULT_BOOT=hdb1"
#warning "Default boot device is hdb1, if you want to change that you can edit Kernel/platform/platform-esp8266/config.h"
#endif

#define SWAPDEV (swap_dev) /* wherever */
Expand Down
4 changes: 2 additions & 2 deletions Kernel/platform/platform-esp8266/update-flash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ cd /bin
bget ../../../Applications/util/banner
bget ../../../Applications/util/basename
bget ../../../Applications/util/bd
# bget ../../../Applications/util/blkdiscard
bget ../../../Applications/util/blkdiscard
bget ../../../Applications/util/cal
bget ../../../Applications/util/cat
bget ../../../Applications/util/chgrp
Expand Down Expand Up @@ -175,7 +175,7 @@ bget ../../../Applications/util/yes
chmod 0755 banner
chmod 0755 basename
chmod 0755 bd
# chmod 0755 blkdiscard
chmod 0755 blkdiscard
chmod 0755 cal
chmod 0755 cat
chmod 0755 chgrp
Expand Down

0 comments on commit 905b8a8

Please sign in to comment.