PiDP-8/I Software

Check-in [3d63f75bdc]
Log In

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge github-ci, CI builds via mirror look good: https://github.com/tangentsoft/pidp8i/actions
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3d63f75bdcba852ff6c3f63d1bc9e82315c69ddd
User & Date: ryan 2020-07-20 21:10:16.490
Context
2020-07-31
02:13
Implemented the clearer demarkation of different levels of OS8 boot media, as per Forum discussion: https://tangentsoft.com/pidp8i/forumpost/dcf09a8902 check-in: c548a7866c user: poetnerd tags: trunk
2020-07-20
21:10
Merge github-ci, CI builds via mirror look good: https://github.com/tangentsoft/pidp8i/actions check-in: 3d63f75bdc user: ryan tags: trunk
2020-07-13
19:28
Build CI on MacOS as well. Leaf check-in: 6872ad8e22 user: ryan tags: github-ci
2020-07-12
03:04
Typoed the conditionals on fortran. The option has a dash not an underscore. This caused patches to be attempted on fortran packages even if the packages were disabled. Note that SABR is now required for the C compiler, and we apply the SABR patch unconditionally. check-in: 70b6053e6d user: poetnerd tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Added .github/workflows/ci.yml.


































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: ci
on: [push, pull_request]
jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
    steps:
    - uses: actions/checkout@v2
    - name: Dependency packages (ubuntu)
      run: sudo apt-get -y install build-essential python3-pexpect libncurses-dev
      if: ${{ matrix.os == 'ubuntu-latest' }}
    - name: Dependency packages (macos)
      run: |
        brew install coreutils ncurses
        pip3 install pexpect
      if: ${{ matrix.os == 'macos-latest' }}
    - name: configure
      run: ./configure
    - name: make
      run: ./tools/mmake
    - name: make install-target
      run: make install-target DESTDIR=${GITHUB_WORKSPACE}/destdir
    - name: Build artifact tarball
      run: |
        mkdir -p ${GITHUB_WORKSPACE}/artifacts
        tar zcvf ${GITHUB_WORKSPACE}/artifacts/${{ github.job }}-${{ github.run_id }}.${{ github.run_number }}-${{ matrix.os }}.tar.gz -C ${GITHUB_WORKSPACE}/destdir .
    - name: Upload artifacts
      uses: actions/upload-artifact@v2
      with:
        name: ci-${{ github.job }}-${{ github.run_id }}.${{ github.run_number }}-${{ matrix.os }}
        path: artifacts/*.tar.gz
Changes to Makefile.in.
381
382
383
384
385
386
387

388






389
390
391
392
393
394
395
V3F_TD12K_TU56 = bin/v3f-td12k.tu56
V3F_BOOT_TAPE= bin/v3f-@OS8_TAPE_DEVICE@.tu56

CC8_TU56_SCRIPT = $(MISC_SCRIPTS_DIR)/cc8-tu56.os8

E8_TU56_SCRIPT = $(MISC_SCRIPTS_DIR)/e8-tu56.os8


RCFILE := @ABSPREFIX@/etc/pidp8i.rc







CLTXT = /boot/cmdline.txt

ADF := adrules.mk


#### TARGETS ###########################################################







>
|
>
>
>
>
>
>







381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
V3F_TD12K_TU56 = bin/v3f-td12k.tu56
V3F_BOOT_TAPE= bin/v3f-@OS8_TAPE_DEVICE@.tu56

CC8_TU56_SCRIPT = $(MISC_SCRIPTS_DIR)/cc8-tu56.os8

E8_TU56_SCRIPT = $(MISC_SCRIPTS_DIR)/e8-tu56.os8

# Absolute version of --prefix passed to configure.
PREFIX = @ABSPREFIX@
# Normally unset.  Prepended to PREFIX to install files to a
# different tree than / (e.g. for distribution build/CI scripts).
# https://www.gnu.org/prep/standards/html_node/DESTDIR.html
DESTDIR = 

RCFILE := $(PREFIX)/etc/pidp8i.rc

CLTXT = /boot/cmdline.txt

ADF := adrules.mk


#### TARGETS ###########################################################
433
434
435
436
437
438
439


440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468

469






































470
471
472
473
474
475
476

ctags tags:
	ctags -R @srcdir@/src @srcdir@/lib
ifeq (@HAVE_PROG_CSCOPE@, 1)
	cscope -bR -s@srcdir@
endif



install: all instdirs
	@echo Installing to @prefix@...

	@# Install most bin/* stuff and set their perms
	@for f in $(BINS) ; do \
		dest=@prefix@/$$f ; \
		echo "Installing binary $$dest..." ; \
		@INSTALL@ -m 755 -D -s $$f $$dest ; \
	done
	@for f in $(BIN_SCRIPTS) ; do \
		dest=@prefix@/bin/$$(basename $$f) ; \
		echo "Installing script $$dest..." ; \
		@INSTALL@ -m 755 -D $$f $$dest ; \
	done
	@( cd @prefix@/bin ; \
	   echo "Installing txt2ptp symlink..." ; \
	   ln -f ptp2txt txt2ptp ; \
	)
	@(test -x /sbin/setcap && \
		for f in @prefix@/bin/pidp8i-* ; do \
			echo "Setting real-time priority capabilities on $$(basename $$f)..." ; \
			/sbin/setcap 'cap_sys_nice=eip' $$f ; \
		done \
	) || true
	@(	test -e @MEDIADIR@/os8/os8.rk05 || \
		test -e @MEDIADIR@/os8/os8v3d-bin.rk05 || \
		test -e @MEDIADIR@/os8/v3d.rk05) && \
		echo "Skipping media image and SIMH boot script reinstall." || \
		$(MAKE) mediainstall

	@ln -f @prefix@/bin/pidp8i-sim @prefix@/bin/pdp8  # run w/o PiDP-8/I extensions







































	@# If this is a Debian-type system, install needed helper programs
	@test -x /usr/bin/apt-get -a ! -x /usr/bin/screen && apt-get -y install screen || true

	@# Remove usbmount: we've replaced that with bin/usb-mount and friends.
	@(test -x /usr/bin/apt-get -a -d /etc/usbmount && \
		apt-get -y remove usbmount > /dev/null 2>&1 \







>
>
|
|



|

|


|

|

<
|
|
<
<
<
<
<
<
<
|
|
|


>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462

463
464







465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516

ctags tags:
	ctags -R @srcdir@/src @srcdir@/lib
ifeq (@HAVE_PROG_CSCOPE@, 1)
	cscope -bR -s@srcdir@
endif

install: install-target install-system

install-target: all instdirs
	@echo Installing to $(PREFIX)...

	@# Install most bin/* stuff and set their perms
	@for f in $(BINS) ; do \
		dest=$(PREFIX)/$$f ; \
		echo "Installing binary $$dest..." ; \
		@INSTALL@ -m 755 -D -s $$f $(DESTDIR)$$dest ; \
	done
	@for f in $(BIN_SCRIPTS) ; do \
		dest=$(PREFIX)/bin/$$(basename $$f) ; \
		echo "Installing script $$dest..." ; \
		@INSTALL@ -m 755 -D $$f $(DESTDIR)$$dest ; \
	done

	@echo "Installing txt2ptp symlink..."
	@ln -f $(DESTDIR)$(PREFIX)/bin/ptp2txt $(DESTDIR)$(PREFIX)/bin/txt2ptp







	@(	test -e $(DESTDIR)@MEDIADIR@/os8/os8.rk05 || \
		test -e $(DESTDIR)@MEDIADIR@/os8/os8v3d-bin.rk05 || \
		test -e $(DESTDIR)@MEDIADIR@/os8/v3d.rk05) && \
		echo "Skipping media image and SIMH boot script reinstall." || \
		$(MAKE) mediainstall
	@ln -f $(DESTDIR)$(PREFIX)/bin/pidp8i-sim $(DESTDIR)$(PREFIX)/bin/pdp8  # run w/o PiDP-8/I extensions

	@# Install CC8 stuff if built
	@test -n "@CC8_CROSS@" && \
		echo "Installing cc8 cross-compiler..." ; \
		@INSTALL@ -m 755 bin/cc8 $(DESTDIR)$(PREFIX)/bin && \
		@INSTALL@ -m 644 @srcdir@/src/cc8/include/* $(DESTDIR)$(PREFIX)/share/include

	@# Install palbart stuff
	@@INSTALL@ -m 755 bin/palbart $(DESTDIR)$(PREFIX)/bin
	@@INSTALL@ -m 644 @srcdir@/src/palbart/palbart.1 $(DESTDIR)$(PREFIX)/share/man/man1

	@# Install os8-run and its dependencies
	@echo "Installing os8-run..."
	@@INSTALL@ -m 775 -g @INSTGRP@ $(OS8RUN) $(DESTDIR)$(PREFIX)/bin
	@( for src in $(OS8RUN_PY_ALL) ; do \
		test -e $$src || src=@srcdir@/$$src ; \
		dest=$(PREFIX)/$$(echo $$src | sed -e 's_^@srcdir@/__') ; \
		echo "Installing $$src to $$dest..." ; \
	    @INSTALL@ -m 644 -g @INSTGRP@ -D $${src}  $(DESTDIR)$${dest}  ; \
	  done \
	)
	@sed -e 's#^build =.*#build = "$(PREFIX)"#' \
	     -e 's#^media =.*#media = os.path.join (build, "share/media/")#' \
	     -e 's#^os8mo =.*#os8mo = os8mi#' \
		 < $(PIDP8I_DIRS) > $(DESTDIR)$(PREFIX)/$(PIDP8I_DIRS)
	@chgrp @INSTGRP@ $(DESTDIR)$(PREFIX)/$(PIDP8I_DIRS)

	@# We need a directory for PIDs and such in some cases
	@@INSTALL@ -d -m 755 $(DESTDIR)$(PREFIX)/run

install-system: install-target
	@echo Installing system files and programs...

	@(test -x /sbin/setcap && \
		for f in $(PREFIX)/bin/pidp8i-* ; do \
			echo "Setting real-time priority capabilities on $$(basename $$f)..." ; \
			/sbin/setcap 'cap_sys_nice=eip' $(DESTDIR)$$f ; \
		done \
	) || true

	@# If this is a Debian-type system, install needed helper programs
	@test -x /usr/bin/apt-get -a ! -x /usr/bin/screen && apt-get -y install screen || true

	@# Remove usbmount: we've replaced that with bin/usb-mount and friends.
	@(test -x /usr/bin/apt-get -a -d /etc/usbmount && \
		apt-get -y remove usbmount > /dev/null 2>&1 \
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
	@(test -e /etc/init.d/pidp8i -a -e /etc/rc5.d/S*pidp8i && \
		/bin/systemctl disable pidp8i && \
		rm -f /etc/init.d/pidp8i \
	) || true

	@# Install the systemd unit file if this system is systemd based.
	@(test -x /bin/systemctl && \
		sudo -i -u @INSTUSR@ @ABSPREFIX@/bin/pidp8i install && \
		/bin/loginctl enable-linger @INSTUSR@ \
	) || true

	@# Give the install user permission to use GPIO if done on a Pi
	@grep -q '^gpio:' /etc/group && usermod -a -G gpio @INSTUSR@ || true

	@# Give the install user permission to shut down and reboot the Pi
	@# if this is a systemd/sudo based system.
	@(	test -d /etc/sudoers.d -a -w /etc/sudoers.d -a -x /bin/systemctl && \
		@INSTALL@ -m 440 -o root -g root @srcdir@/etc/sudoers \
		    /etc/sudoers.d/099_pidp8i \
	) || true

	@# Install runtime config file if there isn't one there already.
	@test -f $(RCFILE) || @INSTALL@ -m 644 -o @INSTUSR@ @srcdir@/etc/pidp8i.rc $(RCFILE)

	@# Add installation bin dir to the non-root user's PATH unless it's
	@# already in there or we aren't running under sudo.
	@(for p in .profile .bash_profile ; do \
		test -n "$$SUDO_USER" -a -w "/home/$$SUDO_USER/$$p" && \
			! grep -qF "@ABSPREFIX@/bin" "/home/$$SUDO_USER/$$p" && \
			echo "export PATH=\$$PATH:@ABSPREFIX@/bin" >> "/home/$$SUDO_USER/$$p" ; \
	done) || true

	@# Ditto for MANPATH
	@(for p in .profile .bash_profile ; do \
		test -n "$$SUDO_USER" -a -w "/home/$$SUDO_USER/$$p" && \
			! grep -qF "@ABSPREFIX@/share/man" "/home/$$SUDO_USER/$$p" && \
			echo "export MANPATH=\$$MANPATH:@ABSPREFIX@/share/man" >> "/home/$$SUDO_USER/$$p" ; \
		done \
	) || true

	@# If serial mod is disabled, turn off serial console and kgdb stuff
	@# in case they were enabled previously, else they will fight with
	@# our use of GPIO.
	@(  test -z "@PCB_SERIAL_MOD_ANY@" -a -r $(CLTXT) && ! -w $(CLTXT) && \
		cp -p $(CLTXT) "$(CLTXT)"_orig && \
		sed -e 's/console\=[a-zA-Z0-9]+,[0-9]+ //' \
		    -e  's/kgdboc\=[a-zA-Z0-9]+,[0-9]+ //' -i $(CLTXT) \
	) || true

	@# Install CC8 stuff if built
	@test -n "@CC8_CROSS@" && \
		echo "Installing cc8 cross-compiler..." ; \
		@INSTALL@ -m 755 bin/cc8 @prefix@/bin && \
		@INSTALL@ -m 644 @srcdir@/src/cc8/include/* @prefix@/share/include

	@# Install palbart stuff
	@@INSTALL@ -m 755 bin/palbart @prefix@/bin
	@@INSTALL@ -m 644 @srcdir@/src/palbart/palbart.1 @prefix@/share/man/man1

	@# Install os8-run and its dependencies
	@echo "Installing os8-run..."
	@@INSTALL@ -m 775 -g @INSTGRP@ $(OS8RUN) @prefix@/bin
	@( for src in $(OS8RUN_PY_ALL) ; do \
		test -e $$src || src=@srcdir@/$$src ; \
		dest=@prefix@/$$(echo $$src | sed -e 's_^@srcdir@/__') ; \
		echo "Installing $$src to $$dest..." ; \
	    @INSTALL@ -m 644 -g @INSTGRP@ -D $${src}  $${dest}  ; \
	  done \
	)
	@sed -e 's#^build =.*#build = "@ABSPREFIX@"#' \
	     -e 's#^media =.*#media = os.path.join (build, "share/media/")#' \
	     -e 's#^os8mo =.*#os8mo = os8mi#' \
		 < $(PIDP8I_DIRS) > @prefix@/$(PIDP8I_DIRS)
	@chgrp @INSTGRP@ @prefix@/$(PIDP8I_DIRS)

	@# We need a directory for PIDs and such in some cases
	@@INSTALL@ -d -m 755 @prefix@/run

instdirs:
	@echo "Creating installation directory tree..."
	@for d in $(INSTDIRS) ; do @INSTALL@ -m 755 -o @INSTUSR@ -g @INSTGRP@ -d @prefix@/$$d ; done

mediainstall: instdirs
	@echo "[Re]installing OS and program media..."
	@cd @srcdir@ ; \
	find media \( \
		-name \*.bin  -o \
		-name \*.dsk  -o \
		-name \*.rk05 -o \
		-name \*.tu56 \
	\) -exec @INSTALL@ -D -m 664 -o @INSTUSR@ -g @INSTGRP@ {} @ABSPREFIX@/share/{} \;
	@@INSTALL@ -m 644 -o @INSTUSR@ -g @INSTGRP@ bin/*.rk05 @ABSPREFIX@/share/media/os8
	@@INSTALL@ -m 644 -o @INSTUSR@ -g @INSTGRP@ bin/*.tu56 @ABSPREFIX@/share/media/os8
	for f in boot/*.script ; do \
		sed -e 's#%HOME%/\.pidp8i-#@SHAREDIR@/save/#' < $$f > @SHAREDIR@/$$f ; \
		chown @INSTUSR@:@INSTGRP@ @SHAREDIR@/$$f ; \
		chmod 664 @SHAREDIR@/$$f ; \
	done

# Called by test-os8-run
# Minimizes dependencies to provoke minimal rebuilds.
# Builds cc8.tu56, copying in rather than rebuilding source and demo files.
os8-sys: test-tmp-tools
	$(OS8RUN)@OS8_OPTS@ $(V3D_DIST_SCRIPT)







|














|





|
|





|
|












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<


|









|
|
|

|
|
|







536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584





























585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
	@(test -e /etc/init.d/pidp8i -a -e /etc/rc5.d/S*pidp8i && \
		/bin/systemctl disable pidp8i && \
		rm -f /etc/init.d/pidp8i \
	) || true

	@# Install the systemd unit file if this system is systemd based.
	@(test -x /bin/systemctl && \
		sudo -i -u @INSTUSR@ $(DESTDIR)$(PREFIX)/bin/pidp8i install && \
		/bin/loginctl enable-linger @INSTUSR@ \
	) || true

	@# Give the install user permission to use GPIO if done on a Pi
	@grep -q '^gpio:' /etc/group && usermod -a -G gpio @INSTUSR@ || true

	@# Give the install user permission to shut down and reboot the Pi
	@# if this is a systemd/sudo based system.
	@(	test -d /etc/sudoers.d -a -w /etc/sudoers.d -a -x /bin/systemctl && \
		@INSTALL@ -m 440 -o root -g root @srcdir@/etc/sudoers \
		    /etc/sudoers.d/099_pidp8i \
	) || true

	@# Install runtime config file if there isn't one there already.
	@test -f $(DESTDIR)$(RCFILE) || @INSTALL@ -m 644 -o @INSTUSR@ @srcdir@/etc/pidp8i.rc $(DESTDIR)$(RCFILE)

	@# Add installation bin dir to the non-root user's PATH unless it's
	@# already in there or we aren't running under sudo.
	@(for p in .profile .bash_profile ; do \
		test -n "$$SUDO_USER" -a -w "/home/$$SUDO_USER/$$p" && \
			! grep -qF "$(PREFIX)/bin" "/home/$$SUDO_USER/$$p" && \
			echo "export PATH=\$$PATH:$(PREFIX)/bin" >> "/home/$$SUDO_USER/$$p" ; \
	done) || true

	@# Ditto for MANPATH
	@(for p in .profile .bash_profile ; do \
		test -n "$$SUDO_USER" -a -w "/home/$$SUDO_USER/$$p" && \
			! grep -qF "$(PREFIX)/share/man" "/home/$$SUDO_USER/$$p" && \
			echo "export MANPATH=\$$MANPATH:$(PREFIX)/share/man" >> "/home/$$SUDO_USER/$$p" ; \
		done \
	) || true

	@# If serial mod is disabled, turn off serial console and kgdb stuff
	@# in case they were enabled previously, else they will fight with
	@# our use of GPIO.
	@(  test -z "@PCB_SERIAL_MOD_ANY@" -a -r $(CLTXT) && ! -w $(CLTXT) && \
		cp -p $(CLTXT) "$(CLTXT)"_orig && \
		sed -e 's/console\=[a-zA-Z0-9]+,[0-9]+ //' \
		    -e  's/kgdboc\=[a-zA-Z0-9]+,[0-9]+ //' -i $(CLTXT) \
	) || true






























instdirs:
	@echo "Creating installation directory tree..."
	@for d in $(INSTDIRS) ; do @INSTALL@ -m 755 -o @INSTUSR@ -g @INSTGRP@ -d $(DESTDIR)$(PREFIX)/$$d ; done

mediainstall: instdirs
	@echo "[Re]installing OS and program media..."
	@cd @srcdir@ ; \
	find media \( \
		-name \*.bin  -o \
		-name \*.dsk  -o \
		-name \*.rk05 -o \
		-name \*.tu56 \
	\) -exec @INSTALL@ -D -m 664 -o @INSTUSR@ -g @INSTGRP@ {} $(DESTDIR)$(PREFIX)/share/{} \;
	@@INSTALL@ -m 644 -o @INSTUSR@ -g @INSTGRP@ bin/*.rk05 $(DESTDIR)$(PREFIX)/share/media/os8
	@@INSTALL@ -m 644 -o @INSTUSR@ -g @INSTGRP@ bin/*.tu56 $(DESTDIR)$(PREFIX)/share/media/os8
	for f in boot/*.script ; do \
		sed -e 's#%HOME%/\.pidp8i-#@SHAREDIR@/save/#' < $$f > $(DESTDIR)@SHAREDIR@/$$f ; \
		chown @INSTUSR@:@INSTGRP@ $(DESTDIR)@SHAREDIR@/$$f ; \
		chmod 664 $(DESTDIR)@SHAREDIR@/$$f ; \
	done

# Called by test-os8-run
# Minimizes dependencies to provoke minimal rebuilds.
# Builds cc8.tu56, copying in rather than rebuilding source and demo files.
os8-sys: test-tmp-tools
	$(OS8RUN)@OS8_OPTS@ $(V3D_DIST_SCRIPT)