Skip to content

Commit

Permalink
Merge pull request #1799 from ghaerr/misc
Browse files Browse the repository at this point in the history
[build][docs] Miscellaneous fixes
  • Loading branch information
ghaerr authored Feb 6, 2024
2 parents 5b69ab0 + d2645a9 commit e58868f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 27 deletions.
44 changes: 19 additions & 25 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,31 @@

## Prerequisites

To build ELKS, you need a GNU development environment, including:
To build ELKS, you need a development environment on Linux or macOS, including:
- flex
- bison
- texinfo
- libncurses5-dev
- mtools-4.0.23 (for MSDOS/FAT images)
- compress (for compressed man pages; use `sudo apt-get install ncompress`)

## Quickstart

A script is provided to automate the whole build process
(cross tool chain, configuration, kernel, user land and target image),
and make it easier for ELKS newbies:

`./build.sh`

Note: all the scripts must be executed within the top folder of
the ELKS repository as the current one (= TOPDIR).

If you want to clean everything up afterwards (except the cross tool chain):

`./clean.sh`

## Build steps

1- Create a `cross` subfolder:

`mkdir cross`

2- Build the cross tool chain, mainly based on a recent GCC-IA16
(DEV86 including BCC was used for previous versions, but has been
dropped because it was obsolete and no longer maintained):
2- Build the cross tool chain, mainly based on GCC-IA16. This
step is quite long, but only needs to be done once:

`tools/build.sh`

Ubuntu 18.04 LTS users: as this step is quite long,
you can download an already built cross folder from here:
https://github.com/elks-org/elks/actions?query=workflow%3Across

3- Set up your environment (PATH, TOPDIR and CROSSDIR):

`. ./env.sh` (note the '.' before the script)
`. ./env.sh` (note the '.' before the script, or use `source ./env.sh` for csh)

4- Configure the kernel, the user land and the target image format:
4- Configure the kernel, the user land and the target image format. This
creates the configuration file .config:

`make menuconfig`

Expand All @@ -69,8 +50,21 @@ step 4 after cleaning only the kernel, the user land and the image:

`make clean`

To clean the kernel build objects only, `make kclean` can be used.

8- One can also build ELKS distribution images for the entire suite of
supported floppy formats and hard disks (with and without MBRs) for both
MINIX and MSDOS FAT format. To create these images, use the following:

`cd image; make images`

## GitHub Continuous Integration

A script is provided to automate the whole build process
(cross tool chain, configuration, kernel, user land and target image),
which is run by GitHub on PRs and pushes:

`./build.sh`

Note: all the scripts must be executed within the top folder of
the ELKS repository as the current one (= TOPDIR).
1 change: 1 addition & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ if [ "$1" = "auto" ]; then
rm elkscmd/sys_utils/clock.o
rm elkscmd/sys_utils/ps.o
rm elkscmd/sys_utils/meminfo.o
rm elkscmd/sys_utils/beep.o
rm elkscmd/basic/*.o
rm elkscmd/nano-X/*/*.o
make -j1 || clean_exit 10
Expand Down
3 changes: 3 additions & 0 deletions elks/config.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ mainmenu_option next_comment
int 'INT0 Logical IRQ' CONFIG_8018X_INT3 0
int 'INT0 Logical IRQ' CONFIG_8018X_INT4 0

define_bool CONFIG_CONSOLE_DIRECT n
define_bool CONFIG_CONSOLE_8018X y

elif [ "$CONFIG_ARCH_PC98" = "y" ]; then

comment 'Devices'
Expand Down
2 changes: 1 addition & 1 deletion elks/fs/msdos/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static struct super_block *msdos_read_super(struct super_block *s, char *data,
sb->previous_cluster = 0;
unmap_brelse(bh);

printk("FAT: me=%x,csz=%d,#f=%d,floc=%d,fsz=%d,rloc=%d,#d=%d,dloc=%d,#s=%ld,ts=%ld\n",
printk("FAT: me=%x,csz=%d,#f=%d,floc=%d,fsz=%d,rloc=%d,#d=%d,dloc=%d,#s=%lu,ts=%lu\n",
b->media, sb->cluster_size, sb->fats, sb->fat_start,
sb->fat_length, sb->dir_start, sb->dir_entries,
sb->data_start, total_sectors, b->total_sect);
Expand Down
2 changes: 1 addition & 1 deletion elkscmd/inet/httpd/sample_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<B><BIG>It worked!!</BIG></B>
<P>
If you can see this page the web server worked.<br>
Visit <a href="https://github.com/jbruchon/elks">https://github.com/jbruchon/elks</a>
Visit <a href="https://github.com/ghaerr/elks">https://github.com/ghaerr/elks</a>
</p>
</CENTER>
</BODY>
Expand Down
1 change: 1 addition & 0 deletions elkscmd/sys_utils/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
beep
chmem
clock
console
Expand Down

0 comments on commit e58868f

Please sign in to comment.