GithubHelp home page GithubHelp logo

etchedpixels / fuzix Goto Github PK

View Code? Open in Web Editor NEW
2.1K 152.0 263.0 19.75 MB

FuzixOS: Because Small Is Beautiful

License: Other

Assembly 23.27% C 71.13% Makefile 2.78% Shell 0.35% Python 0.01% Awk 0.01% Forth 0.16% Limbo 0.45% Yacc 0.17% OpenEdge ABL 0.07% Perl 0.10% Roff 0.88% AngelScript 0.20% SWIG 0.03% CMake 0.03% BASIC 0.01% Batchfile 0.01% GDB 0.01% C++ 0.37%

fuzix's Introduction

** ENGINEERING WORK IN PROGRESS **

The Z80 side of the tree is currently moving to the new compiler including work on the compiler, linker and kernel. Thus some bits of it require you have absolutely bleeding edge pieces all around. I would suggest avoiding working on this tree for Z80 stuff right now. Non Z80 should be just fine.

FuzixOS: Because Small Is Beautiful

This is the initial public tree for the FuzixOS project. It is not yet useful although you can build and boot it and run test application code. A lot of work is needed on the utilities and libraries.

FUZIX

FUZIX is a fusion of various elements from the assorted UZI forks and branches beaten together into some kind of semi-coherent platform and then extended from V7 to somewhere in the SYS3 to SYS5.x world with bits of POSIX thrown in for good measure. Various learnings and tricks from ELKS and from OMU also got blended in

Pre-built images

Some pre-built filesystems are now available on www.fuzix.org, and other images should follow in time.

Tools

For the 8080, 8085, Z80 and Z180 the code is now built with the Fuzix C Compiler and Bintools which are also in github. See instructions for building them. Some kernels still need the customised SDCC 3.8 from from this github. 65C816 and Z8 are a work in progress moving to this compiler.

6502 is currently built with cc65 and a distribution version should work.

6303/6803 are built with CC6303 (again in this github)

6809 is built with lwtools and the including gcc fork.

Other targets use gcc variants. See the target specific information.

What does FUZIX have over UZI

  • Support for multiple processes in banked memory (as per UZI180) but with Minix style chmem and efficient use of bank allocations.
  • Support for multiple processes via hard disk or non mappable RAM drive switching (as per UZI, UZIX).
  • Support for "real" swapping combined with banked memory.
  • Proper sane off_t and lseek
  • Normal dev_t
  • 30 character filenames
  • Proper sane time_t
  • System 5 signals
  • Posix termios (does all the original UZI tty did but much can be added)
  • Blocking on carrier for terminals
  • Optimisations to avoid bogus uarea copying compared to UZI180
  • More modern system call API: 3 argument open, mkdir, rmdir, rename, chroot (with correct .. semantics), fchdir, fchmod, fchown, fstat, fcntl, setpgrp, sighold and friends, waitpid, setpgrp, nice O_NDELAY, O_CLOEXEC, F_SETFL, F_DUPFD etc
  • Address validation checks on all syscall copies
  • Builds with a modern ANSI C compiler (SDCC)
  • Kernel boots to userspace on 6303, 6502, 65C816, 68000, 6803, 6809, 68HC11, 8080, 8085, arm32, esp8266, MSP430 (bitrotted) and eZ80/Z80/Z180
  • Core code can be built for 6303, 6502, 65C816, 68000, 6803, 6809, 68HC11, 8080, 8085, 8086, arm32, esp8266, MSP430, pdp11, rabbit r2k/r3k and eZ80/Z80/Z180 so should be far more portable
  • Core architecture designed to support building and maintaining multiple target machines without forking each one
  • Helpers to make many bits of implementation wrappers to core code
  • Lots more bugs right now

What does UZI have over FUZIX

  • Can run in 64K of RAM (32K kernel/32K user). FUZIX needs banked ROM or similar to pull this off. If you have banked ROM then our kernel footprint in RAM is about 8K plus userspace plus any framebuffers and similar overhead. On a 6809 it's just about possible to run in a straight 64K

What do the UZI branches have that FUZIX has not yet integrated

  • Symbolic links (UZIX)
  • Various clever fusions of syscalls that may save a few bytes (UZIX)
  • setprio (UZIX)
  • Rather crude loadable drivers (UZIX)
  • Use of __naked and __asm for Z80 specific bits to avoid more .S files than are needed (UMZIX)

Plus OMU has a really clever function passing trick for open/creat and friends, while UMZIX has a neat unified "make anything" function.

What Key Features Are Missing Still

  • ptrace, most of ulimit
  • root reserved disk blocks
  • banked executables
  • TCP/IP (in progress)
  • select/poll() (in progress)
  • Support for > 32MB filesystems (but first figure out how to fsck a giant fs on a slow 8bit micro!)
  • Smarter scheduler
  • Optimisations for disk block/inode allocator (2.11BSD)

Tool Issues

  • 6809 gcc and cc65 don't have long long 64bit (for sane time_t)
  • None of the above have an O88 style common sequence compressor
  • CC65 can't handle larger objects on stack, and lacks float support
  • We need a 'proper' 65C816 C compiler

fuzix's People

Contributors

abbasfaisal avatar adx11 avatar atsidaev avatar balyuf avatar beretta42 avatar davidgiven avatar daztucker avatar dfffffff avatar erkinalp avatar etchedpixels avatar frno7 avatar geijoenr avatar jcw avatar k0gamsx avatar marioaugustorama avatar nealcrook avatar nollkolltroll avatar pawelo12345678 avatar pawosm-arm avatar piso77 avatar ra1fh avatar retrac0 avatar skiselev avatar slp avatar tinkercnc avatar tjewell99 avatar tormodvolden avatar veremenko-y avatar willsowerbutts avatar xmotif 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  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

fuzix's Issues

mkdir failure cases

From a straight boot doing "mkdir /mnt" gives an error and creates an empty file with 0 perms.

Doing a follow up rm /mnt and mkdir /mnt re-creates it correctly as a directory

Universar MMU for Z80

How do you would like a hybrid of a MMU/bank switch that could be used on nearly any Z80/8080 machine ?
Some time ago, we had and idea to allow to plug an 8/16 bit CPU to the Trillek computer (an virtual "toy" computer with an 24 bit address bus). This :
Extended Memory Unit

Well, looks that Mcleod_idefix had make an implementation on a CPLD

The concept is an little board with the CPLD, a Z80 and a RAM module or a bus connector that allow to expand the RAM of any Z80 computer with a very flexible bank scheme with 4 KiB banks, and is controlled by four I/O ports.

I think that FUZIX could exploit this idea very well if it is build. What do you think ?

x86 memory model and FUZIX conventions on it

I have seen 16-bit address type in 8086 test code, probably remnant of 8-bit code. As you know, x86 has four overlappable segment selectors. We should document our kernel code segment and free space. malloc()/mmap() needs to be reworked to return "far" pointers on 8086 because sometimes 8086 programs use more than 64K. What about other system calls and stack segment? Are there any plans for common stack allocator?

Keyboard on ZX128: Wrong bitflags ?

This seems to treat the bit patterns in the reverse of the other ports. It ought to be fixed so that the KBGETMAP ioctl always returns a mask of down bits.

/usr/games/fortune

To work on a small box with potentially very slow disk (eg floppies) we need a version of /usr/games/fortune that

  • doesn't use floating point as v7/BSD one does
  • doesn't read through the whole file but uses an index
  • has some kind of tool to build an index

DOS emulator for x86 target

There is a CP/M emulator for Z80 target. DOS emulator for x86 target would be good idea. FreeDOS is native to 8086 and under GPLv2, thus, only needed piece remaining is a loader and TSR to access FUZIX services.

Concerning SDCC

Hi! I'm SirCmpwn, from the KnightOS project, which is another operating system for z80.

We have a fork of SDCC that only supports z80 and that we're hoping to use as the foundation for a better C compiler for z80. You can check it out here: https://github.com/KnightOS/kcc

We are also working on replacing our home-grown assembler with a better home-grown assembler. The new assembler will aim to replace sdas and sdld, both of which are pretty gross. I think there's a good chance for collaboration between us! Want to switch to kcc and help us improve it?

bootup service configuration

Most inits have a way to set up boot up services in either the imperative (shellscripts) or the declarative way. FUZIX init lacks this. I had made a PR about this along with a security patch on login #70.

The sfdisk utility

sfdisk is to fdisk how sed is to ed. As it has no interactive operation, its code is simpler and smaller than fdisk.

non-deterministic builds with sdcc

I am observing the same source might compile to a binary that crashes in different places during boot depending on max-allocs-per-node build option and on the placement of kprintf's (a build with debug enable in process runs further than one without debug enabled).

do you also see this?

Shell is unsuitable for scripting

Current shell /bin/ssh is only usable for interactive usage, no script flow control implemented, such as:

  • if / then / else / fi
  • case / esac
  • for / do / done
    This makes us unable to use the toolbox approach on FUZIX we are used to on UNIX and the likes.
    Related: #70 #76

Feature: C128 support?

The C128 has 128k RAM and a Z80 CPU with 4MHz (on newer models with VIC-II disabled), backed by a 6502-compatible "co-processor" in Z80/CPM mode, so it should theoretically be possible to run FUZIX on it.

Keyboard layout support

Keyboard layout is hardcoded as QWERTY on zx128 code. I want to add Turkish F layout, but it does not fit.

Translation support

FUZIX currently supports English only. GNU gettext supports localisation using .po and .mo files. With gettext, we will get proper message translation.

Sync and flush on final device close

Currently we don't guarantee that any buffers are flushed on the final umount of a disk. If you change floppies the only thing avoiding disaster is that fact we have so few buffers.

posix_spawn api

POSIX 1:2008 has posix_spawn() as a means to create new processes from scratch without the copy overhead of fork(). It has a parameter list like exec(), but acts on a new process instead of manipulating current one. Spawning is less resource intensive than forking. So we should use spawn internally, however, continue providing fork to external users for compatibility.

Boot time arguments: alignment and passing

The start.c code should have an accompanying platform/discard.c which parses non standard devices by name.

It should also pass any further argument string onto init so you can do things like boot "hd0 s"

The current argument array is also not 16bit aligned so will cause problems on some future ports and wants realigning

tty_waitready changes

We need to distinguish between 'busy', 'flow controlled' and 'empty'

We need to look at switching between polled and sleeping intelligently based on system speed and baud rate

We need tty_putc to lock so that vt_foo doesn't have to hold IRQs off (we can pick up the 'stray' byte in the unlock and process it there)

Unaligned accesses

So I'm porting Fuzix to a modern microcontroller which has issues with unaligned accesses. I've found that _uputw and _ugetw are both implemented as a simple read of a uint16_t*. The argv and envp structure laid out by create_init() are placed at an unaligned address, causing failure.

(What actually happens on my platform is that the value is read/written to (address & ~1), with hilarious results.)

This is easy enough to fix --- I just rearranged the structure so that the argv and envp pointers go before the string. But I've noticed some other alignment issues elsewhere --- the most egregious is the FZX1 binary format, where the entire header is at an offset of 3 due to the leading jump instruction. Might it be worth changing this to be more alignment-friendly? I take it the reason for the leading jmp instruction is CP/M compatibility; is that still desirable?

tcflow

tcflow is a stub in libc and needs implementing

User space does not build (nc100 port)

First of all, thanks for all your efforts!
I'm trying to prepare a nc100 card image for playing around with it in nc100em. I will also try it on my real NC100 once I get my hands on one of these expensive PCMCIA memory cards. I'm relatively new to z80 programming and the FUZIX build process is very poorly documented, so please excuse any stupid mistakes on my side.

I am running Ubuntu 10.04 with a hand-built SDCC:

SDCC : z80/z180/gbz80 3.4.3 #9201 (Mar 29 2015) (Linux)

So far I think I've managed to build the kernel "image" (fuzix.bin). First a few remarks on the nc100 kernel build process:

  • nc100.def is missing. Given the commit log, I assume it must contain something like VIDEO_BASE .equ 0x7000, VIDEO_BASEH .equ 0x7000 (what's that for, anyway?) and VIDEO_SIZE .equ 0x1000. You should also add the corresponding nc200.def.
  • the Kernel/platform-nc100/Makefile image-target refers to bootblock.cim. This looks like it must be generated from bootblock.s with zmac. Any reason for not adding this step as a Makefile rule?
  • Also I think that the image rule should be modified/fixed and read dd if=bootblock.cim of=../fuzix.bin bs=1 seek=256 conv=notrunc

If I understand correctly, the fuzix.bin is already a PCMCIA card image, albeit incomplete. Something like a rootfs should be added. I see that this can be done with the mkfs and ucp tools from the Standalone subdirectory. But in reality I assume that the Standalone/filesystem-src/build-filesystem script should be used instead of doing it manually. This needs all of the user space tools of course. Unfortunately, the Applications/util/Makefile won't just work. Right, we need a toolchain first! It appears to be hidden in Library/. Just making it however does not appease the Applications/util build proces as it's referring to files in /opt/fcc/. So I followed the not-so-outdated instructions from the wiki. I think it should be renamed to "Building the toolchain". But now I get the following build errors from Applications/util/Makefile:

$ make 
../../Library/tools/fcc -O2  -c banner.c
../../Library/tools/fcc -O2  banner.rel -o banner

?ASlink-Warning-Undefined Global '_strcpy' referenced by module 'vfprintf'

?ASlink-Warning-Undefined Global '_strcpy' referenced by module 'ltostr'

?ASlink-Warning-Undefined Global '__modulong' referenced by module 'ltostr'

?ASlink-Warning-Undefined Global '__divulong' referenced by module 'ltostr'

?ASlink-Warning-Undefined Global '___sdcc_call_hl' referenced by module 'atexit'

?ASlink-Warning-Undefined Global '_strcat' referenced by module 'vfprintf'

?ASlink-Warning-Undefined Global '_strlen' referenced by module 'banner'

?ASlink-Warning-Undefined Global '_strlen' referenced by module 'vfprintf'

?ASlink-Warning-Undefined Global '___sdcc_enter_ix' referenced by module 'banner'

?ASlink-Warning-Undefined Global '___sdcc_enter_ix' referenced by module 'printf'

?ASlink-Warning-Undefined Global '___sdcc_enter_ix' referenced by module 'stat'

?ASlink-Warning-Undefined Global '___sdcc_enter_ix' referenced by module 'atexit'

?ASlink-Warning-Undefined Global '___sdcc_enter_ix' referenced by module 'vfprintf'

?ASlink-Warning-Undefined Global '___sdcc_enter_ix' referenced by module 'fflush'

?ASlink-Warning-Undefined Global '___sdcc_enter_ix' referenced by module 'lseek'

?ASlink-Warning-Undefined Global '___sdcc_enter_ix' referenced by module 'ltostr'

?ASlink-Warning-Undefined Global '___sdcc_enter_ix' referenced by module 'fputc'

?ASlink-Warning-Undefined Global '__modsint' referenced by module 'banner'
make: *** [banner] Error 1

Seems like it doesn't properly link against FUZIX' libc. Any idea why?

Once I get the user space utilities to build and assembled them with build-filesystem, I guess I will have to write it into the fuzix.bin as explained by the nc100 README:

dd if=myfs of=mycard.img bs=16384 seek=20 conv=notrunc

The resulting image should be suitable as a nc100.card image for nc100em, right?
The nc100emu.s can then be assembled and used a "boot script" as in

xnc100em nc100emu.cim

Btw. nc100emu.s cannot be assembled with zmac as claimed in the README. But I got it to compile with SDCC's assembler (see bcec50f), linked with sdcc and converted the intel hex file:

sdasz80 nc100emu.s
sdcc --no-std-crt0 -mz80 nc100emu.rel
objcopy -Iihex -Obinary nc100emu.ihx nc100emu.cim

In case that's right, there should be a Makefile rule for it.
A few questions remain:

  • Do I need the original NC100 ROM image or does FUZIX work with nc100em's default ROM image (written for ZCN)?
  • If I do need the original ROM image, how do I boot into FUZIX from the Amstrad ROM?

Once I get this sorted out I can also fork and send you a pull-request with the changes discussed above.

Keyboard fixes

Tormod's keyboard fixes need to be propogated to all relevant platforms

Coexistence

On m68k platform, FUZIX and Linux can coexist. We will need either of those:
a)Chainloader which loads FUZIX
b)Boot manager to choose among Linux and FUZIX plus (a)
c)GRUB compatible kernel image

Safe shutdown

FUZIX currently lacks an utility to shutdown or reboot the system safely. I understand, we have no APM on most of the targets, yet anyway could we implement a utility that does:

  • SIGTERM, wait for save and SIGKILL
  • Disable network
  • Unmount non-root FSs
  • Remount rootfs readonly
  • Prompt for poweroff

build-filesystem

Need a script to build a minimalist file system. Some of our machines only have 40 track floppies.

Backspace/Delete

Figure out which we are using as the default binding (^H seems favoured), standardize it in the keymaps and fix the default tty termios accordingly

sleep uses the wrong time clock

We now have proper monotonic system time, so sleep() should use this but that means making sure the libc code discovers the platform HZ value nicely and stuffs it somewhere at setup.

Joyce boot disk

I'm trying to load the fuzix.bin, obtained by platform-pcw8256 compilation, in Joyce but it says "bad format".
I suppose that I should create some boot disk in dsk format with fuzix.bin as kernel and some tools and libs in the rest of the disk.
Do you have a recipe to make such an image?
Thanks

Artwork

Logo and nicely typesetted documentation needed.

Big-endian filesystem support is broken

mkfs -X creates a big endian file system (or seems to)
fsck should automatically switch endianness when checking it and work but is reported to fail
ucp does not support 'wrong endian' operation

Probably what we want is not to fix ucp (which is really hard) but to add a 'swapendian' tool which switches the endianness of all superblock multi-byte fields, all inode multi-byte fields, and then walks the block free list and the blocks and indirects off each inode that is a file or directory and fixes those up too as well as block 0 of device nodes.

Cowsay

The game which displays speech bubbles, companion of fortune. A version written in C preferred.

Internal Error from SDCC compiler

I am trying to build a kernel image for z80pack. There seems to be some error from the sdcc compiler and I'm not sure what to do about it.

$ make
rm platform
ln -sf platform-z80pack platform
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C platform-z80pack
make[1]: Nothing to be done for `all'.
sdcc -c --std-sdcc99 --no-std-crt0 -mz80 -I/Users/n6il/Development/Fusix/FUZIX/Kernel/cpu-z80 -I/Users/n6il/Development/Fusix/FUZIX/Kernel/platform-z80pack -I/Users/n6il/Development/Fusix/FUZIX/Kernel/include --max-allocs-per-node 30000 --opt-code-size --Werror --stack-auto --constseg CONST --codeseg CODE2 syscall_proc.c
Internal error: validateLink failed in SPEC_NOUN(type) @ /Users/sdcc-builder/build/sdcc-build/orig/sdcc/src/SDCCcse.c:1667: expected SPECIFIER, got DECLARATOR
make: *** [syscall_proc.rel] Error 1

I played around a bit and figured out it is line 257 of the waitpid function in syscall_pid.c

252 int16_t _waitpid(void)
253 {
254         ptptr p;
255         int retval;
256 
257         if (statloc && !valaddr((char *) statloc, sizeof(int))) {
258                 udata.u_error = EFAULT;
259                 return (-1);
260         }
261 

This is so simple I have no idea why the compiler is barfing on this.

#define statloc (int *)udata.u_argn1
if (statloc
if ((int *)udata.u_argn1

I have the 11/04 snapshot of SDCC

$ sdcc -v
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.4.1 #9093 (Nov  4 2014) (Mac OS X i386)
published under GNU General Public License (GPL)

and just pulled the latest FUZIX code.

commit 3faa2dff49c39b2a9fa59009b84a398912dd1be0
Author: Alan Cox <[email protected]>
Date:   Fri Nov 7 20:51:12 2014 +0000

    msx1: memory mapping and other logic

z80pack simulator images not being created correctly

I tried building FUZIX for zhe z80pack simulator by following this guide

However, it looks like the boot floppies are not built correctly:

root@kubuntu:/usr/src/FUZIX/Kernel/platform-z80pack# ./createdrives
Making filesystem on device drivea.cpm with isize 8 fsize 390.
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Making filesystem on device drivei.cpm with isize 64 fsize 8192.
Opening drivei.cpm sd0
fd=3, dev_offset = 0
Opening drivea.cpm sd0
Opening drivea.cpm sd0
Opening drivea.cpm sd0
fd=3, dev_offset = 0
fd=3, dev_offset = 0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
Fuzix UCP version 1.1ac. Type ? for help.
Fuzix UCP version 1.1ac. Type ? for help.
Opening drivea.cpm sd0
Opening drivea.cpm sd0
fd=3, dev_offset = 0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
i_open: bad disk inode
mkdir: mknod error 0
Fuzix UCP version 1.1ac. Type ? for help.
i_open: bad disk inode
mkdir: mknod error 0
Opening drivea.cpm sd0
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 20
chmod cat to 755
chmod: can't stat file 'cat': 2
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 20
i_open: bad disk inode
Can't open destination file './../../Applications/util/cp'; error 0
Opening drivea.cpm sd0
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Opening drivea.cpm sd0
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 20
chmod df to 755
chmod: can't stat file 'df': 2
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
Opening drivea.cpm sd0
Opening drivea.cpm sd0
Opening drivea.cpm sd0
fd=3, dev_offset = 0
fd=3, dev_offset = 0
Opening drivea.cpm sd0
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 20
chmod cp to 755
chmod: can't stat file 'cp': 2
Opening drivea.cpm sd0
fd=3, dev_offset = 0
fd=3, dev_offset = 0
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 20
Opening drivea.cpm sd0
fd=3, dev_offset = 0
fd=3, dev_offset = 0
cd: error number 20
Fuzix UCP version 1.1ac. Type ? for help.
Fuzix UCP version 1.1ac. Type ? for help.
i_open: bad disk inode
mkdir: mknod error 0
cd: error number 2
i_open: bad disk inode
_mknod: error 0
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 20
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
Opening drivea.cpm sd0
cd: error number 20
Opening drivea.cpm sd0
Opening drivea.cpm sd0
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Opening drivea.cpm sd0
Opening drivei.cpm sd0
fd=3, dev_offset = 0
Opening drivei.cpm sd0
Opening drivei.cpm sd0
fd=3, dev_offset = 0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 2
chmod mkfs to 755
chmod: can't stat file 'mkfs': 2
cd: error number 2
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Opening drivea.cpm sd0
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 20
i_open: bad disk inode
Can't open destination file './../../Applications/util/df'; error 0
Fuzix UCP version 1.1ac. Type ? for help.
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 20
Fuzix UCP version 1.1ac. Type ? for help.
Fuzix UCP version 1.1ac. Type ? for help.
Opening drivea.cpm sd0
chmod init to 755
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 20
Fuzix UCP version 1.1ac. Type ? for help.
cd: error number 20
i_open: bad disk inode
Can't open destination file './../../Applications/util/ln'; error 0
Opening drivei.cpm sd0
chmod fdisk to 755
fd=3, dev_offset = 0
...
Can't open destination file './../../Applications/util/ed'; error 0
Can't open destination file './../../Applications/util/patchcpm'; error 0
i_open: bad disk inode
chmod passwd to 755
Can't open destination file './../../Applications/util/sed'; error 0
chmod: can't stat file 'passwd': 2
chmod mkdir to 755
Can't open destination file './../../Applications/util/grep'; error 0
Can't open destination file './../../Applications/util/passwd'; error 0
chmod: can't stat file 'grep': 2
chmod: can't stat file 'mkdir': 2
45346+0 records in
45346+0 records out
45346 bytes (45 kB) copied, 0,127427 s, 356 kB/s
390+0 records in
390+0 records out
199680 bytes (200 kB) copied, 0,00152064 s, 131 MB/s
0+1 records in
0+1 records out
128 bytes (128 B) copied, 0,00019373 s, 661 kB/s
z80pack drives "drivea.cpm" and "drivei.cpm" successfully generated

Trying to run the images on the emulator gives the following:

root@kubuntu:/usr/src/z80pack-1.26/cpmsim# ./cpmsim

#######  #####    ###            #####    ###   #     #
     #  #     #  #   #          #     #    #    ##   ##
    #   #     # #     #         #          #    # # # #
   #     #####  #     #  #####   #####     #    #  #  #
  #     #     # #     #               #    #    #     #
 #      #     #  #   #          #     #    #    #     #
#######  #####    ###            #####    ###   #     #

Release 1.26, Copyright (C) 1987-2015 by Udo Munk

CPU speed is unlimited

Booting...

-
FUZIX version 0.1
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 <[email protected]>
Copyright (c) 2014-2015 Alan Cox <[email protected]>
Devboot
480kB total RAM, 416kB available to processes (15 processes max)
Enabling interrupts ... ok.
bootdev: 0
Mounting root fs (root_dev=0): OK
Starting /init

panic: no /init
System halted, bye.

The files in Applications/util get built correctly, in fact everything up to the createdrivesscript runs without errors.

Any ideas what's going wrong? I tried using ucp directly:

root@kubuntu:/usr/src/FUZIX/Kernel/platform-z80pack# ../../Standalone/ucp drivea.cpm
Opening drivea.cpm sd0
fd=3, dev_offset = 0
Fuzix UCP version 1.1ac. Type ? for help.
unix: ?
UCP commands:
?|help
exit|quit
dir|ls [path]
cd path
mkdir dirname
mknod name mode dev#
chmod mode path
[b]get sourcefile [destfile]
[b]put uzifile
type|cat filename
dump filename
rm path
rmdir dirname
df
mount dev# path
umount path
unix: ls
drwxrwxrwx   6     1         512 Apr 27  115    8:54  ./
drwxrwxrwx   6     1         512 Apr 27  115    8:54  ../
----------   1    46           0                      bin
drwxrwxrwx   2    44         512 Apr 27  115    8:54  root/
drwxrwxrwx   2    43         512 Apr 27  115    8:54  usr/
-rw-rw-rw-   1    42        7000 Apr 27  115    8:54  init
-rwxr-xr-x   1    41       14221 Apr 27  115    8:54  fdisk
brw-r--r--   1    40         256 Apr 27  115    8:54  hda
crw--w--w-   1    37        1026 Apr 27  115    8:54  zero
unix: cd bin
cd: error number 20
unix: rm bin
unix: mkdir bin
unix: cd bin
unix: bget ../../Applications/util/init
i_open: bad disk inode
Can't open destination file '../../Applications/util/init'; error 0
unix: ls
drwxrwxrwx   2    46         512 Apr 27  115    8:55  ./
drwxrwxrwx   7     1         512 Apr 27  115    8:55  ../
unix: cd ..
panic: inode freed.
root@kubuntu:/usr/src/FUZIX/Kernel/platform-z80pack#

TRS80 crashes on pre-empt sometimes

Pre-emption hangs switching back to the shell side of a fork in certain cases
(may be linked to swap fail ? but seen without swapping)

Possibly in/out of kernel value incorrect ??

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.