Compare commits
2 commits
aaf6b637a4
...
a268f2730f
| Author | SHA1 | Date | |
|---|---|---|---|
| a268f2730f | |||
| fc283e6531 |
12 changed files with 41 additions and 93 deletions
|
|
@ -38,7 +38,7 @@ test -d /dev/browser || {
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_overlayfs(){
|
setup_overlayfs(){
|
||||||
test -f /mnt/overlayfs.zip && unzip /mnt/overlayfs.zip -d /
|
test -f /mnt/overlayfs.zip && ziprun /mnt/overlayfs.zip
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_incoming_cmds(){
|
setup_incoming_cmds(){
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
source /etc/profile.sh # expose xrsh cmds like require etc
|
source /etc/profile.sh # expose xrsh cmds like require etc
|
||||||
|
|
||||||
if [[ "$1" =~ pos=|t= ]] then
|
if [[ "$1" =~ "pos=|t=" ]]; then
|
||||||
# we are dealing with XR or Media Fragments
|
# we are dealing with XR or Media Fragments (ignore for now)
|
||||||
exit # ignore for now
|
echo "[x] detected Media/XR Fragment in URI: $1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# otherwise execute
|
# otherwise execute
|
||||||
echo "" # clear line
|
echo "" # clear line
|
||||||
$* # simply execute
|
$* # simply execute
|
||||||
echo "$*" >> /tmp/frag.log
|
echo "$*" >> /tmp/frag.log
|
||||||
|
|
||||||
|
|
|
||||||
BIN
dist/v86-linux.iso
vendored
BIN
dist/v86-linux.iso
vendored
Binary file not shown.
8
edit.sh
8
edit.sh
|
|
@ -1,11 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
make BR2_EXTERNAL=/buildroot-v86 v86_defconfig
|
export BR2_EXTERNAL=/buildroot-v86
|
||||||
|
export BR2_PACKAGE_BUSYBOX_CONFIG=/buildroot-v86/configs/busybox.config
|
||||||
|
make v86_defconfig
|
||||||
|
|
||||||
make menuconfig
|
make menuconfig
|
||||||
make busybox-menuconfig
|
make busybox-menuconfig
|
||||||
make linux-menuconfig
|
make linux-menuconfig
|
||||||
make savedefconfig
|
make savedefconfig # /buildroot-v86/configs/v86_defconfig
|
||||||
make linux-savedefconfig
|
make linux-savedefconfig
|
||||||
|
make linux-update-defconfig # /buildroot-v86/configs/linux.config
|
||||||
|
make busybox-update-defconfig # /buildroot-v86/configs/linux.config
|
||||||
|
|
||||||
make
|
make
|
||||||
|
|
|
||||||
23
nix/README.md
Normal file
23
nix/README.md
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
# Nix-compiled binaries for xrsh.iso
|
||||||
|
|
||||||
|
Crosscompiling used to be tricky, due to dependencies.
|
||||||
|
With Nix this belongs to the past.
|
||||||
|
|
||||||
|
# building hello.c
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ nix-shell --run '$CC hello.c -o hello' hello.nix
|
||||||
|
$ file hello
|
||||||
|
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped
|
||||||
|
```
|
||||||
|
|
||||||
|
# building a nixos pkg
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ nix-build '<nixpkgs>' --pure -I nixpkgs=channel:nixos-24.05 -A pkgsCross.musl32.pkgsStatic.hello
|
||||||
|
$ file hello
|
||||||
|
hello: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, not stripped
|
||||||
|
```
|
||||||
|
|
||||||
|
use the build-shellscripts in this directory as a startingpoint for your xrsh binaries.
|
||||||
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
#test -n "$ARCH" || ARCH=i686-embedded
|
#test -n "$ARCH" || ARCH=i686-embedded
|
||||||
test -n "$ARCH" || ARCH=musl32
|
test -n "$ARCH" || ARCH=musl32
|
||||||
test -n "$CHANNEL" || CHANNEL=nixos-24.05
|
test -n "$CHANNEL" || CHANNEL=nixos-24.05
|
||||||
test -n "$1" || { echo "usage: [ARCH=...] [CHANNEL=...] build_nixpkg.sh <packagename>"; exit 0; }
|
test -n "$1" || { echo "usage: [ARCH=...] [CHANNEL=...] build_nixpkg.sh <packagename> [outfile]"; exit 0; }
|
||||||
set -x
|
set -xe
|
||||||
nix-build '<nixpkgs>' --pure -I nixpkgs=channel:$CHANNEL -A pkgsCross.$ARCH.pkgsStatic.$1
|
nix-build '<nixpkgs>' --pure -I nixpkgs=channel:$CHANNEL -A pkgsCross.$ARCH.pkgsStatic.$1
|
||||||
|
test -n "$2" && cp result/bin/$1 $2
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
|
||||||
|
|
||||||
pkgs.mkShell {
|
|
||||||
buildInputs = [
|
|
||||||
pkgs.pkg-config
|
|
||||||
pkgs.gnumake # For running make
|
|
||||||
pkgs.gcc_multi # GCC with multi-lib support (32-bit and 64-bit)
|
|
||||||
pkgs.glibc_multi
|
|
||||||
pkgs.gccMultiStdenv
|
|
||||||
pkgs.binutils
|
|
||||||
];
|
|
||||||
|
|
||||||
# Set up environment variables for cross-compilation to 32-bit
|
|
||||||
shellHook = ''
|
|
||||||
export CC="gcc -m32 -static"
|
|
||||||
export CXX="g++ -m32 -static"
|
|
||||||
export LD="ld -m elf_i386"
|
|
||||||
echo "32-bit cross-compilation environment with static linking is set up."
|
|
||||||
git clone https://github.com/rui314/chibicc
|
|
||||||
cd chibicc
|
|
||||||
make
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
# /etc/nixos/configuration.nix
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
# Set the hostname of the system
|
|
||||||
networking.hostName = "nixos-minimal";
|
|
||||||
|
|
||||||
# Enable the OpenSSH service (optional, useful for remote access)
|
|
||||||
services.openssh.enable = false;
|
|
||||||
|
|
||||||
# Timezone configuration
|
|
||||||
time.timeZone = "UTC";
|
|
||||||
|
|
||||||
# Set the default shell to bash
|
|
||||||
users.defaultUserShell = pkgs.bash;
|
|
||||||
|
|
||||||
# Create a minimal user (replace "your-user" with desired username)
|
|
||||||
users.users.yourUser = {
|
|
||||||
isNormalUser = true;
|
|
||||||
shell = pkgs.bash;
|
|
||||||
initialPassword = "password"; # Replace with a hashed password for production
|
|
||||||
};
|
|
||||||
|
|
||||||
# Boot loader (for booting the system)
|
|
||||||
boot.loader.grub.enable = true;
|
|
||||||
boot.loader.grub.version = 2;
|
|
||||||
boot.loader.grub.devices = [ "/dev/sda" ]; # Replace with your actual boot device
|
|
||||||
|
|
||||||
# Allow unfree packages (if needed)
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
# Enable virtual console
|
|
||||||
console.useXkbConfig = true;
|
|
||||||
|
|
||||||
# Enable bash as a package (part of the basic system environment)
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
bash
|
|
||||||
];
|
|
||||||
|
|
||||||
# Disable the display manager (minimal CLI system, no graphical interface)
|
|
||||||
services.xserver.enable = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
let
|
|
||||||
nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/release-24.05";
|
|
||||||
pkgs = (import nixpkgs {}).pkgsCross.i686-embedded;
|
|
||||||
in
|
|
||||||
|
|
||||||
# callPackage is needed due to https://github.com/NixOS/nixpkgs/pull/126844
|
|
||||||
pkgs.pkgsStatic.callPackage ({ mkShell, zlib, pkg-config, file }: mkShell {
|
|
||||||
# these tools run on the build platform, but are configured to target the host platform
|
|
||||||
nativeBuildInputs = [ pkg-config file ];
|
|
||||||
# libraries needed for the host platform
|
|
||||||
buildInputs = [ zlib ];
|
|
||||||
}) {}
|
|
||||||
|
|
@ -5,8 +5,8 @@ in
|
||||||
|
|
||||||
# callPackage is needed due to https://github.com/NixOS/nixpkgs/pull/126844
|
# callPackage is needed due to https://github.com/NixOS/nixpkgs/pull/126844
|
||||||
pkgs.pkgsStatic.callPackage ({ mkShell, fuse, pkg-config, file }: mkShell {
|
pkgs.pkgsStatic.callPackage ({ mkShell, fuse, pkg-config, file }: mkShell {
|
||||||
# these tools run on the build platform, but are configured to target the host platform
|
## these tools run on the build platform, but are configured to target the host platform
|
||||||
nativeBuildInputs = [ pkg-config file ];
|
#nativeBuildInputs = [ pkg-config file ];
|
||||||
# libraries needed for the host platform
|
## libraries needed for the host platform
|
||||||
buildInputs = [ fuse ];
|
#buildInputs = [ fuse ];
|
||||||
}) {}
|
}) {}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
nix-shell --run gcc -m32 -static hello.c -o hello cross.nix
|
|
||||||
nix-shell --run 'gcc -m32 -static hello.c -o hello' cross.nix
|
|
||||||
nix-build '<nixpkgs>' -I nixpkgs=channel:nixos-24.05 -A pkgsCross.i686-embedded.hello --show-trace
|
|
||||||
Loading…
Add table
Reference in a new issue