add complete build system

master
Clyne 3 years ago
parent 700a1b10b3
commit e5a5b64c61

13
.gitignore vendored

@ -1,2 +1,15 @@
.*
buildroot-2022.02.1.tar.xz
buildroot-2022.02.1/
busybox-1.20.0.tar.bz2
busybox-1.20.0/
linux-5.17.2.tar.xz
linux-5.17.2/
floppy.img
floppy/boot/busyboz
floppy/boot/bzImage
floppy/lib/
modules.img
modules/
preinit/init

@ -1,14 +1,38 @@
# linux-486
This repo provides the files necessary to build a Linux-based "operating system" for old i486 systems with at least 8MB of RAM.
This repo provides the files necessary to build a Linux-based "operating system" for old i486 systems with at least 8MB of RAM. Build scripts for all components of the sysem are provided. An i486-linux toolchain is also built, enabling you to compile other programs for the system.
The generated single floppy disk image allows you to boot into a Busybox system that is kept entirely in memory, freeing up the floppy disk drive for other disks/data.
The generated boot floppy disk provides you with a Busybox system that is kept entirely in memory. uClibc's shared library files are also loaded into memory, allowing other programs to save on memory (as opposed to using static binaries).
The boot process goes:
* GRUB 0.96 boots Linux.
* Linux loads an embedded initramfs with a "preinit" init binary.
* "preinit" mounts the floppy disk, decompresses busybox into the root ramdisk filesystem, then unmounts the floppy.
* busybox runs its own init process, bringing you to a shell.
A second floppy containing additional kernel modules can also be generated. Both floppies are ext2 formatted.
To test the floppy image with QEMU, provide at least 8320K of RAM.
## Build requirements
* building tools (make, gcc, linux's requirements, etc.)
* bash
* wget
* tar, xz, bzip2
## Build steps
Run the build scripts in this order:
1. `build-toolchain.sh` (after this script, add ~/i486-linux/bin to your PATH)
2. `build-linux.sh`
3. `build-busybox.sh`
4. `build-floppy.sh`
5. `build-modules.sh`
After successful execution of all scripts, you should have `floppy.img` (boot image) and `modules.img` (modules). These can be `dd`'d to a 1.44M 3.5" floppy disk.
## Booting the system
The system requires an i486 or better processor, a 3.5" floppy drive, and at least 8MB of RAM (8320K for QEMU).
Notes:
* Once the system is booted, the floppy disk can be removed.
* root's password is `toor`.
* Mount the modules floppy to `/lib/modules`; then, use `modprobe` for loading and unloading.
* The `msdos` module may need to be loaded to read MS-DOS/FAT floppies.

Binary file not shown.

@ -0,0 +1,21 @@
#!/bin/bash
if [ ! -e ./busybox-1.20.0.tar.bz2 ] ; then
echo "Fetching busybox..."
wget https://www.busybox.net/downloads/busybox-1.20.0.tar.bz2
fi
if [ ! -e ./busybox-1.20.0 ] ; then
echo "Extracting busybox..."
tar xf busybox-1.20.0.tar.bz2
cp config-busybox-1.20.0 busybox-1.20.0/.config
cd busybox-1.20.0
patch include/libbb.h < ../busybox/libbb.h.patch
cd ..
fi
make -C busybox-1.20.0 -j8
lzma -zc9 busybox-1.20.0/busybox > floppy/boot/busyboz
echo "Busybox is now installed to the floppy folder."

@ -0,0 +1,17 @@
#!/bin/bash
dd if=/dev/zero of=floppy.img bs=1k count=1440
mkfs.ext2 -b 1024 -i 65536 -I 128 -m 0 -r 0 -T floppy -d floppy floppy.img
sudo mount floppy.img /mnt -oloop
sudo mkdir /mnt/dev
sudo mount devtmpfs /mnt/dev -t devtmpfs
sudo chown -R root:root /mnt/*
sudo lilo -v -g -b /dev/loop0 -r /mnt -C /boot/lilo.conf
sudo umount /mnt/dev
sudo rmdir /mnt/dev
df -h /mnt
sudo umount /mnt

@ -0,0 +1,38 @@
#!/bin/bash
if [ ! -e ./linux-5.17.2.tar.xz ] ; then
echo "Fetching Linux..."
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.17.2.tar.xz
fi
if [ ! -e ./linux-5.17.2 ] ; then
echo "Extracting Linux..."
tar xf ./linux-5.17.2.tar.xz
cp config-5.17.2tiny ./linux-5.17.2/.config
cd ./linux-5.17.2
echo "Patching Linux..."
patch usr/gen_initramfs.sh < ../linux/patches/gen_initramfs.sh.patch
# TODO: Other patches necessary? They do save some space...
else
cd ./linux-5.17.2
fi
echo "Creating initramfs file structure..."
sudo rm -rf initrd
mkdir -p initrd/{bin,dev/pts,etc/init.d,lib/modules,mnt,proc,root,run,sys}
cp ../linux/{fstab,group,inittab,passwd} initrd/etc
make -C ../preinit
cp ../preinit/init initrd/init
echo "Calling sudo to create initramfs's /dev/console..."
sudo mknod initrd/dev/console c 5 1
echo "Building Linux..."
make -j8
echo "Calling sudo to copy bzImage to the floppy folder..."
sudo cp arch/x86/boot/bzImage ../floppy/boot/bzImage

@ -0,0 +1,22 @@
#!/bin/bash
echo "Building ./modules/ floppy folder..."
rm -rf ./modules
INSTALL_MOD_PATH=$(pwd)/modules make -C linux-5.17.2 modules_install
mv modules/lib/modules/* modules/
rmdir modules/lib/modules modules/lib
rm modules/5.17.2clyne/{source,build}
find modules/ -type f -name "*.ko" -exec strip --strip-debug {} \;
du -sh ./modules
echo "Creating modules.img..."
dd if=/dev/zero of=modules.img bs=1k count=1440
mkfs.vfat -F 12 modules.img
sudo mount -oloop modules.img /mnt
sudo cp -R modules/* /mnt/
sudo chown root:root /mnt/*
df -h /mnt
sudo umount /mnt

@ -0,0 +1,29 @@
#!/bin/bash
if [ ! -e ./buildroot-2022.02.1.tar.xz ] ; then
echo "Fetching buildroot..."
wget https://buildroot.org/downloads/buildroot-2022.02.1.tar.xz
fi
if [ ! -e ./buildroot-2022.02.1 ] ; then
echo "Extracting buildroot..."
tar xf buildroot-2022.02.1.tar.xz
cp config-buildroot-2022.02.1 buildroot-2022.02.1/.config
cp config-uclibc buildroot-2022.02.1/config-uclibc
fi
echo "Building with sudo..."
sudo make -C buildroot-2022.02.1 toolchain -j8
echo "Installing i486-linux toolchain to ~ (and adding to PATH)..."
cp -R buildroot-2022.02.1/output/host ~/i486-linux
export PATH=$PATH:~/i486-linux/bin
echo "Copying libc files to the floppy folder..."
mkdir floppy/lib
sudo strip buildroot-2022.02.1/output/target/lib/ld-uClibc-1.0.40.so
sudo strip buildroot-2022.02.1/output/target/lib/libuClibc-1.0.40.so
sudo bash -c "lzma -zc9 buildroot-2022.02.1/output/target/lib/ld-uClibc-1.0.40.so > floppy/lib/lduClibc.lzm"
sudo bash -c "lzma -zc9 buildroot-2022.02.1/output/target/lib/libuClibc-1.0.40.so > floppy/lib/libc.lzm"

@ -1,8 +0,0 @@
#!/bin/bash
cp base.img floppy.img
sudo mount -oloop floppy.img /mnt
sudo chown -R root:root floppy/
sudo rsync -av floppy/ /mnt/
df -h /mnt
sudo umount /mnt

@ -0,0 +1,10 @@
--- include/libbb.h 2012-04-21 21:33:23.000000000 -0400
+++ include/libbb.h.new 2022-04-29 20:49:40.674509941 -0400
@@ -40,6 +40,7 @@
#include <sys/poll.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
+#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>

@ -2,9 +2,9 @@
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.17.2 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 11.2.0-20) 11.2.0"
CONFIG_CC_VERSION_TEXT="gcc (Debian 11.3.0-1) 11.3.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110200
CONFIG_GCC_VERSION=110300
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23800
@ -28,7 +28,7 @@ CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
# CONFIG_WERROR is not set
CONFIG_LOCALVERSION="tiny"
CONFIG_LOCALVERSION="clyne"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_BUILD_SALT=""
CONFIG_HAVE_KERNEL_GZIP=y
@ -157,7 +157,7 @@ CONFIG_HAVE_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
CONFIG_EXPERT=y
CONFIG_UID16=y
# CONFIG_UID16 is not set
CONFIG_MULTIUSER=y
# CONFIG_SGETMASK_SYSCALL is not set
# CONFIG_SYSFS_SYSCALL is not set
@ -173,7 +173,7 @@ CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
# CONFIG_SHMEM is not set
# CONFIG_AIO is not set
# CONFIG_IO_URING is not set
CONFIG_ADVISE_SYSCALLS=y
@ -287,7 +287,7 @@ CONFIG_CPU_SUP_UMC_32=y
CONFIG_CPU_SUP_ZHAOXIN=y
CONFIG_CPU_SUP_VORTEX_32=y
# CONFIG_HPET_TIMER is not set
CONFIG_DMI=y
# CONFIG_DMI is not set
CONFIG_NR_CPUS_RANGE_BEGIN=1
CONFIG_NR_CPUS_RANGE_END=1
CONFIG_NR_CPUS_DEFAULT=1
@ -378,7 +378,6 @@ CONFIG_ISA=y
# CONFIG_OLPC is not set
# CONFIG_ALIX is not set
# CONFIG_NET5501 is not set
# CONFIG_GEOS is not set
# end of Bus options (PCI etc.)
#
@ -570,7 +569,7 @@ CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y
CONFIG_BINFMT_ELF=y
CONFIG_ELFCORE=y
CONFIG_BINFMT_SCRIPT=m
# CONFIG_BINFMT_MISC is not set
CONFIG_BINFMT_MISC=m
# CONFIG_COREDUMP is not set
# end of Executable file formats
@ -638,7 +637,7 @@ CONFIG_HAVE_PCI=y
# CONFIG_UEVENT_HELPER is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_DEVTMPFS_SAFE is not set
CONFIG_DEVTMPFS_SAFE=y
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
@ -674,9 +673,6 @@ CONFIG_GENERIC_CPU_VULNERABILITIES=y
# CONFIG_EDD is not set
# CONFIG_FIRMWARE_MEMMAP is not set
CONFIG_DMIID=y
# CONFIG_DMI_SYSFS is not set
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# CONFIG_FW_CFG_SYSFS is not set
CONFIG_SYSFB=y
# CONFIG_SYSFB_SIMPLEFB is not set
@ -694,8 +690,8 @@ CONFIG_SYSFB=y
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
CONFIG_PARPORT_PC_FIFO=y
CONFIG_PARPORT_PC_SUPERIO=y
# CONFIG_PARPORT_AX88796 is not set
# CONFIG_PARPORT_1284 is not set
# CONFIG_PNP is not set
@ -761,7 +757,7 @@ CONFIG_SCSI_DMA=y
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
# CONFIG_CHR_DEV_ST is not set
CONFIG_CHR_DEV_ST=m
# CONFIG_BLK_DEV_SR is not set
# CONFIG_CHR_DEV_SG is not set
# CONFIG_BLK_DEV_BSG is not set
@ -799,8 +795,11 @@ CONFIG_INPUT=y
#
# Userland interfaces
#
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_JOYDEV is not set
CONFIG_INPUT_MOUSEDEV=m
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=m
# CONFIG_INPUT_EVBUG is not set
@ -812,7 +811,6 @@ CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_OPENCORES is not set
# CONFIG_KEYBOARD_SAMSUNG is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
@ -838,7 +836,9 @@ CONFIG_SERIO_RAW=m
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_SERIO_ARC_PS2 is not set
# CONFIG_USERIO is not set
# CONFIG_GAMEPORT is not set
CONFIG_GAMEPORT=m
CONFIG_GAMEPORT_NS558=m
# CONFIG_GAMEPORT_L4 is not set
# end of Hardware I/O ports
# end of Input device support
@ -883,13 +883,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_LANTIQ is not set
# CONFIG_SERIAL_SCCNXP is not set
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_BCM63XX is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_ARC is not set
# CONFIG_SERIAL_FSL_LPUART is not set
# CONFIG_SERIAL_FSL_LINFLEXUART is not set
# CONFIG_SERIAL_SPRD is not set
# end of Serial drivers
# CONFIG_SERIAL_NONSTANDARD is not set
@ -992,12 +990,11 @@ CONFIG_BCMA_POSSIBLE=y
#
CONFIG_FB_CMDLINE=y
CONFIG_FB_NOTIFY=y
CONFIG_FB=y
CONFIG_FB=m
# CONFIG_FIRMWARE_EDID is not set
CONFIG_FB_BOOT_VESA_SUPPORT=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_CFB_FILLRECT=m
CONFIG_FB_CFB_COPYAREA=m
CONFIG_FB_CFB_IMAGEBLIT=m
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_MODE_HELPERS is not set
# CONFIG_FB_TILEBLITTING is not set
@ -1006,8 +1003,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
# Frame buffer hardware drivers
#
# CONFIG_FB_ARC is not set
CONFIG_FB_VGA16=y
CONFIG_FB_VESA=y
CONFIG_FB_VGA16=m
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_OPENCORES is not set
@ -1025,7 +1021,7 @@ CONFIG_FB_VESA=y
# CONFIG_BACKLIGHT_CLASS_DEVICE is not set
# end of Backlight & LCD device support
CONFIG_VGASTATE=y
CONFIG_VGASTATE=m
#
# Console display driver support
@ -1039,13 +1035,9 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set
# end of Console display driver support
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
CONFIG_LOGO_LINUX_VGA16=y
# CONFIG_LOGO_LINUX_CLUT224 is not set
# CONFIG_LOGO is not set
# end of Graphics support
# CONFIG_SOUND is not set
@ -1096,10 +1088,7 @@ CONFIG_RTC_MC146818_LIB=y
# CONFIG_CHROME_PLATFORMS is not set
# CONFIG_MELLANOX_PLATFORM is not set
# CONFIG_SURFACE_PLATFORMS is not set
CONFIG_HAVE_CLK=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_COMMON_CLK=y
# CONFIG_XILINX_VCU is not set
# CONFIG_COMMON_CLK is not set
# CONFIG_HWSPINLOCK is not set
#
@ -1238,7 +1227,7 @@ CONFIG_CLKBLD_I8253=y
CONFIG_DCACHE_WORD_ACCESS=y
# CONFIG_VALIDATE_FS_PARSER is not set
CONFIG_FS_IOMAP=y
CONFIG_EXT2_FS=m
CONFIG_EXT2_FS=y
# CONFIG_EXT2_FS_XATTR is not set
# CONFIG_EXT3_FS is not set
# CONFIG_EXT4_FS is not set
@ -1281,13 +1270,17 @@ CONFIG_EXT2_FS=m
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=m
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="437"
CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
# CONFIG_FAT_DEFAULT_UTF8 is not set
# CONFIG_EXFAT_FS is not set
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS3_FS is not set
CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
# CONFIG_NTFS_RW is not set
CONFIG_NTFS3_FS=m
# CONFIG_NTFS3_LZX_XPRESS is not set
# CONFIG_NTFS3_FS_POSIX_ACL is not set
# end of DOS/FAT/EXFAT/NT Filesystems
#
@ -1301,11 +1294,7 @@ CONFIG_PROC_CHILDREN=y
CONFIG_PROC_PID_ARCH_STATUS=y
CONFIG_KERNFS=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_TMPFS_XATTR is not set
# CONFIG_HUGETLBFS is not set
CONFIG_MEMFD_CREATE=y
# CONFIG_CONFIGFS_FS is not set
# end of Pseudo filesystems
@ -1335,7 +1324,7 @@ CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
CONFIG_NLS_ASCII=y
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
@ -1360,7 +1349,7 @@ CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_MAC_INUIT is not set
# CONFIG_NLS_MAC_ROMANIAN is not set
# CONFIG_NLS_MAC_TURKISH is not set
# CONFIG_NLS_UTF8 is not set
CONFIG_NLS_UTF8=m
# CONFIG_UNICODE is not set
# end of File systems
@ -1392,18 +1381,143 @@ CONFIG_CC_HAS_ZERO_CALL_USED_REGS=y
# end of Kernel hardening options
# end of Security options
# CONFIG_CRYPTO is not set
CONFIG_CRYPTO=m
#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=m
CONFIG_CRYPTO_ALGAPI2=m
CONFIG_CRYPTO_HASH=m
CONFIG_CRYPTO_HASH2=m
# CONFIG_CRYPTO_MANAGER is not set
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_TEST is not set
#
# Public-key cryptography
#
# CONFIG_CRYPTO_RSA is not set
# CONFIG_CRYPTO_DH is not set
# CONFIG_CRYPTO_ECDH is not set
# CONFIG_CRYPTO_ECDSA is not set
# CONFIG_CRYPTO_ECRDSA is not set
# CONFIG_CRYPTO_SM2 is not set
# CONFIG_CRYPTO_CURVE25519 is not set
#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_CHACHA20POLY1305 is not set
# CONFIG_CRYPTO_AEGIS128 is not set
# CONFIG_CRYPTO_SEQIV is not set
# CONFIG_CRYPTO_ECHAINIV is not set
#
# Block modes
#
# CONFIG_CRYPTO_CBC is not set
# CONFIG_CRYPTO_CFB is not set
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
# CONFIG_CRYPTO_ECB is not set
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_OFB is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set
# CONFIG_CRYPTO_KEYWRAP is not set
# CONFIG_CRYPTO_ADIANTUM is not set
# CONFIG_CRYPTO_ESSIV is not set
#
# Hash modes
#
# CONFIG_CRYPTO_CMAC is not set
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_VMAC is not set
#
# Digest
#
CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_CRC32C_INTEL is not set
# CONFIG_CRYPTO_CRC32 is not set
# CONFIG_CRYPTO_CRC32_PCLMUL is not set
# CONFIG_CRYPTO_XXHASH is not set
# CONFIG_CRYPTO_BLAKE2B is not set
# CONFIG_CRYPTO_BLAKE2S is not set
# CONFIG_CRYPTO_CRCT10DIF is not set
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_POLY1305 is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_SHA3 is not set
# CONFIG_CRYPTO_SM3 is not set
# CONFIG_CRYPTO_STREEBOG is not set
# CONFIG_CRYPTO_WP512 is not set
#
# Ciphers
#
# CONFIG_CRYPTO_AES is not set
# CONFIG_CRYPTO_AES_TI is not set
# CONFIG_CRYPTO_AES_NI_INTEL is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_CHACHA20 is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_SERPENT_SSE2_586 is not set
# CONFIG_CRYPTO_SM4 is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_TWOFISH_586 is not set
#
# Compression
#
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_LZO is not set
# CONFIG_CRYPTO_842 is not set
# CONFIG_CRYPTO_LZ4 is not set
# CONFIG_CRYPTO_LZ4HC is not set
# CONFIG_CRYPTO_ZSTD is not set
#
# Random Number Generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_DRBG_MENU is not set
# CONFIG_CRYPTO_JITTERENTROPY is not set
# CONFIG_CRYPTO_HW is not set
#
# Certificates for signature checking
#
# end of Certificates for signature checking
#
# Library routines
#
# CONFIG_PACKING is not set
CONFIG_BITREVERSE=y
CONFIG_BITREVERSE=m
CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
# CONFIG_CORDIC is not set
# CONFIG_PRIME_NUMBERS is not set
CONFIG_RATIONAL=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_IOMAP=y
CONFIG_ARCH_HAS_FAST_MULTIPLIER=y
@ -1413,16 +1527,18 @@ CONFIG_ARCH_USE_SYM_ANNOTATIONS=y
# Crypto library routines
#
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
# CONFIG_CRYPTO_LIB_CHACHA is not set
# CONFIG_CRYPTO_LIB_CURVE25519 is not set
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
# CONFIG_CRYPTO_LIB_POLY1305 is not set
# CONFIG_CRYPTO_LIB_CHACHA20POLY1305 is not set
# end of Crypto library routines
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
CONFIG_CRC16=m
# CONFIG_CRC_T10DIF is not set
# CONFIG_CRC_ITU_T is not set
CONFIG_CRC32=y
CONFIG_CRC32=m
# CONFIG_CRC32_SELFTEST is not set
CONFIG_CRC32_SLICEBY8=y
# CONFIG_CRC32_SLICEBY4 is not set
@ -1445,7 +1561,7 @@ CONFIG_HAVE_GENERIC_VDSO=y
CONFIG_GENERIC_GETTIMEOFDAY=y
CONFIG_GENERIC_VDSO_32=y
CONFIG_GENERIC_VDSO_TIME_NS=y
CONFIG_FONT_SUPPORT=y
CONFIG_FONT_SUPPORT=m
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Busybox version: 1.20.0
# Wed Apr 20 14:54:07 2022
# Fri Apr 29 20:13:59 2022
#
CONFIG_HAVE_DOT_CONFIG=y
@ -22,15 +22,15 @@ CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
CONFIG_SHOW_USAGE=y
# CONFIG_FEATURE_VERBOSE_USAGE is not set
CONFIG_FEATURE_COMPRESS_USAGE=y
# CONFIG_FEATURE_COMPRESS_USAGE is not set
CONFIG_FEATURE_INSTALLER=y
CONFIG_INSTALL_NO_USR=y
# CONFIG_LOCALE_SUPPORT is not set
# CONFIG_UNICODE_SUPPORT is not set
# CONFIG_UNICODE_USING_LOCALE is not set
CONFIG_LOCALE_SUPPORT=y
CONFIG_UNICODE_SUPPORT=y
CONFIG_UNICODE_USING_LOCALE=y
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
CONFIG_SUBST_WCHAR=0
CONFIG_LAST_SUPPORTED_WCHAR=0
CONFIG_SUBST_WCHAR=63
CONFIG_LAST_SUPPORTED_WCHAR=767
# CONFIG_UNICODE_COMBINING_WCHARS is not set
# CONFIG_UNICODE_WIDE_WCHARS is not set
# CONFIG_UNICODE_BIDI_SUPPORT is not set
@ -39,8 +39,8 @@ CONFIG_LAST_SUPPORTED_WCHAR=0
# CONFIG_LONG_OPTS is not set
CONFIG_FEATURE_DEVPTS=y
# CONFIG_FEATURE_CLEAN_UP is not set
CONFIG_FEATURE_UTMP=y
CONFIG_FEATURE_WTMP=y
# CONFIG_FEATURE_UTMP is not set
# CONFIG_FEATURE_WTMP is not set
CONFIG_FEATURE_PIDFILE=y
# CONFIG_FEATURE_SUID is not set
# CONFIG_FEATURE_SUID_CONFIG is not set
@ -54,17 +54,17 @@ CONFIG_FEATURE_SYSLOG=y
#
# Build Options
#
CONFIG_STATIC=y
# CONFIG_STATIC is not set
# CONFIG_PIE is not set
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set
# CONFIG_FEATURE_INDIVIDUAL is not set
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
# CONFIG_LFS is not set
CONFIG_CROSS_COMPILER_PREFIX=""
CONFIG_CROSS_COMPILER_PREFIX="i486-linux-"
CONFIG_SYSROOT=""
CONFIG_EXTRA_CFLAGS="-march=i486 -mtune=i486 -fno-if-conversion -fno-if-conversion2 -Os"
CONFIG_EXTRA_LDFLAGS="-static-libgcc"
CONFIG_EXTRA_CFLAGS=""
CONFIG_EXTRA_LDFLAGS=""
CONFIG_EXTRA_LDLIBS=""
#
@ -126,9 +126,9 @@ CONFIG_IOCTL_HEX2STR_ERROR=y
# Archival Utilities
#
# CONFIG_FEATURE_SEAMLESS_XZ is not set
# CONFIG_FEATURE_SEAMLESS_LZMA is not set
CONFIG_FEATURE_SEAMLESS_LZMA=y
# CONFIG_FEATURE_SEAMLESS_BZ2 is not set
CONFIG_FEATURE_SEAMLESS_GZ=y
# CONFIG_FEATURE_SEAMLESS_GZ is not set
# CONFIG_FEATURE_SEAMLESS_Z is not set
# CONFIG_AR is not set
# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
@ -141,8 +141,8 @@ CONFIG_FEATURE_SEAMLESS_GZ=y
# CONFIG_DPKG is not set
# CONFIG_DPKG_DEB is not set
# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
CONFIG_GUNZIP=y
CONFIG_GZIP=y
# CONFIG_GUNZIP is not set
# CONFIG_GZIP is not set
# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set
CONFIG_GZIP_FAST=0
# CONFIG_LZOP is not set
@ -162,7 +162,7 @@ CONFIG_FEATURE_TAR_UNAME_GNAME=y
# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set
# CONFIG_FEATURE_TAR_SELINUX is not set
# CONFIG_UNCOMPRESS is not set
# CONFIG_UNLZMA is not set
CONFIG_UNLZMA=y
# CONFIG_FEATURE_LZMA_FAST is not set
# CONFIG_LZMA is not set
# CONFIG_UNXZ is not set
@ -189,8 +189,8 @@ CONFIG_TR=y
# CONFIG_FEATURE_TR_CLASSES is not set
# CONFIG_FEATURE_TR_EQUIV is not set
CONFIG_BASE64=y
CONFIG_WHO=y
CONFIG_USERS=y
# CONFIG_WHO is not set
# CONFIG_USERS is not set
CONFIG_CAL=y
CONFIG_CATV=y
# CONFIG_CHGRP is not set
@ -386,7 +386,7 @@ CONFIG_SED=y
# Finding Utilities
#
CONFIG_FIND=y
CONFIG_FEATURE_FIND_PRINT0=y
# CONFIG_FEATURE_FIND_PRINT0 is not set
# CONFIG_FEATURE_FIND_MTIME is not set
# CONFIG_FEATURE_FIND_MMIN is not set
# CONFIG_FEATURE_FIND_PERM is not set
@ -408,7 +408,7 @@ CONFIG_FEATURE_FIND_EXEC=y
# CONFIG_FEATURE_FIND_REGEX is not set
# CONFIG_FEATURE_FIND_CONTEXT is not set
# CONFIG_FEATURE_FIND_LINKS is not set
CONFIG_GREP=y
# CONFIG_GREP is not set
# CONFIG_FEATURE_GREP_EGREP_ALIAS is not set
# CONFIG_FEATURE_GREP_FGREP_ALIAS is not set
# CONFIG_FEATURE_GREP_CONTEXT is not set
@ -432,7 +432,7 @@ CONFIG_FEATURE_USE_INITTAB=y
# CONFIG_FEATURE_KILL_REMOVED is not set
CONFIG_FEATURE_KILL_DELAY=0
CONFIG_FEATURE_INIT_SCTTY=y
CONFIG_FEATURE_INIT_SYSLOG=y
# CONFIG_FEATURE_INIT_SYSLOG is not set
# CONFIG_FEATURE_EXTRA_QUIET is not set
# CONFIG_FEATURE_INIT_COREDUMPS is not set
# CONFIG_FEATURE_INITRD is not set
@ -474,7 +474,7 @@ CONFIG_PASSWD=y
# CONFIG_CHPASSWD is not set
CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des"
CONFIG_SU=y
CONFIG_FEATURE_SU_SYSLOG=y
# CONFIG_FEATURE_SU_SYSLOG is not set
# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
# CONFIG_SULOGIN is not set
# CONFIG_VLOCK is not set
@ -521,7 +521,7 @@ CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"
#
# Linux System Utilities
#
CONFIG_BLOCKDEV=y
# CONFIG_BLOCKDEV is not set
# CONFIG_MDEV is not set
# CONFIG_FEATURE_MDEV_CONF is not set
# CONFIG_FEATURE_MDEV_RENAME is not set
@ -627,11 +627,11 @@ CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
#
# CONFIG_CONSPY is not set
CONFIG_LESS=y
CONFIG_FEATURE_LESS_MAXLINES=9999999
CONFIG_FEATURE_LESS_MAXLINES=65535
# CONFIG_FEATURE_LESS_BRACKETS is not set
# CONFIG_FEATURE_LESS_FLAGS is not set
# CONFIG_FEATURE_LESS_MARKS is not set
CONFIG_FEATURE_LESS_REGEXP=y
# CONFIG_FEATURE_LESS_REGEXP is not set
# CONFIG_FEATURE_LESS_WINCH is not set
# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set
# CONFIG_FEATURE_LESS_DASHCMD is not set
@ -665,7 +665,7 @@ CONFIG_FEATURE_BEEP_LENGTH_MS=30
# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
CONFIG_FEATURE_CROND_DIR=""
# CONFIG_CRONTAB is not set
CONFIG_DC=y
# CONFIG_DC is not set
# CONFIG_FEATURE_DC_LIBM is not set
# CONFIG_DEVFSD is not set
# CONFIG_DEVFSD_MODLOAD is not set
@ -893,11 +893,11 @@ CONFIG_FREE=y
CONFIG_KILL=y
# CONFIG_KILLALL is not set
# CONFIG_KILLALL5 is not set
CONFIG_PGREP=y
# CONFIG_PGREP is not set
# CONFIG_PIDOF is not set
# CONFIG_FEATURE_PIDOF_SINGLE is not set
# CONFIG_FEATURE_PIDOF_OMIT is not set
CONFIG_PKILL=y
# CONFIG_PKILL is not set
CONFIG_PS=y
CONFIG_FEATURE_PS_WIDE=y
CONFIG_FEATURE_PS_LONG=y
@ -997,16 +997,16 @@ CONFIG_FEATURE_SH_EXTRA_QUIET=y
#
# System Logging Utilities
#
CONFIG_SYSLOGD=y
CONFIG_FEATURE_ROTATE_LOGFILE=y
# CONFIG_SYSLOGD is not set
# CONFIG_FEATURE_ROTATE_LOGFILE is not set
# CONFIG_FEATURE_REMOTE_LOG is not set
CONFIG_FEATURE_SYSLOGD_DUP=y
# CONFIG_FEATURE_SYSLOGD_DUP is not set
# CONFIG_FEATURE_SYSLOGD_CFG is not set
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
CONFIG_FEATURE_IPC_SYSLOG=y
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
CONFIG_LOGREAD=y
CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
CONFIG_KLOGD=y
CONFIG_FEATURE_KLOGD_KLOGCTL=y
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
# CONFIG_FEATURE_IPC_SYSLOG is not set
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
# CONFIG_LOGREAD is not set
# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
# CONFIG_KLOGD is not set
# CONFIG_FEATURE_KLOGD_KLOGCTL is not set
# CONFIG_LOGGER is not set

@ -0,0 +1,241 @@
#
# Automatically generated file; DO NOT EDIT.
# uClibc-ng 1.0.40 C Library Configuration
#
# TARGET_aarch64 is not set
# TARGET_alpha is not set
# TARGET_arc is not set
# TARGET_arm is not set
# TARGET_avr32 is not set
# TARGET_bfin is not set
# TARGET_c6x is not set
# TARGET_cris is not set
# TARGET_csky is not set
# TARGET_frv is not set
# TARGET_h8300 is not set
# TARGET_hppa is not set
TARGET_i386=y
# TARGET_ia64 is not set
# TARGET_kvx is not set
# TARGET_lm32 is not set
# TARGET_m68k is not set
# TARGET_metag is not set
# TARGET_microblaze is not set
# TARGET_mips is not set
# TARGET_nds32 is not set
# TARGET_nios2 is not set
# TARGET_or1k is not set
# TARGET_powerpc is not set
# TARGET_riscv64 is not set
# TARGET_sh is not set
# TARGET_sparc is not set
# TARGET_sparc64 is not set
# TARGET_tile is not set
# TARGET_x86_64 is not set
# TARGET_xtensa is not set
#
# Target Architecture Features and Options
#
TARGET_ARCH="i386"
FORCE_OPTIONS_FOR_ARCH=y
# CONFIG_386 is not set
CONFIG_486=y
# CONFIG_586 is not set
# CONFIG_686 is not set
TARGET_SUBARCH="i486"
#
# Using ELF file format
#
ARCH_HAS_DEPRECATED_SYSCALLS=y
ARCH_LITTLE_ENDIAN=y
#
# Using Little Endian
#
ARCH_HAS_MMU=y
ARCH_USE_MMU=y
UCLIBC_HAS_FLOATS=y
UCLIBC_HAS_FPU=y
# DO_C99_MATH is not set
# DO_XSI_MATH is not set
# UCLIBC_HAS_FENV is not set
KERNEL_HEADERS="/home/clyne/Programming/486/buildroot-2022.02.1/output/build/linux-headers-5.17.2/usr/include"
HAVE_DOT_CONFIG=y
#
# General Library Settings
#
DOPIC=y
ARCH_HAS_UCONTEXT=y
HAVE_SHARED=y
# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
LDSO_LDD_SUPPORT=y
# LDSO_CACHE_SUPPORT is not set
LDSO_PRELOAD_ENV_SUPPORT=y
# LDSO_PRELOAD_FILE_SUPPORT is not set
LDSO_STANDALONE_SUPPORT=y
LDSO_PRELINK_SUPPORT=y
# UCLIBC_STATIC_LDCONFIG is not set
# LDSO_RUNPATH is not set
LDSO_SEARCH_INTERP_PATH=y
LDSO_LD_LIBRARY_PATH=y
UCLIBC_CTOR_DTOR=y
# LDSO_GNU_HASH_SUPPORT is not set
# HAS_NO_THREADS is not set
# UCLIBC_HAS_LINUXTHREADS is not set
UCLIBC_HAS_THREADS_NATIVE=y
UCLIBC_HAS_THREADS=y
UCLIBC_HAS_TLS=y
# PTHREADS_DEBUG_SUPPORT is not set
UCLIBC_HAS_SYSLOG=y
UCLIBC_HAS_LFS=y
# MALLOC is not set
# MALLOC_SIMPLE is not set
MALLOC_STANDARD=y
UCLIBC_DYNAMIC_ATEXIT=y
# UCLIBC_HAS_UTMPX is not set
# UCLIBC_SUSV2_LEGACY is not set
UCLIBC_SUSV3_LEGACY=y
UCLIBC_HAS_CONTEXT_FUNCS=y
UCLIBC_SUSV3_LEGACY_MACROS=y
UCLIBC_SUSV4_LEGACY=y
UCLIBC_STRICT_HEADERS=y
# UCLIBC_HAS_STUBS is not set
# UCLIBC_HAS_SHADOW is not set
# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set
# UCLIBC_HAS___PROGNAME is not set
UCLIBC_HAS_PTY=y
ASSUME_DEVPTS=y
UNIX98PTY_ONLY=y
UCLIBC_HAS_GETPT=y
# UCLIBC_HAS_LIBUTIL is not set
UCLIBC_HAS_TM_EXTENSIONS=y
UCLIBC_HAS_TZ_CACHING=y
# UCLIBC_HAS_TZ_FILE is not set
#
# Advanced Library Settings
#
UCLIBC_PWD_BUFFER_SIZE=256
UCLIBC_GRP_BUFFER_SIZE=256
#
# Support various families of functions
#
UCLIBC_LINUX_SPECIFIC=y
UCLIBC_HAS_GNU_ERROR=y
UCLIBC_BSD_SPECIFIC=y
# UCLIBC_HAS_BSD_ERR is not set
# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set
# UCLIBC_HAS_BSD_B64_NTOP_B64_PTON is not set
# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
# UCLIBC_NTP_LEGACY is not set
# UCLIBC_SV4_DEPRECATED is not set
UCLIBC_HAS_REALTIME=y
UCLIBC_HAS_ADVANCED_REALTIME=y
UCLIBC_HAS_EPOLL=y
# UCLIBC_HAS_XATTR is not set
# UCLIBC_HAS_PROFILING is not set
# UCLIBC_HAS_CRYPT_IMPL is not set
UCLIBC_HAS_CRYPT_STUB=y
UCLIBC_HAS_CRYPT=y
UCLIBC_HAS_NETWORK_SUPPORT=y
UCLIBC_HAS_SOCKET=y
UCLIBC_HAS_IPV4=y
UCLIBC_HAS_IPV6=y
# UCLIBC_USE_NETLINK is not set
# UCLIBC_HAS_BSD_RES_CLOSE is not set
UCLIBC_HAS_COMPAT_RES_STATE=y
# UCLIBC_HAS_EXTRA_COMPAT_RES_STATE is not set
UCLIBC_HAS_RESOLVER_SUPPORT=y
#
# String and Stdio Support
#
# UCLIBC_HAS_STRING_GENERIC_OPT is not set
UCLIBC_HAS_STRING_ARCH_OPT=y
UCLIBC_HAS_STDIO_FUTEXES=y
UCLIBC_HAS_CTYPE_TABLES=y
UCLIBC_HAS_CTYPE_SIGNED=y
UCLIBC_HAS_CTYPE_UNSAFE=y
# UCLIBC_HAS_CTYPE_CHECKED is not set
# UCLIBC_HAS_CTYPE_ENFORCED is not set
UCLIBC_HAS_WCHAR=y
UCLIBC_HAS_LIBICONV=y
UCLIBC_HAS_LIBINTL=y
# UCLIBC_HAS_LOCALE is not set
# UCLIBC_HAS_HEXADECIMAL_FLOATS is not set
UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
UCLIBC_HAS_STDIO_BUFSIZ_4096=y
# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
UCLIBC_HAS_STDIO_GETC_MACRO=y
UCLIBC_HAS_STDIO_PUTC_MACRO=y
UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
# UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE is not set
# UCLIBC_HAS_GLIBC_CUSTOM_STREAMS is not set
UCLIBC_HAS_PRINTF_M_SPEC=y
UCLIBC_HAS_ERRNO_MESSAGES=y
# UCLIBC_HAS_SYS_ERRLIST is not set
UCLIBC_HAS_SIGNUM_MESSAGES=y
# UCLIBC_HAS_SYS_SIGLIST is not set
UCLIBC_HAS_GNU_GETOPT=y
UCLIBC_HAS_GETOPT_LONG=y
UCLIBC_HAS_GNU_GETSUBOPT=y
# UCLIBC_HAS_ARGP is not set
#
# Big and Tall
#
UCLIBC_HAS_REGEX=y
UCLIBC_HAS_FNMATCH=y
UCLIBC_HAS_WORDEXP=y
# UCLIBC_HAS_NFTW is not set
# UCLIBC_HAS_FTW is not set
# UCLIBC_HAS_FTS is not set
UCLIBC_HAS_GLOB=y
UCLIBC_HAS_GNU_GLOB=y
#
# Library Installation Options
#
RUNTIME_PREFIX="/"
DEVEL_PREFIX="/usr"
MULTILIB_DIR="lib"
HARDWIRED_ABSPATH=y
#
# Security options
#
# UCLIBC_BUILD_PIE is not set
# UCLIBC_HAS_SSP is not set
UCLIBC_BUILD_RELRO=y
UCLIBC_BUILD_NOW=y
UCLIBC_BUILD_NOEXECSTACK=y
#
# Development/debugging options
#
CROSS_COMPILER_PREFIX="/home/clyne/Programming/486/buildroot-2022.02.1/output/host/bin/i486-buildroot-linux-uclibc-"
UCLIBC_EXTRA_CFLAGS=""
# DODEBUG is not set
DOSTRIP=y
# DOASSERTS is not set
# SUPPORT_LD_DEBUG is not set
# SUPPORT_LD_DEBUG_EARLY is not set
# UCLIBC_MALLOC_DEBUGGING is not set
# UCLIBC_HAS_BACKTRACE is not set
WARNINGS=""
# EXTRA_WARNINGS is not set

@ -1,9 +0,0 @@
default 0
root (fd0)
title Clyne/Linux
kernel /boot/bzImage root=/dev/ram0 rw vga=788
title Reboot
reboot

Binary file not shown.

Binary file not shown.

@ -0,0 +1,11 @@
disk=/dev/loop0
bios=0
sectors=18
heads=2
cylinders=80
backup=/dev/null
install=text
compact
image=/boot/bzImage
label=linux
append="root=/dev/ram0 rw"

@ -0,0 +1,5 @@
none /proc proc defaults 0 0
#devpts /dev/pts devpts gid=5,mode=620 0 0
#devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /run tmpfs defaults 0 0

@ -0,0 +1 @@
root::0:root

@ -0,0 +1,51 @@
# Note: BusyBox init works just fine without an inittab. If no inittab is
# found, it has the following default behavior:
# ::sysinit:/etc/init.d/rcS
# ::askfirst:/bin/sh
# ::ctrlaltdel:/sbin/reboot
# ::shutdown:/sbin/swapoff -a
# ::shutdown:/bin/umount -a -r
# ::restart:/sbin/init
# tty2::askfirst:/bin/sh
# tty3::askfirst:/bin/sh
# tty4::askfirst:/bin/sh
#
# Boot-time system configuration/initialization script.
# This is run first except when booting in single-user mode.
#
#::sysinit:/etc/init.d/rcS
::sysinit:/bin/mount -a
# /bin/sh invocations on selected ttys
#
# Note below that we prefix the shell commands with a "-" to indicate to the
# shell that it is supposed to be a login shell. Normally this is handled by
# login, but since we are bypassing login in this case, BusyBox lets you do
# this yourself...
#
# Start an "askfirst" shell on the console (whatever that may be)
::askfirst:-/bin/sh
# Start an "askfirst" shell on /dev/tty2-4
#tty2::askfirst:-/bin/sh
#tty3::askfirst:-/bin/sh
#tty4::askfirst:-/bin/sh
# /bin/getty invocations for selected ttys
#tty4::respawn:/bin/getty 38400 tty5
#tty5::respawn:/bin/getty 38400 tty6
# Example of how to put a getty on a serial line (for a terminal)
::respawn:/bin/getty -L ttyS0 9600 vt100
#::respawn:/bin/getty -L ttyS1 9600 vt100
#
# Example how to put a getty on a modem line.
#::respawn:/bin/getty 57600 ttyS2
# Stuff to do when restarting the init process
::restart:/bin/init
# Stuff to do before rebooting
#::ctrlaltdel:/bin/reboot
::shutdown:/bin/umount -a -r
#::shutdown:/bin/swapoff -a

@ -0,0 +1 @@
root:Dtd09GUh1f5sY:0:0:root:/root:/bin/sh

@ -0,0 +1,156 @@
--- arch/x86/kernel/cpu/bugs.c.new 2022-04-21 10:22:57.337425325 -0400
+++ arch/x86/kernel/cpu/bugs.c 2022-04-21 10:34:47.550249356 -0400
@@ -36,6 +36,7 @@
#include "cpu.h"
+#ifndef CONFIG_M486
static void __init spectre_v1_select_mitigation(void);
static void __init spectre_v2_select_mitigation(void);
static void __init ssb_select_mitigation(void);
@@ -45,6 +46,7 @@
static void __init taa_select_mitigation(void);
static void __init srbds_select_mitigation(void);
static void __init l1d_flush_select_mitigation(void);
+#endif // CONFIG_M486
/* The base value of the SPEC_CTRL MSR that always has to be preserved. */
u64 x86_spec_ctrl_base;
@@ -112,6 +114,7 @@
if (boot_cpu_has(X86_FEATURE_STIBP))
x86_spec_ctrl_mask |= SPEC_CTRL_STIBP;
+#ifndef CONFIG_M486
/* Select the proper CPU mitigations before patching alternatives: */
spectre_v1_select_mitigation();
spectre_v2_select_mitigation();
@@ -127,6 +130,7 @@
* mitigation until after TAA mitigation selection is done.
*/
mds_print_mitigation();
+#endif // CONFIG_M486
arch_smt_update();
@@ -248,6 +252,7 @@
[MDS_MITIGATION_VMWERV] = "Vulnerable: Clear CPU buffers attempted, no microcode",
};
+#ifndef CONFIG_M486
static void __init mds_select_mitigation(void)
{
if (!boot_cpu_has_bug(X86_BUG_MDS) || cpu_mitigations_off()) {
@@ -274,6 +279,7 @@
pr_info("%s\n", mds_strings[mds_mitigation]);
}
+#endif // CONFIG_M486
static int __init mds_cmdline(char *str)
{
@@ -317,6 +323,7 @@
[TAA_MITIGATION_TSX_DISABLED] = "Mitigation: TSX disabled",
};
+#ifndef CONFIG_M486
static void __init taa_select_mitigation(void)
{
u64 ia32_cap;
@@ -388,6 +395,7 @@
out:
pr_info("%s\n", taa_strings[taa_mitigation]);
}
+#endif // CONFIG_M486
static int __init tsx_async_abort_parse_cmdline(char *str)
{
@@ -463,6 +471,7 @@
wrmsrl(MSR_IA32_MCU_OPT_CTRL, mcu_ctrl);
}
+#ifndef CONFIG_M486
static void __init srbds_select_mitigation(void)
{
u64 ia32_cap;
@@ -487,6 +496,7 @@
update_srbds_msr();
pr_info("%s\n", srbds_strings[srbds_mitigation]);
}
+#endif // CONFIG_M486
static int __init srbds_parse_cmdline(char *str)
{
@@ -504,6 +514,7 @@
#undef pr_fmt
#define pr_fmt(fmt) "L1D Flush : " fmt
+#ifndef CONFIG_M486
enum l1d_flush_mitigations {
L1D_FLUSH_OFF = 0,
L1D_FLUSH_ON,
@@ -528,10 +539,12 @@
return 0;
}
early_param("l1d_flush", l1d_flush_parse_cmdline);
+#endif // CONFIG_M486
#undef pr_fmt
#define pr_fmt(fmt) "Spectre V1 : " fmt
+#ifndef CONFIG_M486
enum spectre_v1_mitigation {
SPECTRE_V1_MITIGATION_NONE,
SPECTRE_V1_MITIGATION_AUTO,
@@ -618,6 +631,7 @@
return 0;
}
early_param("nospectre_v1", nospectre_v1_cmdline);
+#endif // CONFIG_M486
#undef pr_fmt
#define pr_fmt(fmt) "Spectre V2 : " fmt
@@ -729,6 +743,7 @@
{ "seccomp,ibpb", SPECTRE_V2_USER_CMD_SECCOMP_IBPB, false },
};
+#ifndef CONFIG_M486
static void __init spec_v2_user_print_cond(const char *reason, bool secure)
{
if (boot_cpu_has_bug(X86_BUG_SPECTRE_V2) != secure)
@@ -1071,6 +1086,7 @@
/* Set up IBPB and STIBP depending on the general spectre V2 command */
spectre_v2_user_select_mitigation(cmd);
}
+#endif // CONFIG_M486
static void update_stibp_msr(void * __unused)
{
@@ -1207,6 +1223,7 @@
{ "seccomp", SPEC_STORE_BYPASS_CMD_SECCOMP }, /* Disable Speculative Store Bypass via prctl and seccomp */
};
+#ifndef CONFIG_M486
static enum ssb_mitigation_cmd __init ssb_parse_cmdline(void)
{
enum ssb_mitigation_cmd cmd = SPEC_STORE_BYPASS_CMD_AUTO;
@@ -1316,6 +1333,7 @@
if (boot_cpu_has_bug(X86_BUG_SPEC_STORE_BYPASS))
pr_info("%s\n", ssb_strings[ssb_mode]);
}
+#endif // CONFIG_M486
#undef pr_fmt
#define pr_fmt(fmt) "Speculation prctl: " fmt
@@ -1573,6 +1591,7 @@
enum vmx_l1d_flush_state l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_AUTO;
EXPORT_SYMBOL_GPL(l1tf_vmx_mitigation);
+#ifndef CONFIG_M486
/*
* These CPUs all support 44bits physical address space internally in the
* cache but CPUID can report a smaller number of physical address bits.
@@ -1926,3 +1945,4 @@
return cpu_show_common(dev, attr, buf, X86_BUG_SRBDS);
}
#endif
+#endif // CONFIG_M486

@ -0,0 +1,31 @@
--- usr/gen_initramfs.sh 2022-04-08 07:59:05.000000000 -0400
+++ usr/gen_initramfs.sh.new 2022-04-21 08:51:04.635080820 -0400
@@ -187,8 +187,8 @@
}
prog=$0
-root_uid=0
-root_gid=0
+root_uid="squash"
+root_gid="squash"
dep_list=
cpio_list=$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)
output="/dev/stdout"
@@ -209,13 +209,13 @@
shift
;;
"-u") # map $1 to uid=0 (root)
- root_uid="$1"
- [ "$root_uid" = "-1" ] && root_uid=$(id -u || echo 0)
+# root_uid="$1"
+# [ "$root_uid" = "-1" ] && root_uid=$(id -u || echo 0)
shift
;;
"-g") # map $1 to gid=0 (root)
- root_gid="$1"
- [ "$root_gid" = "-1" ] && root_gid=$(id -g || echo 0)
+# root_gid="$1"
+# [ "$root_gid" = "-1" ] && root_gid=$(id -g || echo 0)
shift
;;
"-h")

@ -0,0 +1,386 @@
--- arch/x86/realmode/init.c.new 2022-04-21 08:59:29.875419413 -0400
+++ arch/x86/realmode/init.c 2022-04-21 09:00:11.359752804 -0400
@@ -19,195 +19,195 @@
void load_trampoline_pgtable(void)
{
-#ifdef CONFIG_X86_32
- load_cr3(initial_page_table);
-#else
- /*
- * This function is called before exiting to real-mode and that will
- * fail with CR4.PCIDE still set.
- */
- if (boot_cpu_has(X86_FEATURE_PCID))
- cr4_clear_bits(X86_CR4_PCIDE);
-
- write_cr3(real_mode_header->trampoline_pgd);
-#endif
-
- /*
- * The CR3 write above will not flush global TLB entries.
- * Stale, global entries from previous page tables may still be
- * present. Flush those stale entries.
- *
- * This ensures that memory accessed while running with
- * trampoline_pgd is *actually* mapped into trampoline_pgd.
- */
- __flush_tlb_all();
+//#ifdef CONFIG_X86_32
+// load_cr3(initial_page_table);
+//#else
+// /*
+// * This function is called before exiting to real-mode and that will
+// * fail with CR4.PCIDE still set.
+// */
+// if (boot_cpu_has(X86_FEATURE_PCID))
+// cr4_clear_bits(X86_CR4_PCIDE);
+//
+// write_cr3(real_mode_header->trampoline_pgd);
+//#endif
+//
+// /*
+// * The CR3 write above will not flush global TLB entries.
+// * Stale, global entries from previous page tables may still be
+// * present. Flush those stale entries.
+// *
+// * This ensures that memory accessed while running with
+// * trampoline_pgd is *actually* mapped into trampoline_pgd.
+// */
+// __flush_tlb_all();
}
void __init reserve_real_mode(void)
{
- phys_addr_t mem;
- size_t size = real_mode_size_needed();
-
- if (!size)
- return;
-
- WARN_ON(slab_is_available());
-
- /* Has to be under 1M so we can execute real-mode AP code. */
- mem = memblock_phys_alloc_range(size, PAGE_SIZE, 0, 1<<20);
- if (!mem)
- pr_info("No sub-1M memory is available for the trampoline\n");
- else
- set_real_mode_mem(mem);
-
- /*
- * Unconditionally reserve the entire fisrt 1M, see comment in
- * setup_arch().
- */
- memblock_reserve(0, SZ_1M);
-}
-
-static void sme_sev_setup_real_mode(struct trampoline_header *th)
-{
-#ifdef CONFIG_AMD_MEM_ENCRYPT
- if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
- th->flags |= TH_FLAGS_SME_ACTIVE;
-
- if (cc_platform_has(CC_ATTR_GUEST_STATE_ENCRYPT)) {
- /*
- * Skip the call to verify_cpu() in secondary_startup_64 as it
- * will cause #VC exceptions when the AP can't handle them yet.
- */
- th->start = (u64) secondary_startup_64_no_verify;
-
- if (sev_es_setup_ap_jump_table(real_mode_header))
- panic("Failed to get/update SEV-ES AP Jump Table");
- }
-#endif
-}
-
-static void __init setup_real_mode(void)
-{
- u16 real_mode_seg;
- const u32 *rel;
- u32 count;
- unsigned char *base;
- unsigned long phys_base;
- struct trampoline_header *trampoline_header;
- size_t size = PAGE_ALIGN(real_mode_blob_end - real_mode_blob);
-#ifdef CONFIG_X86_64
- u64 *trampoline_pgd;
- u64 efer;
- int i;
-#endif
-
- base = (unsigned char *)real_mode_header;
-
- /*
- * If SME is active, the trampoline area will need to be in
- * decrypted memory in order to bring up other processors
- * successfully. This is not needed for SEV.
- */
- if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
- set_memory_decrypted((unsigned long)base, size >> PAGE_SHIFT);
-
- memcpy(base, real_mode_blob, size);
-
- phys_base = __pa(base);
- real_mode_seg = phys_base >> 4;
-
- rel = (u32 *) real_mode_relocs;
-
- /* 16-bit segment relocations. */
- count = *rel++;
- while (count--) {
- u16 *seg = (u16 *) (base + *rel++);
- *seg = real_mode_seg;
- }
-
- /* 32-bit linear relocations. */
- count = *rel++;
- while (count--) {
- u32 *ptr = (u32 *) (base + *rel++);
- *ptr += phys_base;
- }
-
- /* Must be performed *after* relocation. */
- trampoline_header = (struct trampoline_header *)
- __va(real_mode_header->trampoline_header);
-
-#ifdef CONFIG_X86_32
- trampoline_header->start = __pa_symbol(startup_32_smp);
- trampoline_header->gdt_limit = __BOOT_DS + 7;
- trampoline_header->gdt_base = __pa_symbol(boot_gdt);
-#else
- /*
- * Some AMD processors will #GP(0) if EFER.LMA is set in WRMSR
- * so we need to mask it out.
- */
- rdmsrl(MSR_EFER, efer);
- trampoline_header->efer = efer & ~EFER_LMA;
-
- trampoline_header->start = (u64) secondary_startup_64;
- trampoline_cr4_features = &trampoline_header->cr4;
- *trampoline_cr4_features = mmu_cr4_features;
-
- trampoline_header->flags = 0;
-
- trampoline_pgd = (u64 *) __va(real_mode_header->trampoline_pgd);
-
- /* Map the real mode stub as virtual == physical */
- trampoline_pgd[0] = trampoline_pgd_entry.pgd;
-
- /*
- * Include the entirety of the kernel mapping into the trampoline
- * PGD. This way, all mappings present in the normal kernel page
- * tables are usable while running on trampoline_pgd.
- */
- for (i = pgd_index(__PAGE_OFFSET); i < PTRS_PER_PGD; i++)
- trampoline_pgd[i] = init_top_pgt[i].pgd;
-#endif
-
- sme_sev_setup_real_mode(trampoline_header);
-}
-
-/*
- * reserve_real_mode() gets called very early, to guarantee the
- * availability of low memory. This is before the proper kernel page
- * tables are set up, so we cannot set page permissions in that
- * function. Also trampoline code will be executed by APs so we
- * need to mark it executable at do_pre_smp_initcalls() at least,
- * thus run it as a early_initcall().
- */
-static void __init set_real_mode_permissions(void)
-{
- unsigned char *base = (unsigned char *) real_mode_header;
- size_t size = PAGE_ALIGN(real_mode_blob_end - real_mode_blob);
-
- size_t ro_size =
- PAGE_ALIGN(real_mode_header->ro_end) -
- __pa(base);
-
- size_t text_size =
- PAGE_ALIGN(real_mode_header->ro_end) -
- real_mode_header->text_start;
-
- unsigned long text_start =
- (unsigned long) __va(real_mode_header->text_start);
-
- set_memory_nx((unsigned long) base, size >> PAGE_SHIFT);
- set_memory_ro((unsigned long) base, ro_size >> PAGE_SHIFT);
- set_memory_x((unsigned long) text_start, text_size >> PAGE_SHIFT);
-}
-
-static int __init init_real_mode(void)
-{
- if (!real_mode_header)
- panic("Real mode trampoline was not allocated");
-
- setup_real_mode();
- set_real_mode_permissions();
-
- return 0;
-}
-early_initcall(init_real_mode);
+// phys_addr_t mem;
+// size_t size = real_mode_size_needed();
+//
+// if (!size)
+// return;
+//
+// WARN_ON(slab_is_available());
+//
+// /* Has to be under 1M so we can execute real-mode AP code. */
+// mem = memblock_phys_alloc_range(size, PAGE_SIZE, 0, 1<<20);
+// if (!mem)
+// pr_info("No sub-1M memory is available for the trampoline\n");
+// else
+// set_real_mode_mem(mem);
+//
+// /*
+// * Unconditionally reserve the entire fisrt 1M, see comment in
+// * setup_arch().
+// */
+// memblock_reserve(0, SZ_1M);
+}
+
+//static void sme_sev_setup_real_mode(struct trampoline_header *th)
+//{
+//#ifdef CONFIG_AMD_MEM_ENCRYPT
+// if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
+// th->flags |= TH_FLAGS_SME_ACTIVE;
+//
+// if (cc_platform_has(CC_ATTR_GUEST_STATE_ENCRYPT)) {
+// /*
+// * Skip the call to verify_cpu() in secondary_startup_64 as it
+// * will cause #VC exceptions when the AP can't handle them yet.
+// */
+// th->start = (u64) secondary_startup_64_no_verify;
+//
+// if (sev_es_setup_ap_jump_table(real_mode_header))
+// panic("Failed to get/update SEV-ES AP Jump Table");
+// }
+//#endif
+//}
+//
+//static void __init setup_real_mode(void)
+//{
+// u16 real_mode_seg;
+// const u32 *rel;
+// u32 count;
+// unsigned char *base;
+// unsigned long phys_base;
+// struct trampoline_header *trampoline_header;
+// size_t size = PAGE_ALIGN(real_mode_blob_end - real_mode_blob);
+//#ifdef CONFIG_X86_64
+// u64 *trampoline_pgd;
+// u64 efer;
+// int i;
+//#endif
+//
+// base = (unsigned char *)real_mode_header;
+//
+// /*
+// * If SME is active, the trampoline area will need to be in
+// * decrypted memory in order to bring up other processors
+// * successfully. This is not needed for SEV.
+// */
+// if (cc_platform_has(CC_ATTR_HOST_MEM_ENCRYPT))
+// set_memory_decrypted((unsigned long)base, size >> PAGE_SHIFT);
+//
+// memcpy(base, real_mode_blob, size);
+//
+// phys_base = __pa(base);
+// real_mode_seg = phys_base >> 4;
+//
+// rel = (u32 *) real_mode_relocs;
+//
+// /* 16-bit segment relocations. */
+// count = *rel++;
+// while (count--) {
+// u16 *seg = (u16 *) (base + *rel++);
+// *seg = real_mode_seg;
+// }
+//
+// /* 32-bit linear relocations. */
+// count = *rel++;
+// while (count--) {
+// u32 *ptr = (u32 *) (base + *rel++);
+// *ptr += phys_base;
+// }
+//
+// /* Must be performed *after* relocation. */
+// trampoline_header = (struct trampoline_header *)
+// __va(real_mode_header->trampoline_header);
+//
+//#ifdef CONFIG_X86_32
+// trampoline_header->start = __pa_symbol(startup_32_smp);
+// trampoline_header->gdt_limit = __BOOT_DS + 7;
+// trampoline_header->gdt_base = __pa_symbol(boot_gdt);
+//#else
+// /*
+// * Some AMD processors will #GP(0) if EFER.LMA is set in WRMSR
+// * so we need to mask it out.
+// */
+// rdmsrl(MSR_EFER, efer);
+// trampoline_header->efer = efer & ~EFER_LMA;
+//
+// trampoline_header->start = (u64) secondary_startup_64;
+// trampoline_cr4_features = &trampoline_header->cr4;
+// *trampoline_cr4_features = mmu_cr4_features;
+//
+// trampoline_header->flags = 0;
+//
+// trampoline_pgd = (u64 *) __va(real_mode_header->trampoline_pgd);
+//
+// /* Map the real mode stub as virtual == physical */
+// trampoline_pgd[0] = trampoline_pgd_entry.pgd;
+//
+// /*
+// * Include the entirety of the kernel mapping into the trampoline
+// * PGD. This way, all mappings present in the normal kernel page
+// * tables are usable while running on trampoline_pgd.
+// */
+// for (i = pgd_index(__PAGE_OFFSET); i < PTRS_PER_PGD; i++)
+// trampoline_pgd[i] = init_top_pgt[i].pgd;
+//#endif
+//
+// sme_sev_setup_real_mode(trampoline_header);
+//}
+//
+///*
+// * reserve_real_mode() gets called very early, to guarantee the
+// * availability of low memory. This is before the proper kernel page
+// * tables are set up, so we cannot set page permissions in that
+// * function. Also trampoline code will be executed by APs so we
+// * need to mark it executable at do_pre_smp_initcalls() at least,
+// * thus run it as a early_initcall().
+// */
+//static void __init set_real_mode_permissions(void)
+//{
+// unsigned char *base = (unsigned char *) real_mode_header;
+// size_t size = PAGE_ALIGN(real_mode_blob_end - real_mode_blob);
+//
+// size_t ro_size =
+// PAGE_ALIGN(real_mode_header->ro_end) -
+// __pa(base);
+//
+// size_t text_size =
+// PAGE_ALIGN(real_mode_header->ro_end) -
+// real_mode_header->text_start;
+//
+// unsigned long text_start =
+// (unsigned long) __va(real_mode_header->text_start);
+//
+// set_memory_nx((unsigned long) base, size >> PAGE_SHIFT);
+// set_memory_ro((unsigned long) base, ro_size >> PAGE_SHIFT);
+// set_memory_x((unsigned long) text_start, text_size >> PAGE_SHIFT);
+//}
+//
+//static int __init init_real_mode(void)
+//{
+// if (!real_mode_header)
+// panic("Real mode trampoline was not allocated");
+//
+// setup_real_mode();
+// set_real_mode_permissions();
+//
+// return 0;
+//}
+//early_initcall(init_real_mode);

@ -0,0 +1,45 @@
--- init/initramfs.c.new 2022-04-21 10:43:58.644900319 -0400
+++ init/initramfs.c 2022-04-21 10:46:57.309758246 -0400
@@ -461,7 +461,7 @@
#include <linux/decompress/generic.h>
-static char * __init unpack_to_rootfs(char *buf, unsigned long len)
+static char * __init do_unpack_to_rootfs(char *buf, unsigned long len, char *output)
{
long written;
decompress_fn decompress;
@@ -497,7 +497,7 @@
decompress = decompress_method(buf, len, &compress_name);
pr_debug("Detected %s compressed data\n", compress_name);
if (decompress) {
- int res = decompress(buf, len, NULL, flush_buffer, NULL,
+ int res = decompress(buf, len, NULL, flush_buffer, output,
&my_inptr, error);
if (res)
error("decompressor failed");
@@ -523,6 +523,11 @@
return message;
}
+static char * __init unpack_to_rootfs(char *buf, unsigned long len)
+{
+ return do_unpack_to_rootfs(buf, len, NULL);
+}
+
static int __initdata do_retain_initrd;
static int __init retain_initrd_param(char *str)
@@ -683,7 +688,11 @@
else
printk(KERN_INFO "Unpacking initramfs...\n");
- err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start);
+ //err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start);
+ void *output = vmalloc(0x80000);
+ err = do_unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start, output);
+ vfree(output);
+
if (err) {
#ifdef CONFIG_BLK_DEV_RAM
populate_initrd_image(err);

@ -0,0 +1,26 @@
--- arch/x86/kernel/cpu/intel.c.new 2022-04-21 10:30:16.303395343 -0400
+++ arch/x86/kernel/cpu/intel.c 2022-04-21 10:31:18.648938081 -0400
@@ -752,6 +752,8 @@
}
#endif
+#ifndef CONFIG_M486
+
#define TLB_INST_4K 0x01
#define TLB_INST_4M 0x02
#define TLB_INST_2M_4M 0x03
@@ -926,6 +928,14 @@
}
}
+#else
+
+static void intel_detect_tlb(struct cpuinfo_x86 *c)
+{
+}
+
+#endif // CONFIG_M486
+
static const struct cpu_dev intel_cpu_dev = {
.c_vendor = "Intel",
.c_ident = { "GenuineIntel" },

@ -0,0 +1,34 @@
--- arch/x86/realmode/rmpiggy.S.new 2022-04-21 09:00:39.636016815 -0400
+++ arch/x86/realmode/rmpiggy.S 2022-04-21 09:00:51.392134904 -0400
@@ -3,17 +3,17 @@
* Wrapper script for the realmode binary as a transport object
* before copying to low memory.
*/
-#include <linux/linkage.h>
-#include <asm/page_types.h>
-
- .section ".init.data","aw"
-
- .balign PAGE_SIZE
-
-SYM_DATA_START(real_mode_blob)
- .incbin "arch/x86/realmode/rm/realmode.bin"
-SYM_DATA_END_LABEL(real_mode_blob, SYM_L_GLOBAL, real_mode_blob_end)
-
-SYM_DATA_START(real_mode_relocs)
- .incbin "arch/x86/realmode/rm/realmode.relocs"
-SYM_DATA_END(real_mode_relocs)
+//#include <linux/linkage.h>
+//#include <asm/page_types.h>
+//
+// .section ".init.data","aw"
+//
+// .balign PAGE_SIZE
+//
+//SYM_DATA_START(real_mode_blob)
+// .incbin "arch/x86/realmode/rm/realmode.bin"
+//SYM_DATA_END_LABEL(real_mode_blob, SYM_L_GLOBAL, real_mode_blob_end)
+//
+//SYM_DATA_START(real_mode_relocs)
+// .incbin "arch/x86/realmode/rm/realmode.relocs"
+//SYM_DATA_END(real_mode_relocs)

@ -0,0 +1,9 @@
#!/bin/sh
echo "Mounting filesystems..."
mount -a
mkdir /dev/pts
mount devpts /dev/pts -t devpts -o gid=5,mode=620
echo "Ready."

@ -1,5 +1,5 @@
all:
gcc -m32 -march=i486 -mtune=i486 -fno-if-conversion -fno-if-conversion2 \
i486-linux-gcc \
-static -nostdlib -nostartfiles -ffreestanding -fno-pic -fno-pie \
-Os -ffunction-sections -fdata-sections -Wl,-gc-sections \
-Ilinux-headers \

@ -745,82 +745,90 @@ __attribute__((naked)) void _start(void)
main();
}
static char ibuffer[0xc0000];
static char obuffer[0x100000];
static void decompress_file_to(char *srcfile, char *dstfile, mode_t mode);
void main()
{
static char ibuffer[0xc0000];
static char obuffer[0x100000];
int ret;
int ifd, ofd;
struct kernel_stat info;
size_t st_size;
ssize_t br;
print("Mounting /dev/fd0...\n");
//devtmpfs /dev devtmpfs mode=0755,nosuid 0 0
ret = sys_mount("devtmpfs", "/dev", "devtmpfs", 0, NULL);
if (ret != 0)
panic("Failed to mount /dev!");
ret = sys_mount("/dev/fd0", "/mnt", "msdos", 0, NULL);
ret = sys_mount("/dev/fd0", "/mnt", "ext2", 0, NULL);
if (ret != 0)
panic("Failed to mount /dev/fd0!");
print("Decompressing busybox...\n");
decompress_file_to("/mnt/boot/busyboz", "/bin/busybox", 0755);
print("Decompressing libc...\n");
decompress_file_to("/mnt/lib/libc.lzm", "/lib/libc.so.0", 0755);
print("Decompressing ld.so...\n");
decompress_file_to("/mnt/lib/lduClibc.lzm", "/lib/ld-uClibc.so.0", 0755);
ret = sys_mount("ramfs", "/bin", "ramfs", 0, NULL);
if (ret != 0)
panic("Failed to mount!");
sys_umount("/mnt");
//sys_umount("/dev");
pid_t cid = sys_fork();
if (cid == 0) {
const char *argv[] = { "/bin/busybox", "--install", "-s", "/bin", NULL };
const char *envp[] = { NULL };
sys_execve("/bin/busybox", argv, envp);
} else {
int ws = 0;
sys_waitpid(cid, &ws, 0);
const char *argv[] = { "init", NULL };
const char *envp[] = { NULL };
sys_execve("/bin/busybox", argv, envp);
}
}
ret = sys_stat("/mnt/boot/busyboz", &info);
void decompress_file_to(char *srcfile, char *dstfile, mode_t mode)
{
int ret;
int ifd, ofd;
struct kernel_stat info;
size_t st_size;
ssize_t br;
ret = sys_stat(srcfile, &info);
if (ret != 0)
panic("Failed to stat busyboz!\n");
panic("Failed to stat srcfile!\n");
st_size = info.st_size;
ifd = sys_open("/mnt/boot/busyboz", O_RDONLY, 0);
ifd = sys_open(srcfile, O_RDONLY, 0);
if (ifd < 0)
panic("Failed to open busyboz!\n");
panic("Failed to open srcfile!\n");
br = sys_read(ifd, ibuffer, st_size);
if (br != st_size)
panic("Failed to read busyboz!\n");
panic("Failed to read srcfile!\n");
sys_close(ifd);
ofd = sys_open("/bin/busybox", O_CREAT | O_RDWR, 0);
ofd = sys_open(dstfile, O_CREAT | O_RDWR, 0);
if (ofd < 0)
panic("Failed to open busybox!\n");
panic("Failed to open dstfile!\n");
unlzma(ibuffer, st_size, NULL, unlzma_flush, obuffer, NULL, panic);
if (ret != 0)
panic("Failed to decompress busyboz!");
panic("Failed to decompress srcfile!");
else if (outlen == 0)
panic("Failed to fully decompress busyboz!");
panic("Failed to fully decompress srcfile!");
br = sys_write(ofd, obuffer, outlen);
if (br != outlen)
panic("Failed to write busybox!\n");
panic("Failed to write dstfile!\n");
sys_close(ofd);
sys_umount("/mnt");
sys_chmod("/bin/busybox", 0755);
pid_t cid = sys_fork();
if (cid == 0) {
const char *argv[] = { "/bin/busybox", "--install", "-s", "/bin", NULL };
const char *envp[] = { NULL };
sys_execve("/bin/busybox", argv, envp);
} else {
int ws = 0;
sys_waitpid(cid, &ws, 0);
const char *argv[] = { "init", NULL };
const char *envp[] = { NULL };
sys_execve("/bin/busybox", argv, envp);
}
sys_chmod(dstfile, mode);
}
int *__errno_location(void)

Loading…
Cancel
Save