summaryrefslogtreecommitdiffstats
path: root/meta-agl-bsp/meta-intel/recipes-kernel/linux
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe@baylibre.com>2019-04-29 13:59:08 +0000
committerCorentin Labbe <clabbe@baylibre.com>2019-04-29 13:59:50 +0000
commitb8fe29ceae03d4a340579a83d338ba9404fc0190 (patch)
tree812394618025c257a3fb9face08cd96a11ea49a3 /meta-agl-bsp/meta-intel/recipes-kernel/linux
parent2ca4db6cf14a709d25f79b2e6308743a115e5aa5 (diff)
meta-intel: Support the upsquare board
This patch adds the necessary CONFIG for booting the upsquare board. The upsquare have an R8169 ethernet card and need it built-in for the kernel DHCP autoconf to work. The upsquare need some MFD_INTEL configs to boot. The meta-intel miss some CONFIG necessary for LAVA and NBD to works. Bug-AGL: SPEC-2075 Change-Id: Iad63e0f0b978bb75f8d8759ad353e7952b63a2ab Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Diffstat (limited to 'meta-agl-bsp/meta-intel/recipes-kernel/linux')
-rw-r--r--meta-agl-bsp/meta-intel/recipes-kernel/linux/files/lava.cfg3
-rw-r--r--meta-agl-bsp/meta-intel/recipes-kernel/linux/files/net-devices.cfg1
-rw-r--r--meta-agl-bsp/meta-intel/recipes-kernel/linux/files/upsquare.cfg4
-rw-r--r--meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend8
4 files changed, 16 insertions, 0 deletions
diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/lava.cfg b/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/lava.cfg
new file mode 100644
index 000000000..4dcf4036d
--- /dev/null
+++ b/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/lava.cfg
@@ -0,0 +1,3 @@
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_NBD=y
+CONFIG_BLK_DEV_INITRD=y
diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/net-devices.cfg b/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/net-devices.cfg
index 9d5329a8f..ab88cedc2 100644
--- a/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/net-devices.cfg
+++ b/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/net-devices.cfg
@@ -1 +1,2 @@
CONFIG_IGB=y
+CONFIG_R8169=y
diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/upsquare.cfg b/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/upsquare.cfg
new file mode 100644
index 000000000..7be178bf6
--- /dev/null
+++ b/meta-agl-bsp/meta-intel/recipes-kernel/linux/files/upsquare.cfg
@@ -0,0 +1,4 @@
+CONFIG_MFD_CORE=y
+CONFIG_MFD_INTEL_LPSS=y
+CONFIG_MFD_INTEL_LPSS_ACPI=y
+CONFIG_MFD_INTEL_LPSS_PCI=y
diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend b/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend
index c49b8ecb0..9827b3e7d 100644
--- a/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend
+++ b/meta-agl-bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19%.bbappend
@@ -12,6 +12,14 @@ KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/extra-graphic-devices.cfg"
SRC_URI_append = " file://net-devices.cfg"
KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/net-devices.cfg"
+# adding specific driver needed by the upsquare board
+SRC_URI_append = " file://upsquare.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/upsquare.cfg"
+
+# adding CONFIG needed by LAVA and NBD
+SRC_URI_append = " file://lava.cfg"
+KERNEL_CONFIG_FRAGMENTS_append = " ${WORKDIR}/lava.cfg"
+
# Ensure we have a startup.nsh file
SRC_URI_append = " file://startup.nsh"
teral.Number.Integer.Long */ }
#include "double_conversion.h"
#include <math.h>
#include <stdio.h>

static const double testvalues[] = {
           0.0,        -0.0,         0.1,         -0.1,
          M_PI,       -M_PI,  123456.789,  -123456.789,
      INFINITY,   -INFINITY,         NAN, INFINITY - INFINITY,
          1e38,       -1e38,        1e39,        -1e39,
         1e-38,      -1e-38,       1e-39,       -1e-39,
   3.14159e-37,-3.14159e-37, 3.14159e-43, -3.14159e-43,
         1e-60,      -1e-60,       1e-45,       -1e-45,
    0.99999999999999, -0.99999999999999, 127.999999999999, -127.999999999999
};

#define TESTVALUES_COUNT (sizeof(testvalues)/sizeof(testvalues[0]))

int main()
{
    int status = 0;
    int i;
    for (i = 0; i < TESTVALUES_COUNT; i++)
    {
        double orig = testvalues[i];
        float expected_float = (float)orig;
        double expected_double = (double)expected_float;
        
        float got_float = double_to_float(*(uint64_t*)&orig);
        uint64_t got_double = float_to_double(got_float);
        
        uint32_t e1 = *(uint32_t*)&expected_float;
        uint32_t g1 = *(uint32_t*)&got_float;
        uint64_t e2 = *(uint64_t*)&expected_double;
        uint64_t g2 = got_double;
        
        if (g1 != e1)
        {
            printf("%3d double_to_float fail: %08x != %08x\n", i, g1, e1);
            status = 1;
        }
        
        if (g2 != e2)
        {
            printf("%3d float_to_double fail: %016llx != %016llx\n", i,
                (unsigned long long)g2,
                (unsigned long long)e2);
            status = 1;
        }
    }

    return status;
}