Skip to contentSkip to conversation

edgerouter: fix machine tune

PATCH Kevin Hao 2 participants 4 messages May 8, 2016 – May 10, 2016 3 messages not in the archive

lore
Share & tools
lore

Kevin Hao

author
#1 lore raw
In reply to a message not in the archive
Quoted 13 lines · Ruslan Babayev

Octeon+ lacks FPU

---
 meta-yocto-bsp/conf/machine/edgerouter.conf | 1 +
 1 file changed, 1 insertion(+)
meta-yocto-bsp/conf/machine/edgerouter.conf +0 -0
index 6343dfc..062d896 100644

meta-yocto-bsp/conf/machine/edgerouter.conf line 5

Quoted 4 lines
meta-yocto-bsp/conf/machine/edgerouter.conf +1 -0
@@ -2,6 +2,7 @@
 #@NAME: Edgerouter
 #@DESCRIPTION: Edgerouter
 
+DEFAULTTUNE ?= "mips64-nf"

The change looks fine to me. But unfortunately the libjpeg-turbo can't build with the mips64-nf. I have filed a bug (9606) for it. I think we can merge this once we fix the build failure.

Thanks,
Kevin

Quoted 5 lines
meta-yocto-bsp/conf/machine/edgerouter.conf +0 -0
 require conf/machine/include/tune-mips64.inc
 
 MACHINE_FEATURES = "pci ext2 ext3 serial"
Signature · 1 line
2.7.4
author
#3 lore raw
In reply to a message not in the archive
Quoted 27 lines · Ruslan Babayev
Quoted 17 lines · Kevin Hao
Quoted 16 lines · Ruslan Babayev

Octeon+ lacks FPU

---
 meta-yocto-bsp/conf/machine/edgerouter.conf | 1 +
 1 file changed, 1 insertion(+)
meta-yocto-bsp/conf/machine/edgerouter.conf +0 -0
index 6343dfc..062d896 100644
@@ -2,6 +2,7 @@
 #@NAME: Edgerouter
 #@DESCRIPTION: Edgerouter
 
Quoted 6 lines

meta-yocto-bsp/conf/machine/edgerouter.conf line 5

Quoted 1 line
meta-yocto-bsp/conf/machine/edgerouter.conf +1 -0
+DEFAULTTUNE ?= "mips64-nf"

The change looks fine to me. But unfortunately the libjpeg-turbo can't build with the mips64-nf. I have filed a bug (9606) for it. I think we can merge this once we fix the build failure.

Quoted 2 lines

Without this change OpenSSH (ssh-keygen) dies with SIGILL at runtime.

The ssh-keygen works pretty well for me. Could you show the steps to reproduce this issue?

Quoted 1 line

How about blacklisting libjpeg for edgerouter?

Or we can easily workaround this by using the method [1] suggested by Peter Kjellerstedt.

Quoted 2 lines

It's not very
useful on a little headless router.

Agreed.

[1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=9606

Thanks,
Kevin

Quoted 3 lines

Thanks,
Ruslan

author
#5 lore raw
In reply to a message not in the archive
Quoted 7 lines · Ruslan Babayev
Quoted 4 lines · Kevin Hao
Quoted 3 lines

Without this change OpenSSH (ssh-keygen) dies with SIGILL at runtime.

Quoted 7 lines
Quoted 3 lines

The ssh-keygen works pretty well for me. Could you show the steps to reproduce this issue?

Sorry, I should have mentioned I have seen the crash with TCLIBC = "musl" only. Not sure what's going on. Perhaps glibc by default falls back to soft-float at run-time.

Since the kernel has FPU emulation, we should not run into this crash even if musl use the hard float instructions. That is also why the edgerouter BSP can works previously. It seems a bug in musl.

Quoted 7 lines

With "musl" I also saw a mips related compilation failure in libffi which I have fixed.

Just to verify I have rebuilt core-image-minimal with glibc and I ssh-keygen works. Regarding core-image-sato, is it even officially supported for edgerouter? The release notes [1] only mention core-image-minimal.

We don't have an officially image type supported list for each BSP. The core-image-minimal is only referred as an example in release note, but that doesn't mean we only support this image type. A patch should not break the build of an image type which is buildable currently at least.

Thanks,
Kevin

Quoted 6 lines

Regards,
Ruslan

[1] https://www.yoctoproject.org/downloads/bsps/krogoth21/edgerouter

#6 lore raw
Quoted 15 lines · Kevin Hao
Quoted 11 lines · Ruslan Babayev
Quoted 7 lines · Kevin Hao
Quoted 3 lines

Without this change OpenSSH (ssh-keygen) dies with SIGILL at runtime.

The ssh-keygen works pretty well for me. Could you show the steps to reproduce this issue?

Quoted 7 lines
Quoted 3 lines

Sorry, I should have mentioned I have seen the crash with TCLIBC = "musl" only. Not sure what's going on. Perhaps glibc by default falls back to soft-float at run-time.

Since the kernel has FPU emulation, we should not run into this crash even if musl use the hard float instructions. That is also why the edgerouter BSP can works previously. It seems a bug in musl.

it would be good if you can narrow it down. musl supports both hf and sf variants for mips64