diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2023-07-29 20:00:29 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2023-07-29 20:00:29 +0200 |
commit | 908af8ebe7d9d342af3f11d37918155d25de0b78 (patch) | |
tree | e349c73e06dfb23e09c3a876fe8747db3e2a7b2b | |
parent | 4cde4e4e28e3455f4c3dbd51dd0e341494688f7a (diff) | |
download | i486tcc-linux-908af8ebe7d9d342af3f11d37918155d25de0b78.tar.gz i486tcc-linux-908af8ebe7d9d342af3f11d37918155d25de0b78.tar.bz2 |
started to generate fonts X11, still too big (we have to extract the correct charset)
-rw-r--r-- | README | 29 | ||||
-rw-r--r-- | configs/versions | 5 | ||||
-rw-r--r-- | local/share/X11/fonts/6x13-ISO8859-1.pcf.gz | bin | 4675 -> 0 bytes | |||
-rw-r--r-- | local/share/X11/fonts/cursor.pcf.gz | bin | 5225 -> 0 bytes | |||
-rw-r--r-- | patches/bdftopcf-tcc.patch | 25 | ||||
-rw-r--r-- | patches/rxvt-font.patch | 17 | ||||
-rwxr-xr-x | scripts/build.sh | 48 | ||||
-rwxr-xr-x | scripts/create_root.sh | 3 | ||||
-rwxr-xr-x | scripts/download.sh | 15 | ||||
-rw-r--r-- | tools/rdev.c | 4 |
10 files changed, 128 insertions, 18 deletions
@@ -454,7 +454,9 @@ EOF the mod_xrandr module, we should be fine (tinyxlib has some Xrandr function stubs for a possible extention - similar like XCB - but the implementation is somehow missing) - +- notion: startup issues: ion-statusd, ion-completefile (should be in + /lib/notionbin) + tools ----- @@ -522,7 +524,7 @@ an initial change_root?), so is this in RAM? Uses buildroot for the toolchain. Boot loader is LILO. C-library is uclibc. -There are 486-related kernel patches, but e run without issues on 6.2 on +There are 486-related kernel patches, but it runs without issues on 6.x on a real machine, so why? I really like the shell scripts to build the system, they are extremely @@ -531,14 +533,14 @@ simple. gray486linux ------------ -Maybe the final system is nice, but the NIX build system is not.. +Maybe the final system is nice, but the Nix build system is not.. 0001-WIP-patch-kernel-to-skip-endbr32-instruction-on-real.patch interesting approach to ignore endbr32 without the help of fixing gcc/binutils (we should check again, why we got it inside busybox, musl and tinycc don't to this kind of stuff). -Use of dropbear could be a good idea. +Using dropbear could be a good idea. aboriginal ---------- @@ -599,11 +601,13 @@ statically linked Plan 9 mk build system x86_64 and i486 builds quite old (kernel 3.10.32) -git://git.2f30.org/hbase (Heirloom as alernative base for some Unix tools) -textbased tools like abduco and dvtm for easy text console multiplexing +git://git.2f30.org/hbase (Heirloom as alternative base for some Unix tools) +text-based tools like abduco and dvtm for easy text console multiplexing and window manager, no X tinyalsa sounds interesting too +how is id prefering tools over other tools? + stali ----- @@ -668,6 +672,7 @@ links - https://github.com/firasuke/awesome - https://github.com/firasuke/mussel (Firas Khalil Khana) - https://github.com/pikhq/bootstrap-linux + - https://www.glendix.org/: Plan9-like distro - C Compilers - https://repo.or.cz/w/tinycc.git - C Libraries @@ -709,6 +714,8 @@ links - https://github.com/hut/minirc - https://omaera.org/wlog/tech/runit_init - https://forums.gentoo.org/viewtopic-t-1000292-start-0.html + - service/daemon management + - http://r-36.net/scm/svc/log.html - minimal userland - shells - POSIX compliant @@ -737,6 +744,7 @@ links plan 9 things (as they tend to be more minimalistic): - git://git.9front.org/plan9front/plan9front - git://git.suckless.org/9base + - https://github.com/ecki/net-tools.git - minimalism - https://wiki.installgentoo.com/wiki/Software_minimalism - Link collections of interesting software @@ -764,11 +772,14 @@ links - https://www.kernel.org/doc/html/v4.15/dev-tools/kgdb.html - X - tiny X - - https://github.com/idunham/tinyxserver (puppy linux): has nice simple + - https://github.com/idunham/tinyxserver and + https://github.com/idunham/tinyxlib (puppy linux): has nice simple makefiles - - https://github.com/tinycorelinux/tinyx, is newer, but requires autoconf mess + - https://github.com/tinycorelinux/tinyx, is newer, but requires autoconf to build - - alernatives would have been velox? + - alternatives: + - https://github.com/michaelforney/velox, https://github.com/michaelforney/swc: but + this is wayland - X terminal - xterm: bloat - st, requires Xft, requiring fontconfig, freetype2, etc. can eventually diff --git a/configs/versions b/configs/versions index 360bd65..fba68e1 100644 --- a/configs/versions +++ b/configs/versions @@ -15,13 +15,16 @@ NETBSD_NCURSES_VERSION="0.3.2" TMUX_VERSION="3.3a" ZLIB_VERSION="1.2.13" MANDOC_VERSION="1.14.6" -ABASE_VERSION="f2c13" +ABASE_VERSION="57945" NBD_VERSION="3.25" SAMURAI_VERSION="1.2" JOE_VERSION="4.6" DROPBEAR_VERSION="2022.83" TINYXLIB_VERSION="9862f35" TINYXSERVER_VERSION="b010434" +BDFTOPCF_VERSION="1.1" +FONT_CURSOR_MISC_VERSION="1.0.4" +FONT_MISC_MISC_VERSION="1.1.3" RXVT_VERSION="2.6.4" LUA_VERSION="5.1.5" NOTION_VERSION="435631f" diff --git a/local/share/X11/fonts/6x13-ISO8859-1.pcf.gz b/local/share/X11/fonts/6x13-ISO8859-1.pcf.gz Binary files differdeleted file mode 100644 index 8bc303e..0000000 --- a/local/share/X11/fonts/6x13-ISO8859-1.pcf.gz +++ /dev/null diff --git a/local/share/X11/fonts/cursor.pcf.gz b/local/share/X11/fonts/cursor.pcf.gz Binary files differdeleted file mode 100644 index 7792d9b..0000000 --- a/local/share/X11/fonts/cursor.pcf.gz +++ /dev/null diff --git a/patches/bdftopcf-tcc.patch b/patches/bdftopcf-tcc.patch new file mode 100644 index 0000000..c8090f6 --- /dev/null +++ b/patches/bdftopcf-tcc.patch @@ -0,0 +1,25 @@ +diff -rauN bdftopcf/bdfint.h bdftopcf-tcc-patch/bdfint.h +--- bdftopcf/bdfint.h 2017-11-07 20:11:44.000000000 +0100 ++++ bdftopcf-tcc-patch/bdfint.h 2023-07-29 11:02:26.916280874 +0200 +@@ -65,8 +65,8 @@ + BOOL haveDefaultCh; + } bdfFileState; + +-extern void bdfError ( const char * message, ... ) _X_ATTRIBUTE_PRINTF(1, 2); +-extern void bdfWarning ( const char *message, ... ) _X_ATTRIBUTE_PRINTF(1, 2); ++extern void bdfError ( const char * message, ... ); ++extern void bdfWarning ( const char *message, ... ); + extern unsigned char * bdfGetLine ( FontFilePtr file, unsigned char *buf, + int len ); + extern Atom bdfForceMakeAtom ( const char *str, int *size ); +diff -rauN bdftopcf/pcf.h bdftopcf-tcc-patch/pcf.h +--- bdftopcf/pcf.h 2017-11-07 20:11:44.000000000 +0100 ++++ bdftopcf-tcc-patch/pcf.h 2023-07-29 11:02:31.786288017 +0200 +@@ -92,6 +92,6 @@ + int bit, int byte, int glyph, int scan ); + extern int pcfReadFontInfo ( FontInfoPtr pFontInfo, FontFilePtr file ); + extern int pcfWriteFont ( FontPtr pFont, FontFilePtr file ); +-extern void pcfError ( const char *, ... ) _X_ATTRIBUTE_PRINTF(1, 2); ++extern void pcfError ( const char *, ... ); + + #endif /* _PCF_H_ */ diff --git a/patches/rxvt-font.patch b/patches/rxvt-font.patch new file mode 100644 index 0000000..d09f3b5 --- /dev/null +++ b/patches/rxvt-font.patch @@ -0,0 +1,17 @@ +diff -rauN rxvt/src/feature.h rxvt-font-patch/src/feature.h +--- rxvt/src/feature.h 2000-07-05 09:26:17.000000000 +0200 ++++ rxvt-font-patch/src/feature.h 2023-07-29 18:24:33.175186686 +0200 +@@ -376,10 +376,10 @@ + * sets (NFONT_LIST) have been matched up + */ + #ifndef MULTICHAR_SET /* no Kanji or Big5 or GB support */ +-# define NFONTS 5 +-# define FONT0_IDX 2 ++# define NFONTS 1 ++# define FONT0_IDX 0 + # undef MFONT_LIST +-# define NFONT_LIST "7x14", "6x10", "6x13", "8x13", "9x15" ++# define NFONT_LIST "fixed" + #endif + #ifdef KANJI + # define NFONTS 5 diff --git a/scripts/build.sh b/scripts/build.sh index 23901ea..506256c 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -69,6 +69,32 @@ else echo "stage0 musl C library exists" fi +# tools on the host (assuming we use i386 code compiled with tcc and run +# on a AMD64/i386 host) + +cd "${BASE}" + +if [ ! -x "${BASE}/tools/rdev" ]; then + "${BASE}/build/stage1/bin/i386-tcc" -static -o tools/rdev tools/rdev.c +else + echo "tool rdev exists" +fi + +cd "${BASE}/src/stage1" + +if [ ! -f "${BASE}/tools/bdftopcf" ]; then + rm -rf "bdftopcf-${BDFTOPCF_VERSION}" + tar xf "${BASE}/downloads/bdftopcf-${BDFTOPCF_VERSION}.tar.gz" + cd "bdftopcf-${BDFTOPCF_VERSION}" + patch -Np1 < "${BASE}/patches/bdftopcf-tcc.patch" + "${BASE}/build/stage1/bin/i386-tcc" -static -I. -DPACKAGE_STRING='"bdftopdf ${BDFTOPCF_VERSION}"' -o "${BASE}/tools/bdftopcf" *.c + cd .. +else + echo "tool bdftopcf exists" +fi + +cd .. + # build tcc with tcc from stage1 against musl from stage0, it should # have no dependencies on the host anymore @@ -449,10 +475,25 @@ else echo "stage1 Xfbdev exists" fi +# generate fonts and install them +if [ ! -d "${BASE}/build/stage1/share/X11/fonts" ]; then + rm -rf "font-cursor-misc-${FONT_CURSOR_MISC_VERSION}" + rm -rf "font-misc-misc-${FONT_MISC_MISC_VERSION}" + tar xf "${BASE}/downloads/font-cursor-misc-${FONT_CURSOR_MISC_VERSION}.tar.gz" + tar xf "${BASE}/downloads/font-misc-misc-${FONT_MISC_MISC_VERSION}.tar.gz" + mkdir -p "${BASE}/build/stage1/share/X11/fonts" + cp -dR "${BASE}/local/share/X11/fonts/"* "${BASE}/build/stage1/share/X11/fonts/." + "${BASE}/tools/bdftopcf" -t "font-cursor-misc-${FONT_CURSOR_MISC_VERSION}/cursor.bdf" | gzip -9 > "${BASE}/build/stage1/share/X11/fonts/cursor.pcf.gz" + "${BASE}/tools/bdftopcf" -t "font-misc-misc-${FONT_MISC_MISC_VERSION}/6x13.bdf" | gzip -9 > "${BASE}/build/stage1/share/X11/fonts/6x13-ISO8859-1.pcf.gz" +else + echo "stage1 X11 fonts exist" +fi + if [ ! -f "${BASE}/build/stage1/bin/rxvt" ]; then rm -rf "rxvt-${RXVT_VERSION}" tar xf "${BASE}/downloads/rxvt-${RXVT_VERSION}.tar.gz" cd "rxvt-${RXVT_VERSION}" + patch -Np1 < "${BASE}/patches/rxvt-font.patch" CC="${BASE}/build/stage1/bin/i386-tcc" \ ./configure --enable-static --prefix="${BASE}/build/stage1" \ --x-includes="${BASE}/build/stage1/include" \ @@ -605,18 +646,13 @@ if [ ! -f "${BASE}/build/stage1/boot/boot.img" ]; then cd src nasm -o boot.img boot.asm cp boot.img "${BASE}/build/stage1/boot/boot.img" - cd ../.. + cd .. else echo "stage1 uflbbl exists" fi cd ../.. -# tools on the host -if [ ! -x "${BASE}/tools/rdev" ]; then - tcc -o tools/rdev tools/rdev.c -fi - # ramdisk if [ ! -f "${BASE}/ramdisk.img" ]; then diff --git a/scripts/create_root.sh b/scripts/create_root.sh index f6cb8a8..4fb401a 100755 --- a/scripts/create_root.sh +++ b/scripts/create_root.sh @@ -70,7 +70,7 @@ test -d "${ROOT}"/var || mkdir "${ROOT}"/var test -d "${ROOT}"/var/run || mkdir "${ROOT}"/var/run test -d "${ROOT}"/mnt || mkdir "${ROOT}"/mnt -# copy locally adapted scripts +# copy locally adapted scripts, configuration test -d "${ROOT}/root" || mkdir "${ROOT}/root" cp "${LOCAL}"/root/.profile "${ROOT}/root" cp "${LOCAL}"/root/.xserverrc "${ROOT}/root" @@ -80,7 +80,6 @@ cp -dR "${LOCAL}"/bin/* "${ROOT}/bin" test -d "${ROOT}/etc" || mkdir "${ROOT}/etc" cp -dR "${LOCAL}"/etc/* "${ROOT}/etc" test -d "${ROOT}/share" || mkdir "${ROOT}/share" -cp -dR "${LOCAL}"/share/* "${ROOT}/share" # copy ramdisk, boot loader and kernel to /boot cp ramdisk.img "${ROOT}/boot" diff --git a/scripts/download.sh b/scripts/download.sh index 5bda079..746ddfe 100755 --- a/scripts/download.sh +++ b/scripts/download.sh @@ -148,6 +148,21 @@ if [ ! -f "${BASE}/downloads/rxvt-${RXVT_VERSION}.tar.gz" ]; then "https://sourceforge.net/projects/rxvt/files/rxvt/${RXVT_VERSION}/rxvt-${RXVT_VERSION}.tar.gz/download" fi +if [ ! -f "${BASE}/downloads/bdftopcf-${BDFTOPCF_VERSION}.tar.gz" ]; then + wget -O "${BASE}/downloads/bdftopcf-${BDFTOPCF_VERSION}.tar.gz" \ + "https://www.x.org/archive/individual/app/bdftopcf-${BDFTOPCF_VERSION}.tar.gz" +fi + +if [ ! -f "${BASE}/downloads/font-cursor-misc-${FONT_CURSOR_MISC_VERSION}.tar.gz" ]; then + wget -O "${BASE}/downloads/font-cursor-misc-${FONT_CURSOR_MISC_VERSION}.tar.gz" \ + "https://www.x.org/archive/individual/font/font-cursor-misc-${FONT_CURSOR_MISC_VERSION}.tar.gz" +fi + +if [ ! -f "${BASE}/downloads/font-misc-misc-${FONT_MISC_MISC_VERSION}.tar.gz" ]; then + wget -O "${BASE}/downloads/font-misc-misc-${FONT_MISC_MISC_VERSION}.tar.gz" \ + "https://www.x.org/archive/individual/font/font-misc-misc-${FONT_MISC_MISC_VERSION}.tar.gz" +fi + if [ ! -f "${BASE}/downloads/lua-${LUA_VERSION}.tar.gz" ]; then wget -O "${BASE}/downloads/lua-${LUA_VERSION}.tar.gz" \ "https://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz" diff --git a/tools/rdev.c b/tools/rdev.c index 227239f..edbfa75 100644 --- a/tools/rdev.c +++ b/tools/rdev.c @@ -67,6 +67,10 @@ Wed Jun 22 21:12:29 1994: Applied patches from Dave #include <sys/types.h> #include <sys/stat.h> +#ifndef PATH_MAX +#define PATH_MAX 255 +#endif + /* rdev.c - query/set root device. */ static void |