radxa-repo / bsp

Radxa BSP Build Tool
https://radxa-repo.github.io/bsp/
GNU General Public License v3.0
32 stars 44 forks source link

Linux Latest Patch failure #33

Closed milnepe closed 1 year ago

milnepe commented 1 year ago

Clean bsp fails with the following: error: patch failed: arch/arm64/boot/dts/rockchip/Makefile:74

pete@xps:~/bsp$ lsb_release -a | grep -i description
No LSB modules are available.
Description:    Ubuntu 22.04.2 LTS

pete@xps:~$ git clone --depth 1 https://github.com/radxa-repo/bsp.git
Cloning into 'bsp'...
remote: Enumerating objects: 257, done.
remote: Counting objects: 100% (257/257), done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 257 (delta 37), reused 162 (delta 25), pack-reused 0
Receiving objects: 100% (257/257), 1.12 MiB | 2.61 MiB/s, done.
Resolving deltas: 100% (37/37), done.
pete@xps:~$ cd bsp
pete@xps:~/bsp$ ./bsp linux latest
main: Pulling from radxa-repo/bsp
Digest: sha256:1208326185f3373eb97d83c296614b795d898b29065fd0c0f9d89d94b193add3
Status: Image is up to date for ghcr.io/radxa-repo/bsp:main
ghcr.io/radxa-repo/bsp:main
/home/pete/bsp/.src/linux /home/pete/bsp
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
Initialized empty Git repository in /home/pete/bsp/.src/linux/.git/
remote: Finding sources: 100% (83380/83380)
remote: Total 83380 (delta 3625), reused 16526 (delta 3625)
Receiving objects: 100% (83380/83380), 237.22 MiB | 4.24 MiB/s, done.
Resolving deltas: 100% (3625/3625), done.
From https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux
 * [new tag]             v6.1.12    -> v6.1.12
Updating files: 100% (78711/78711), done.
HEAD is now at 129c15b60 Linux 6.1.12
HEAD is now at 129c15b60 Linux 6.1.12
Running custom_source_action from /home/pete/bsp/linux/latest/0002-common/overlays.sh
/home/pete/bsp/linux/latest/0002-common /home/pete/bsp/.src/linux /home/pete/bsp
/home/pete/bsp/.src/overlays /home/pete/bsp/linux/latest/0002-common /home/pete/bsp/.src/linux /home/pete/bsp
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint:   git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint:   git branch -m <name>
Initialized empty Git repository in /home/pete/bsp/.src/overlays/.git/
fatal: ambiguous argument 'FETCH_HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
remote: Enumerating objects: 216, done.
remote: Counting objects: 100% (216/216), done.
remote: Compressing objects: 100% (145/145), done.
remote: Total 216 (delta 162), reused 84 (delta 64), pack-reused 0
Receiving objects: 100% (216/216), 47.12 KiB | 1.57 MiB/s, done.
Resolving deltas: 100% (162/162), done.
From https://github.com/radxa/overlays
 * branch            38d5c8cee736258f99076a5df55ed1eddea2f3c3 -> FETCH_HEAD
HEAD is now at 38d5c8c Merge pull request #11 from Radxa-Alvin/main
HEAD is now at 38d5c8c Merge pull request #11 from Radxa-Alvin/main
/home/pete/bsp/linux/latest/0002-common /home/pete/bsp/.src/linux /home/pete/bsp
/home/pete/bsp/.src/linux /home/pete/bsp
Applying: arm64: dts: rockchip: enable tsadc for ROCK 4C+
Checking patch arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts...
Applied patch arch/arm64/boot/dts/rockchip/rk3399-rock-4c-plus.dts cleanly.
Applying: arm64: dts: rockchip: Add rk3566 based Radxa Compute Module 3
Checking patch arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi...
Applied patch arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3.dtsi cleanly.
Applying: arm64: dts: rockchip: Add Radxa Compute Module 3 IO board
Checking patch arch/arm64/boot/dts/rockchip/Makefile...
error: while searching for:
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-pinenote-v1.2.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-a.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-quartz64-b.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-roc-pc.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-blade.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3566-soquartz-cm4.dtb

error: patch failed: arch/arm64/boot/dts/rockchip/Makefile:74
Checking patch arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts...
Applying patch arch/arm64/boot/dts/rockchip/Makefile with 1 reject...
Rejected hunk #1.
Applied patch arch/arm64/boot/dts/rockchip/rk3566-radxa-cm3-io.dts cleanly.
Patch failed at 0003 arm64: dts: rockchip: Add Radxa Compute Module 3 IO board
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
bsp
RicoKirstein commented 1 year ago

I think you need to git submodule init git submodule update in the bsp folder. https://github.com/radxa-repo/bsp/issues/30

RadxaYuntian commented 1 year ago

Fixed by a935e24b5e7442191eeba30dea6b639f49b20ba6.

RadxaYuntian commented 1 year ago

Oops I made the same mistake. I cloned to a new machine and also forgot to checkout submodule.

I have updated the README for now to have the correct way to checkout the repo. I'll add a check in bsp in the future to make sure submodules are initiated.

milnepe commented 1 year ago

Yes it works now - thanks!

I was following the build docs here: https://radxa-doc.github.io/software/build.html

It doesn't mention how to contribute to these so it would help others to update this as well.

RadxaYuntian commented 1 year ago

Yes this one has been out of date for quite some times. We are now trying to release the first system based on this new build system, which will mark it semi-stable, and we will restart the work on documentations.