[Q] Strange Error Compiling Note 5 Kernel - PLEASE HELP!

Search This thread

sk806

Senior Member
Jan 30, 2005
1,973
1,441
Rye, New York
Hi All,

I have been building permissive kernels for my own use for a while now, but the Note 5 kernel (both the "C" and "I" versions from Samsung open Source) is giving me fits. As you can see from my terminal output, I get through the creation of the image, the modules build fine, but when the firmware install makefile starts, I get an error I've never seen before, even if I have made no changes at all to the source code:

Code:
  OBJCOPY arch/arm64/boot/Image
  GZIP    arch/arm64/boot/Image.gz
  Building modules, stage 2.
  MODPOST 2 modules
  CC      net/ipv4/tcp_htcp.mod.o
  LD [M]  net/ipv4/tcp_htcp.ko
  CC      net/ipv4/tcp_westwood.mod.o
  LD [M]  net/ipv4/tcp_westwood.ko
[B]/home/parallels/ANDROID/KERNEL/920c_kernel/scripts/Makefile.fwinst:45: target `/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule[/B].

I have looked at the cited section code, but don't see anything obvious. I have also google searched for this error way too thoroughly and PM'd some who have successfully compiled this kernel, but alas...

I am running Ubuntu 14.04 via Parallels on a Macbook Pro running Yosemite. As noted above, I am compiling from the Samsung OpenvSource files for The 920I and have also tried the 920C version, as well. As for toolchains, I have tried the Android NDK aarch64 4.9 toolchain, linaro aarch64 4.9 and linaro aarch64 5.2, all to no avail. I have tried make clean, make mrproper, deleted .ccache, etc., as well as using/not using -jX.

Here is a link to a repo with the untouched source code: https://github.com/sk806/N5_Kernel.git

ANY HELP IS GREATLY APPRECIATED!!!

Thanks!

Steve
 

mikeyinid

Senior Member
Sep 4, 2010
8,871
4,001
Boise
Hi All,

I have been building permissive kernels for my own use for a while now, but the Note 5 kernel (both the "C" and "I" versions from Samsung open Source) is giving me fits. As you can see from my terminal output, I get through the creation of the image, the modules build fine, but when the firmware install makefile starts, I get an error I've never seen before, even if I have made no changes at all to the source code:

Code:
  OBJCOPY arch/arm64/boot/Image
  GZIP    arch/arm64/boot/Image.gz
  Building modules, stage 2.
  MODPOST 2 modules
  CC      net/ipv4/tcp_htcp.mod.o
  LD [M]  net/ipv4/tcp_htcp.ko
  CC      net/ipv4/tcp_westwood.mod.o
  LD [M]  net/ipv4/tcp_westwood.ko
[B]/home/parallels/ANDROID/KERNEL/920c_kernel/scripts/Makefile.fwinst:45: target `/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule[/B].

I have looked at the cited section code, but don't see anything obvious. I have also google searched for this error way too thoroughly and PM'd some who have successfully compiled this kernel, but alas...

I am running Ubuntu 14.04 via Parallels on a Macbook Pro running Yosemite. As noted above, I am compiling from the Samsung OpenvSource files for The 920I and have also tried the 920C version, as well. As for toolchains, I have tried the Android NDK aarch64 4.9 toolchain, linaro aarch64 4.9 and linaro aarch64 5.2, all to no avail. I have tried make clean, make mrproper, deleted .ccache, etc., as well as using/not using -jX.

Here is a link to a repo with the untouched source code: https://github.com/sk806/N5_Kernel.git

ANY HELP IS GREATLY APPRECIATED!!!

Thanks!

Steve

That is Samsung for ya. Maybe @g.lewarne could provide some insight
 
  • Like
Reactions: some_galaxy_user

elesbb

Senior Member
Jun 20, 2010
7,883
5,324
I hope so! Thanks.

It's weird, as i've gotten the same error on both a virtual box and parallels setup. I am going to try boot camping it and then I'm done, unless someone knows what is going on.

Have you resolved this issue? I am running into it too trying to compile S6 Kernel for 5.1.1
 

elesbb

Senior Member
Jun 20, 2010
7,883
5,324
I haven't. I can get every kernel to compile for my current devices, except this one. Strange.

It is related to modules compiling from what I can gather. If I use Ktoonsez source, I don't get that error. However, I notice it doesn't compile any modules. I still get an Image in my boot directory. Do you? I think the kernel itself is safe to use. You could probably ignore this error.
 

elesbb

Senior Member
Jun 20, 2010
7,883
5,324
You guys just need to read what the error exactly refers to and then search for it in your source.

Would have brought you to. ....

https://github.com/UpInTheAir/SM-N920/commit/ad77e0333fbdccf5e0e1485e5a65ae47a062b235

Easy ;)

I don't have anything like that in my makefile.fwinst file. Here is what is at line 45, which is where terminal is telling me the error is at:

$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %)
$(call cmd,install)

Here is the actual terminal error message:

/home/seth/S6-Kernel_Parent/Extracted_S6_Source/Kernel.tar/scripts/Makefile.fwinst:45: target `/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule.


So I'm confused.


EDIT: Nevermind I'm an idiot. I found it. Thank you so much!! Finally solved :D
 
Last edited:

sk806

Senior Member
Jan 30, 2005
1,973
1,441
Rye, New York
You guys just need to read what the error exactly refers to and then search for it in your source.

Would have brought you to. ....

https://github.com/UpInTheAir/SM-N920/commit/ad77e0333fbdccf5e0e1485e5a65ae47a062b235

Easy ;)

HA! I googled the error a million times and never saw your repo! I wasn't sure if removing "stm_z1.fw tsp_stm" from the makefile would screw anything up, but apparently it doesn't. Many thanks, sir!

It's odd that others have built with the same sources (920C, mainly, from what I have seen), and have not changed that section of the makefile, but still succeeded in their build. I wonder what it is about my setup that caused this error. Anyway, not an issue now. Thanks again.

Steve
 

UpInTheAir

Account currently disabled
Jan 17, 2011
7,965
15,909
Phuket, Thailand
HA! I googled the error a million times and never saw your repo! I wasn't sure if removing "stm_z1.fw tsp_stm" from the makefile would screw anything up, but apparently it doesn't. Many thanks, sir!

It's odd that others have built with the same sources (920C, mainly, from what I have seen), and have not changed that section of the makefile, but still succeeded in their build. I wonder what it is about my setup that caused this error. Anyway, not an issue now. Thanks again.

Steve

There are others I've seen using my commit (no credit) and didn't cherry-pick keeping the history. I believe the Image still flashes with or without though
 
  • Like
Reactions: desmond462

minealex2244

Senior Member
Jan 29, 2015
1,503
1,581
24
Baia Mare
Last edited:
G

GuestK00325

Guest
I don't have anything like that in my makefile.fwinst file. Here is what is at line 45, which is where terminal is telling me the error is at:

$(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %)
$(call cmd,install)

Here is the actual terminal error message:

/home/seth/S6-Kernel_Parent/Extracted_S6_Source/Kernel.tar/scripts/Makefile.fwinst:45: target `/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule.


So I'm confused.


EDIT: Nevermind I'm an idiot. I found it. Thank you so much!! Finally solved :D

Can you tell me what you did? I have the same error and i cant fix it ????
 

minealex2244

Senior Member
Jan 29, 2015
1,503
1,581
24
Baia Mare
  • Like
Reactions: some_galaxy_user

Firerust

Member
Jul 14, 2019
7
0
Broken link

Hey, I'm having the same issue but I can't find your commit, could you please fix the link?. Thanks in advance.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    You guys just need to read what the error exactly refers to and then search for it in your source.

    Would have brought you to. ....

    https://github.com/UpInTheAir/SM-N920/commit/ad77e0333fbdccf5e0e1485e5a65ae47a062b235

    Easy ;)
    2
    Hi All,

    I have been building permissive kernels for my own use for a while now, but the Note 5 kernel (both the "C" and "I" versions from Samsung open Source) is giving me fits. As you can see from my terminal output, I get through the creation of the image, the modules build fine, but when the firmware install makefile starts, I get an error I've never seen before, even if I have made no changes at all to the source code:

    Code:
      OBJCOPY arch/arm64/boot/Image
      GZIP    arch/arm64/boot/Image.gz
      Building modules, stage 2.
      MODPOST 2 modules
      CC      net/ipv4/tcp_htcp.mod.o
      LD [M]  net/ipv4/tcp_htcp.ko
      CC      net/ipv4/tcp_westwood.mod.o
      LD [M]  net/ipv4/tcp_westwood.ko
    [B]/home/parallels/ANDROID/KERNEL/920c_kernel/scripts/Makefile.fwinst:45: target `/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule[/B].

    I have looked at the cited section code, but don't see anything obvious. I have also google searched for this error way too thoroughly and PM'd some who have successfully compiled this kernel, but alas...

    I am running Ubuntu 14.04 via Parallels on a Macbook Pro running Yosemite. As noted above, I am compiling from the Samsung OpenvSource files for The 920I and have also tried the 920C version, as well. As for toolchains, I have tried the Android NDK aarch64 4.9 toolchain, linaro aarch64 4.9 and linaro aarch64 5.2, all to no avail. I have tried make clean, make mrproper, deleted .ccache, etc., as well as using/not using -jX.

    Here is a link to a repo with the untouched source code: https://github.com/sk806/N5_Kernel.git

    ANY HELP IS GREATLY APPRECIATED!!!

    Thanks!

    Steve
    1
    Hi All,

    I have been building permissive kernels for my own use for a while now, but the Note 5 kernel (both the "C" and "I" versions from Samsung open Source) is giving me fits. As you can see from my terminal output, I get through the creation of the image, the modules build fine, but when the firmware install makefile starts, I get an error I've never seen before, even if I have made no changes at all to the source code:

    Code:
      OBJCOPY arch/arm64/boot/Image
      GZIP    arch/arm64/boot/Image.gz
      Building modules, stage 2.
      MODPOST 2 modules
      CC      net/ipv4/tcp_htcp.mod.o
      LD [M]  net/ipv4/tcp_htcp.ko
      CC      net/ipv4/tcp_westwood.mod.o
      LD [M]  net/ipv4/tcp_westwood.ko
    [B]/home/parallels/ANDROID/KERNEL/920c_kernel/scripts/Makefile.fwinst:45: target `/lib/firmware/tsp_stm/stm_z1.fw' given more than once in the same rule[/B].

    I have looked at the cited section code, but don't see anything obvious. I have also google searched for this error way too thoroughly and PM'd some who have successfully compiled this kernel, but alas...

    I am running Ubuntu 14.04 via Parallels on a Macbook Pro running Yosemite. As noted above, I am compiling from the Samsung OpenvSource files for The 920I and have also tried the 920C version, as well. As for toolchains, I have tried the Android NDK aarch64 4.9 toolchain, linaro aarch64 4.9 and linaro aarch64 5.2, all to no avail. I have tried make clean, make mrproper, deleted .ccache, etc., as well as using/not using -jX.

    Here is a link to a repo with the untouched source code: https://github.com/sk806/N5_Kernel.git

    ANY HELP IS GREATLY APPRECIATED!!!

    Thanks!

    Steve

    That is Samsung for ya. Maybe @g.lewarne could provide some insight
    1
    HA! I googled the error a million times and never saw your repo! I wasn't sure if removing "stm_z1.fw tsp_stm" from the makefile would screw anything up, but apparently it doesn't. Many thanks, sir!

    It's odd that others have built with the same sources (920C, mainly, from what I have seen), and have not changed that section of the makefile, but still succeeded in their build. I wonder what it is about my setup that caused this error. Anyway, not an issue now. Thanks again.

    Steve

    There are others I've seen using my commit (no credit) and didn't cherry-pick keeping the history. I believe the Image still flashes with or without though
    1
    Did you figure it out?

    Uhm somehow. I used a script which ignored that error as your kernel image is already built and you shouldn't care about modules. But if you still want a fix then see my commit: https://github.com/minealex2244/AldeXus/commit/e89301766b3d251b285649a38ee4dea4f2871b99
    This commit shows you what to remove (it may be the perfect fix or just an example of what you should do in your code).
    Tell me if it helped.