FUZIX.git
6 years agosmallc: fix warning
Alan Cox [Wed, 15 Nov 2017 23:08:47 +0000 (23:08 +0000)]
smallc: fix warning

6 years agosmall c: Send errors to stderr so we seen them under cc
Alan Cox [Wed, 15 Nov 2017 23:08:05 +0000 (23:08 +0000)]
small c: Send errors to stderr so we seen them under cc

6 years agoMakefile.linux: Set a CROSS define so we can build a test harness mode
Alan Cox [Wed, 15 Nov 2017 23:07:31 +0000 (23:07 +0000)]
Makefile.linux: Set a CROSS define so we can build a test harness mode

6 years agoas: Fix RST handling
Alan Cox [Wed, 15 Nov 2017 23:06:48 +0000 (23:06 +0000)]
as: Fix RST handling

The old code expected the Intel 8080 syntax for RST not the Z80 one.

6 years agoas: We use 16 char symbols in ld so we must match in as
Alan Cox [Wed, 15 Nov 2017 23:06:14 +0000 (23:06 +0000)]
as: We use 16 char symbols in ld so we must match in as

6 years agold: Fix library handling, set binary executable
Alan Cox [Wed, 15 Nov 2017 23:05:08 +0000 (23:05 +0000)]
ld: Fix library handling, set binary executable

When we rescan a library we don't want to import the same module again and
decide we have duplicate symbols.

6 years agoas: Allow #constant in Z80.
Alan Cox [Wed, 15 Nov 2017 21:12:04 +0000 (21:12 +0000)]
as: Allow #constant in Z80.

Yes it's an abomination but some assemblers in common use want this.

6 years agocc: add front end to build
Alan Cox [Wed, 15 Nov 2017 21:11:02 +0000 (21:11 +0000)]
cc: add front end to build

6 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Wed, 15 Nov 2017 21:10:03 +0000 (21:10 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

6 years agortc: Headers for RTC in kernel and user
Alan Cox [Wed, 15 Nov 2017 21:09:50 +0000 (21:09 +0000)]
rtc: Headers for RTC in kernel and user

6 years agoas: Fix the register+offset 8bit absolute case
Alan Cox [Wed, 15 Nov 2017 21:08:11 +0000 (21:08 +0000)]
as: Fix the register+offset 8bit absolute case

The simple case is (ix + const) but in theory at least we might have an
absolute symbol.

6 years agold: trap more obvious symbol errors
Alan Cox [Wed, 15 Nov 2017 21:07:54 +0000 (21:07 +0000)]
ld: trap more obvious symbol errors

6 years agoobj: Fix object file format 32bit alignment
Alan Cox [Wed, 15 Nov 2017 21:07:11 +0000 (21:07 +0000)]
obj: Fix object file format 32bit alignment

Otherwise it'll be a pain in the butt for cross tools and testing

(This breaks every existing object file... at least natively)

6 years agoMerge pull request #558 from beretta42/irc2
EtchedPixels [Wed, 15 Nov 2017 12:47:00 +0000 (12:47 +0000)]
Merge pull request #558 from beretta42/irc2

irc: 6809 compile, add to fs

6 years agoirc: 6809 compile, add to fs
Brett Gordon [Tue, 14 Nov 2017 03:15:54 +0000 (22:15 -0500)]
irc: 6809 compile, add to fs

6 years agocc: minor front end tweaks
Alan Cox [Wed, 15 Nov 2017 00:17:31 +0000 (00:17 +0000)]
cc: minor front end tweaks

It almost works .. yay!

6 years agocc: add a frontend
Alan Cox [Tue, 14 Nov 2017 23:21:39 +0000 (23:21 +0000)]
cc: add a frontend

Not yet tested!

6 years agofsck: note the problem to fix
Alan Cox [Tue, 14 Nov 2017 00:50:03 +0000 (00:50 +0000)]
fsck: note the problem to fix

6 years agoz80pack: turn on rtc
Alan Cox [Tue, 14 Nov 2017 00:49:38 +0000 (00:49 +0000)]
z80pack: turn on rtc

6 years agolibs/TODO: status update
Alan Cox [Tue, 14 Nov 2017 00:49:15 +0000 (00:49 +0000)]
libs/TODO: status update

6 years agoinit: set a sane default umask
Alan Cox [Tue, 14 Nov 2017 00:48:55 +0000 (00:48 +0000)]
init: set a sane default umask

6 years agosetdate: support RTC if present
Alan Cox [Tue, 14 Nov 2017 00:48:41 +0000 (00:48 +0000)]
setdate: support RTC if present

6 years agoz80pack: rtc support
Alan Cox [Tue, 14 Nov 2017 00:47:07 +0000 (00:47 +0000)]
z80pack: rtc support

6 years agokernel: add hooks for rtc
Alan Cox [Tue, 14 Nov 2017 00:46:33 +0000 (00:46 +0000)]
kernel: add hooks for rtc

6 years agonet: and the net_native part..
Alan Cox [Tue, 14 Nov 2017 00:46:01 +0000 (00:46 +0000)]
net: and the net_native part..

Forgot it

6 years agonet_native.h: make this match the kernel changes
Alan Cox [Tue, 14 Nov 2017 00:44:40 +0000 (00:44 +0000)]
net_native.h: make this match the kernel changes

Remember to recompile your netd to match the new kernel or it'll do really
weird stuff

6 years agonetworking: Fixes and updates
Alan Cox [Tue, 14 Nov 2017 00:43:30 +0000 (00:43 +0000)]
networking: Fixes and updates

Provide a 'connection has been reset rudely' callback
Fix the confusion between sd.err and s->s_error
Hopefully get the error handling on read/write correct now

At this point it seems to be behaving sanely.

6 years agonetd: rework logic for closedown
Alan Cox [Tue, 14 Nov 2017 00:41:35 +0000 (00:41 +0000)]
netd: rework logic for closedown

Implement a poll function in uip for a user requested callback. That allows
us to rework all the polling close stuff rather more nicely and the end
result now seems to avoid getting stuck.

Also when we are asked for SS_CONNECTING move to it as we were forgetting
to ack the state change.

6 years agold: add more useful symbols, allow for bigendian testing
Alan Cox [Mon, 13 Nov 2017 14:15:02 +0000 (14:15 +0000)]
ld: add more useful symbols, allow for bigendian testing

6 years agoTODO: update
Alan Cox [Mon, 13 Nov 2017 14:14:54 +0000 (14:14 +0000)]
TODO: update

6 years agoas: trap unresolved subtractions as we can't currently represent them
Alan Cox [Mon, 13 Nov 2017 14:14:37 +0000 (14:14 +0000)]
as: trap unresolved subtractions as we can't currently represent them

6 years agoutils: add "line"
Alan Cox [Mon, 13 Nov 2017 11:46:51 +0000 (11:46 +0000)]
utils: add "line"

Not a very useful command in the normal run of the mill but it's part of the
base command list expected so provide it anyway.

6 years agolibs: add some missing post 5.2 functions we encountered
Alan Cox [Mon, 13 Nov 2017 01:40:48 +0000 (01:40 +0000)]
libs: add some missing post 5.2 functions we encountered

These look worth adding to libc

6 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Mon, 13 Nov 2017 01:34:58 +0000 (01:34 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

6 years agonetd: TODO
Alan Cox [Mon, 13 Nov 2017 01:34:50 +0000 (01:34 +0000)]
netd: TODO

6 years agoprocess; multiple fixes
Alan Cox [Mon, 13 Nov 2017 01:33:07 +0000 (01:33 +0000)]
process; multiple fixes

- put the process into ready state if it tries to sleep on a signal
  (we need to address this better in chksigs instead see issues)
- remember to wake init if we reparent it something
- fix various nready corner cases that causes weird hangs and behavuour

6 years agotty: allow signals to break out of a tty write to a tty that is flow controlled
Alan Cox [Mon, 13 Nov 2017 01:32:47 +0000 (01:32 +0000)]
tty: allow signals to break out of a tty write to a tty that is flow controlled

6 years agoinit: fix run level switching, tidy up stuff we don't need to do
Alan Cox [Mon, 13 Nov 2017 01:19:08 +0000 (01:19 +0000)]
init: fix run level switching, tidy up stuff we don't need to do

There's no pint trying to create a new utmp - the root fs will be r/o at
that point

The extra fd manipulation is guaranteed not required

No point doing work to change from run level to the same one !

The main change however is to set the runlevel before we task switch

6 years agoMerge pull request #548 from beretta42/htget
EtchedPixels [Sun, 12 Nov 2017 23:07:56 +0000 (23:07 +0000)]
Merge pull request #548 from beretta42/htget

htget: quick fixes

6 years agoremount, umount: updates for mtab
Alan Cox [Sun, 12 Nov 2017 21:33:45 +0000 (21:33 +0000)]
remount, umount: updates for mtab

Fix parsing in remount
Add umount -a support to the umount tool

6 years agodevio: change meaning of return from bfree
Alan Cox [Sun, 12 Nov 2017 21:31:55 +0000 (21:31 +0000)]
devio: change meaning of return from bfree

We need this to keep inode.c sane. As nobody else uses the return code
this *should* be fine.

6 years agokernel: propogate I/O errors properly
Alan Cox [Sun, 12 Nov 2017 21:08:25 +0000 (21:08 +0000)]
kernel: propogate I/O errors properly

6 years agowho: fix use as users when a path is given
Alan Cox [Sun, 12 Nov 2017 21:07:37 +0000 (21:07 +0000)]
who: fix use as users when a path is given

6 years agofsck: correct a comment
Alan Cox [Sun, 12 Nov 2017 21:07:04 +0000 (21:07 +0000)]
fsck: correct a comment

6 years agomkfs: use O_SYNC
Alan Cox [Sun, 12 Nov 2017 21:06:56 +0000 (21:06 +0000)]
mkfs: use O_SYNC

6 years agoremount: parse the fstab allowing for tab as well as space
Alan Cox [Sun, 12 Nov 2017 21:05:33 +0000 (21:05 +0000)]
remount: parse the fstab allowing for tab as well as space

6 years agofsck: support fsck by mountpoint and a general fsck -a
Alan Cox [Sun, 12 Nov 2017 18:59:06 +0000 (18:59 +0000)]
fsck: support fsck by mountpoint and a general fsck -a

6 years agoinit: don't reveal if user exists
Alan Cox [Sun, 12 Nov 2017 18:58:55 +0000 (18:58 +0000)]
init: don't reveal if user exists

6 years agowho: reformat and add the ability to run it as 'users' as well
Alan Cox [Sun, 12 Nov 2017 18:58:28 +0000 (18:58 +0000)]
who: reformat and add the ability to run it as 'users' as well

6 years agostty: better default
Alan Cox [Sun, 12 Nov 2017 18:57:51 +0000 (18:57 +0000)]
stty: better default

6 years agosetdate: add a date setting tool to run in /etc/rc
Alan Cox [Sat, 11 Nov 2017 23:24:16 +0000 (23:24 +0000)]
setdate: add a date setting tool to run in /etc/rc

Shades of MS-DOS but it does the job until we have some clock reading
tools for various machines

6 years agoswap.c: facepalm
Alan Cox [Sat, 11 Nov 2017 22:43:18 +0000 (22:43 +0000)]
swap.c: facepalm

The free stats look rather saner now

6 years agoMakefile.z80: build ld
Alan Cox [Sat, 11 Nov 2017 22:40:52 +0000 (22:40 +0000)]
Makefile.z80: build ld

6 years agold: add commentary
Alan Cox [Sat, 11 Nov 2017 22:40:43 +0000 (22:40 +0000)]
ld: add commentary

6 years agoApplications: add more to the build and clean ups
Alan Cox [Sat, 11 Nov 2017 22:16:00 +0000 (22:16 +0000)]
Applications: add more to the build and clean ups

6 years agoutils add 'clear'
Alan Cox [Sat, 11 Nov 2017 21:49:02 +0000 (21:49 +0000)]
utils add 'clear'

Not having this was driving me slowly nuts 8)

6 years agolevee: move the makefile
Alan Cox [Sat, 11 Nov 2017 21:35:25 +0000 (21:35 +0000)]
levee: move the makefile

6 years agoue: move the Makefile
Alan Cox [Sat, 11 Nov 2017 21:35:04 +0000 (21:35 +0000)]
ue: move the Makefile

6 years agohtget: Fix various bugs in data processing
Alan Cox [Sat, 11 Nov 2017 21:17:55 +0000 (21:17 +0000)]
htget: Fix various bugs in data processing

With this I can now htget a file and actually get what appear to be all the
right bits the other end.

6 years agoz80pack: fix misreporting of memory size
Alan Cox [Sat, 11 Nov 2017 21:02:26 +0000 (21:02 +0000)]
z80pack: fix misreporting of memory size

6 years agolinein: forgot a file sorry
Alan Cox [Sat, 11 Nov 2017 20:59:35 +0000 (20:59 +0000)]
linein: forgot a file sorry

6 years agohtget: add to fs build script
Brett Gordon [Sat, 11 Nov 2017 20:27:49 +0000 (15:27 -0500)]
htget: add to fs build script

6 years agohtget: add to 6809 makefile
Brett Gordon [Sat, 11 Nov 2017 20:27:19 +0000 (15:27 -0500)]
htget: add to 6809 makefile

6 years agohtget: dump rest of lines buffer before main content xfer
Brett Gordon [Sat, 11 Nov 2017 20:26:44 +0000 (15:26 -0500)]
htget: dump rest of lines buffer before main content xfer

6 years agoMerge pull request #546 from beretta42/init
EtchedPixels [Sat, 11 Nov 2017 17:26:36 +0000 (17:26 +0000)]
Merge pull request #546 from beretta42/init

init: crunched table not reseting runlevel mask, correct cleanup.

6 years agohtget: doesn't need stdio
Alan Cox [Sat, 11 Nov 2017 17:24:29 +0000 (17:24 +0000)]
htget: doesn't need stdio

6 years agohtget: simple tool to get files off the internet
Alan Cox [Sat, 11 Nov 2017 17:23:53 +0000 (17:23 +0000)]
htget: simple tool to get files off the internet

6 years agouip: introduce some randomness to starting state
Alan Cox [Sat, 11 Nov 2017 03:18:04 +0000 (03:18 +0000)]
uip: introduce some randomness to starting state

6 years agoirc: newlines needed on errors
Alan Cox [Sat, 11 Nov 2017 02:25:42 +0000 (02:25 +0000)]
irc: newlines needed on errors

6 years agoirc: further small changes
Alan Cox [Sat, 11 Nov 2017 02:19:42 +0000 (02:19 +0000)]
irc: further small changes

Almost usable now

6 years agotty: multiple fixes
Alan Cox [Sat, 11 Nov 2017 01:39:56 +0000 (01:39 +0000)]
tty: multiple fixes

VDISCARD should be subject to icanon

VMIN/VTIME were not fully implemented in accordance with SYS5. I think they
are now all correct.

6 years agoz80pack: work around emulation not emulating baud rates
Alan Cox [Sat, 11 Nov 2017 01:39:35 +0000 (01:39 +0000)]
z80pack: work around emulation not emulating baud rates

6 years agoirc: fix some minor buglets
Alan Cox [Sat, 11 Nov 2017 01:39:00 +0000 (01:39 +0000)]
irc: fix some minor buglets

6 years agoslip: performance improvements and clean up
Alan Cox [Sat, 11 Nov 2017 01:38:44 +0000 (01:38 +0000)]
slip: performance improvements and clean up

6 years agobasic: update encoding README
Alan Cox [Fri, 10 Nov 2017 21:41:14 +0000 (21:41 +0000)]
basic: update encoding README

6 years agokernel: first pass set of dependancies (lots left to add)
Alan Cox [Fri, 10 Nov 2017 21:40:47 +0000 (21:40 +0000)]
kernel: first pass set of dependancies (lots left to add)

6 years agomknod: replace the simplistic one with a proper mknod
Alan Cox [Fri, 10 Nov 2017 21:40:12 +0000 (21:40 +0000)]
mknod: replace the simplistic one with a proper mknod

Oh and it shrinks in the process 8)

6 years agoinit: actually set the tty parameters!
Alan Cox [Fri, 10 Nov 2017 21:39:18 +0000 (21:39 +0000)]
init: actually set the tty parameters!

6 years agoirc: because every platform needs an irc client
Alan Cox [Fri, 10 Nov 2017 21:38:43 +0000 (21:38 +0000)]
irc: because every platform needs an irc client

6 years agofuzix-conf: set the mss based upon the device mtu
Alan Cox [Fri, 10 Nov 2017 21:38:13 +0000 (21:38 +0000)]
fuzix-conf: set the mss based upon the device mtu

6 years agoslip: try and be smarter about processing - do blocks
Alan Cox [Fri, 10 Nov 2017 21:37:56 +0000 (21:37 +0000)]
slip: try and be smarter about processing - do blocks

6 years agonetd: add mtu values to driver data
Alan Cox [Fri, 10 Nov 2017 21:37:23 +0000 (21:37 +0000)]
netd: add mtu values to driver data

6 years agoinit: crunched table not reseting runlevel mask, correct cleanup.
Brett Gordon [Fri, 10 Nov 2017 05:57:32 +0000 (00:57 -0500)]
init: crunched table not reseting runlevel mask, correct cleanup.

6 years agotelnet: remove un-needed define copies
Alan Cox [Thu, 9 Nov 2017 23:10:26 +0000 (23:10 +0000)]
telnet: remove un-needed define copies

6 years agonetd: make tracing easier to control, do tcp polls after events for speed
Alan Cox [Thu, 9 Nov 2017 23:09:40 +0000 (23:09 +0000)]
netd: make tracing easier to control, do tcp polls after events for speed

6 years agogethostbyname: this crashes with a null pointer trap
Alan Cox [Thu, 9 Nov 2017 23:09:05 +0000 (23:09 +0000)]
gethostbyname: this crashes with a null pointer trap

Fix up what I think was intended

6 years agonetd: minor changes to fuzix-conf
Alan Cox [Thu, 9 Nov 2017 23:08:15 +0000 (23:08 +0000)]
netd: minor changes to fuzix-conf

6 years agonetd: use the right clock
Alan Cox [Thu, 9 Nov 2017 23:06:54 +0000 (23:06 +0000)]
netd: use the right clock

timer 1 is CPU time. That works by luck on a 6809 but on a Z80 clone at
lots of MHz it doesn't run very fast!

What we really need to do is expose the kernel 1/10th second raw tick clock
as timer 2

6 years agoping: endianisms
Alan Cox [Thu, 9 Nov 2017 22:19:07 +0000 (22:19 +0000)]
ping: endianisms

6 years agoslip: fix dumb bug that corrupted memory
Alan Cox [Thu, 9 Nov 2017 22:17:09 +0000 (22:17 +0000)]
slip: fix dumb bug that corrupted memory

6 years agonetd: Futher fixes
Alan Cox [Thu, 9 Nov 2017 01:20:57 +0000 (01:20 +0000)]
netd: Futher fixes

With these applied you can ping and remotely interact with the stack but
local interactions are not yet working (probably byte order) and also the
close() functionality is a bit messed up.

We need to

a) break the mapping when the kernel asks us to move to closed
b) do the flag test *outside* of the app callbacks (as we may be closing
   without any app callbacks happening)
c) allow for events from uip on unmapped sockets (one the kernel closed),
   in which case we should reset if there is data arriving, and otherwise
   cycle through the close states and close in uip, then free up the broken
   mapping slot

6 years agonet_native: fix build with SDCC
Alan Cox [Thu, 9 Nov 2017 01:20:12 +0000 (01:20 +0000)]
net_native: fix build with SDCC

6 years agomicropack: update MMU definitions
Alan Cox [Thu, 9 Nov 2017 01:19:53 +0000 (01:19 +0000)]
micropack: update MMU definitions

6 years agoz80pack: switch to net_native
Alan Cox [Thu, 9 Nov 2017 01:19:26 +0000 (01:19 +0000)]
z80pack: switch to net_native

Fix some related tty bugs

6 years agonetd: clock types are 32bit
Alan Cox [Wed, 8 Nov 2017 23:30:29 +0000 (23:30 +0000)]
netd: clock types are 32bit

Fixes the crash at startup

6 years agoMerge pull request #543 from beretta42/netd2
EtchedPixels [Wed, 8 Nov 2017 20:18:03 +0000 (20:18 +0000)]
Merge pull request #543 from beretta42/netd2

Fix a few new bugs in netd

6 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Wed, 8 Nov 2017 20:14:17 +0000 (20:14 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

6 years agoMakefile: add a make kclean target
Alan Cox [Wed, 8 Nov 2017 19:56:29 +0000 (19:56 +0000)]
Makefile: add a make kclean target

6 years agosyscal_exec16: Fix two bugs
Alan Cox [Wed, 8 Nov 2017 19:54:18 +0000 (19:54 +0000)]
syscal_exec16: Fix two bugs

1. Potential race on reference to hdr
2. If we tried to exec an r/o file and failed we could end up being marked
non coredumping

6 years agoexec32: move to readi
Alan Cox [Wed, 8 Nov 2017 19:53:57 +0000 (19:53 +0000)]
exec32: move to readi