Version 12 (modified by 5 years ago) (diff) | ,
---|
Trying to build FUZIX for z80pack.
- Install sdcc from repo
- Clone Alan's git https://github.com/EtchedPixels/FUZIX
2020-11-24
On work machine. Clean install z80pack 1.36 and build. Set to yacc as in README:
- sudo apt-get install -y byacc - sudo update-alternatives --set yacc /usr/bin/byacc
Trying to figure out how to make a bootable floppy. Restored the script "createdrives" from old SVN. Found an old set of instructions which don't work. Some observations:
CPM disk images in z80pack are 256256 bytes long. This is not a multiple of 512, and thus AFAIK cannot be created by FUZIX "mkfs" tool. A buried note in git says:
"If you put just a kernel on floppy and the image on hard disk and boot with that as root fs it should work,"
In Kernel/platform-z80pack/README
it says:
Put the kernel at the end of a floppy image from cyl 60 Add the fs in the first 58 cyls (366 blocks) Put the bootblock in sector 0 dd the kernel image to offset 193024 ie dd if=fuzix.bin of=drivea.cpm bs=1 seek=193024 conv=notrunc
This is all very well, but not obvious at all how to handle this with the tools provided.
First thing to try is to grab the drivea.cpm
image and replace the boot block
and kernel with updated ones, leaving the FS alone.
$ dd if=~/work/FUZIX/Kernel/fuzix.bin of=fuzix.dsk bs=1 seek=193024 conv=notrunc 48879+0 records in 48879+0 records out 48879 bytes (49 kB, 48 KiB) copied, 0.062852 s, 778 kB/s
Try this disk as drivea.dsk
and the output of build-filesystem-ng
as drivei.dsk
. Fails miserably....
./cpmsim $* hazen@eric-x20:cpmsim$ ./eric-fuzix ####### ##### ### ##### ### # # # # # # # # # # ## ## # # # # # # # # # # # # ##### # # ##### ##### # # # # # # # # # # # # # # # # # # # # # # # ####### ##### ### ##### ### # # Release 1.36, Copyright (C) 1987-2017 by Udo Munk CPU speed is unlimited Booting... - ^ INT disabled and HALT Op-Code reached at 7735
The original Fuzix disks supplied with z80pack work a little better:
hazen@eric-x20:cpmsim$ ./fuzix ####### ##### ### ##### ### # # # # # # # # # # ## ## # # # # # # # # # # # # ##### # # ##### ##### # # # # # # # # # # # # # # # # # # # # # # # ####### ##### ### ##### ### # # Release 1.36, Copyright (C) 1987-2017 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 <will@sowerbutts.com> Copyright (c) 2014-2015 Alan Cox <alan@etchedpixels.co.uk> Devboot 480kB total RAM, 416kB available to processes (15 processes max) Enabling interrupts ... ok. bootdev: 0 Mounting root fs (root_dev=0, rw): OK Starting /init init version 0.8
Hangs after that, but it seems control is being passed to the kernel from the boot loader and thus to init.
2020-11-22
Running 'make' in FUZIX with z80pack as target. It sure is taking a long time. Start over:
$ make -j 8 | tee build_log.txt
Woohoo! It seems to have finished! Now to figure out what was actually built.
Did make all
and some more stuff happened.
I can build filesystems using the scripts but unclear how to make a bootable one Note that I used the sdcc from the repo which Alan has recommended against.