Skip to content

Commit

Permalink
Merge pull request #11 from openbfdev/devel
Browse files Browse the repository at this point in the history
Merge devel to Master
  • Loading branch information
ffashion authored Feb 9, 2025
2 parents f748336 + 3b8cd4b commit 3b73216
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 8 deletions.
12 changes: 6 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function chlive_alarm_path_do() {
function build_aur_package_live()
{
local name=$1

local project_url="https://aur.archlinux.org/$name.git"

result=`chlive_alarm_path_do "file $name"`
Expand Down Expand Up @@ -173,7 +173,6 @@ function build_aur_package_rootfs()
result=`chlive_alarm_path_do "file $name"`
if [[ "$result" =~ "No such file or directory" ]]; then
chlivealarmdo "" "git clone $project_url $name"

fi

local runtimedeps=$(chlivealarmdo "$name" 'source PKGBUILD && echo ${depends[@]}')
Expand Down Expand Up @@ -255,7 +254,7 @@ function config_rootfs()
build_aur_package_rootfs $package
done

$chlivedo "echo 'alarm' > /mnt/etc/hostname"
$chlivedo "echo '3dprinter' > /mnt/etc/hostname"
$chlivedo "echo 'LANG=C'> /mnt/etc/locale.conf"
$chlivedo "echo -n > /mnt/etc/machine-id"

Expand All @@ -265,8 +264,9 @@ function config_rootfs()
cp -p config/moonraker.conf $rootfs/etc/klipper/
cp -p config/nginx.conf $rootfs/etc/nginx/

# FIXME: support config klipper.conf
cp -p $rootfs/opt/klipper/config/generic-mks-monster8.cfg $rootfs/etc/klipper/klipper.conf
cp -p config/klipper.conf $rootfs/etc/klipper/klipper.conf

cp -p config/usb_host.service $rootfs/usr/lib/systemd/system

# Configure rootfs
$chrootdo "useradd -d /home/alarm -m -U alarm"
Expand Down Expand Up @@ -299,7 +299,7 @@ function generate_checksum()
sha256sum $rootimg.zst > $rootimg.zst.sha256sum
}

set -v
set -ev
mkdir -p build
prepare_livecd
prepare_rootfs
Expand Down
2 changes: 1 addition & 1 deletion config/3dprinter.aur.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
moonraker-git sdbd-git systemd-gadget
moonraker-git sdbd-git systemd-gadget-bin
23 changes: 23 additions & 0 deletions config/klipper.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[virtual_sdcard]
path: /var/opt/moonraker/gcodes

[display_status]

[pause_resume]

[gcode_macro CANCEL_PRINT]
description: Cancel the actual running print
rename_existing: CANCEL_PRINT_BASE
gcode:
TURN_OFF_HEATERS
CANCEL_PRINT_BASE

[mcu]
serial: /dev/ttyACM0

[printer]
kinematics: cartesian
max_velocity: 10000
max_accel: 20000
max_z_velocity: 100
max_z_accel: 1000
2 changes: 1 addition & 1 deletion config/services.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
systemd-networkd systemd-resolved systemd-timesyncd NetworkManager resize2fs sshd klipper moonraker nginx sdbd usb-gadget.target
systemd-networkd systemd-resolved systemd-timesyncd NetworkManager resize2fs sshd klipper moonraker nginx adbd-usb gadget-start
12 changes: 12 additions & 0 deletions config/usb_host.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Open usb host mode
After=network.target

[Service]
Type=oneshot
ExecStart=/usr/bin/bash -c "echo host > /sys/class/usb_role/ci_hdrc.0-role-switch/role"

RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

0 comments on commit 3b73216

Please sign in to comment.