Giter Site home page Giter Site logo

ghaerr / elks Goto Github PK

View Code? Open in Web Editor NEW
928.0 38.0 106.0 30.04 MB

Embeddable Linux Kernel Subset - Linux for 8086

License: Other

Shell 2.09% C 79.43% Makefile 4.26% Assembly 3.44% HTML 0.33% Max 0.03% Perl 0.02% Limbo 0.04% Yacc 0.38% Lex 0.04% M4 0.88% Roff 6.59% Logos 0.08% Awk 0.35% Forth 0.01% TeX 1.86% sed 0.01% Dockerfile 0.01% BASIC 0.11% SWIG 0.05%
linux embedded embedded-linux 8086 8086-architecture 8088 80186 x86-16 ia-16 kernel

elks's Introduction

logo

cross main

What is ELKS?

ELKS is a project providing a Linux-like OS for systems based on the Intel IA16 architecture (16-bit processors: 8086, 8088, 80188, 80186, 80286, NEC V20, V30 and compatibles). Such systems are ancient computers (IBM-PC XT / AT and clones) as well as more recent SBCs, SoCs, and FPGAs. ELKS supports networking and installation to HDD using both MINIX and FAT file systems.

Memory requirements

  • Stock images require 512k RAM
  • ELKS requires 256k RAM to run, 512k to be really useful
  • No hardware MMU required
  • ROM-based systems can run in 128k RAM

Try ELKS online

You can play with ELKS online thanks to the v86 emulator. Login with "root" and no password. Go to the bin folder and try the different commands available. Try nxtetris. Start the game by pressing "n".

Watch ELKS in action

Screenshots

ELKS running on QEMU ss1

Olivetti M24 8086 CPU ss2

ELKS Networking showing netstat and process list ss3

Running ELKS Basic on PC-9801UV21 (NEC V30 CPU) ss4

Downloads

A full set of disk images are available for download, for you to try out ELKS: Downloads.

How to build

Full build instructions are here.

Wiki

Help on how to use ELKS, as well as technical tutorials, are available on our Wiki.

Documentation

More information is in the Documentation folder: Index of ELKS Documentation.

Resources

Other projects and resources interesting to ELKS and our programming community:

  • blink16 A visual 8086 emulator and debugger capable of booting the ELKS kernel for symbolic debugging, as well as an emulator for ELKS executables.
  • Size Optimization Tricks A great article from Justine Tunney's blog showing how big things can be done without bloat.
  • gcc-ia16 TK Chia's gcc compiler targeted for 8086, maintained and used for the ELKS kernel and all its applications.

More information

Questions? Problems? Patches? Open an issue on the ELKS GitHub project!

elks's People

Contributors

ccoffing avatar cjsthompson avatar cocus avatar conikost avatar d33tah avatar dptpirate avatar edoalive avatar floriangit avatar fonin avatar georgp24 avatar ghaerr avatar jbruchon avatar johnathancn avatar jsedanoj avatar lithoxs avatar madejusz avatar marcin-laszewski avatar mellvik avatar mfld-fr avatar mintsuki avatar mirevall avatar pawelo12345678 avatar pawosm-arm avatar redfoxymoon avatar segin avatar tkchia avatar toncho11 avatar transplier avatar tyama501 avatar wmthornton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elks's Issues

[romfs] Add support of symbolic link

From review and testing of PR #197:

The ROM filesystem currently does not support the symbolic link, resulting in an image build failure when packing the target folder with the ROM configuration option. In that folder, /bin/sh is a link to either ash or sash, depending on the configuration.

Kernel build fails when deselecting BIOS HD support

When deselecting BIOS HD option in kernel configuration, the compilation fails on doshd.c, because the static global variable hdcount is not more available for bioshd_ioctl(). Moreover, in this latest function, the minor number (so the disk number) is checked only against HD count, not (FD + HD) count.

Patch proposal is in commit 80de838.

Nothing loads with my XT-IDE CF Adapter

When i try to load elks with my XT-IDE CF Adapter connected.
I choose to boot from floppy (by typing "A").
The kernel begins to load

Loadling elks
............................................................

And nothing more... no error logs.
When i disconnect the card, everything works fine.

Shell interrupt problem

Hitting ^C at the shell prompt cause the message
can't cd to ??oot/.profile
where ?? are garbage chars and the actual file name will vary. Occasionally the message will be different, such as 'HOME not set'.
Hitting a second ^C terminates the shell.

[ Tested with physical 286/AT and virtualbox]

Links not working on ELKS FAQ web pages

When I load the http://elks.sourceforge.net/FAQ-English.html web page, I get the following error message when I click on any of the links provided. The same is the case with the web pages in other languages:


`An error has been encountered in accessing this page.

  1. Server: elks.sourceforge.net
  2. URL path: /faq/FAQ-English.html
  3. Error notes: NONE
  4. Error type: 404
  5. Request method: GET
  6. Request query string: NONE
  7. Time: 2017-02-26 11:36:49 UTC (1488109009)

Reporting this problem: The problem you have encountered is with a project web site hosted by SourceForge.net. This issue should be reported to the SourceForge.net-hosted project (not to SourceForge.net).

If this is a severe or recurring/persistent problem, please do one of the following, and provide the error text (numbered 1 through 7, above):

Contact the project via their designated support resources.
Contact the project administrators of this project via email (see the upper right-hand corner of the Project Summary page for their usernames) at [email protected]

If you are a maintainer of this web content, please refer to the Site Documentation regarding web services for further assistance.

NOTE: As of 2008-10-23 directory index display has been disabled by default. This option may be re-enabled by the project by placing a file with the name ".htaccess" with this line:

Options +Indexes
`

ROM version build fails

When selecting the ROM version (CONFIG_ROMCODE), the build fails:

gcc -E -traditional -I/mnt/data/home/mfld/advantech/elks/elks/include -DELKS_VERSION_CODE=0x00020000 -DUTS_RELEASE=\"0.2.0\" -D__KERNEL__ -o irqtab.s irqtab.S
as86 -0  -o irqtab.o irqtab.s
00399 0010           891E       0000                    mov stashed_ds,bx
***** unbound label.........................................^
00530 0083           8B1E       0000                mov bx,stashed_ds   ! Recover the data segment
***** unbound label................................................^
00755 0147           8E1E       0000                mov ds,stashed_ds       ! the org DS of kernel
***** unbound label................................................^

The reason is that GCC does not pre-process the #define stashed_ds directive, that stills in the .s file:

#asm
    .text
   #define stashed_ds       [0]

This causes AS86 to fail, as there is no stashed_ds label, and that word has not been substituted to [0].

fail to compile elkscmd/ktcp/vjhc.c

Here is the output:

bcc -ansi -O -0 -D__KERNEL__ -I/home/lynus/elks/elks/include -c -o vjhc.o vjhc.c

00427 if ip_vjhc_compress.off=0
***** relocation impossible..............................................^
00438 if ip_vjhc_compress.off=0
***** relocation impossible..............................................^
00469 if ip_vjhc_compress.off=0
***** relocation impossible..............................................^

00003 errors
00000 warnings
../Make.defs:122: recipe for target 'vjhc.o' failed

build.sh fails. pushd is not found

[12:43:40][~/p/elks]
[sparky4@lappy4]$ sudo ./build.sh
-e
WARNING: Disk images can only be built if you have root permissions
./build.sh: 38: ./build.sh: pushd: not found
./build.sh: 39: .: Can't open ./env.sh

Mess in top level directory of project

Last commit ([gcc] Close jbruchon#178 : update GCC-IA16) floods top level directory with a plethora of directories used in the intermediate steps of building a compiler. The mail goal of the project is to write a kernel (and its userspace), not the building of compilers.

Look at FUZIX (https://github.com/EtchedPixels/FUZIX), with similar goals than ELKS. You will not find there a "bin" directory to contain binaries of any compiler. And this project uses several compilers: sdcc, cc65, gcc-6809, even ia16-gcc. The documentation gives information on how to get required tools, but getting them is your problem.

It is a gross mistake to require a specific compiler to be able to compile ELKS. Rather, the Documentation must offer a range of options, from precompiled packages to directions on where to get the latest compilers. The top level README should point to the easiest options.

I will appreciate a definition on this issue.

select() in userspace crashes the caller

Version: latest master (commit 661ac70).

The following code causes the process to crash after pressing a key:

int main ()
	{
	fd_set fdset;
	FD_ZERO (&fdset);
	FD_SET  (0 /*fd*/, &fdset);
	res = select (0 /*fd*/ + 1, &fdset, NULL, NULL, NULL);

Result is:

panic: wrong waitpt
apparent call stack:
(...)

ELKS uses weak sleep_on()

As documented in LDD3 and ULK2 books, there is a possible race condition in the current sleep / wake implementation, as a task could be woken up between checking the sleep condition and putting the task to sleep.

It is unlikely to occur between tasks with a single CPU core if the condition check & sleep put are close to each other, but is more likely to occur when waking up from within an interrupt routine for fast devices, like the Ethernet and the HR timers.

Solution is to replace the current sleep_on () by the more modern wait_event () implementation, but with the condition expression replaced by a test function, to reduce the cost of macro expansion in term of code size.

elksnet fails to build (ktcp/vjhc.c macro problem)

Trying to build elksnet results in the following:

root@kubuntu:/usr/src/elks/elksnet# make
make[1]: Entering directory '/usr/src/elks/elksnet/ktcp'
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o ktcp.o ktcp.c
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o slip.o slip.c
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o ip.o ip.c
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o icmp.o icmp.c
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o tcp.o tcp.c
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o tcp_cb.o tcp_cb.c
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o tcp_output.o tcp_output.c
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o timer.o timer.c
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o tcpdev.o tcpdev.c
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o netconf.o netconf.c
bcc -ansi -O -0 -D__KERNEL__ -I/usr/src/elks/elks/include -c -o vjhc.o vjhc.c
vjhc.c:117.19: error: need ')'
vjhc.c:119.1: error: need ';'
vjhc.c:119.1: error: need variable name
vjhc.c:117.3: error: need ';'
vjhc.c:117.21: error: ip_vjhc_compress already declared
vjhc.c:118.12: error: pkt already declared
vjhc.c:120.1: error: need variable name
vjhc.c:121.8: error: need ';'
vjhc.c:130.3: error: need variable name
vjhc.c:130.5: error: need ';'

...and hundreds of follow-up errors. Probably related to the funny-looking DEFUN macro (why is that needed anyway?)

Create a new integration branch to host the toolchain migration

@jbruchon : as the toolchain migration would make ELKS unstable for quite a long time until we complete and mature the changes, I think it would be safer to branch from master into another one dedicated to that migration.

If you agree, could you then please create that new branch from master, and also set up both as protected in the project configuration ?

[net] Ether/ne2k interrupt problem

My ne2k ISA card is set to IRQ11, and does not support IRQ9. Changed ne2k.h: #define NE2K_IRQ 11
Compile and test. No cigar. Run on QEMU w/IRQ set to 11. Still no cigar. Set QEMU IRQ to 9. Voila!

So - changing the IRQ in ne2k.h does not seem to have any effects. Is this a bug or did I miss something?

FAT16 support hangs with message ""BUFMAP: buffer #.... waiting on L1 slot"

When you mount a FAT16 disk and use ls to list the files on this disk the message above will occur.

This is as far as I could trace it:
in msdos/dir.c the function msdos_get_entry() is called in line 244. This function is implemented in msdos/misc.c. There it calls msdos_sread() which calls map_buffer() in fs/buffer.c. The function map_buffer() hangs with the message above.

The ls command causes these calls to be repeated several times until bread() in msdos_sread() returns a buffer_head ptr that cannot be handled in map_buffer().

You can generate a FAT16 disk image for testing by modifying lines 41 and 43 in
elkscmd/test/fat/build_fat32_hd_image.sh. I.e uncomment line 43 and comment out line 41.

Georg

GCC-IA16 guidelines

@lithoxs : earlier this year, you announced that you started to compile the ELKS kernel with the latest GCC-IA6 (http://www.spinics.net/lists/linux-8086/msg00817.html).

As I can see in your PR flow, you still maintain the build with GCC-IA16, and it looks like, after tons of (more or less serious) posts to discuss that topic, that this compiler is today the best alternative to BCC.

Not only because of the work you already performed, but also because this GCC fork is still alive & able to be mainstreamed: https://github.com/tkchia/gcc-ia16

Even Alan is keeping an eye on this option: crtc-demos/gcc-ia16#4

It would be nice if you could provide some guidelines to use that compiler in the /Documentation folder, so that we could be more to use it to improve the ELKS code.

`rm` does not work

Make a file, rm that file, and you'll get the message "rm: could not remove foo"

Last bytes of data segment corrupted

As reported by @Mellvik in #133, the last bytes of the data segment (.data) are corrupted. For example, starting from the default configuration, enabling the NE2K driver, and after adding some traces with printk(), the end of the data segment (just followed by the string tables) in the system executable is:

00e010 6c 65 6e 3d 25 75 0a 00 6e 65 32 6b 5f 72 65 61  >len=%u..ne2k_rea<
00e020 64 3a 6c 65 6e 3d 25 75 0a 00 00 00 5f 6d 61 69  >d:len=%u...._mai<
00e030 6e 00 00 00 03 00 00 00 12 00 00 00 5f 5f 73 62  >n...........__sb<
00e040 73 73 00 00 06 00 00 00 1b 00 00 00 5f 5f 65 6e  >ss..........__en<

The corresponding trace was added in `ne2k_main.c' line 40:

	printk ("ne2k_read:len=%u\n", len);

But when running the /bin/eth test program, output is:

Receive ARP reply...
ne2k_rea???

where ??? should rather be `d:len='.

End of the Image file is correct:

00ea10 6c 65 6e 3d 25 75 0a 00 6e 65 32 6b 5f 72 65 61  >len=%u..ne2k_rea<
00ea20 64 3a 6c 65 6e 3d 25 75 0a 00 00 00              >d:len=%u....<
00ea2c

So the corruption occurs at runtime and looks to be aligned to the paragraph.

Add automatic user feedback ?

What about adding a feedback in the configuration & build script ? Activated after the explicit consent of the user, it would upload some anonymous data to one of our server, like the ELKS configuration, in order to help us to figure out what is the real usage of the product and where we should focus our effort ?

Elkscmd build fail

I have build elks and make boot image.
I want to make image with root system,so goto Elkscmd
Make images.zip,this makes error .

:~/elks/elkscmd$ sudo make images.zip
cp /home/xxx/elks/elks/arch/i86/boot/Image boot
make[1]: Entering directory `/home/xxx/elks/elkscmd'
/bin/sh: 1: [[: not found
/bin/sh: 1: -e: not found
-e

*** Do builds in dev86 and dev86/bootblocks first ***

make[1]: *** [boot_blocks] Error 1
make[1]: Leaving directory `/home/xxx/elks/elkscmd'
make: *** [comb] Error 2

[telnet] Client does not like UTF-8

To test the ELKS telnet client, I connect to my Linux workstation that is configured in UTF-8 for almost everything. The telnet server is the Busybox applet sudo busybox telnetd -F. I don't know at this stage where the wrong thing is (client ? server ? failed negociation ?), but the result is uggly.

nano-X does not compile

bcc -0 -ansi -Dconst= -Dvolatile= -DELKS=1 -DUNIX=1 -DDEBUG=1 -I/home/daivox/projects/github/elks/nano-X/src -I/usr/bcc/include -I/home/georg/elks-dev/OS-build/elks/include -O -DNONETWORK=1 -DERASEMOVE=1 -DUPDATEREGIONS=1   -c -o engine/devdraw.o engine/devdraw.c
bcc -0 -ansi -Dconst= -Dvolatile= -DELKS=1 -DUNIX=1 -DDEBUG=1 -I/home/daivox/projects/github/elks/nano-X/src -I/usr/bcc/include -I/home/georg/elks-dev/OS-build/elks/include -O -DNONETWORK=1 -DERASEMOVE=1 -DUPDATEREGIONS=1   -c -o engine/devmouse.o engine/devmouse.c
bcc -0 -ansi -Dconst= -Dvolatile= -DELKS=1 -DUNIX=1 -DDEBUG=1 -I/home/daivox/projects/github/elks/nano-X/src -I/usr/bcc/include -I/home/georg/elks-dev/OS-build/elks/include -O -DNONETWORK=1 -DERASEMOVE=1 -DUPDATEREGIONS=1   -c -o engine/devkbd.o engine/devkbd.c
bcc -0 -ansi -Dconst= -Dvolatile= -DELKS=1 -DUNIX=1 -DDEBUG=1 -I/home/daivox/projects/github/elks/nano-X/src -I/usr/bcc/include -I/home/georg/elks-dev/OS-build/elks/include -O -DNONETWORK=1 -DERASEMOVE=1 -DUPDATEREGIONS=1   -c -o engine/devclip.o engine/devclip.c
bcc -0 -ansi -Dconst= -Dvolatile= -DELKS=1 -DUNIX=1 -DDEBUG=1 -I/home/daivox/projects/github/elks/nano-X/src -I/usr/bcc/include -I/home/georg/elks-dev/OS-build/elks/include -O -DNONETWORK=1 -DERASEMOVE=1 -DUPDATEREGIONS=1   -c -o engine/devrgn.o engine/devrgn.c
bcc -0 -ansi -Dconst= -Dvolatile= -DELKS=1 -DUNIX=1 -DDEBUG=1 -I/home/daivox/projects/github/elks/nano-X/src -I/usr/bcc/include -I/home/georg/elks-dev/OS-build/elks/include -O -DNONETWORK=1 -DERASEMOVE=1 -DUPDATEREGIONS=1   -c -o engine/devpal1.o engine/devpal1.c
bcc -0 -ansi -Dconst= -Dvolatile= -DELKS=1 -DUNIX=1 -DDEBUG=1 -I/home/daivox/projects/github/elks/nano-X/src -I/usr/bcc/include -I/home/georg/elks-dev/OS-build/elks/include -O -DNONETWORK=1 -DERASEMOVE=1 -DUPDATEREGIONS=1   -c -o engine/devpal2.o engine/devpal2.c
bcc -0 -ansi -Dconst= -Dvolatile= -DELKS=1 -DUNIX=1 -DDEBUG=1 -I/home/daivox/projects/github/elks/nano-X/src -I/usr/bcc/include -I/home/georg/elks-dev/OS-build/elks/include -O -DNONETWORK=1 -DERASEMOVE=1 -DUPDATEREGIONS=1   -c -o engine/devpal4.o engine/devpal4.c
bcc -0 -ansi -Dconst= -Dvolatile= -DELKS=1 -DUNIX=1 -DDEBUG=1 -I/home/daivox/projects/github/elks/nano-X/src -I/usr/bcc/include -I/home/georg/elks-dev/OS-build/elks/include -O -DNONETWORK=1 -DERASEMOVE=1 -DUPDATEREGIONS=1   -c -o drivers/scr_bios.o drivers/scr_bios.c
drivers/scr_bios.c:40: error: Cannot open include file

Shell script will not read parameters passed

The following one line script will not echo the parameter passed:
echo $1

So if you run this script line with e.g. test.sh 123 it will not echo 123

You cannot use $1 with other commands as well.

[inet] Hashed stream in case of full TCP window

While testing the telnet client, I observe that, when the server sends much data, the client reads and displays only a part of this data, then blocks. One has to press a key to make the client to display next data. In Wireshark, these blocking times looks like to happen when the server reaches the TCP window limit advertised by ELKS, that is currently 2 * slip_mtu = 2 * 256 = 512 bytes.

FAT image options not active

From review and testing of PR #197:

The FAT image options are present in the configuration menu, but not active yet. Only the MINIX and ROM filesystems options are effective in image build.

Move HD image creation back into main build

From review and testing of PR #197:

The standalone script build_hd_image.sh from @georgp24 generates an HD image by partitioning, installing the MBR-related boot blocks, and expanding the FD1440 image. Generate this HD image directly in the main build process.

Tools Build.c error

make[3]: Entering directory `/private/var/root/elks-git/elks/arch/i86/tools'
gcc -I ../../../include -o build build.c
WARNING: Invalid path ignored:
build.c:26:55: error: sys/sysmacros.h: No such file or directory
make[3]: *** [build] Error 1

stty problem

stty-issue

The output from stty looks corrupted. Qemu was started with: -serial pty

Georg

Optimize directory reading in kernel

The readdir fonction of the filesystem is called twice : the first entry is retained, but the second one is wasted, as the filldir callback buffer has only one entry. Add a maximum count as a new parameter to speed up directory listing, or simplify the whole.

Console i/o

When using BIOS console I/O, the system softhangs on input of a char < (ascii)6 (such as ctrl-C). The problem goes away when the cmp al,#6 instruction in kbd_timer() is removed. (bioscon.c)

full3 image crashes on boot

I was trying to compile elks and get networking running with the full3 image, but I was not able to crash because there was an error about a double free which crashed completely. I narrowed down the issue to elks/arch/i86/mm/malloc.c in commit 4786296

I am not familiar enough with the internals of malloc to fix the problem myself, as some of the optimizations look like they could be helpful when specific conditions are met.

386 config fails to build

Setting processor type to 386 in the config cause the build to fail in bootsect.s (as86 -3):

00557                                           	mov	sectors, ax
***** illegal immediate mode...........................................^
***** mismatched size………………………………………………^
… and so on …

[ktcp] ARP sequencing error

The current implementation of the ARP module makes the assumption that the next incoming packet after sending an ARP request will be the expected ARP reply. It works in QEMU, but in a real & more loaded network, some other packets might come between the request and the reply. Therefore the implementation of ARP should be kept asynchronous as the IP module.

building floppy disks fails

Something to do with bash, maybe? If so, what shell is recommended to use?

root@kubuntu:/usr/src/elks/elkscmd# make full3
make[1]: Entering directory '/usr/src/elks/elkscmd'
/bin/sh: 1: [: missing ]
/bin/sh: 1: -e: not found
-e

 *** Do builds in dev86 and dev86/bootblocks first ***


Makefile:147: recipe for target 'boot_blocks' failed
make[1]: *** [boot_blocks] Error 1
make[1]: Leaving directory '/usr/src/elks/elkscmd'
Makefile:206: recipe for target 'full3' failed
make: *** [full3] Error 2

with verbose tracing:

root@kubuntu:/usr/src/elks/elkscmd# make --trace full3
Makefile:206: target 'full3' does not exist
if [ "0" != "0" ]; \
then echo -e "\n\n *** Only root can build disk images *** \n\n"; exit 1; fi
make _build_bootable_target \
        TARGET_FS=/usr/src/elks/elkscmd/full3 \
        TARGET_RFS=rfs \
        TARGET_BLKS=1440 \
        INSTALL_KTCP=yes
make[1]: Entering directory '/usr/src/elks/elkscmd'
Makefile:147: update target 'boot_blocks' due to: /usr/src/elks/dev86/bootblocks/minix.bin /usr/src/elks/dev86/bootblocks/minix_elks.bin
if [ ! -e /usr/src/elks/dev86/bootblocks/minix.bin || ! -e /usr/src/elks/dev86/bootblocks/minix_elks.bin ]; \
then echo -e "\n\n *** Do builds in dev86 and dev86/bootblocks first *** \n\n"; exit 1; fi
/bin/sh: 1: [: missing ]
/bin/sh: 1: -e: not found
-e

 *** Do builds in dev86 and dev86/bootblocks first ***


Makefile:147: recipe for target 'boot_blocks' failed
make[1]: *** [boot_blocks] Error 1
make[1]: Leaving directory '/usr/src/elks/elkscmd'
Makefile:206: recipe for target 'full3' failed
make: *** [full3] Error 2

Bootblocks from dev86 are there:

root@kubuntu:/usr/src/elks# ls -l /usr/src/elks/dev86/bootblocks/minix*.bin
-rw-r--r-- 1 root root 1024 Mär  4 12:56 /usr/src/elks/dev86/bootblocks/minix.bin
-rw-r--r-- 1 root root  281 Mär  4 12:56 /usr/src/elks/dev86/bootblocks/minix_elks.bin
-rw-r--r-- 1 root root 1024 Mär  4 12:56 /usr/src/elks/dev86/bootblocks/minixhd.bin

Partial output of remote telnet to local console

While testing the fix to the select() weakness (see #208), I can observe a problem that looks closely linked to the one reported by @Mellvik in issue #133 about the console management.

I am using busybox telnet 127.0.0.1 2323 on the host and QEMU for ELKS target, with only ktcp and telnetd daemons. Sometimes part of the output of the remote command is directed to the ELKS console in QEMU, and not to the remote telnet client, even if not logged in !

In remote telnet client:

mfld@home /home/mfld/elks $ busybox telnet 127.0.0.1 2323
Welcome to the ELKS telnet server

login: root
# cd /bin
# 
# ls -l

-xr-x  1 root     root         8396  May 13 2018  banner
-rwxr-xr-x  1 root     root          648  May 13 2018  basename

And in local console (in QEMU):

ELKS 0.2.0

login: Telnetserver:accept connection
Commands entered by remote terminal:
># cd /bin
>ls -l
>-rwxr-xr-x  1 root    root        50652  May 13 2018  ash
-rwxr>

Here, the beginning of the ls -l command output goes to the local console, then the remaining goes to the remote telnet client.

MSDOS fs buffer hang & more

Mounting a FAT16 FS works (tested on physical and virtualbox), files can be copied in and out, some issues remain:

  • deleting a file from the msdos fs appears to work (the shell prompt comes back), but the next cmd always soft-hangs the system, regardless of pwd.
  • ls -l on DOS files give wrong sizes and dates on most files (see top of attached photo)
  • After working with the mounted FS for a dozen or so commands, the 'Buffer #x waiting for L1' error comes back and the system soft hangs (see photo)

img_3661

Enable pseudo ttys - pty

"make menuconfig" enables pseudo ttys as default. The pty.c driver is compiled too.

However there are no ptys in the /dev directory and the MAKEDEV script states:
"# Pseudo-TTY master devices. These are not yet supported by the ELKS kernel."

Can ptys be enabled in the MAKEDEV script or do they not work at all? The code says they were implemented for nano-X.

I would like to port a telnet server and need a pty for that.

Weak implementation of select()

Current implementation of select() watches the regular wait queues through a special select_poll wait queue and a pollhash of the watched ones. But the hash is the same for two wait queues in the same address range of 256 bytes (see select.c line 57). This is the case for the queues in the NE2K driver. As reported by @Mellvik in #133, effect is to wake up ktcp on a write completion while it is waiting for a read completion, and to iterate for nothing on the file descriptors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.