Git Product home page Git Product logo

xet7 / gray386linux Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marmolak/gray386linux

0.0 1.0 0.0 135.26 MB

Linux distribution for i386 machines only.

License: BSD 2-Clause "Simplified" License

Shell 0.13% C++ 0.06% Python 0.02% Perl 0.12% C 97.09% Java 0.01% Assembly 2.06% Scilab 0.01% Awk 0.01% UnrealScript 0.01% TeX 0.08% Nix 0.01% Makefile 0.32% HTML 0.03% XS 0.01% Yacc 0.02% Lex 0.01% M4 0.01% GDB 0.01% Roff 0.02%

gray386linux's Introduction

  _______ .______          ___   ____    ____  ____     ___      __   
 /  _____||   _  \        /   \  \   \  /   / |___ \   / _ \    / /   
|  |  __  |  |_)  |      /  ^  \  \   \/   /    __) | | (_) |  / /_   
|  | |_ | |      /      /  /_\  \  \_    _/    |__ <   > _ <  | '_ \  
|  |__| | |  |\  \----./  _____  \   |  |      ___) | | (_) | | (_) | 
 \______| | _| `._____/__/     \__\  |__|     |____/   \___/   \___/  
Linux for i386 machines

Are you interested in Linux on i486 machine? Take a look at gray486linux. Currently, it's not possible to run gray386linux on i486 machines (but it's possible to run gray386linux on Cyrix 486DLC and similar CPUs). However i486 machine is still able to run actual Linux kernel (2022).

How to get binary build?

It's easy. Just take a look at bin directory. There is 2 folders named:

fpu - version for machines with FPU coprocessor installed.

no_fpu - build with software FPU enabled.

NOTE: only AMD cpus are enabled by default now.

NOTE2: gray386 linux is source based distribution so binaries can be older than current configuration.

How to build a gray386 linux

Tested build environment: Fedora 35 with Nix installed.

11. Decide how to build

If you want just default build, and you have installed make and bash then you can just type make in src directory. You are done and GOTO 100. But if you don't like make, you can just type ./graybuild.sh in src directory. In both cases, results will be placed in results directory.

In case you want to make some changes then follow next steps.

20. Get num of cpus

Nix-shell scripts take handle of it.

If you don't want to use nix-shell, just type:

export GR_CPUS=$(nproc --all)

28. Get kernel headers with nix-shell

cd src/build-kernel-env-with-nix/

nix-shell --pure

28. Install kernel headers

make headers_install ARCH=i386 INSTALL_HDR_PATH=../gray386/

29. Leave nix-shell

exit

30. Build user env with nix-shell

cd src/build-env-with-nix/

nix-shell --pure

40. Build musl libc

CFLAGS="$CFLAGS -I$(realpath "${PWD}/../gray386/include")" ./configure --target=i386 --prefix=$(realpath "${PWD}/../gray386/")

make -j"$GR_CPUS"

make install

50. Build busybox

(optional) make menuconfig

make -j"$GR_CPUS"

make install

51. (optional) Build dropbear SSH client (+~266 K)

autoconf; autoheader

CC="$(realpath $PWD/../gray386/bin/musl-gcc)" ./configure --enable-static --enable-bundled-libtom --disable-syslog --disable-harden --disable-zlib --disable-shadow --disable-utmp --disable-utmpx --disable-wtmpx --disable-loginfunc --prefix="$(realpath $PWD/../gray386/_install/)"

make -j"$GR_CPUS"

strip dbclient

cp dbclient ../gray386/_install/bin

59. Leave nix-shell

exit

60. Build kernel with nix-shell

cd src/build-kernel-env-with-nix/

nix-shell --pure

61. Update .config in kernel directory

There is mapping hidden in .config and you need to change it to UID of user under you compile a kernel.

CONFIG_INITRAMFS_ROOT_UID=1001

CONFIG_INITRAMFS_ROOT_GID=1001

Then you can do some other changes with:

make -j"$GR_CPUS" ARCH=i386 nconfig

70. In Linux kernel directory

(optional) make -j"$GR_CPUS" ARCH=i386 nconfig

make -j"$GR_CPUS" ARCH=i386 bzImage

Results are in:

arch/x86/boot/bzImage usr/initramfs_data.cpio.gz

80. Exit nix-shell

exit

81. (optional) Test build

You need to have qemu installed.

In kernel directory just run

./test-build.sh

90. Cleanup build

git clean -f -d -X

100. END

gray386linux's People

Contributors

marmolak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.