Skip to content

Commit

Permalink
Klipper PR has been accepted, remove local patch. Small fudge to Kcon…
Browse files Browse the repository at this point in the history
…fig added. Also add Rebuild version to PRETTY_NAME
  • Loading branch information
eliasbakken committed May 25, 2024
1 parent 10e5863 commit 1014d69
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 65 deletions.
3 changes: 3 additions & 0 deletions armbian/customize-image-barebone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ post_build() {
cp /tmp/overlay/rebuild/rebuild-version /etc/
apt update
apt install -y "$ADD_PACKAGE_LIST"

TAG=$(cat /tmp/overlay/rebuild/rebuild-tag)
sed -i "s/PRETTY_NAME=\"/PRETTY_NAME=\"Rebuild ${TAG}\//" /etc/os-release
}

prep_install() {
Expand Down
1 change: 1 addition & 0 deletions rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ cp armbian/watermark.png "${BUILD_DIR}"/packages/plymouth-theme-armbian/watermar

mkdir -p "${BUILD_DIR}"/userpatches/overlay/rebuild/
echo "${NAME}" >"${BUILD_DIR}"/userpatches/overlay/rebuild/rebuild-version
echo "${TAG}" >"${BUILD_DIR}"/userpatches/overlay/rebuild/rebuild-tag

cd "$BUILD_DIR"
DOCKER_EXTRA_ARGS="--cpus=${cores}" ./compile.sh rebuild
Expand Down
5 changes: 3 additions & 2 deletions userpatches/overlay/install_components/klipper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ install_klipper(){
echo "🍰 install Klipper"
cd /home/debian
git clone https://github.com/Klipper3d/klipper

sed -i 's/select HAVE_GPIO_I2C if !MACH_STM32F031/select HAVE_GPIO_I2C/' klipper/src/stm32/Kconfig

cp /tmp/overlay/klipper/install-recore.sh /home/debian/klipper/scripts/
cp /tmp/overlay/klipper/generic-recore-a6.cfg /home/debian/klipper/config/
cp /tmp/overlay/klipper/generic-recore-a7.cfg /home/debian/klipper/config/
Expand Down Expand Up @@ -49,8 +52,6 @@ install_klipper(){
cp /home/debian/klipper/out/klipper.bin /opt/firmware/stm32.bin

# Compile STM32-32KB
cp /tmp/overlay/klipper/enable-i2c.patch /home/debian/klipper/
patch -p1 < enable-i2c.patch
cp /tmp/overlay/klipper/stm32f031-32KB-serial.config /home/debian/klipper/.config
make clean
make olddefconfig
Expand Down
3 changes: 3 additions & 0 deletions userpatches/overlay/install_components/post_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ post_build() {
# Force debian to change password
# Must be done as a final step
chage -d 0 debian

TAG=$(cat /tmp/overlay/rebuild/rebuild-tag)
sed -i "s/PRETTY_NAME=\"/PRETTY_NAME=\"Rebuild ${TAG}\//" /etc/os-release
}
43 changes: 0 additions & 43 deletions userpatches/overlay/klipper/enable-i2c.patch

This file was deleted.

17 changes: 0 additions & 17 deletions userpatches/overlay/klipper/stm32f0.config

This file was deleted.

1 change: 0 additions & 1 deletion userpatches/overlay/klipper/stm32f031-32KB-serial.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Base config file for STM32F031 boards with serial on PA14/PA15
CONFIG_MACH_STM32=y
CONFIG_MACH_STM32F031=y
CONFIG_SERIAL=y
CONFIG_STM32_FLASH_START_0000=y
CONFIG_STM32_SERIAL_USART2_ALT_PA15_PA14=y
CONFIG_STM32_CLOCK_REF_INTERNAL=y
Expand Down
7 changes: 5 additions & 2 deletions userpatches/overlay/klipper/stm32f031-serial.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Base config file for STM32F031 boards with serial on PA14/PA15
CONFIG_MACH_STM32=y
CONFIG_MACH_STM32F031=y
CONFIG_SERIAL=y
CONFIG_STM32_FLASH_START_0000=y
CONFIG_STM32_SERIAL_USART2_ALT_PA15_PA14=y
CONFIG_STM32_CLOCK_REF_INTERNAL=y
CONFIG_LOW_LEVEL_OPTIONS=y
CONFIG_STM32_SERIAL_USART2_ALT_PA15_PA14=y
CONFIG_HAVE_GPIO=y
CONFIG_WANT_GPIO_BITBANGING=n
CONFIG_WANT_DISPLAYS=n
CONFIG_WANT_SENSORS=n
CONFIG_WANT_LDC1612=n
CONFIG_WANT_SOFTWARE_I2C=n

0 comments on commit 1014d69

Please sign in to comment.