0596e3449b
Some time ago I started working on a library called libteken, which is terminal emulator. It does not buffer any screen contents, but only keeps terminal state, such as cursor position, attributes, etc. It should implement all escape sequences that are implemented by the cons25 terminal emulator, but also a fair amount of sequences that are present in VT100 and xterm. A lot of random notes, which could be of interest to users/developers: - Even though I'm leaving the terminal type set to `cons25', users can do experiments with placing `xterm-color' in /etc/ttys. Because we only implement a subset of features of xterm, this may cause artifacts. We should consider extending libteken, because in my opinion xterm is the way to go. Some missing features: - Keypad application mode (DECKPAM) - Character sets (SCS) - libteken is filled with a fair amount of assertions, but unfortunately we cannot go into the debugger anymore if we fail them. I've done development of this library almost entirely in userspace. In sys/dev/syscons/teken there are two applications that can be helpful when debugging the code: - teken_demo: a terminal emulator that can be started from a regular xterm that emulates a terminal using libteken. This application can be very useful to debug any rendering issues. - teken_stress: a stress testing application that emulates random terminal output. libteken has literally survived multiple terabytes of random input. - libteken also includes support for UTF-8, but unfortunately our input layer and font renderer don't support this. If users want to experiment with UTF-8 support, they can enable `TEKEN_UTF8' in teken.h. If you recompile your kernel or the teken_demo application, you can hold some nice experiments. - I've left PC98 the way it is right now. The PC98 platform has a custom syscons renderer, which supports some form of localised input. Maybe we should port PC98 to libteken by the time syscons supports UTF-8? - I've removed the `dumb' terminal emulator. It has been broken for years. It hasn't survived the `struct proc' -> `struct thread' conversion. - To prevent confusion among people that want to hack on libteken: unlike syscons, the state machines that parse the escape sequences are machine generated. This means that if you want to add new escape sequences, you have to add an entry to the `sequences' file. This will cause new entries to be added to `teken_state.h'. - Any rendering artifacts that didn't occur prior to this commit are by accident. They should be reported to me, so I can fix them. Discussed on: current@, hackers@ Discussed with: philip (at 25C3)
271 lines
11 KiB
Plaintext
271 lines
11 KiB
Plaintext
# This file tells config what files go into building a kernel,
|
|
# files marked standard are always included.
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# The long compile-with and dependency lines are required because of
|
|
# limitations in config: backslash-newline doesn't work in strings, and
|
|
# dependency lines other than the first are silently ignored.
|
|
#
|
|
#
|
|
linux32_genassym.o optional compat_linux32 \
|
|
dependency "$S/amd64/linux32/linux32_genassym.c" \
|
|
compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \
|
|
no-obj no-implicit-rule \
|
|
clean "linux32_genassym.o"
|
|
#
|
|
linux32_assym.h optional compat_linux32 \
|
|
dependency "$S/kern/genassym.sh linux32_genassym.o" \
|
|
compile-with "sh $S/kern/genassym.sh linux32_genassym.o > ${.TARGET}" \
|
|
no-obj no-implicit-rule before-depend \
|
|
clean "linux32_assym.h"
|
|
#
|
|
ia32_genassym.o standard \
|
|
dependency "$S/compat/ia32/ia32_genassym.c" \
|
|
compile-with "${CC} ${CFLAGS:N-fno-common} -c ${.IMPSRC}" \
|
|
no-obj no-implicit-rule \
|
|
clean "ia32_genassym.o"
|
|
#
|
|
ia32_assym.h standard \
|
|
dependency "$S/kern/genassym.sh ia32_genassym.o" \
|
|
compile-with "env NM='${NM}' sh $S/kern/genassym.sh ia32_genassym.o > ${.TARGET}" \
|
|
no-obj no-implicit-rule before-depend \
|
|
clean "ia32_assym.h"
|
|
#
|
|
font.h optional sc_dflt_font \
|
|
compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'static u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'static u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'static u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \
|
|
no-obj no-implicit-rule before-depend \
|
|
clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8"
|
|
#
|
|
atkbdmap.h optional atkbd_dflt_keymap \
|
|
compile-with "/usr/sbin/kbdcontrol -L ${ATKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > atkbdmap.h" \
|
|
no-obj no-implicit-rule before-depend \
|
|
clean "atkbdmap.h"
|
|
#
|
|
ukbdmap.h optional ukbd_dflt_keymap \
|
|
compile-with "/usr/sbin/kbdcontrol -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \
|
|
no-obj no-implicit-rule before-depend \
|
|
clean "ukbdmap.h"
|
|
#
|
|
nvenetlib.o optional nve pci \
|
|
dependency "$S/contrib/dev/nve/amd64/nvenetlib.o.bz2.uu" \
|
|
compile-with "uudecode $S/contrib/dev/nve/amd64/nvenetlib.o.bz2.uu ; bzip2 -df nvenetlib.o.bz2" \
|
|
no-implicit-rule
|
|
#
|
|
os+%DIKED-nve.h optional nve pci \
|
|
dependency "$S/contrib/dev/nve/os.h" \
|
|
compile-with "sed -e 's/^.*#include.*phy\.h.*$$//' $S/contrib/dev/nve/os.h > os+%DIKED-nve.h" \
|
|
no-implicit-rule no-obj before-depend \
|
|
clean "os+%DIKED-nve.h"
|
|
#
|
|
hptmvraid.o optional hptmv \
|
|
dependency "$S/dev/hptmv/amd64-elf.raid.o.uu" \
|
|
compile-with "uudecode < $S/dev/hptmv/amd64-elf.raid.o.uu" \
|
|
no-implicit-rule
|
|
hptrr_lib.o optional hptrr \
|
|
dependency "$S/dev/hptrr/amd64-elf.hptrr_lib.o.uu" \
|
|
compile-with "uudecode < $S/dev/hptrr/amd64-elf.hptrr_lib.o.uu" \
|
|
no-implicit-rule
|
|
#
|
|
amd64/acpica/OsdEnvironment.c optional acpi
|
|
amd64/acpica/acpi_machdep.c optional acpi
|
|
amd64/acpica/acpi_wakeup.c optional acpi
|
|
amd64/acpica/madt.c optional acpi
|
|
amd64/amd64/amd64_mem.c optional mem
|
|
#amd64/amd64/apic_vector.S standard
|
|
amd64/amd64/atomic.c standard
|
|
amd64/amd64/autoconf.c standard
|
|
amd64/amd64/bios.c standard
|
|
amd64/amd64/bpf_jit_machdep.c optional bpf_jitter
|
|
amd64/amd64/busdma_machdep.c standard
|
|
amd64/amd64/cpu_switch.S standard
|
|
amd64/amd64/db_disasm.c optional ddb
|
|
amd64/amd64/db_interface.c optional ddb
|
|
amd64/amd64/db_trace.c optional ddb
|
|
amd64/amd64/dump_machdep.c standard
|
|
amd64/amd64/elf_machdep.c standard
|
|
amd64/amd64/exception.S standard
|
|
amd64/amd64/fpu.c standard
|
|
amd64/amd64/gdb_machdep.c optional gdb
|
|
amd64/amd64/identcpu.c standard
|
|
amd64/amd64/in_cksum.c optional inet
|
|
amd64/amd64/initcpu.c standard
|
|
amd64/amd64/intr_machdep.c standard
|
|
amd64/amd64/io.c optional io
|
|
amd64/amd64/io_apic.c standard
|
|
amd64/amd64/legacy.c standard
|
|
amd64/amd64/local_apic.c standard
|
|
amd64/amd64/locore.S standard no-obj
|
|
amd64/amd64/machdep.c standard
|
|
amd64/amd64/mem.c optional mem
|
|
amd64/amd64/minidump_machdep.c standard
|
|
amd64/amd64/mp_machdep.c optional smp
|
|
amd64/amd64/mp_watchdog.c optional mp_watchdog smp
|
|
amd64/amd64/mpboot.S optional smp
|
|
amd64/amd64/mptable.c optional mptable
|
|
amd64/amd64/mptable_pci.c optional mptable pci
|
|
amd64/amd64/msi.c optional pci
|
|
amd64/amd64/nexus.c standard
|
|
amd64/amd64/pmap.c standard
|
|
amd64/amd64/prof_machdep.c optional profiling-routine
|
|
amd64/amd64/sigtramp.S standard
|
|
amd64/amd64/stack_machdep.c optional ddb | stack
|
|
amd64/amd64/support.S standard
|
|
amd64/amd64/sys_machdep.c standard
|
|
amd64/amd64/trap.c standard
|
|
amd64/amd64/tsc.c standard
|
|
amd64/amd64/uio_machdep.c standard
|
|
amd64/amd64/uma_machdep.c standard
|
|
amd64/amd64/vm_machdep.c standard
|
|
amd64/isa/atpic.c optional atpic isa
|
|
#amd64/isa/atpic_vector.S optional atpic isa
|
|
amd64/isa/clock.c standard
|
|
amd64/isa/elcr.c standard
|
|
amd64/isa/isa.c standard
|
|
amd64/isa/isa_dma.c standard
|
|
amd64/isa/nmi.c standard
|
|
amd64/pci/pci_bus.c optional pci
|
|
amd64/pci/pci_cfgreg.c optional pci
|
|
crypto/blowfish/bf_enc.c optional crypto | ipsec
|
|
crypto/des/des_enc.c optional crypto | ipsec | netsmb
|
|
dev/acpica/acpi_if.m standard
|
|
dev/agp/agp_amd64.c optional agp
|
|
dev/agp/agp_i810.c optional agp
|
|
dev/agp/agp_intel.c optional agp
|
|
dev/arcmsr/arcmsr.c optional arcmsr pci
|
|
dev/asmc/asmc.c optional asmc isa
|
|
dev/atkbdc/atkbd.c optional atkbd atkbdc
|
|
dev/atkbdc/atkbd_atkbdc.c optional atkbd atkbdc
|
|
dev/atkbdc/atkbdc.c optional atkbdc
|
|
dev/atkbdc/atkbdc_isa.c optional atkbdc isa
|
|
dev/atkbdc/atkbdc_subr.c optional atkbdc
|
|
dev/atkbdc/psm.c optional psm atkbdc
|
|
dev/coretemp/coretemp.c optional coretemp
|
|
dev/cpuctl/cpuctl.c optional cpuctl
|
|
# There are no systems with isa slots, so all ed isa entries should go..
|
|
dev/ed/if_ed_3c503.c optional ed isa ed_3c503
|
|
dev/ed/if_ed_isa.c optional ed isa
|
|
dev/ed/if_ed_wd80x3.c optional ed isa
|
|
dev/ed/if_ed_hpp.c optional ed isa ed_hpp
|
|
dev/ed/if_ed_sic.c optional ed isa ed_sic
|
|
dev/fb/fb.c optional fb | vga
|
|
dev/fb/vga.c optional vga
|
|
dev/ichwd/ichwd.c optional ichwd
|
|
dev/if_ndis/if_ndis.c optional ndis
|
|
dev/if_ndis/if_ndis_pccard.c optional ndis pccard
|
|
dev/if_ndis/if_ndis_pci.c optional ndis cardbus | ndis pci
|
|
dev/if_ndis/if_ndis_usb.c optional ndis usb
|
|
dev/io/iodev.c optional io
|
|
dev/ipmi/ipmi.c optional ipmi
|
|
dev/ipmi/ipmi_acpi.c optional ipmi acpi
|
|
dev/ipmi/ipmi_isa.c optional ipmi isa
|
|
dev/ipmi/ipmi_kcs.c optional ipmi
|
|
dev/ipmi/ipmi_smic.c optional ipmi
|
|
dev/ipmi/ipmi_smbus.c optional ipmi smbus
|
|
dev/ipmi/ipmi_smbios.c optional ipmi
|
|
dev/ipmi/ipmi_ssif.c optional ipmi smbus
|
|
dev/ipmi/ipmi_pci.c optional ipmi pci
|
|
dev/fdc/fdc.c optional fdc
|
|
dev/fdc/fdc_acpi.c optional fdc
|
|
dev/fdc/fdc_isa.c optional fdc isa
|
|
dev/fdc/fdc_pccard.c optional fdc pccard
|
|
dev/hptmv/entry.c optional hptmv
|
|
dev/hptmv/mv.c optional hptmv
|
|
dev/hptmv/gui_lib.c optional hptmv
|
|
dev/hptmv/hptproc.c optional hptmv
|
|
dev/hptmv/ioctl.c optional hptmv
|
|
dev/hptrr/hptrr_os_bsd.c optional hptrr
|
|
dev/hptrr/hptrr_osm_bsd.c optional hptrr
|
|
dev/hptrr/hptrr_config.c optional hptrr
|
|
dev/hwpmc/hwpmc_amd.c optional hwpmc
|
|
dev/hwpmc/hwpmc_intel.c optional hwpmc
|
|
dev/hwpmc/hwpmc_core.c optional hwpmc
|
|
dev/hwpmc/hwpmc_piv.c optional hwpmc
|
|
dev/hwpmc/hwpmc_tsc.c optional hwpmc
|
|
dev/hwpmc/hwpmc_x86.c optional hwpmc
|
|
dev/k8temp/k8temp.c optional k8temp
|
|
dev/kbd/kbd.c optional atkbd | sc | ukbd
|
|
dev/mem/memutil.c optional mem
|
|
dev/nfe/if_nfe.c optional nfe pci
|
|
dev/nve/if_nve.c optional nve pci
|
|
dev/nvram/nvram.c optional nvram isa
|
|
dev/sio/sio.c optional sio
|
|
dev/sio/sio_isa.c optional sio isa
|
|
dev/sio/sio_pccard.c optional sio pccard
|
|
dev/sio/sio_pci.c optional sio pci
|
|
dev/sio/sio_puc.c optional sio puc
|
|
dev/speaker/spkr.c optional speaker
|
|
dev/syscons/apm/apm_saver.c optional apm_saver apm
|
|
dev/syscons/scterm-teken.c optional sc
|
|
dev/syscons/scvgarndr.c optional sc vga
|
|
dev/syscons/scvtb.c optional sc
|
|
dev/syscons/teken/teken.c optional sc
|
|
dev/uart/uart_cpu_amd64.c optional uart
|
|
dev/wpi/if_wpi.c optional wpi
|
|
isa/atrtc.c standard
|
|
isa/syscons_isa.c optional sc
|
|
isa/vga_isa.c optional vga
|
|
kern/link_elf_obj.c standard
|
|
#
|
|
# IA32 binary support
|
|
#
|
|
#amd64/ia32/ia32_exception.S optional compat_ia32
|
|
amd64/ia32/ia32_reg.c optional compat_ia32
|
|
amd64/ia32/ia32_signal.c optional compat_ia32
|
|
amd64/ia32/ia32_sigtramp.S optional compat_ia32
|
|
amd64/ia32/ia32_syscall.c optional compat_ia32
|
|
compat/freebsd32/freebsd32_ioctl.c optional compat_ia32
|
|
compat/freebsd32/freebsd32_misc.c optional compat_ia32
|
|
compat/freebsd32/freebsd32_syscalls.c optional compat_ia32
|
|
compat/freebsd32/freebsd32_sysent.c optional compat_ia32
|
|
compat/ia32/ia32_sysvec.c optional compat_ia32
|
|
compat/linprocfs/linprocfs.c optional linprocfs
|
|
compat/linsysfs/linsysfs.c optional linsysfs
|
|
kern/imgact_elf32.c optional compat_ia32
|
|
#
|
|
# Linux/i386 binary support
|
|
#
|
|
amd64/linux32/linux32_dummy.c optional compat_linux32
|
|
amd64/linux32/linux32_locore.s optional compat_linux32 \
|
|
dependency "linux32_assym.h"
|
|
amd64/linux32/linux32_machdep.c optional compat_linux32
|
|
amd64/linux32/linux32_support.s optional compat_linux32 \
|
|
dependency "linux32_assym.h"
|
|
amd64/linux32/linux32_sysent.c optional compat_linux32
|
|
amd64/linux32/linux32_sysvec.c optional compat_linux32
|
|
compat/linux/linux_emul.c optional compat_linux32
|
|
compat/linux/linux_file.c optional compat_linux32
|
|
compat/linux/linux_futex.c optional compat_linux32
|
|
compat/linux/linux_getcwd.c optional compat_linux32
|
|
compat/linux/linux_ioctl.c optional compat_linux32
|
|
compat/linux/linux_ipc.c optional compat_linux32
|
|
compat/linux/linux_mib.c optional compat_linux32
|
|
compat/linux/linux_misc.c optional compat_linux32
|
|
compat/linux/linux_signal.c optional compat_linux32
|
|
compat/linux/linux_socket.c optional compat_linux32
|
|
compat/linux/linux_stats.c optional compat_linux32
|
|
compat/linux/linux_sysctl.c optional compat_linux32
|
|
compat/linux/linux_time.c optional compat_linux32
|
|
compat/linux/linux_uid16.c optional compat_linux32
|
|
compat/linux/linux_util.c optional compat_linux32
|
|
dev/amr/amr_linux.c optional compat_linux32 amr
|
|
dev/mfi/mfi_linux.c optional compat_linux32 mfi
|
|
#
|
|
# Windows NDIS driver support
|
|
#
|
|
compat/ndis/kern_ndis.c optional ndisapi pci
|
|
compat/ndis/kern_windrv.c optional ndisapi pci
|
|
compat/ndis/subr_hal.c optional ndisapi pci
|
|
compat/ndis/subr_ndis.c optional ndisapi pci
|
|
compat/ndis/subr_ntoskrnl.c optional ndisapi pci
|
|
compat/ndis/subr_pe.c optional ndisapi pci
|
|
compat/ndis/subr_usbd.c optional ndisapi pci
|
|
compat/ndis/winx64_wrap.S optional ndisapi pci
|
|
i386/bios/smbios.c optional smbios
|
|
i386/bios/vpd.c optional vpd
|
|
i386/cpufreq/powernow.c optional cpufreq
|
|
i386/cpufreq/est.c optional cpufreq
|
|
i386/cpufreq/p4tcc.c optional cpufreq
|
|
#
|
|
libkern/memset.c standard
|