[Bug]: uboot-patch fails to generate patch file

Description

  1.  

    1.  

      1. What happened?

I am attempting to create a patch for u-boot with command `$ ./compile.sh nanopi-r2s-plus uboot-patch DEBUG=yes`, with 'userpatches/config-nanopi-r2s-plus.conf':

```
BOARD=nanopi-r2s-plus
BRANCH=current
BUILD_DESKTOP=no
BUILD_MINIMAL=yes
KERNEL_BTF=no
KERNEL_CONFIGURE=no
RELEASE=bookworm
```

The compile script runs until it prompts me to make my changes and press ENTER.

In another window, I added a new file in configs with ownership and permissions consistent with existing files (i.e. owned by root.root and rw-rw-r--).

I pressed ENTER in the window running compile.sh.

The script produced output that appears to indicate an empty patch file:

```
Press ENTER to show a preview of your patch, or type 'stop' to stop patching...
[🌱] OK, here's how your diff looks like [ showing patch diff ]
[🐛] DIR_BATCAT is not set, using default [ batcat ]
[🐛] Running batcat [ batcat version 0.25.0 ]
[🐛] Running batcat bat 0.25.0 (25f4f96) [ batcat ]
[🐛] Calling batcat [ COLUMNS: 60 | --file-name /home/ian/ig3/armbian-build/output/patch/u-boot-rockchip64-current.patch - ]
───────┬────────────────────────────────────────────────────
│ File: /home/ian/ig3/armbian-build/output/patch/
│ u-boot-rockchip64-current.patch <EMPTY>
───────┴────────────────────────────────────────────────────
[🐛] wait_for_disk_sync: after running batcat [ sync start, timeout_seconds:30 ]
[🐛] wait_for_disk_sync: after running batcat [ sync done worked: 1 sync_timeout: 0 ]
[🚸] Are you happy with this patch? [ Type 'yes' to accept, 'stop' to stop patching, or anything else to keep patching ]
Are you happy with the diff above? Type 'y' or 'yes' to accept, 'stop' to stop patching, anything else to keep patching: stop
```

So I stopped (i.e. I entered 'stop'). Then I checked to confirm nothing had been produced in the output/patches directory.

What I expected is that a patch file would be produced for the creation of the config file I had created.

In previous attempts I created other files. I have not attempted to change any existing files because for the change I am trying to implement I don't need to change existing files.

  1.  

    1.  

      1. How to reproduce?

Check out armbian/build branch main, commit 533fc7dca598d8019c8231c4583e80341cf6ceb5 (Feb 20 2025 - so reasonably recent)

Run the 'uboot-patch' command via compile.sh and add a file in the relevant u-boot config directory.

[log-uboot-patch-bc158496-89bb-4c22-9c3e-5bb8ceed0dac.log](https://github.com/user-attachments/files/19082507/log-uboot-patch-bc158496-89bb-4c22-9c3e-5bb8ceed0dac.log)

  1.  

    1.  

      1. Branch

main (main development branch)

  1.  

    1.  

      1. On which host OS are you running the build script and observing this problem?

Ubuntu 22.04 Jammy

  1.  

    1.  

      1. Are you building on Windows WSL2?

  • [ ] Yes, my Ubuntu/Debian/OtherOS is running on WSL2

  1.  

    1.  

      1. Relevant log URL

No response

  1.  

    1.  

      1. Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Raised by: https://github.com/ig3

https://github.com/armbian/build/issues/7912

Checklist

hide

Activity

Show:

Details

Assignee

Reporter

Priority

Created March 5, 2025 at 5:26 AM
Updated March 5, 2025 at 5:26 AM