Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
!/hardware
!/software
!/scripts
/software/OS_build
#/software/OS_build
!/submodules
/submodules/*/*
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ build-dts: $(OS_BUILD_DIR)
rm $(OS_BUILD_DIR)/$(SYSTEM_NAME)_tmp.dts

## Buildroot Makefile Variables and Targets
BUILDROOT_VERSION=buildroot-2022.02.10
BUILDROOT_VERSION=buildroot-2025.08.1
BUILDROOT_DIR=$(OS_SUBMODULES_DIR)/$(BUILDROOT_VERSION)

build-buildroot: $(OS_BUILD_DIR) $(BUILDROOT_DIR)
$(MAKE) -C $(BUILDROOT_DIR) BR2_EXTERNAL=$(OS_SOFTWARE_DIR)/buildroot iob_soc_defconfig
# PATCH: Apply patch for buildroot-2025.08.1 micropython: https://github.com/buildroot/buildroot/commit/ab906018c98e5f0838b023fa886c6c52a1cc5cf6
-cd $(BUILDROOT_DIR) && curl -L https://github.com/buildroot/buildroot/commit/ab906018c98e5f0838b023fa886c6c52a1cc5cf6.patch | patch -p1 -N
$(MAKE) -C $(BUILDROOT_DIR) -j`nproc`
cp $(BUILDROOT_DIR)/output/images/rootfs.cpio.gz $(OS_BUILD_DIR)

Expand Down
18 changes: 10 additions & 8 deletions scripts/shell.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
{ pkgs ? import (builtins.fetchTarball {
# Descriptive name to make the store path easier to identify
name = "nixos-22.11";
# Commit hash for nixos-22.11
url = "https://github.com/NixOS/nixpkgs/archive/refs/tags/22.11.tar.gz";
# Hash obtained using `nix-prefetch-url --unpack <url>`
sha256 = "11w3wn2yjhaa5pv20gbfbirvjq6i3m7pqrq2msf0g7cv44vijwgw";
}) {}}:
{ pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/25.05.tar.gz") {}}:
pkgs.mkShell {
name = "iob-shell";
buildInputs = with pkgs; [
Expand All @@ -15,5 +8,14 @@ pkgs.mkShell {
(callPackage ./scripts/riscv-gnu-toolchain.nix { })
# Linux kernel build packages
libyaml
ncurses
];
shellHook = ''
# fixes libstdc++.so.6 issues of buildroot's patchelf
export LD_LIBRARY_PATH=${pkgs.stdenv.cc.cc.lib}/lib
'';

# Disable hardening flags for gcc. Prevents errors when running buildroot, like these:
# https://github.com/riscv-collab/riscv-gnu-toolchain/issues/901
hardeningDisable = [ "all" ];
}
Binary file modified software/OS_build/rootfs.cpio.gz
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/sh

# SPDX-FileCopyrightText: 2025 IObundle
#
# SPDX-License-Identifier: MIT

#
# Run the mdev daemon
#

DAEMON="mdev"
PIDFILE="/var/run/$DAEMON.pid"


start() {
echo -n "Starting $DAEMON... "
start-stop-daemon -S -b -m -p $PIDFILE -x /sbin/mdev -- -df
[ $? -eq 0 ] && echo "OK" || echo "ERROR"

# coldplug modules
find /sys/ -name modalias -print0 | \
xargs -0 sort -u | \
tr '\n' '\0' | \
xargs -0 modprobe -abq
}

stop() {
echo -n "Stopping $DAEMON... "
start-stop-daemon -K -p $PIDFILE
[ $? -eq 0 ] && echo "OK" || echo "ERROR"
}

restart() {
stop
start
}

case "$1" in
start|stop|restart)
"$1"
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac

exit $?

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# SPDX-FileCopyrightText: 2025 IObundle
#
# SPDX-License-Identifier: MIT

# null may already exist; therefore ownership has to be changed with command
null root:root 666 @chmod 666 $MDEV
zero root:root 666
full root:root 666
random root:root 444
urandom root:root 444
hwrandom root:root 444
grsec root:root 660

kmem root:root 640
mem root:root 640
port root:root 640
# console may already exist; therefore ownership has to be changed with command
console root:tty 600 @chmod 600 $MDEV
ptmx root:tty 666
pty.* root:tty 660

# Typical devices
tty root:tty 666
tty[0-9]* root:tty 660
vcsa*[0-9]* root:tty 660
ttyS[0-9]* root:root 660
ttyUSB[0-9]* root:root 660

# alsa sound devices
snd/pcm.* root:audio 660
snd/control.* root:audio 660
snd/midi.* root:audio 660
snd/seq root:audio 660
snd/timer root:audio 660

# input stuff
input/event[0-9]+ root:root 640
input/mice root:root 640
input/mouse[0-9] root:root 640
input/ts[0-9] root:root 600

# load modules
$MODALIAS=.* root:root 660 @modprobe "$MODALIAS"
8 changes: 4 additions & 4 deletions software/buildroot/configs/iob_soc_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ BR2_CCACHE_DIR="$(HOME)/.buildroot-ccache-saxon_default"

## Target options
BR2_riscv=y
BR2_RISCV_32=y

## Instruction Set Extensions
BR2_riscv_custom=y
BR2_RISCV_ISA_CUSTOM_RVM=y
BR2_RISCV_ISA_CUSTOM_RVA=y
BR2_RISCV_ISA_CUSTOM_RVC=y
BR2_RISCV_ISA_RVM=y
BR2_RISCV_ISA_RVA=y
BR2_RISCV_ISA_RVC=y
BR2_RISCV_32=y
BR2_RISCV_ABI_ILP32=y

## Linux headers same as kernel
Expand Down