Rugxulo

Usono, 27.02.2025, 01:01 |
POSIX 2024 (Utilities) (Developers) |
Although it's pretty irrelevant for us (and even DJGPP), I'm still vaguely curious about POSIX, esp. their utilities. (Even OpenWatcom had a mild fascination with POSIX utils.)
* https://en.wikipedia.org/wiki/List_of_POSIX_commands
No huge changes, AFAICT, removed some q* utils and fort77. Added some others (gettext??).
Things I would consider uniquely useful for us (for flexibility):
> awk cp diff find grep mv patch rm sed sort sleep uname uniq vi wc
Things that could sometimes be useful (but less so):
> bc cat cut dd df du file head m4 make sh tail touch tr
Things that are redundant / obsolete / have better alternatives:
> (SCCS) cksum (un)compress ed (un)expand man more nl od tsort
Of course, there are alternative utilities that could be standardized instead. But this list does give a good overview of useful functionality, roughly speaking. |
tkchia

30.03.2025, 16:54
@ Rugxulo
|
POSIX 2024 (Utilities) |
> Things I would consider uniquely useful for us (for flexibility):
> > awk cp diff find grep mv patch rm sed sort sleep uname uniq vi wc
I recently came across wak (https://github.com/raygard/wak), which is a compact implementation of the AWK language.
Thank you! --- https://gitlab.com/tkchia · https://codeberg.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI" |
Oso2k
30.03.2025, 19:45
@ Rugxulo
|
POSIX 2024 (Utilities) |
> Things that could sometimes be useful (but less so):
>
> > bc cat cut dd df du file head m4 make sh tail touch tr
make from djgpp is super useful IMO. I'd also love to see a dd especially if it handled status=progress . 16-bit Real Mode versions would be nice too. One of these days I'll try cross compiling busybox with build-djgpp.
Funny, bard thinks this how it would work. Not sure I agree.
> To cross-compile BusyBox for DJGPP, you'll need a cross-compiler toolchain for the target platform (DOS with DJGPP) and then configure BusyBox to use that toolchain during compilation, ensuring compatibility with the DJGPP environment.[1, 2, 3]
> Here's a more detailed breakdown:
> 1. Obtain the DJGPP Cross-Compiler: [1, 2]
> • Download: You'll need the DJGPP port of GCC, which includes the necessary cross-compiler tools (e.g., i586-pc-msdosdjgpp-gcc). Delorie Software provides information on obtaining it.
> • Install: Extract the downloaded archive and ensure the bin directory containing the cross-compiler tools is in your system's PATH.
> • Set environment variables: You might need to set environment variables like GCC_EXEC_PREFIX to point to the location of the DJGPP GCC installation. [1, 2, 4]
> 2. Configure BusyBox for DJGPP: [5]
> • Obtain BusyBox Source: Download the BusyBox source code from the BusyBox website. [5]
> • Configure: [6]
> • Navigate to the BusyBox source directory. [6]
> • Run ./configure with the following options to specify the target platform and cross-compiler:
> ./configure --target=i586-pc-msdosdjgpp --host=i586-pc-msdosdjgpp --prefix=/usr/local/djgpp
> • --target specifies the target architecture (i586-pc-msdosdjgpp). [3, 6]
> • --host specifies the build machine (i586-pc-msdosdjgpp). [3, 6]
> • --prefix specifies the installation directory for the compiled BusyBox binaries. [3, 6]
> • You might need to adjust the CC and LD environment variables to point to the DJGPP cross-compiler tools if the configuration script doesn't detect them automatically. [4, 6]
> • Build: [6]
> • Run make to compile BusyBox. [6]
> • Run make install DESTDIR=/path/to/your/destination/directory to install the compiled binaries. [6]
> 3. Creating a DOS-Executable Stub (Optional): [1]
> • Exe2coff: Use the exe2coff utility (part of the DJGPP toolchain) to create a COFF image of your BusyBox executable.
> • Combine with Stub: Combine the COFF image with cwsdstub.exe to create a standalone DOS executable. [1]
> 4. Creating a basic root filesystem (Optional): [6]
> • Directory Structure: Create the necessary directory structure: proc, sys, dev, etc/init.d, usr/lib.
> • Mount points: Mount the /proc and /sys filesystems.
> • Device nodes: Populate the /dev nodes.
> • rcS script: Create an etc/init.d/rcS script to mount the filesystems and start the system. [6]
> Example rcS script:
> #!/bin/sh
> mount -t proc none /proc
> mount -t sysfs none /sys
> echo /sbin/mdev > /proc/sys/kernel/hotplug
> /sbin/mdev -s
> Important Notes: [1]
> • DJGPP Documentation: Refer to the Delorie Software DJGPP documentation for detailed information about the DJGPP environment and cross-compilation. [1]
> • BusyBox Configuration: Carefully review the BusyBox configuration options to ensure that the compiled binaries are compatible with the DJGPP environment. [7, 8]
> • Testing: Thoroughly test the compiled BusyBox binaries on a DOS system with DJGPP to ensure they function correctly. [1]
> Generative AI is experimental.
> [1] http://www.delorie.com/howto/djgpp/linux-x-djgpp-revised.html
> [2] http://www.delorie.com/djgpp/v2faq/faq22_9.html
> [3] https://www.gnu.org/s/automake/manual/html_node/Cross_002dCompilation.html
> [4] https://github.com/andrewwutw/build-djgpp
> [5] https://balau82.wordpress.com/2010/03/27/busybox-for-arm-on-qemu/
> [6] https://wiki.beyondlogic.org/index.php?title=Cross_Compiling_BusyBox_for_ARM
> [7] https://stackoverflow.com/questions/49025932/failure-on-cross-compiling-busybox
> [8] https://stackoverflow.com/questions/22409516/how-to-compile-busybox |
tkchia

31.03.2025, 07:40
@ Oso2k
|
POSIX 2024 (Utilities) |
Hello Oso2k,
> Funny, bard thinks this how it would work. Not sure I agree.
> > To cross-compile BusyBox for DJGPP, you'll need a cross-compiler
> > toolchain for the target platform (DOS with DJGPP) and then configure
> > BusyBox to use that toolchain during compilation, ensuring compatibility
> > with the DJGPP environment.[1, 2, 3]
Well, some of the bêtes noires of porting software to MS-DOS are such matters as
(1) converting between CRLF and '\n' line endings,
(2) figuring out how to properly quote and split up command line arguments,
etc.
I guess it is no surprise that a chatbot's output will simply gloss over these difficulties.
Thank you! --- https://gitlab.com/tkchia · https://codeberg.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI" |