aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUILD.md2
-rw-r--r--CUSTOMIZE.md12
-rw-r--r--DOCUMENTATION.md18
-rw-r--r--FEATURES.md20
-rw-r--r--RELEASE.md46
-rw-r--r--SETUP.md20
-rw-r--r--meta-amd-bsp/README.md4
-rw-r--r--meta-amd-bsp/conf/layer.conf2
-rw-r--r--meta-amd-bsp/conf/machine/e3000.conf1
-rw-r--r--meta-amd-bsp/conf/machine/ethanolx.conf (renamed from meta-amd-bsp/conf/machine/rome.conf)4
-rw-r--r--meta-amd-bsp/conf/machine/include/amd-common-configurations.inc9
-rw-r--r--meta-amd-bsp/conf/machine/include/amdx86.inc7
-rw-r--r--meta-amd-bsp/conf/machine/v1000.conf15
-rw-r--r--meta-amd-bsp/dpdk/recipes-extended/dpdk/dpdk_18.11.10.bbappend17
-rw-r--r--meta-amd-bsp/dpdk/recipes-extended/dpdk/dpdk_20.11.1.bbappend13
-rw-r--r--meta-amd-bsp/recipes-applications/spi-test/files/0001-Modified-the-spi-driver-test-application-to-support-.patch47
-rw-r--r--meta-amd-bsp/recipes-applications/spi-test/files/spirom-test.c798
-rw-r--r--meta-amd-bsp/recipes-applications/spi-test/files/spirom.h53
-rw-r--r--meta-amd-bsp/recipes-applications/spi-test/spi-test_1.0.bb24
-rw-r--r--meta-amd-bsp/recipes-bsp/formfactor/formfactor/e3000/machconfig (renamed from meta-amd-bsp/recipes-bsp/formfactor/formfactor/amdx86/machconfig)0
-rw-r--r--meta-amd-bsp/recipes-bsp/formfactor/formfactor/ethanolx/machconfig3
-rw-r--r--meta-amd-bsp/recipes-bsp/formfactor/formfactor/v1000/machconfig3
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch46
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch30
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch34
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch56
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch76
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch39
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch34
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/cast-fprintf.patch36
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/cfg2
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/disable-address-of-packed-member.patch262
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.gcc-7.patch39
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.squashfs.patch24
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/gcc8.patch74
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch58
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub-efi_%.bbappend (renamed from meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bbappend)3
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bb112
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc5
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub2.inc76
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend1
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub_2.02.bb29
-rw-r--r--meta-amd-bsp/recipes-bsp/grub/grub_2.02.bbappend1
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/amd-spi_1.0.bb16
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/files/Makefile14
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.c479
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.h28
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.c517
-rw-r--r--meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.h53
-rw-r--r--meta-amd-bsp/recipes-kernel/kmod/files/blacklist-ccp.conf2
-rw-r--r--meta-amd-bsp/recipes-kernel/kmod/kmod_%.bbappend8
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0001-usb-xhci-Add-LPM-support-to-AMD-xhci-controller.patch32
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0002-amd-xgbe-fix-for-the-crash-which-happens-during-SFP-.patch77
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0003-amd-xgbe-Fix-NETDEV-WATCHDOG-transmit-queue-timed-ou.patch32
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0004-spi-spidev-Add-dummy-spidev-device-to-SPI-bus.patch100
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0005-amd-xgbe-Fix-for-Network-fluctuations.patch39
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0006-amd-xgbe-sets-XGBE_LINK_INIT-when-there-is-a-link-fa.patch39
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0007-amd-xgbe-improved-KR-training-sequence.patch286
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0008-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch33
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0009-amd-xgbe-increased-cdr-delay.patch35
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0010-amd-xgbe-synchronization-between-AN-state-machine-an.patch123
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/afalg.cfg41
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-ccp.cfg27
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-emmc-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-spi-patches.scc1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-usb-patches.scc1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe-patches.scc8
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe.cfg51
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-extra-config.cfg305
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-standard-only.cfg3
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-config.cfg396
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-features.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86.cfg59
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/disable-graphics.cfg4
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/dpdk.cfg5
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/kvm.cfg39
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-emmc-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-spi-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-usb-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-wdt-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-xgbe-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amdgpu-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/console.cfg7
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-bluetooth.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-intel-graphics.cfg0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-kgdb.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-bluetooth.cfg13
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-kgdb.cfg3
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/hid.cfg5
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/logo.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/misc-patches.scc0
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/sound.cfg29
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/spi-driver.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/usb-serial.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wdt-driver.cfg1
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wifi-drivers.cfg9
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-amdx86_5.10.inc36
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-common_5.10.inc27
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-e3000_5.10.inc3
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-ethanolx_5.10.inc3
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-rt_5.10.bbappend6
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-v1000_5.10.inc3
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto_5.10.bbappend9
-rw-r--r--meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-ethanolx_5.4.inc (renamed from meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-rome_5.4.inc)2
-rw-r--r--meta-amd-distro/conf/layer.conf2
106 files changed, 2062 insertions, 3109 deletions
diff --git a/BUILD.md b/BUILD.md
index 709691a9..cde6c762 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -7,7 +7,7 @@ a selected AMD machine, and will start a build:
### 2.1. Select a target machine
-Set the environment variable `MACHINE` to one of the supported AMD machines (i.e `e3000` or `rome`) that you want
+Set the environment variable `MACHINE` to the `ethanolx` bsp that you want
to build an image for (change the `<machine-name>` in the following example
accordingly):
```sh
diff --git a/CUSTOMIZE.md b/CUSTOMIZE.md
index 36a91687..56bce704 100644
--- a/CUSTOMIZE.md
+++ b/CUSTOMIZE.md
@@ -37,12 +37,12 @@ target.
#### Supported software features
-| Software feature | Configuration variable | Configuration values | Default value | Supported machines |
-|:----------------------|:----------------------------|:---------------------|:--------------|:-------------------|
-| ON-TARGET DEVELOPMENT | EXTRA_IMAGE_FEATURES_append | tools-sdk | | e3000, rome |
-| ON-TARGET DEBUGGING | EXTRA_IMAGE_FEATURES_append | tools-debug | | e3000, rome |
-| ON-TARGET PROFILING | EXTRA_IMAGE_FEATURES_append | tools-profile | | e3000, rome |
-| RT KERNEL | RT_KERNEL_AMD | yes, no | no | e3000, rome |
+| Software feature | Configuration variable | Configuration values | Default value | Supported machines |
+|:----------------------|:----------------------------|:---------------------|:--------------|:-----------------------|
+| ON-TARGET DEVELOPMENT | EXTRA_IMAGE_FEATURES_append | tools-sdk | | ethanolx (milan, rome) |
+| ON-TARGET DEBUGGING | EXTRA_IMAGE_FEATURES_append | tools-debug | | ethanolx (milan, rome) |
+| ON-TARGET PROFILING | EXTRA_IMAGE_FEATURES_append | tools-profile | | ethanolx (milan, rome) |
+| RT KERNEL | RT_KERNEL_AMD | yes, no | no | ethanolx (milan, rome) |
#### Example configuration in local.conf
```sh
diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md
index 2720026c..fcb6efc6 100644
--- a/DOCUMENTATION.md
+++ b/DOCUMENTATION.md
@@ -3,12 +3,12 @@
This section lists the links to official documentation of various
features, and user guide to Yocto Project and it's build system.
-| Feature | Documentation | Comments |
-|:---------------------------------------------|:---------------------------------------------------------------------------------------|:---------|
-| Yocto Project – Overview and Concepts Manual | https://www.yoctoproject.org/docs/3.1.4/overview-manual/overview-manual.html | |
-| Yocto Project – Quick Build | https://www.yoctoproject.org/docs/3.1.4/brief-yoctoprojectqs/brief-yoctoprojectqs.html | |
-| Yocto Project – Toaster Manual | https://www.yoctoproject.org/docs/3.1.4/toaster-manual/toaster-manual.html | |
-| Yocto Project – SDK Manual | https://www.yoctoproject.org/docs/3.1.4/sdk-manual/sdk-manual.html | |
-| KGDB | https://www.kernel.org/doc/html/v5.4/dev-tools/kgdb.html | |
-| LTTng | https://lttng.org/docs/v2.11 | |
-| DPDK | https://doc.dpdk.org/guides-18.11 | |
+| Feature | Documentation | Comments |
+|:---------------------------------------------|:------------------------------------------------------------------|:---------|
+| Yocto Project – Overview and Concepts Manual | https://docs.yoctoproject.org/3.3/overview-manual/index.html | |
+| Yocto Project – Quick Build | https://docs.yoctoproject.org/3.3/brief-yoctoprojectqs/index.html | |
+| Yocto Project – Toaster Manual | https://docs.yoctoproject.org/3.3/toaster-manual/index.html | |
+| Yocto Project – SDK Manual | https://docs.yoctoproject.org/3.3/sdk-manual/index.html | |
+| KGDB | https://www.kernel.org/doc/html/v5.10/dev-tools/kgdb.html | |
+| LTTng | https://lttng.org/docs/v2.12 | |
+| DPDK | https://doc.dpdk.org/guides-20.11 | |
diff --git a/FEATURES.md b/FEATURES.md
index d76f3254..ae6903a8 100644
--- a/FEATURES.md
+++ b/FEATURES.md
@@ -4,7 +4,7 @@ This section lists the features supported on the AMD machines. In each
machine column, a 'Y' represents that the feature in this row is supported
on this machine.
-| Category | Feature | E3000 | ROME |
+| Category | Feature | MILAN | ROME |
|:--------------------------------|:----------------------------------------|:-----:|:----:|
| Images | | | |
| | core-image-sato | | |
@@ -16,11 +16,11 @@ on this machine.
| | USB 2.0 Host | Y | Y |
| | USB 3.0 Host (MSC) | Y | Y |
| | USB 3.1 Host | | |
-| | NVMe | | Y |
+| | NVMe | Y | Y |
| | M.2 SATA | | |
| | I2C | Y | Y |
| | UART | Y | Y |
-| | eMMC | Y | |
+| | eMMC | | |
| | SMP | Y | Y |
| | SPI | Y | Y |
| I/O | | | |
@@ -29,13 +29,13 @@ on this machine.
| | Audio | | |
| | UART | Y | Y |
| | Bluetooth | | |
-| | USB Wi-Fi | Y | |
+| | USB Wi-Fi | | |
| | HDD/SATA | Y | Y |
-| | SD/MMC | Y | |
+| | SD/MMC | | |
| Networking | | | |
-| | Ethernet | Y | |
-| | SGMII | Y | |
-| | RGMII | Y | |
+| | Ethernet | | |
+| | SGMII | | |
+| | RGMII | | |
| Network Protocols | | | |
| | IPv4 | Y | Y |
| | IPv6 | Y | Y |
@@ -99,7 +99,7 @@ on this machine.
| | H.265 | | |
| | ROCm-OpenCL | | |
| Network Security | | | |
-| | IPSEC (strongswan) | Y | |
-| | DPDK | Y | |
+| | IPSEC (strongswan) | | |
+| | DPDK | | |
| Kernel Virtualization | | | |
| | KVM | Y | Y |
diff --git a/RELEASE.md b/RELEASE.md
index caafc8de..65019784 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -1,39 +1,41 @@
# Release notes
-This is the release notes document for the AMD machine ROME. This document
+This is the release notes document for the AMD machine ETHANOLX. This document
contains information about the Yocto layers' git repos, their branches
and commit hashes, software versions, and known/fixed issues/limitations.
## Bitbake layers
-| Layer | Git Repo | Branch | Commit Hash/Tag |
-|:------------------|:---------------------------------------------|:--------|:-----------------------------------------|
-| poky | git://git.yoctoproject.org/poky | dunfell | tags/yocto-3.1.4 |
-| meta-openembedded | git://git.openembedded.org/meta-openembedded | dunfell | f2d02cb71eaff8eb285a1997b30be52486c160ae |
-| meta-dpdk | git://git.yoctoproject.org/meta-dpdk | dunfell | 9465b6d27fc9520e18d05cc50dbed9d84e111953 |
-| meta-amd | git://git.yoctoproject.org/meta-amd | dunfell | tags/dunfell-rome-ga-202103 |
+| Layer | Git Repo | Branch | Commit Hash/Tag |
+|:------------------|:---------------------------------------------|:----------|:-----------------------------------------|
+| poky | git://git.yoctoproject.org/poky | hardknott | tags/yocto-3.3 |
+| meta-openembedded | git://git.openembedded.org/meta-openembedded | hardknott | cf5bd6a8308108b4313a1e45ce8aa87e73125bf9 |
+| meta-dpdk | git://git.yoctoproject.org/meta-dpdk | master | c011004a49ffb1304f376f0fdc65066913102d5f |
+| meta-amd | git://git.yoctoproject.org/meta-amd | hardknott | tags/hardknott-ethanolx-ga-202107 |
## Software versions
| Software | Version |
|:----------------|:---------|
-| Yocto Poky base | 3.1.4 |
-| grub | 2.02 |
-| linux-yocto | 5.4.69 |
-| linux-yocto-rt | 5.4.69 |
-| gcc | 9.3.0 |
-| util-linux | 2.35.1 |
-| lttng | 2.11 |
+| Yocto Poky base | 3.3 |
+| grub | 2.06-rc1 |
+| linux-yocto | 5.10.25 |
+| linux-yocto-rt | 5.10.25 |
+| gcc | 10.2.0 |
+| util-linux | 2.36.2 |
+| lttng | 2.12 |
| babeltrace | 1.5.8 |
-| connman | 1.37 |
-| gdb | 9.1 |
-| dpdk | 18.11.10 |
-| strongswan | 5.8.4 |
+| connman | 1.39 |
+| gdb | 10.1 |
+| dpdk | 20.11.1 |
+| strongswan | 5.9.2 |
## Fixed issues
-| __ROME Fixed Issues__ |
-|:----------------------|
-| None |
+| __ETHANOLX Fixed Issues__ |
+|:--------------------------|
+| None |
## Known issues
-| __ROME Known Issues/Limitations__ |
+| __ETHANOLX Known Issues/Limitations__ |
|:--------------------------------------------------------------------------------------------|
| Network is detected from only one NIC card when two NIC cards are connected on the platform |
+| AMD SPI Kernel Driver fails to access the SPI ROM registers |
+| _** Workaround: Disable ‘Rom Armor’ setting under ‘Chipset’ tab in BIOS_ |
diff --git a/SETUP.md b/SETUP.md
index 562c90dc..0257f4b4 100644
--- a/SETUP.md
+++ b/SETUP.md
@@ -2,12 +2,12 @@
Building images for AMD machines requires setting up the Yocto Project
Build System. Please follow the guidelines on
-[Yocto Project Overview and Concepts Manual](https://www.yoctoproject.org/docs/3.1.4/overview-manual/overview-manual.html)
-and [Yocto Project Quick Build Guide](https://www.yoctoproject.org/docs/3.1.4/brief-yoctoprojectqs/brief-yoctoprojectqs.html)
+[Yocto Project Overview and Concepts Manual](https://docs.yoctoproject.org/3.3/overview-manual/index.html)
+and [Yocto Project Quick Build Guide](https://docs.yoctoproject.org/3.3/brief-yoctoprojectqs/index.html)
if you are not familiar with the Yocto Project and it's Build System.
Running the following commands will setup the build system and will
-enable us to build recipes & images for any of the supported AMD machines (i.e `e3000` or `rome`).
+enable us to build recipes & images for the `ethanolx` bsp.
### 1.1 Prerequisites
@@ -17,14 +17,14 @@ sudo apt install -y gawk wget git-core diffstat unzip texinfo \
gcc-multilib build-essential chrpath socat cpio python3 \
python3-pip python3-pexpect xz-utils debianutils iputils-ping \
python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 \
- xterm
+ xterm python3-subunit mesa-common-dev
```
### 1.2 Download the build system and the meta-data layers
Select the Yocto Project branch:
```sh
-YOCTO_BRANCH="dunfell"
+YOCTO_BRANCH="hardknott"
```
Clone the git repositories:
@@ -34,7 +34,7 @@ git clone --single-branch --branch "${YOCTO_BRANCH}" \
cd poky-amd-${YOCTO_BRANCH}
git clone --single-branch --branch "${YOCTO_BRANCH}" \
"git://git.openembedded.org/meta-openembedded"
-git clone --single-branch --branch "${YOCTO_BRANCH}" \
+git clone --single-branch --branch master \
"git://git.yoctoproject.org/meta-dpdk"
git clone --single-branch --branch "${YOCTO_BRANCH}" \
"git://git.yoctoproject.org/meta-amd"
@@ -42,13 +42,13 @@ git clone --single-branch --branch "${YOCTO_BRANCH}" \
Checkout commit hashes:
```sh
-git checkout --quiet tags/yocto-3.1.4
+git checkout --quiet tags/yocto-3.3
cd meta-openembedded
-git checkout --quiet f2d02cb71eaff8eb285a1997b30be52486c160ae
+git checkout --quiet cf5bd6a8308108b4313a1e45ce8aa87e73125bf9
cd ../meta-dpdk
-git checkout --quiet 9465b6d27fc9520e18d05cc50dbed9d84e111953
+git checkout --quiet c011004a49ffb1304f376f0fdc65066913102d5f
cd ../meta-amd
-git checkout --quiet tags/dunfell-rome-ga-202103
+git checkout --quiet tags/hardknott-ethanolx-ga-202107
cd ..
```
diff --git a/meta-amd-bsp/README.md b/meta-amd-bsp/README.md
index ef94f72e..7dc8dd9e 100644
--- a/meta-amd-bsp/README.md
+++ b/meta-amd-bsp/README.md
@@ -10,8 +10,8 @@ to ensure they only apply to expected boards.
The supported AMD machines/platforms are:
-* rome - AMD EPYC™ 7002 Series (a.k.a. ROME)
-* e3000 - AMD EPYC™ Embedded 3000 Series (a.k.a. E3000)
+* ethanolx - AMD EPYC™ 7003 Series (a.k.a. milan)
+* ethanolx - AMD EPYC™ 7002 Series (a.k.a. rome)
Please see the README file contained in the root meta-amd directory
for general information and usage details.
diff --git a/meta-amd-bsp/conf/layer.conf b/meta-amd-bsp/conf/layer.conf
index f36e7a16..82a7966d 100644
--- a/meta-amd-bsp/conf/layer.conf
+++ b/meta-amd-bsp/conf/layer.conf
@@ -12,6 +12,6 @@ BBFILES += "${@' '.join('${LAYERDIR}/%s/recipes*/*/*.bb' % layer \
BBFILE_COLLECTIONS += "amd-bsp"
BBFILE_PRIORITY_amd-bsp = "13"
BBFILE_PATTERN_amd-bsp = "^${LAYERDIR}/"
-LAYERSERIES_COMPAT_amd-bsp = "dunfell"
+LAYERSERIES_COMPAT_amd-bsp = "hardknott"
LAYERDEPENDS_amdx86 = "openembedded-layer meta-python meta-networking"
diff --git a/meta-amd-bsp/conf/machine/e3000.conf b/meta-amd-bsp/conf/machine/e3000.conf
index 30279e6e..1d372572 100644
--- a/meta-amd-bsp/conf/machine/e3000.conf
+++ b/meta-amd-bsp/conf/machine/e3000.conf
@@ -13,4 +13,3 @@ KERNEL_SERIAL_CONSOLE ?= "console=ttyS4,115200n8"
# Add machine specific AMD features and feature pkgs here
EXTRA_IMAGE_FEATURES += "amd-feature-networking"
-DPDK_PKGS = "${@bb.utils.contains("BBFILE_COLLECTIONS", "dpdk", "dpdk dpdk-examples dpdk-test", "", d)}"
diff --git a/meta-amd-bsp/conf/machine/rome.conf b/meta-amd-bsp/conf/machine/ethanolx.conf
index 1859880d..a3e64f97 100644
--- a/meta-amd-bsp/conf/machine/rome.conf
+++ b/meta-amd-bsp/conf/machine/ethanolx.conf
@@ -1,7 +1,7 @@
#@TYPE: Machine
-#@NAME: rome
+#@NAME: ethanolx
-#@DESCRIPTION: Machine configuration for rome systems
+#@DESCRIPTION: Machine configuration for ethanolx (i.e. rome & milan) systems
require conf/machine/include/amdx86.inc
diff --git a/meta-amd-bsp/conf/machine/include/amd-common-configurations.inc b/meta-amd-bsp/conf/machine/include/amd-common-configurations.inc
index 9152fe3f..4c8cc1b8 100644
--- a/meta-amd-bsp/conf/machine/include/amd-common-configurations.inc
+++ b/meta-amd-bsp/conf/machine/include/amd-common-configurations.inc
@@ -2,11 +2,11 @@ require conf/machine/include/amd-features.inc
POKY_DEFAULT_DISTRO_FEATURES_remove = "wayland"
-PREFERRED_VERSION_grub-efi ?= "2.02"
-PREFERRED_VERSION_grub ?= "2.02"
+PREFERRED_VERSION_grub-efi ?= "2.04%"
+PREFERRED_VERSION_grub ?= "2.04%"
PREFERRED_PROVIDER_jpeg ?= "jpeg"
PREFERRED_PROVIDER_jpeg-native ?= "jpeg-native"
-PREFERRED_VERSION_linux-yocto ?= "5.4%"
+PREFERRED_VERSION_linux-yocto ?= "5.10%"
MULTILIBS ?= ""
require conf/multilib.conf
@@ -19,8 +19,7 @@ MACHINE_FEATURES_remove = "qemu-usermode"
MACHINE_EXTRA_RRECOMMENDS += "kernel-modules alsa-utils"
MACHINE_EXTRA_RRECOMMENDS += "grub parted util-linux-blkid"
-MACHINE_EXTRA_RRECOMMENDS += "rtc-test watchdog-test spi-test smbus-test gpio-test"
-MACHINE_EXTRA_RRECOMMENDS += "amd-spi"
+MACHINE_EXTRA_RRECOMMENDS += "rtc-test watchdog-test smbus-test gpio-test"
# Add serial consoles to kernel commandline, these should occur before the tty0
KERNEL_SERIAL_CONSOLE ??= ""
diff --git a/meta-amd-bsp/conf/machine/include/amdx86.inc b/meta-amd-bsp/conf/machine/include/amdx86.inc
index 67933d74..edd09756 100644
--- a/meta-amd-bsp/conf/machine/include/amdx86.inc
+++ b/meta-amd-bsp/conf/machine/include/amdx86.inc
@@ -1,11 +1,14 @@
PREFERRED_PROVIDER_virtual/kernel ?= "${@bb.utils.contains('RT_KERNEL_AMD', 'yes', "linux-yocto-rt", "linux-yocto", d)}"
-PREFERRED_VERSION_linux-yocto ?= "5.4%"
-PREFERRED_VERSION_linux-yocto-rt ?= "5.4%"
+PREFERRED_VERSION_linux-yocto ?= "5.10%"
+PREFERRED_VERSION_linux-yocto-rt ?= "5.10%"
require conf/machine/include/tune-amdx86.inc
require conf/machine/include/amd-common-configurations.inc
include conf/machine/include/amd-customer-configurations.inc
+# Add machine specific AMD features and feature pkgs here
+DPDK_PKGS = "${@bb.utils.contains("BBFILE_COLLECTIONS", "dpdk", "dpdk dpdk-examples dpdk-tools dpdk-module", "", d)}"
+
MACHINE_FEATURES_remove = "alsa"
MACHINE_EXTRA_RRECOMMENDS_remove = " rtc-test alsa-utils"
diff --git a/meta-amd-bsp/conf/machine/v1000.conf b/meta-amd-bsp/conf/machine/v1000.conf
new file mode 100644
index 00000000..6c322d18
--- /dev/null
+++ b/meta-amd-bsp/conf/machine/v1000.conf
@@ -0,0 +1,15 @@
+#@TYPE: Machine
+#@NAME: v1000
+
+#@DESCRIPTION: Machine configuration for v1000 systems
+
+require conf/machine/include/amdx86.inc
+
+# Setup a getty on all serial ports
+SERIAL_CONSOLES = "115200;ttyS4 115200;ttyS5"
+
+# Enable the kernel console on ttyS4/COM0
+KERNEL_SERIAL_CONSOLE ?= "console=ttyS4,115200n8"
+
+# Add machine specific AMD features and feature pkgs here
+EXTRA_IMAGE_FEATURES += "amd-feature-networking"
diff --git a/meta-amd-bsp/dpdk/recipes-extended/dpdk/dpdk_18.11.10.bbappend b/meta-amd-bsp/dpdk/recipes-extended/dpdk/dpdk_18.11.10.bbappend
deleted file mode 100644
index 0631f0f4..00000000
--- a/meta-amd-bsp/dpdk/recipes-extended/dpdk/dpdk_18.11.10.bbappend
+++ /dev/null
@@ -1,17 +0,0 @@
-DEPENDS += "openssl"
-
-# takes n or y
-BUILD_SHARED = "n"
-do_configure_prepend () {
- # enable the AMD CCP driver
- sed -e "s#CONFIG_RTE_LIBRTE_PMD_CCP=n#CONFIG_RTE_LIBRTE_PMD_CCP=y#" -i ${S}/config/common_base
- sed -e "s#CONFIG_RTE_LIBRTE_PMD_CCP_CPU_AUTH=n#CONFIG_RTE_LIBRTE_PMD_CCP_CPU_AUTH=y#" -i ${S}/config/common_base
-
- # shared libs are a more convenient way for development but then the user
- # has to load the PMD explicitly with the -d flag so be careful
- sed -e "s#CONFIG_RTE_BUILD_SHARED_LIB=n#CONFIG_RTE_BUILD_SHARED_LIB=${BUILD_SHARED}#" -i ${S}/config/common_base
-}
-
-COMPATIBLE_MACHINE_amdx86 = "amdx86"
-DPDK_TARGET_MACHINE_amdx86 = "znver1"
-TUNE_FEATURES += "m64"
diff --git a/meta-amd-bsp/dpdk/recipes-extended/dpdk/dpdk_20.11.1.bbappend b/meta-amd-bsp/dpdk/recipes-extended/dpdk/dpdk_20.11.1.bbappend
new file mode 100644
index 00000000..88cfca79
--- /dev/null
+++ b/meta-amd-bsp/dpdk/recipes-extended/dpdk/dpdk_20.11.1.bbappend
@@ -0,0 +1,13 @@
+DEPENDS += "openssl"
+
+RDEPENDS_dpdk-tools += "\
+ python3-shell \
+ python3-json \
+ python3-pyelftools \
+ python3-pprint \
+ python3-debugger \
+"
+
+COMPATIBLE_MACHINE = "${MACHINE}"
+DPDK_TARGET_MACHINE = "znver1"
+TUNE_FEATURES += "m64"
diff --git a/meta-amd-bsp/recipes-applications/spi-test/files/0001-Modified-the-spi-driver-test-application-to-support-.patch b/meta-amd-bsp/recipes-applications/spi-test/files/0001-Modified-the-spi-driver-test-application-to-support-.patch
deleted file mode 100644
index ebc648e0..00000000
--- a/meta-amd-bsp/recipes-applications/spi-test/files/0001-Modified-the-spi-driver-test-application-to-support-.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From a059c0737d9f75ce4e62acf3644708e32dc34fc2 Mon Sep 17 00:00:00 2001
-From: smavila <smavila@wallaby.amd.com>
-Date: Mon, 3 Dec 2018 06:21:04 +0000
-Subject: [PATCH] Modified the spi driver test application to support SPI ROM
- Flash in Wallaby platform
-
-Signed-off-by: smavila <smavila@wallaby.amd.com>
-Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
----
- spirom-test.c | 17 ++++++++++++++++-
- 1 file changed, 16 insertions(+), 1 deletion(-)
- mode change 100644 => 100755 spirom-test.c
-
-diff --git a/spirom-test.c b/spirom-test.c
-old mode 100644
-new mode 100755
-index 22c9003..2f10309
---- a/spirom-test.c
-+++ b/spirom-test.c
-@@ -243,8 +243,23 @@ void parse_cmd(const char *cmdline)
- return;
- }
-
-+ /* read device ID Command with response */
-+ tr.buf[0] = ROM_RDID;
-+ tr.direction = RECEIVE;
-+ tr.addr_present = 0;
-+ tr.len = 3;
-+
-+ ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
-+ if (ret < 1) {
-+ printf("\nError executing RDID command\n\n");
-+ return;
-+ }
-+
-+ if( (tr.buf[1] == 0x20) && (tr.buf[2] == 0xbb) && (tr.buf[3] == 0x18))
-+ tr.buf[0] = 0xC7; /* N25Q128A SPI ROM needs 0xC7 as erase command */
-+ else
-+ tr.buf[0] = ROM_CHIP_ERASE;
- /* Command without data */
-- tr.buf[0] = ROM_CHIP_ERASE;
- tr.direction = 0;
- tr.len = 0;
- tr.addr_present = 0;
---
-2.17.1
-
diff --git a/meta-amd-bsp/recipes-applications/spi-test/files/spirom-test.c b/meta-amd-bsp/recipes-applications/spi-test/files/spirom-test.c
deleted file mode 100644
index 22c90036..00000000
--- a/meta-amd-bsp/recipes-applications/spi-test/files/spirom-test.c
+++ /dev/null
@@ -1,798 +0,0 @@
-/*****************************************************************************
-*
-* Copyright (c) 2014, Advanced Micro Devices, Inc.
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of Advanced Micro Devices, Inc. nor the names of
-* its contributors may be used to endorse or promote products derived
-* from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*
-***************************************************************************/
-#include <stdint.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <string.h>
-#include <dirent.h>
-#include <signal.h>
-
-#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-
-#include <readline/readline.h>
-
-#include "spirom.h"
-
-#define SPI_APP_VERSION "1.0"
-
-static int device_opened = 0;
-static char filename[20];
-static int fd = -1;
-
-char *show_prompt(void)
-{
- return "$ ";
-}
-
-void sighandler(int sig)
-{
- /* Do nothing. That is the idea. */
-}
-
-void show_license(void)
-{
- printf("/*****************************************************************************\n"
- "*\n"
- "* Copyright (c) 2014, Advanced Micro Devices, Inc.\n"
- "* All rights reserved.\n"
- "*\n"
- "* Redistribution and use in source and binary forms, with or without\n"
- "* modification, are permitted provided that the following conditions are met:\n"
- "* * Redistributions of source code must retain the above copyright\n"
- "* notice, this list of conditions and the following disclaimer.\n"
- "* * Redistributions in binary form must reproduce the above copyright\n"
- "* notice, this list of conditions and the following disclaimer in the\n"
- "* documentation and/or other materials provided with the distribution.\n"
- "* * Neither the name of Advanced Micro Devices, Inc. nor the names of\n"
- "* its contributors may be used to endorse or promote products derived\n"
- "* from this software without specific prior written permission.\n"
- "*\n"
- "* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n"
- "* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n"
- "* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n"
- "* DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY\n"
- "* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n"
- "* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n"
- "* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n"
- "* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n"
- "* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n"
- "* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
- "*\n"
- "*\n"
- "***************************************************************************/\n");
-}
-
-void print_usage(void)
-{
- printf("\nCommands Supported ->\n");
- printf(" enumerate : List all SPI device nodes available\n");
- printf(" setdevice <dev_id> : Set the SPI device number to access\n");
- printf(" wren : Enable Write operation on SPI device\n");
- printf(" wrdi : Disable Write operation on SPI device\n");
- printf(" chiperase : Erase entire ROM chip\n");
- printf(" rdsr : Read status register of ROM device\n");
- printf(" rdid : Read device identification string\n");
- printf(" sectorerase <addr> <num_sectors> : Erase a fixed number of sectors starting at the address\n"
- " specified\n");
- printf(" blockerase <addr> <num_blocks> : Erase a fixed number of blocks starting at the address\n"
- " specified\n");
- printf(" read <addr> <num_bytes> <filename> : Read a fixed number of bytes starting at address\n"
- " specified, and output the contents into file\n");
- printf(" write <addr> <num_bytes> <filename> : Read a fixed number of bytes from file and output\n"
- " the contents to the device starting at the address\n"
- " specified\n");
- printf(" license : Displays the terms of LICENSE for this application\n");
- printf(" help : Displays help text\n");
- printf(" exit : Exits the application\n\n");
-}
-
-void parse_cmd(const char *cmdline)
-{
- struct spi_ioc_transfer tr;
- unsigned int bytes_chunks;
- unsigned int remaining_bytes;
- int addr;
- int ret;
-
- if (strncmp(cmdline, "enumerate", 9) == 0) {
- DIR *dir;
- struct dirent *dir_entry;
- int device_found = 0;
-
- /* Get the directory handle */
- if ((dir = opendir("/dev")) == NULL) {
- printf("\n\nFailed to open directory /dev. Probably you "
- "do not have right privilege!\n\n");
- exit(EXIT_FAILURE);
- }
-
- /* Iterate over all the directory entries */
- while ((dir_entry = readdir(dir)) != NULL) {
- /*
- * If the file is a character device, and its signature
- * matches spirom, then we print the corresponding file.
- */
- if ((dir_entry->d_type == DT_CHR) &&
- (strncmp(dir_entry->d_name, "spirom", 6) == 0)) {
- printf("/dev/%s\n", dir_entry->d_name);
- device_found = 1;
- }
- }
-
- printf("\n");
-
- /*
- * In case we did not find even a single entry, we print a
- * message and exit.
- */
- if (!device_found) {
- printf("\n\nNo spirom device nodes found, load spirom "
- "kernel module and try again\n\n");
- exit(EXIT_FAILURE);
- }
- } else if (strncmp(cmdline, "setdevice", 9) == 0) {
- char input[2 + 1];
- int file_desc;
-
- cmdline += 10;
- memset(input, 0, 3);
- if (sscanf(cmdline, "%s", input) < 1) {
- printf("\nInvalid inputs, please try again\n\n");
- return;
- }
-
- memset(filename, 0, 20);
- snprintf(filename, 19, "/dev/spirom%s", input);
- file_desc = open(filename, O_RDWR);
- if (file_desc < 0) {
- printf("\nError opening file %s\n\n", filename);
- return;
- }
-
- /* Once we have validated inputs, we store them into the global
- * variables used at other places in the program.
- */
- fd = file_desc;
- device_opened = 1;
- printf("\nSPI device set to /dev/spirom%s\n\n", input);
- } else if (strncmp(cmdline, "wren", 4) == 0) {
- if (!device_opened) {
- printf("\nSPI device needs to be set before you can "
- "perform this operation\n\n");
- return;
- }
-
- /* command without data */
- tr.buf[0] = ROM_WREN;
- tr.direction = 0;
- tr.len = 0;
- tr.addr_present = 0;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1)
- printf("\nError executing WREN command\n\n");
- else
- printf("\n...WREN completed successfully\n\n");
- } else if (strncmp(cmdline, "wrdi", 4) == 0) {
- if (!device_opened) {
- printf("\nSPI device needs to be set before you can "
- "perform this operation\n\n");
- return;
- }
-
- /* command without data */
- tr.buf[0] = ROM_WRDI;
- tr.direction = 0;
- tr.len = 0;
- tr.addr_present = 0;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1)
- printf("\nError executing WRDI command\n\n");
- else
- printf("\n...WRDI completed successfully\n\n");
- } else if (strncmp(cmdline, "chiperase", 9) == 0) {
- if (!device_opened) {
- printf("\nSPI device needs to be set before you can "
- "perform this operation\n\n");
- return;
- }
-
- tr.buf[0] = ROM_RDSR;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDSR command\n\n");;
- return;
- } else if ((tr.buf[1] & 0x02) == 0x00) {
- printf("\nCannot execute CHIPERASE command, write is disabled\n\n");
- return;
- }
-
- /* Command without data */
- tr.buf[0] = ROM_CHIP_ERASE;
- tr.direction = 0;
- tr.len = 0;
- tr.addr_present = 0;
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing CHIPERASE command\n\n");
- return;
- }
-
- printf("\n\nCHIPERASE operation in progress, please do not "
- " stop in between.\n\n");
-
- /* Make sure WIP has been reset */
- while (1) {
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_RDSR;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDSR command\n\n");
- return;
- }
-
- if ((tr.buf[1] & 0x01) == 0x00)
- break;
- }
-
- printf("\n\n...CHIPERASE completed successfully\n\n");
- /* Restore signal handler to default */
- } else if (strncmp(cmdline, "rdsr", 4) == 0) {
- if (!device_opened) {
- printf("\nSPI device needs to be set before you can "
- "perform this operation\n\n");
- return;
- }
-
- /* Command with response */
- tr.buf[0] = ROM_RDSR;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDSR command\n\n");
- return;
- }
-
- /*
- * The 1-byte response will be stored in tr.buf,
- * so print it out
- */
- printf("\nRDSR command returned: 0x%.2x\n\n", tr.buf[1]);
- } else if (strncmp(cmdline, "rdid", 4) == 0) {
- if (!device_opened) {
- printf("\nSPI device needs to be set before you can "
- "perform this operation\n\n");
- return;
- }
-
- /* Command with response */
- tr.buf[0] = ROM_RDID;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 3;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDID command\n\n");
- return;
- }
-
- /*
- * The 3-bytes response will be stored in tr.buf,
- * so print it out
- */
- printf("\nRDID command returned: 0x%.2x%.2x%.2x\n", tr.buf[1],
- tr.buf[2], tr.buf[3]);
- } else if (strncmp(cmdline, "sectorerase", 11) == 0) {
- int nsectors;
- int i;
-
- if (!device_opened) {
- printf("\nSPI device needs to be set before you can "
- "perform this operation\n\n");
- return;
- }
-
- cmdline += 12;
- if (sscanf(cmdline, "0x%x 0x%x", &addr, &nsectors) < 2) {
- printf("\nInvalid inputs, please try again\n\n");
- return;
- }
-
- tr.buf[0] = ROM_RDSR;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDSR command\n\n");
- return;
- } else if ((tr.buf[1] & 0x02) == 0x00) {
- printf("\nCannot execute SECTORERASE command, write is disabled\n\n");
- return;
- }
-
- printf("\n\nSECTORERASE operation in progress, please do not "
- " stop in between.\n\n");
-
- for (i = 0; i < nsectors; i++) {
- /* Write Enable before Sector Erase */
- tr.buf[0] = ROM_WREN;
- tr.direction = 0;
- tr.len = 0;
- tr.addr_present = 0;
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing WREN command\n\n");
- return;
- }
-
- /* Command with address but no data */
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_SECTOR_ERASE;
- tr.buf[3] = addr & 0xff;
- tr.buf[2] = (addr >> 8) & 0xff;
- tr.buf[1] = (addr >> 16) & 0xff;
- tr.addr_present = 1;
- tr.direction = 0;
- tr.len = 0;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing SECTORERASE command\n\n");
- return;
- }
-
- /* point to the next 4k sector */
- addr += 4 * 1024;
-
- /*
- * Before the next loop, we need to make sure that WIP
- * bit in the output of RDSR has been reset.
- */
- while (1) {
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_RDSR;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDSR command\n\n");
- return;
- }
-
- if ((tr.buf[1] & 0x01) == 0x00)
- break;
- }
- }
-
- printf("\n\n...SECTORERASE completed successfully\n\n");
- } else if (strncmp(cmdline, "blockerase", 10) == 0) {
- int nblocks;
- int i;
-
- if (!device_opened) {
- printf("\nSPI device needs to be set before you can "
- "perform this operation\n\n");
- return;
- }
-
- cmdline += 11;
- if (sscanf(cmdline, "0x%x 0x%x", &addr, &nblocks) < 2) {
- printf("\nInvalid inputs, please try again\n\n");
- return;
- }
-
- tr.buf[0] = ROM_RDSR;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDSR command\n\n");
- return;
- } else if ((tr.buf[1] & 0x02) == 0x00) {
- printf("\nError executing BLOCKERASE command, write is disabled\n\n");
- return;
- }
-
- printf("\n\nBLOCKERASE operation in progress, please do not "
- " stop in between.\n\n");
-
- for (i = 0; i < nblocks; i++) {
- /* Write Enable before Block Erase */
- tr.buf[0] = ROM_WREN;
- tr.direction = 0;
- tr.len = 0;
- tr.addr_present = 0;
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing WREN command\n\n");
- return;
- }
-
- /* Command with address but no data */
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_BLOCK_ERASE;
- tr.buf[3] = addr & 0xff;
- tr.buf[2] = (addr >> 8) & 0xff;
- tr.buf[1] = (addr >> 16) & 0xff;
- tr.addr_present = 1;
- tr.direction = 0;
- tr.len = 0;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing BLOCKERASE command\n\n");
- return;
- }
-
- /* point to the next 64k block */
- addr += 64 * 1024;
-
- /*
- * Before the next loop, we need to make sure that WIP
- * bit in the output of RDSR has been reset.
- */
- while (1) {
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_RDSR;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDSR command\n\n");
- return;
- }
-
- if ((tr.buf[1] & 0x01) == 0x00)
- break;
- }
- }
-
- printf("\n\n...BLOCKERASE completed successfully\n\n");
- } else if (strncmp(cmdline, "read", 4) == 0) {
- int nbytes;
- int outfile_fd;
- int i;
-
- if (!device_opened) {
- printf("\nSPI device needs to be set before you can "
- "perform this operation\n\n");
- return;
- }
-
- cmdline += 5;
- memset(filename, 0, 20);
- if (sscanf(cmdline, "0x%x 0x%x %s", &addr, &nbytes, filename) < 3) {
- printf("\nInvalid inputs, please try again\n\n");
- return;
- }
-
- /*
- * Open the output file for writing. Create a new file if not
- * there, and empty the file before writing if file already
- * exists.
- */
- outfile_fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
- if (outfile_fd < 0) {
- printf("\nError opening file %s for writing\n\n", filename);
- return;
- }
-
- /*
- * We will break down the bytes to be received in chunks of
- * of 64-bytes. Data might not be a even multiple of 64. So
- * in that case, we will have some remaining bytes <4. We
- * handle that separately.
- */
- bytes_chunks = nbytes / 64;
- remaining_bytes = nbytes % 64;
-
- printf("\n\nREAD operation in progress.\n\n");
-
- for (i = 0; i < bytes_chunks; i++) {
- /* Command with address and data */
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_READ;
- tr.direction = RECEIVE;
- /*
- * We will store the address into the buffer in little
- * endian order.
- */
- tr.buf[3] = addr & 0xff;
- tr.buf[2] = (addr >> 8) & 0xff;
- tr.buf[1] = (addr >> 16) & 0xff;
- tr.len = 64;
- tr.addr_present = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing READ command\n\n");
- return;
- }
-
- /* Write the data read to output file */
- if (write(outfile_fd, &tr.buf[4], tr.len) < 0) {
- printf("\nError writing to file %s\n\n", filename);
- return;
- }
- addr += 64;
- }
-
- if (remaining_bytes) {
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_READ;
- tr.direction = RECEIVE;
- tr.buf[3] = addr & 0xff;
- tr.buf[2] = (addr >> 8) & 0xff;
- tr.buf[1] = (addr >> 16) & 0xff;
- tr.len = remaining_bytes;
- tr.addr_present = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing READ command\n\n");
- return;
- }
-
- if (write(outfile_fd, &tr.buf[4], tr.len) < 0) {
- printf("\nError writing to file %s\n\n", filename);
- return;
- }
- }
-
- printf("\n\n...READ completed successfully\n\n");
- close(outfile_fd);
- } else if (strncmp(cmdline, "write", 5) == 0) {
- int nbytes;
- int infile_fd;
- int i;
-
- if (!device_opened) {
- printf("\nSPI device needs to be set before you can "
- "perform this operation\n\n");
- return;
- }
-
- cmdline += 6;
- memset(filename, 0, 20);
- if (sscanf(cmdline, "0x%x 0x%x %s", &addr, &nbytes, filename) < 3) {
- printf("\nInvalid inputs, please try again\n\n");
- return;
- }
-
- /* Open the input file for reading*/
- infile_fd = open(filename, O_RDONLY);
- if (infile_fd < 0) {
- printf("\nError opening file %s for reading\n\n", filename);
- return;
- }
-
- /*
- * We will break down the bytes to be transmitted in chunks of
- * of 64-bytes. Like for read, we might not have data in an
- * even multiple of 64 bytes. So we will handle the remaining
- * bytes in the end.
- */
- tr.buf[0] = ROM_RDSR;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDSR command\n\n");
- return;
- } else if ((tr.buf[1] & 0x02) == 0x00) {
- printf("\nCannot execute WRITE command, write is disabled\n\n");
- return;
- }
-
- bytes_chunks = nbytes / 64;
- remaining_bytes = nbytes % 64;
-
- printf("\n\nWRITE operation in progress, please do not "
- " stop in between.\n\n");
-
- for (i = 0; i < bytes_chunks; i++) {
- tr.buf[0] = ROM_WREN;
- tr.direction = 0;
- tr.len = 0;
- tr.addr_present = 0;
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing WREN command\n\n");
- return;
- }
-
- /* Command with data and address */
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_WRITE;
- tr.direction = TRANSMIT;
- /*
- * We will store the address into the buffer in little
- * endian order.
- */
- tr.buf[3] = addr & 0xff;
- tr.buf[2] = (addr >> 8) & 0xff;
- tr.buf[1] = (addr >> 16) & 0xff;
- tr.len = 64;
- tr.addr_present = 1;
-
- /* Read 64 bytes from input file to buffer */
- if (read(infile_fd, &tr.buf[4], tr.len) < 0) {
- printf("\nError reading from file %s\n\n", filename);
- return;
- }
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing WRITE command\n\n");
- return;
- }
-
- addr += 64;
-
- /*
- * Before the next loop, we need to make sure that WIP
- * bit in the output of RDSR has been reset.
- */
- while (1) {
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_RDSR;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDSR command\n\n");
- return;
- }
-
- if ((tr.buf[1] & 0x01) == 0x00)
- break;
- }
- }
-
- if (remaining_bytes) {
- tr.buf[0] = ROM_WREN;
- tr.direction = 0;
- tr.len = 0;
- tr.addr_present = 0;
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing WREN command\n\n");
- return;
- }
-
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_WRITE;
- tr.direction = TRANSMIT;
- tr.buf[3] = addr & 0xff;
- tr.buf[2] = (addr >> 8) & 0xff;
- tr.buf[1] = (addr >> 16) & 0xff;
- tr.len = remaining_bytes;
- tr.addr_present = 1;
-
- if (read(infile_fd, &tr.buf[4], tr.len) < 0) {
- printf("\nError reading from file %s\n\n", filename);
- return;
- }
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing WRITE command\n\n");
- return;
- }
-
- while (1) {
- memset(&tr, 0, sizeof(struct spi_ioc_transfer));
- tr.buf[0] = ROM_RDSR;
- tr.direction = RECEIVE;
- tr.addr_present = 0;
- tr.len = 1;
-
- ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
- if (ret < 1) {
- printf("\nError executing RDSR command\n\n");
- return;
- }
-
- if ((tr.buf[1] & 0x01) == 0x00)
- break;
- }
- }
-
- printf("\n\n...WRITE completed successfully\n\n");
- close(infile_fd);
- } else if (strncmp(cmdline, "license", 7) == 0) {
- show_license();
- } else if (strncmp(cmdline, "exit", 4) == 0) {
- printf("\nExiting...\n");
- close(fd);
- exit(EXIT_SUCCESS);
- } else if (strncmp(cmdline, "help", 4) == 0) {
- print_usage();
- } else {
- printf("\nUnknown command\n");
- print_usage();
- }
-}
-
-int main(void)
-{
- char *cmdline= NULL;
-
- printf("SPI sample application version: %s\n", SPI_APP_VERSION);
- printf("Copyright (c) 2014, Advanced Micro Devices, Inc.\n"
- "This sample application comes with ABSOLUTELY NO WARRANTY;\n"
- "This is free software, and you are welcome to redistribute it\n"
- "under certain conditions; type `license` for details.\n\n");
-
- /* Set the signal handler */
- signal(SIGINT, sighandler);
-
- while (1) {
- cmdline = readline(show_prompt());
- parse_cmd(cmdline);
- /* Free the memory malloc'ed by readline */
- free(cmdline);
- }
-
- /* Restore the default signal handler */
- signal(SIGINT, SIG_DFL);
-
- /* Should never reach here */
- return 0;
-}
diff --git a/meta-amd-bsp/recipes-applications/spi-test/files/spirom.h b/meta-amd-bsp/recipes-applications/spi-test/files/spirom.h
deleted file mode 100644
index f599925f..00000000
--- a/meta-amd-bsp/recipes-applications/spi-test/files/spirom.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef SPIROM_H
-#define SPIROM_H
-
-#include <linux/types.h>
-
-/*---------------------------------------------------------------------------*/
-
-/* IOCTL commands */
-
-#define SPI_IOC_MAGIC 'k'
-
-#define TRANSMIT 1
-#define RECEIVE 2
-
-/*
- * struct spi_ioc_transfer - interface structure between application and ioctl
- *
- * @buf: Buffer to hold 1-byte command, 3-bytes address, and 4-byte data for
- * transmit or receive. The internal FIFO of our controller can hold a
- * maximum of 8 bytes, including the address. But here we assume the
- * maximum data excluding address to be 4-bytes long.
- *
- * @direction: Direction of data transfer, either TRANSMIT or RECEIVE.
- *
- * @len: Length of data excluding command and address.
- *
- * @addr_present: Flag to indicate whether 'buf' above contains an address.
- */
-struct spi_ioc_transfer {
- __u8 buf[64 + 1 + 3];
- __u8 direction;
- __u8 len;
- __u8 addr_present;
-};
-
-/* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */
-#define SPI_MSGSIZE(N) \
- ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \
- ? ((N)*(sizeof (struct spi_ioc_transfer))) : 0)
-#define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)])
-
-/* SPI ROM command codes */
-#define ROM_WREN 0x06
-#define ROM_WRDI 0x04
-#define ROM_RDSR 0x05
-#define ROM_RDID 0x9F
-#define ROM_CHIP_ERASE 0x60
-#define ROM_SECTOR_ERASE 0x20
-#define ROM_BLOCK_ERASE 0xD8
-#define ROM_READ 0x03
-#define ROM_WRITE 0x02
-
-#endif /* SPIROM_H */
diff --git a/meta-amd-bsp/recipes-applications/spi-test/spi-test_1.0.bb b/meta-amd-bsp/recipes-applications/spi-test/spi-test_1.0.bb
deleted file mode 100644
index 7b590ad4..00000000
--- a/meta-amd-bsp/recipes-applications/spi-test/spi-test_1.0.bb
+++ /dev/null
@@ -1,24 +0,0 @@
-DESCRIPTION = "Sample application for AMD SPI driver"
-SECTION = "applications"
-LICENSE = "BSD"
-DEPENDS = "readline"
-LIC_FILES_CHKSUM = "file://spirom-test.c;endline=29;md5=8e7a9706367d146e5073510a6e176dc2"
-
-SRC_URI = "file://spirom-test.c \
- file://spirom.h \
- "
-
-SRC_URI_append_amdx86 = "file://0001-Modified-the-spi-driver-test-application-to-support-.patch"
-
-S = "${WORKDIR}"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-do_compile() {
- ${CC} spirom-test.c -o spirom-test -lreadline
-}
-
-do_install() {
- install -d ${D}${bindir}
- install -m 0755 spirom-test ${D}${bindir}
-}
diff --git a/meta-amd-bsp/recipes-bsp/formfactor/formfactor/amdx86/machconfig b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/e3000/machconfig
index 28ca080e..28ca080e 100644
--- a/meta-amd-bsp/recipes-bsp/formfactor/formfactor/amdx86/machconfig
+++ b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/e3000/machconfig
diff --git a/meta-amd-bsp/recipes-bsp/formfactor/formfactor/ethanolx/machconfig b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/ethanolx/machconfig
new file mode 100644
index 00000000..28ca080e
--- /dev/null
+++ b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/ethanolx/machconfig
@@ -0,0 +1,3 @@
+# Assume a USB mouse and keyboard are connected
+HAVE_TOUCHSCREEN=n
+HAVE_KEYBOARD=y
diff --git a/meta-amd-bsp/recipes-bsp/formfactor/formfactor/v1000/machconfig b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/v1000/machconfig
new file mode 100644
index 00000000..28ca080e
--- /dev/null
+++ b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/v1000/machconfig
@@ -0,0 +1,3 @@
+# Assume a USB mouse and keyboard are connected
+HAVE_TOUCHSCREEN=n
+HAVE_KEYBOARD=y
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
deleted file mode 100644
index ce3238f3..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From fb7b827a56b1f92f882d0f5ef130acc968b23293 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Jan 2016 19:17:31 +0000
-Subject: [PATCH] Disable -mfpmath=sse as well when SSE is disabled
-
-Fixes
-
-configure:20574: i586-poky-linux-gcc -m32 -march=core2 -msse3
--mtune=generic -mfpmath=sse
---sysroot=/usr/local/dev/yocto/grubtest2/build/tmp/sysroots/emenlow -o
-conftest -O2 -pipe -g -feliminate-unused-debug-types -Wall -W -Wshadow
--Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g
--falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse
--mno-sse2 -mno-3dnow -fno-dwarf2-cfi-asm -m32 -fno-stack-protector
--mno-stack-arg-probe -Werror -nostdlib -Wl,--defsym,___main=0x8100
--Wall -W -I$(top_srcdir)/include -I$(top_builddir)/include
--DGRUB_MACHINE_PCBIOS=1 -DGRUB_MACHINE=I386_PC -Wl,-O1
--Wl,--hash-style=gnu -Wl,--as-needed conftest.c >&5
-conftest.c:1:0: error: SSE instruction set disabled, using 387
-arithmetics [-Werror]
-cc1: all warnings being treated as errors
-
-Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Pending
-
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 26d2f33..9ce56de 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -783,7 +783,7 @@ fi
- if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
- # Some toolchains enable these features by default, but they need
- # registers that aren't set up properly in GRUB.
-- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow"
-+ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mfpmath=387"
- fi
-
- # GRUB doesn't use float or doubles at all. Yet some toolchains may decide
---
-2.7.0
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index 67dc1154..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Mon, 13 Apr 2015 17:02:13 -0700
-Subject: [PATCH] Unset need_charset_alias when building for musl
-
-localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
-which actually shoudl be fixed in gnulib and then all downstream
-projects will get it eventually. For now we apply the fix to
-coreutils
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- lib/gnulib.mk | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: grub-2.00/grub-core/gnulib/Makefile.am
-===================================================================
---- grub-2.00.orig/grub-core/gnulib/Makefile.am
-+++ grub-2.00/grub-core/gnulib/Makefile.am
-@@ -410,7 +410,7 @@ install-exec-localcharset: all-local
- case '$(host_os)' in \
- darwin[56]*) \
- need_charset_alias=true ;; \
-- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
-+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
- need_charset_alias=false ;; \
- *) \
- need_charset_alias=true ;; \
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch
deleted file mode 100644
index e01fcdff..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/0001-grub-setup-Debug-message-cleanup.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 4e9d9358e0cda6d01020005eb6343e3b69f7201a Mon Sep 17 00:00:00 2001
-From: Cao jin <caoj.fnst@cn.fujitsu.com>
-Date: Tue, 3 Jul 2018 18:51:13 +0800
-Subject: [PATCH] grub-setup: Debug message cleanup
-
-Variable "root" is initialized after root device probing and is null in
-current place, so, drop it.
-
-Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
-Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
----
-Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/grub.git/commit/?id=4e9d9358e0cda6d01020005eb6343e3b69f7201a]
-
- util/setup.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/util/setup.c b/util/setup.c
-index 80363075d..9c1e1b7da 100644
---- a/util/setup.c
-+++ b/util/setup.c
-@@ -305,9 +305,8 @@ SETUP (const char *dir,
- bl.first_block = (struct grub_boot_blocklist *) (core_img
- + GRUB_DISK_SECTOR_SIZE
- - sizeof (*bl.block));
-- grub_util_info ("root is `%s', dest is `%s'", root, dest);
-
-- grub_util_info ("Opening dest");
-+ grub_util_info ("Opening dest `%s'", dest);
- dest_dev = grub_device_open (dest);
- if (! dest_dev)
- grub_util_error ("%s", grub_errmsg);
---
-2.17.2 (Apple Git-113)
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
deleted file mode 100644
index d5bfaa17..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From b512c77222a8b133d7dd71a0dcef081a921d97d4 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 13 Jan 2016 19:28:00 +0000
-Subject: [PATCH] grub.d/10_linux.in: add oe's kernel name
-
-Our kernel's name is bzImage, we need add it to grub.d/10_linux.in so
-that the grub-mkconfig and grub-install can work correctly.
-
-We only need add the bzImage to util/grub.d/10_linux.in, but also add it
-to util/grub.d/20_linux_xen.in to keep compatibility.
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
-Upstream-Status: Inappropriate [OE specific]
-
- util/grub.d/10_linux.in | 6 +++---
- util/grub.d/20_linux_xen.in | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index 859b608..946be5d 100644
---- a/util/grub.d/10_linux.in
-+++ b/util/grub.d/10_linux.in
-@@ -148,12 +148,12 @@ machine=`uname -m`
- case "x$machine" in
- xi?86 | xx86_64)
- list=
-- for i in /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
-+ for i in /boot/bzImage-* /bzImage-* /boot/vmlinuz-* /vmlinuz-* /boot/kernel-* ; do
- if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
- done ;;
-- *)
-+ *)
- list=
-- for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
-+ for i in /boot/bzImage-* /boot/vmlinuz-* /boot/vmlinux-* /bzImage-* /vmlinuz-* /vmlinux-* /boot/kernel-* ; do
- if grub_file_is_not_garbage "$i" ; then list="$list $i" ; fi
- done ;;
- esac
-diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
-index f532fb9..1994244 100644
---- a/util/grub.d/20_linux_xen.in
-+++ b/util/grub.d/20_linux_xen.in
-@@ -138,7 +138,7 @@ EOF
- }
-
- linux_list=
--for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
-+for i in /boot/bzImage[xz]-* /bzImage[xz]-* /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do
- if grub_file_is_not_garbage "$i"; then
- basename=$(basename $i)
- version=$(echo $basename | sed -e "s,^[^0-9]*-,,g")
---
-2.7.0
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch
deleted file mode 100644
index 61d58c40..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From 842c390469e2c2e10b5aa36700324cd3bde25875 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Sat, 17 Feb 2018 06:47:28 -0800
-Subject: [PATCH] x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32
-
-Starting from binutils commit bd7ab16b4537788ad53521c45469a1bdae84ad4a:
-
-https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bd7ab16b4537788ad53521c45469a1bdae84ad4a
-
-x86-64 assembler generates R_X86_64_PLT32, instead of R_X86_64_PC32, for
-32-bit PC-relative branches. Grub2 should treat R_X86_64_PLT32 as
-R_X86_64_PC32.
-
-Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
----
- grub-core/efiemu/i386/loadcore64.c | 1 +
- grub-core/kern/x86_64/dl.c | 1 +
- util/grub-mkimagexx.c | 1 +
- util/grub-module-verifier.c | 1 +
- 4 files changed, 4 insertions(+)
-
-diff --git a/grub-core/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c
-index e49d0b6ff..18facf47f 100644
---- a/grub-core/efiemu/i386/loadcore64.c
-+++ b/grub-core/efiemu/i386/loadcore64.c
-@@ -98,6 +98,7 @@ grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
- break;
-
- case R_X86_64_PC32:
-+ case R_X86_64_PLT32:
- err = grub_efiemu_write_value (addr,
- *addr32 + rel->r_addend
- + sym.off
-diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c
-index 440690673..3a73e6e6c 100644
---- a/grub-core/kern/x86_64/dl.c
-+++ b/grub-core/kern/x86_64/dl.c
-@@ -70,6 +70,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
- break;
-
- case R_X86_64_PC32:
-+ case R_X86_64_PLT32:
- {
- grub_int64_t value;
- value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value -
-diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
-index a2bb05439..39d7efb91 100644
---- a/util/grub-mkimagexx.c
-+++ b/util/grub-mkimagexx.c
-@@ -841,6 +841,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
- break;
-
- case R_X86_64_PC32:
-+ case R_X86_64_PLT32:
- {
- grub_uint32_t *t32 = (grub_uint32_t *) target;
- *t32 = grub_host_to_target64 (grub_target_to_host32 (*t32)
-diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
-index 9179285a5..a79271f66 100644
---- a/util/grub-module-verifier.c
-+++ b/util/grub-module-verifier.c
-@@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = {
- -1
- }, (int[]){
- R_X86_64_PC32,
-+ R_X86_64_PLT32,
- -1
- }
- },
---
-2.11.0
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch
new file mode 100644
index 00000000..69d62e64
--- /dev/null
+++ b/meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch
@@ -0,0 +1,39 @@
+From d80b85dd61db9261b6cfd0d43a2f1c035627310b Mon Sep 17 00:00:00 2001
+From: "Arsalan H. Awan" <Arsalan_Awan@mentor.com>
+Date: Tue, 6 Apr 2021 15:01:41 +0500
+Subject: [PATCH] x86_64/amd: avoid SSE register return with SSE disabled
+
+When GRUB is compiled with -march=znver1 or -march=znver2 using the GCC
+v9.3 and above, the compilation fails with the following error:
+
+recipe-sysroot-native/usr/lib/x86_64-amd-linux/gcc/x86_64-amd-linux/
+ 10.2.0/include/shaintrin.h:40:1:
+ error: SSE register return with SSE disabled
+
+What's interesting, is that -march=skylake also implies -mbmi which
+defines __BMI__ but compilation succeeds.
+
+It is probably due to different BMI implementations on AMD and INTEL
+processors and the way compiler uses related instructions.
+
+Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0b1bc48..dbe7a71 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -833,7 +833,7 @@ fi
+ if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then
+ # Some toolchains enable these features by default, but they need
+ # registers that aren't set up properly in GRUB.
+- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mfpmath=387"
++ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mfpmath=387 -mno-bmi"
+ fi
+
+ # GRUB doesn't use float or doubles at all. Yet some toolchains may decide
+--
+2.25.1
+
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch b/meta-amd-bsp/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch
deleted file mode 100644
index fc5aa4e3..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From ff8f68cc48fd3c30d55e1d570d51f2e0952c968e Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang@windriver.com>
-Date: Sat, 25 Jan 2014 23:49:44 -0500
-Subject: [PATCH] autogen.sh: exclude .pc from po/POTFILES.in
-
-Exclude the .pc from po/POTFILES.in since quilt uses "patch --backup",
-which will create the backup file under .pc, this may cause unexpected
-errors, for example, on CentOS 5.x, if the backup file is null
-(newfile), it's mode will be 000, then we will get errors when xgettext
-try to read it.
-
-Upstream-Status: Inappropriate [OE specific]
-
-Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
----
- autogen.sh | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/autogen.sh b/autogen.sh
-index 7424428..843619e 100755
---- a/autogen.sh
-+++ b/autogen.sh
-@@ -5,7 +5,7 @@ set -e
- export LC_COLLATE=C
- unset LC_ALL
-
--find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' |sort > po/POTFILES.in
-+find . -iname '*.[ch]' ! -ipath './grub-core/lib/libgcrypt-grub/*' ! -ipath './build-aux/*' ! -ipath './grub-core/lib/libgcrypt/src/misc.c' ! -ipath './grub-core/lib/libgcrypt/src/global.c' ! -ipath './grub-core/lib/libgcrypt/src/secmem.c' ! -ipath './util/grub-gen-widthspec.c' ! -ipath './util/grub-gen-asciih.c' ! -path './.pc/*' | sort > po/POTFILES.in
- find util -iname '*.in' ! -name Makefile.in |sort > po/POTFILES-shell.in
-
- echo "Importing unicode..."
---
-1.7.10.4
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/cast-fprintf.patch b/meta-amd-bsp/recipes-bsp/grub/files/cast-fprintf.patch
deleted file mode 100644
index b340d557..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/cast-fprintf.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-grub_script.yy.c: In function 'yy_fatal_error':
-grub_script.yy.c:18:22: error: statement with no effect [-Werror=unused-value]
-
- ^
-grub_script.yy.c:2366:2: note: in expansion of macro 'fprintf'
- (void)yyg;
- ^~~~~~~
-
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-From c36c2a86404f373100775305f532c09d46f3c6ce Mon Sep 17 00:00:00 2001
-From: Vladimir Serbinenko <phcoder@gmail.com>
-Date: Mon, 14 Aug 2017 14:11:43 +0200
-Subject: yylex: Explicilty cast fprintf to void.
-
-It's needed to avoid warning on recent GCC.
----
- grub-core/script/yylex.l | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grub-core/script/yylex.l b/grub-core/script/yylex.l
-index 95b2191..7b44c37 100644
---- a/grub-core/script/yylex.l
-+++ b/grub-core/script/yylex.l
-@@ -91,7 +91,7 @@ typedef size_t yy_size_t;
- #define stdin 0
- #define stdout 0
-
--#define fprintf(...) 0
-+#define fprintf(...) (void)0
- #define exit(...) grub_fatal("fatal error in lexer")
- #endif
-
---
-cgit v1.0-41-gc330
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/cfg b/meta-amd-bsp/recipes-bsp/grub/files/cfg
deleted file mode 100644
index 8ca53d24..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-search.file ($cmdpath)/EFI/BOOT/grub.cfg root
-set prefix=($root)/EFI/BOOT
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/disable-address-of-packed-member.patch b/meta-amd-bsp/recipes-bsp/grub/files/disable-address-of-packed-member.patch
deleted file mode 100644
index 415f52eb..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/disable-address-of-packed-member.patch
+++ /dev/null
@@ -1,262 +0,0 @@
-Disable address-of-packed-member warnings with gcc9
-
-gcc9 has turned this warning into error when -Werror is used, lets paper
-it over by turning it into a warning for now
-
-Fixes
- error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member]
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
---- a/grub-core/commands/lsacpi.c
-+++ b/grub-core/commands/lsacpi.c
-@@ -26,6 +26,9 @@
- #include <grub/dl.h>
-
- #pragma GCC diagnostic ignored "-Wcast-align"
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
-
- GRUB_MOD_LICENSE ("GPLv3+");
-
---- a/grub-core/commands/lspci.c
-+++ b/grub-core/commands/lspci.c
-@@ -26,6 +26,9 @@
-
- GRUB_MOD_LICENSE ("GPLv3+");
-
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
- struct grub_pci_classname
- {
- int class;
-@@ -171,7 +174,7 @@ grub_lspci_iter (grub_pci_device_t dev,
-
- if (space == 0)
- continue;
--
-+
- switch (space & GRUB_PCI_ADDR_SPACE_MASK)
- {
- case GRUB_PCI_ADDR_SPACE_IO:
-@@ -195,13 +198,13 @@ grub_lspci_iter (grub_pci_device_t dev,
- (space & GRUB_PCI_ADDR_MEM_MASK),
- space & GRUB_PCI_ADDR_MEM_PREFETCH
- ? "prefetchable" : "non-prefetchable");
--
-+
- }
- else
- grub_printf ("\t32-bit memory space %d at 0x%016llx [%s]\n",
- (unsigned) ((reg - GRUB_PCI_REG_ADDRESSES)
- / sizeof (grub_uint32_t)) - 1,
-- (unsigned long long)
-+ (unsigned long long)
- (space & GRUB_PCI_ADDR_MEM_MASK),
- space & GRUB_PCI_ADDR_MEM_PREFETCH
- ? "prefetchable" : "non-prefetchable");
---- a/grub-core/fs/cpio_common.c
-+++ b/grub-core/fs/cpio_common.c
-@@ -26,7 +26,9 @@
- #include <grub/archelp.h>
-
- GRUB_MOD_LICENSE ("GPLv3+");
--
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
- struct grub_archelp_data
- {
- grub_disk_t disk;
-@@ -108,7 +110,7 @@ grub_cpio_get_link_target (struct grub_a
- if (!ret)
- return NULL;
-
-- err = grub_disk_read (data->disk, 0, data->dofs, data->size,
-+ err = grub_disk_read (data->disk, 0, data->dofs, data->size,
- ret);
- if (err)
- {
---- a/grub-core/fs/hfs.c
-+++ b/grub-core/fs/hfs.c
-@@ -32,6 +32,9 @@
- #include <grub/fshelp.h>
-
- GRUB_MOD_LICENSE ("GPLv3+");
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
-
- #define GRUB_HFS_SBLOCK 2
- #define GRUB_HFS_EMBED_HFSPLUS_SIG 0x482B
-@@ -882,7 +885,7 @@ grub_hfs_iterate_dir_it_dir (struct grub
- {
- struct grub_hfs_catalog_key *ckey = rec->key;
- struct grub_hfs_iterate_dir_node_found_ctx *ctx = hook_arg;
--
-+
- /* Stop when the entries do not match anymore. */
- if (ckey->parent_dir != ctx->dir_be)
- return 1;
-@@ -1076,7 +1079,7 @@ macroman_to_utf8 (char *to, const grub_u
- {
- *optr++ = ':';
- continue;
-- }
-+ }
- if (!(*iptr & 0x80))
- {
- *optr++ = *iptr;
-@@ -1093,7 +1096,7 @@ utf8_to_macroman (grub_uint8_t *to, cons
- grub_uint8_t *end = to + 31;
- grub_uint8_t *optr = to;
- const char *iptr = from;
--
-+
- while (*iptr && optr < end)
- {
- int i, clen;
-@@ -1103,7 +1106,7 @@ utf8_to_macroman (grub_uint8_t *to, cons
- *optr++ = '/';
- iptr++;
- continue;
-- }
-+ }
- if (!(*iptr & 0x80))
- {
- *optr++ = *iptr++;
-@@ -1164,7 +1167,7 @@ lookup_file (grub_fshelp_node_t dir,
- *foundnode = grub_malloc (sizeof (struct grub_fshelp_node));
- if (!*foundnode)
- return grub_errno;
--
-+
- (*foundnode)->inode = grub_be_to_cpu32 (fdrec.dir.dirid);
- (*foundnode)->fdrec = fdrec;
- (*foundnode)->data = dir->data;
-@@ -1265,7 +1268,7 @@ grub_hfs_dir (grub_device_t device, cons
- .hook_data = hook_data
- };
- grub_fshelp_node_t found = NULL;
--
-+
- grub_dl_ref (my_mod);
-
- data = grub_hfs_mount (device->disk);
-@@ -1294,7 +1297,7 @@ grub_hfs_open (struct grub_file *file, c
- {
- struct grub_hfs_data *data;
- grub_fshelp_node_t found = NULL;
--
-+
- grub_dl_ref (my_mod);
-
- data = grub_hfs_mount (file->device->disk);
---- a/grub-core/fs/hfsplus.c
-+++ b/grub-core/fs/hfsplus.c
-@@ -19,7 +19,7 @@
-
- /* HFS+ is documented at http://developer.apple.com/technotes/tn/tn1150.html */
-
--#define grub_fshelp_node grub_hfsplus_file
-+#define grub_fshelp_node grub_hfsplus_file
- #include <grub/err.h>
- #include <grub/file.h>
- #include <grub/mm.h>
-@@ -34,6 +34,9 @@
-
- GRUB_MOD_LICENSE ("GPLv3+");
-
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
- /* The type of node. */
- enum grub_hfsplus_btnode_type
- {
-@@ -145,7 +148,7 @@ grub_hfsplus_read_block (grub_fshelp_nod
- {
- struct grub_hfsplus_btnode *nnode = 0;
- grub_disk_addr_t blksleft = fileblock;
-- struct grub_hfsplus_extent *extents = node->compressed
-+ struct grub_hfsplus_extent *extents = node->compressed
- ? &node->resource_extents[0] : &node->extents[0];
-
- while (1)
-@@ -461,7 +464,7 @@ grub_hfsplus_cmp_extkey (struct grub_hfs
-
- if (extkey_a->type < extkey_b->type)
- return -1;
--
-+
- akey = grub_be_to_cpu32 (extkey_a->start);
- if (akey > extkey_b->start)
- return 1;
-@@ -548,7 +551,7 @@ grub_hfsplus_btree_search (struct grub_h
- struct grub_hfsplus_key_internal *key,
- int (*compare_keys) (struct grub_hfsplus_key *keya,
- struct grub_hfsplus_key_internal *keyb),
-- struct grub_hfsplus_btnode **matchnode,
-+ struct grub_hfsplus_btnode **matchnode,
- grub_off_t *keyoffset)
- {
- grub_uint64_t currnode;
---- a/grub-core/fs/jfs.c
-+++ b/grub-core/fs/jfs.c
-@@ -28,6 +28,9 @@
- #include <grub/i18n.h>
-
- GRUB_MOD_LICENSE ("GPLv3+");
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
-
- #define GRUB_JFS_MAX_SYMLNK_CNT 8
- #define GRUB_JFS_FILETYPE_MASK 0170000
---- a/grub-core/kern/efi/efi.c
-+++ b/grub-core/kern/efi/efi.c
-@@ -29,6 +29,9 @@
- #include <grub/mm.h>
- #include <grub/loader.h>
-
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
- /* The handle of GRUB itself. Filled in by the startup code. */
- grub_efi_handle_t grub_efi_image_handle;
-
-@@ -201,7 +204,7 @@ grub_efi_set_variable(const char *var, c
-
- r = grub_efi_system_table->runtime_services;
-
-- status = efi_call_5 (r->set_variable, var16, guid,
-+ status = efi_call_5 (r->set_variable, var16, guid,
- (GRUB_EFI_VARIABLE_NON_VOLATILE
- | GRUB_EFI_VARIABLE_BOOTSERVICE_ACCESS
- | GRUB_EFI_VARIABLE_RUNTIME_ACCESS),
---- a/grub-core/loader/efi/chainloader.c
-+++ b/grub-core/loader/efi/chainloader.c
-@@ -41,6 +41,9 @@
- #endif
-
- GRUB_MOD_LICENSE ("GPLv3+");
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
-
- static grub_dl_t my_mod;
-
---- a/grub-core/commands/usbtest.c
-+++ b/grub-core/commands/usbtest.c
-@@ -63,6 +63,10 @@ static const char *usb_devspeed[] =
- "High"
- };
-
-+#if __GNUC__ >= 9
-+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
-+#endif
-+
- static grub_usb_err_t
- grub_usb_get_string (grub_usb_device_t dev, grub_uint8_t index, int langid,
- char **string)
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.gcc-7.patch b/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.gcc-7.patch
deleted file mode 100644
index f35df97b..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.gcc-7.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-* e.g. with gentoo gcc-7.1 they define _FORTIFY_SOURCE by default with:
- https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/7.1.0/gentoo/10_all_default-fortify-source.patch?view=markup
- which results in following error while building grub-efi-native:
- ./config-util.h:1504:48: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
- || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
- ^~~~~~~~~~~~~~~
- this part comes from gnulib and it's used only for Apple and BSD,
- so we can ignore it, but we cannot add -Wno-error=expansion-to-defined
- because this warning was introduced only in gcc-7 and older gcc
- will fail with:
- cc1: error: -Werror=expansion-to-defined: no option -Wexpansion-to-defined
- use #pragma to work around this
-
-Upstream-Status: Pending (should be fixed in gnulib which is then rarely updated in grub)
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
-diff -uNr grub-2.02.old/m4/extern-inline.m4 grub-2.02/m4/extern-inline.m4
---- grub-2.02.old/m4/extern-inline.m4 2016-02-28 15:22:21.000000000 +0100
-+++ grub-2.02/m4/extern-inline.m4 2017-08-22 19:26:45.213637276 +0200
-@@ -39,6 +39,10 @@
- OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
- for clang but remains for g++; see <http://trac.macports.org/ticket/41033>.
- Assume DragonFly and FreeBSD will be similar. */
-+#pragma GCC diagnostic push
-+#if __GNUC__ >= 7
-+#pragma GCC diagnostic ignored "-Wexpansion-to-defined"
-+#endif
- #if (((defined __APPLE__ && defined __MACH__) \
- || defined __DragonFly__ || defined __FreeBSD__) \
- && (defined __header_inline \
-@@ -50,6 +52,7 @@
- && defined __GNUC__ && ! defined __cplusplus))))
- # define _GL_EXTERN_INLINE_STDHEADER_BUG
- #endif
-+#pragma GCC diagnostic pop
- #if ((__GNUC__ \
- ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
- : (199901L <= __STDC_VERSION__ \
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.squashfs.patch b/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.squashfs.patch
deleted file mode 100644
index 2c2d2ea0..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/fix.build.with.squashfs.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-When squashfs support is enabled, the build fails with:
-
-../grub-2.02/grub-core/fs/squash4.c: In function 'direct_read':
-../grub-2.02/grub-core/fs/squash4.c:868:10: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized]
- if (err)
- ^
-cc1: all warnings being treated as errors
-Makefile:7272: recipe for target 'grub-core/fs/libgrubmods_a-squash4.o' failed
-
-Upstream-Status: Pending (should be fixed in gnulib which is then rarely updated in grub)
-
-Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-
---- grub-2.02/grub-core/fs/squash4.c 2019-03-10 20:00:14.070468728 +0000
-+++ grub-2.02.fixed/grub-core/fs/squash4.c 2019-03-10 19:58:31.382477818 +0000
-@@ -746,7 +746,7 @@
- struct grub_squash_cache_inode *ino,
- grub_off_t off, char *buf, grub_size_t len)
- {
-- grub_err_t err;
-+ grub_err_t err = 0;
- grub_off_t cumulated_uncompressed_size = 0;
- grub_uint64_t a = 0;
- grub_size_t i;
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/gcc8.patch b/meta-amd-bsp/recipes-bsp/grub/files/gcc8.patch
deleted file mode 100644
index fa7331f1..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/gcc8.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 563b1da6e6ae7af46cc8354cadb5dab416989f0a Mon Sep 17 00:00:00 2001
-From: Michael Chang <mchang@suse.com>
-Date: Mon, 26 Mar 2018 16:52:34 +0800
-Subject: Fix packed-not-aligned error on GCC 8
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When building with GCC 8, there are several errors regarding packed-not-aligned.
-
-./include/grub/gpt_partition.h:79:1: error: alignment 1 of ‘struct grub_gpt_partentry’ is less than 8 [-Werror=packed-not-aligned]
-
-This patch fixes the build error by cleaning up the ambiguity of placing
-aligned structure in a packed one. In "struct grub_btrfs_time" and "struct
-grub_gpt_part_type", the aligned attribute seems to be superfluous, and also
-has to be packed, to ensure the structure is bit-to-bit mapped to the format
-laid on disk. I think we could blame to copy and paste error here for the
-mistake. In "struct efi_variable", we have to use grub_efi_packed_guid_t, as
-the name suggests. :)
-
-Signed-off-by: Michael Chang <mchang@suse.com>
-Tested-by: Michael Chang <mchang@suse.com>
-Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
-Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
-
-Upstream-Status: Backport http://git.savannah.gnu.org/cgit/grub.git/commit/?id=563b1da6e6ae7af46cc8354cadb5dab416989f0a
----
- grub-core/fs/btrfs.c | 2 +-
- include/grub/efiemu/runtime.h | 2 +-
- include/grub/gpt_partition.h | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c
-index 4849c1c..be19544 100644
---- a/grub-core/fs/btrfs.c
-+++ b/grub-core/fs/btrfs.c
-@@ -175,7 +175,7 @@ struct grub_btrfs_time
- {
- grub_int64_t sec;
- grub_uint32_t nanosec;
--} __attribute__ ((aligned (4)));
-+} GRUB_PACKED;
-
- struct grub_btrfs_inode
- {
-diff --git a/include/grub/efiemu/runtime.h b/include/grub/efiemu/runtime.h
-index 9b6b729..36d2ded 100644
---- a/include/grub/efiemu/runtime.h
-+++ b/include/grub/efiemu/runtime.h
-@@ -29,7 +29,7 @@ struct grub_efiemu_ptv_rel
-
- struct efi_variable
- {
-- grub_efi_guid_t guid;
-+ grub_efi_packed_guid_t guid;
- grub_uint32_t namelen;
- grub_uint32_t size;
- grub_efi_uint32_t attributes;
-diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h
-index 1b32f67..9668a68 100644
---- a/include/grub/gpt_partition.h
-+++ b/include/grub/gpt_partition.h
-@@ -28,7 +28,7 @@ struct grub_gpt_part_type
- grub_uint16_t data2;
- grub_uint16_t data3;
- grub_uint8_t data4[8];
--} __attribute__ ((aligned(8)));
-+} GRUB_PACKED;
- typedef struct grub_gpt_part_type grub_gpt_part_type_t;
-
- #define GRUB_GPT_PARTITION_TYPE_EMPTY \
---
-cgit v1.0-41-gc330
-
diff --git a/meta-amd-bsp/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch b/meta-amd-bsp/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
deleted file mode 100644
index ffc2d40d..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 7461a3de38b66edbe2f5593f9bdab9f2704d32bc Mon Sep 17 00:00:00 2001
-From: Hongxu Jia <hongxu.jia@windriver.com>
-Date: Wed, 17 Aug 2016 04:06:34 -0400
-Subject: [PATCH] grub module explicitly keeps symbole .module_license
-
-While using oe-core toolchain to strip grub module 'all_video.mod',
-it stripped symbol table:
---------------
-root@localhost:~# objdump -t all_video.mod
-
-all_video.mod: file format elf64-x86-64
-
-SYMBOL TABLE:
-no symbols
---------------
-
-It caused grub to load module all_video failed.
---------------
-grub> insmod all_video
-error: no symbol table.
---------------
-
-Tweak strip option to keep symbol .module_license could workaround
-the issue.
---------------
-root@localhost:~# objdump -t all_video.mod
-
-all_video.mod: file format elf64-x86-64
-
-SYMBOL TABLE:
-0000000000000000 l d .text 0000000000000000 .text
-0000000000000000 l d .data 0000000000000000 .data
-0000000000000000 l d .module_license 0000000000000000 .module_license
-0000000000000000 l d .bss 0000000000000000 .bss
-0000000000000000 l d .moddeps 0000000000000000 .moddeps
-0000000000000000 l d .modname 0000000000000000 .modname
---------------
-
-Upstream-Status: Pending
-
-Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
----
- grub-core/genmod.sh.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: grub-2.02/grub-core/genmod.sh.in
-===================================================================
---- grub-2.02.orig/grub-core/genmod.sh.in
-+++ grub-2.02/grub-core/genmod.sh.in
-@@ -56,7 +56,7 @@ if test x@TARGET_APPLE_LINKER@ != x1; th
- if test x@platform@ != xemu; then
- @TARGET_STRIP@ --strip-unneeded \
- -K grub_mod_init -K grub_mod_fini \
-- -K _grub_mod_init -K _grub_mod_fini \
-+ -K _grub_mod_init -K _grub_mod_fini -K .module_license \
- -R .note.gnu.gold-version -R .note.GNU-stack \
- -R .note -R .comment -R .ARM.exidx $tmpfile || exit 1
- fi
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bbappend b/meta-amd-bsp/recipes-bsp/grub/grub-efi_%.bbappend
index 018c1513..26a77e9b 100644
--- a/meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bbappend
+++ b/meta-amd-bsp/recipes-bsp/grub/grub-efi_%.bbappend
@@ -1,2 +1,3 @@
+require grub-fixes.inc
+
RDEPENDS_${PN}_class-target_append = " efibootmgr"
-export PYTHON
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bb b/meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bb
deleted file mode 100644
index 14fce97f..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/grub-efi_2.02.bb
+++ /dev/null
@@ -1,112 +0,0 @@
-require grub2.inc
-
-GRUBPLATFORM = "efi"
-
-DEPENDS_append_class-target = " grub-efi-native"
-RDEPENDS_${PN}_class-target = "diffutils freetype grub-common virtual/grub-bootconf"
-
-SRC_URI += " \
- file://cfg \
- "
-
-S = "${WORKDIR}/grub-${PV}"
-
-# Determine the target arch for the grub modules
-python __anonymous () {
- import re
- target = d.getVar('TARGET_ARCH')
- prefix = "" if d.getVar('EFI_PROVIDER') == "grub-efi" else "grub-efi-"
- if target == "x86_64":
- grubtarget = 'x86_64'
- grubimage = prefix + "bootx64.efi"
- elif re.match('i.86', target):
- grubtarget = 'i386'
- grubimage = prefix + "bootia32.efi"
- elif re.match('aarch64', target):
- grubtarget = 'arm64'
- grubimage = prefix + "bootaa64.efi"
- elif re.match('arm', target):
- grubtarget = 'arm'
- grubimage = prefix + "bootarm.efi"
- else:
- raise bb.parse.SkipRecipe("grub-efi is incompatible with target %s" % target)
- d.setVar("GRUB_TARGET", grubtarget)
- d.setVar("GRUB_IMAGE", grubimage)
- prefix = "grub-efi-" if prefix == "" else ""
- d.setVar("GRUB_IMAGE_PREFIX", prefix)
-}
-
-inherit deploy
-
-CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
-EXTRA_OECONF += "--enable-efiemu=no"
-
-# ldm.c:114:7: error: trampoline generated for nested function 'hook' [-Werror=trampolines]
-# and many other places in the grub code when compiled with some native gcc compilers (specifically, gentoo)
-CFLAGS_append_class-native = " -Wno-error=trampolines"
-
-do_mkimage() {
- cd ${B}
- # Search for the grub.cfg on the local boot media by using the
- # built in cfg file provided via this recipe
- grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
- -O ${GRUB_TARGET}-efi -o ./${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} \
- ${GRUB_BUILDIN}
-}
-
-addtask mkimage before do_install after do_compile
-
-do_mkimage_class-native() {
- :
-}
-
-do_install_append_class-target() {
- install -d ${D}/boot
- install -d ${D}/boot/EFI
- install -d ${D}/boot/EFI/BOOT
- install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${D}/boot/EFI/BOOT/${GRUB_IMAGE}
-}
-
-do_install_class-native() {
- install -d ${D}${bindir}
- install -m 755 grub-mkimage ${D}${bindir}
-}
-
-do_install_class-target() {
- oe_runmake 'DESTDIR=${D}' -C grub-core install
-
- # Remove build host references...
- find "${D}" -name modinfo.sh -type f -exec \
- sed -i \
- -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
- {} +
-}
-
-GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal \
- efi_gop iso9660 configfile search loadenv test"
-
-do_deploy() {
- install -m 644 ${B}/${GRUB_IMAGE_PREFIX}${GRUB_IMAGE} ${DEPLOYDIR}
-}
-
-do_deploy_class-native() {
- :
-}
-
-addtask deploy after do_install before do_build
-
-FILES_${PN} = "${libdir}/grub/${GRUB_TARGET}-efi \
- ${datadir}/grub \
- /boot/EFI/BOOT/${GRUB_IMAGE} \
- "
-
-
-# 64-bit binaries are expected for the bootloader with an x32 userland
-INSANE_SKIP_${PN}_append_linux-gnux32 = " arch"
-INSANE_SKIP_${PN}-dbg_append_linux-gnux32 = " arch"
-INSANE_SKIP_${PN}_append_linux-muslx32 = " arch"
-INSANE_SKIP_${PN}-dbg_append_linux-muslx32 = " arch"
-
-BBCLASSEXTEND = "native"
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc b/meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc
new file mode 100644
index 00000000..2d425c09
--- /dev/null
+++ b/meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc
@@ -0,0 +1,5 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+export PYTHON
+
+SRC_URI += "file://0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch"
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub2.inc b/meta-amd-bsp/recipes-bsp/grub/grub2.inc
deleted file mode 100644
index fdff6784..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/grub2.inc
+++ /dev/null
@@ -1,76 +0,0 @@
-SUMMARY = "GRUB2 is the next-generation GRand Unified Bootloader"
-
-DESCRIPTION = "GRUB2 is the next generaion of a GPLed bootloader \
-intended to unify bootloading across x86 operating systems. In \
-addition to loading the Linux kernel, it implements the Multiboot \
-standard, which allows for flexible loading of multiple boot images."
-
-HOMEPAGE = "http://www.gnu.org/software/grub/"
-SECTION = "bootloaders"
-
-LICENSE = "GPLv3"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
-
-SRC_URI = "https://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
- file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
- file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
- file://autogen.sh-exclude-pc.patch \
- file://grub-module-explicitly-keeps-symbole-.module_license.patch \
- file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
- file://fix.build.with.gcc-7.patch \
- file://gcc8.patch \
- file://0001-x86-64-Treat-R_X86_64_PLT32-as-R_X86_64_PC32.patch \
- file://0001-grub-setup-Debug-message-cleanup.patch \
- file://disable-address-of-packed-member.patch \
- file://fix.build.with.squashfs.patch \
- file://cast-fprintf.patch \
-"
-SRC_URI[md5sum] = "1116d1f60c840e6dbd67abbc99acb45d"
-SRC_URI[sha256sum] = "660ee136fbcee08858516ed4de2ad87068bfe1b6b8b37896ce3529ff054a726d"
-
-DEPENDS = "flex-native bison-native"
-
-COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
-COMPATIBLE_HOST_armv7a = 'null'
-COMPATIBLE_HOST_armv7ve = 'null'
-
-# configure.ac has code to set this automagically from the target tuple
-# but the OE freeform one (core2-foo-bar-linux) don't work with that.
-
-GRUBPLATFORM_arm = "efi"
-GRUBPLATFORM_aarch64 = "efi"
-GRUBPLATFORM ??= "pc"
-
-inherit autotools gettext texinfo
-
-EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
- --disable-grub-mkfont \
- --program-prefix="" \
- --enable-liblzma=no \
- --enable-libzfs=no \
- --enable-largefile \
-"
-
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[grub-mount] = "--enable-grub-mount,--disable-grub-mount,fuse"
-PACKAGECONFIG[device-mapper] = "--enable-device-mapper,--disable-device-mapper,libdevmapper"
-
-# grub2 creates its own set of -nostdinc / -isystem / -ffreestanding CFLAGS and
-# OE's default BUILD_CFLAGS (assigned to CFLAGS for native builds) etc, conflict
-# with that. Note that since BUILD_CFLAGS etc are not used by grub2 target
-# builds, it's safe to clear them unconditionally for both target and native.
-BUILD_CPPFLAGS = ""
-BUILD_CFLAGS = ""
-BUILD_CXXFLAGS = ""
-BUILD_LDFLAGS = ""
-
-do_configure_prepend() {
- # The grub2 configure script uses variables such as TARGET_CFLAGS etc
- # for its own purposes. Remove the OE versions from the environment to
- # avoid conflicts.
- unset TARGET_CPPFLAGS TARGET_CFLAGS TARGET_CXXFLAGS TARGET_LDFLAGS
- ( cd ${S}
- ${S}/autogen.sh )
-}
-
-RDEPENDS_${PN}_class-native = ""
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend b/meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend
new file mode 100644
index 00000000..501f81fc
--- /dev/null
+++ b/meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend
@@ -0,0 +1 @@
+require grub-fixes.inc
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bb b/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bb
deleted file mode 100644
index e0973759..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-require grub2.inc
-
-RDEPENDS_${PN}-common += "${PN}-editenv"
-RDEPENDS_${PN} += "diffutils freetype ${PN}-common"
-
-RPROVIDES_${PN}-editenv += "${PN}-efi-editenv"
-
-PACKAGES =+ "${PN}-editenv ${PN}-common"
-FILES_${PN}-editenv = "${bindir}/grub-editenv"
-FILES_${PN}-common = " \
- ${bindir} \
- ${sysconfdir} \
- ${sbindir} \
- ${datadir}/grub \
-"
-
-do_install_append () {
- install -d ${D}${sysconfdir}/grub.d
- # Remove build host references...
- find "${D}" -name modinfo.sh -type f -exec \
- sed -i \
- -e 's,--sysroot=${STAGING_DIR_TARGET},,g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
- {} +
-}
-
-INSANE_SKIP_${PN} = "arch"
-INSANE_SKIP_${PN}-dbg = "arch"
diff --git a/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bbappend b/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bbappend
deleted file mode 100644
index e91aab49..00000000
--- a/meta-amd-bsp/recipes-bsp/grub/grub_2.02.bbappend
+++ /dev/null
@@ -1 +0,0 @@
-export PYTHON
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/amd-spi_1.0.bb b/meta-amd-bsp/recipes-kernel/amd-spi/amd-spi_1.0.bb
deleted file mode 100644
index aacb1039..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/amd-spi_1.0.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-DESCRIPTION = "This kernel module provides support for AMD SPI controller driver"
-LICENSE = "BSD | GPLv2"
-LIC_FILES_CHKSUM = "file://spi_amd.c;endline=29;md5=e9fdf6da58412e619d89ec9e135a1be3"
-
-inherit module kernel-openssl
-
-SRC_URI = "file://Makefile \
- file://spi_amd.c \
- file://spi_amd.h \
- file://spirom.c \
- file://spirom.h \
- "
-
-S = "${WORKDIR}"
-
-# The inherit of module.bbclass will take care of the rest
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/files/Makefile b/meta-amd-bsp/recipes-kernel/amd-spi/files/Makefile
deleted file mode 100644
index f778a69a..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/files/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-obj-m := spi_amd.o spirom.o
-
-SRC := $(shell pwd)
-
-all:
- $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
-
-modules_install:
- $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
-
-clean:
- rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c
- rm -f Module.markers Module.symvers modules.order
- rm -rf .tmp_versions Modules.symvers
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.c b/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.c
deleted file mode 100644
index 998d9ea6..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.c
+++ /dev/null
@@ -1,479 +0,0 @@
-/*****************************************************************************
-*
-* Copyright (c) 2013, Advanced Micro Devices, Inc.
-* All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above copyright
-* notice, this list of conditions and the following disclaimer in the
-* documentation and/or other materials provided with the distribution.
-* * Neither the name of Advanced Micro Devices, Inc. nor the names of
-* its contributors may be used to endorse or promote products derived
-* from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-* DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*
-***************************************************************************/
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <linux/spi/spi.h>
-#include <linux/kthread.h>
-
-#include "spi_amd.h"
-
-struct amd_platform_data {
- u8 chip_select;
-};
-
-struct amd_spi {
- void __iomem *io_remap_addr;
- unsigned long io_base_addr;
- u32 rom_addr;
- struct spi_master *master;
- struct amd_platform_data controller_data;
- struct task_struct *kthread_spi;
- struct list_head msg_queue;
- wait_queue_head_t wq;
-};
-
-static struct pci_device_id amd_spi_pci_device_id[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LPC_BRIDGE) },
- {}
-};
-MODULE_DEVICE_TABLE(pci, amd_spi_pci_device_id);
-
-static inline u8 amd_spi_readreg8(struct spi_master *master, int idx)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- return ioread8((u8 *)amd_spi->io_remap_addr + idx);
-}
-
-static inline void amd_spi_writereg8(struct spi_master *master, int idx,
- u8 val)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- iowrite8(val, ((u8 *)amd_spi->io_remap_addr + idx));
-}
-
-static inline void amd_spi_setclear_reg8(struct spi_master *master, int idx,
- u8 set, u8 clear)
-{
- u8 tmp = amd_spi_readreg8(master, idx);
- tmp = (tmp & ~clear) | set;
- amd_spi_writereg8(master, idx, tmp);
-}
-
-static inline u32 amd_spi_readreg32(struct spi_master *master, int idx)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- return ioread32((u8 *)amd_spi->io_remap_addr + idx);
-}
-
-static inline void amd_spi_writereg32(struct spi_master *master, int idx,
- u32 val)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- iowrite32(val, ((u8 *)amd_spi->io_remap_addr + idx));
-}
-
-static inline void amd_spi_setclear_reg32(struct spi_master *master, int idx,
- u32 set, u32 clear)
-{
- u32 tmp = amd_spi_readreg32(master, idx);
- tmp = (tmp & ~clear) | set;
- amd_spi_writereg32(master, idx, tmp);
-}
-
-static void amd_spi_select_chip(struct spi_master *master)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
- u8 chip_select = amd_spi->controller_data.chip_select;
-
- amd_spi_setclear_reg8(master, AMD_SPI_ALT_CS_REG, chip_select,
- AMD_SPI_ALT_CS_MASK);
-}
-
-
-static void amd_spi_clear_fifo_ptr(struct spi_master *master)
-{
- amd_spi_setclear_reg32(master, AMD_SPI_CTRL0_REG, AMD_SPI_FIFO_CLEAR,
- AMD_SPI_FIFO_CLEAR);
-}
-
-static void amd_spi_set_opcode(struct spi_master *master, u8 cmd_opcode)
-{
- amd_spi_setclear_reg32(master, AMD_SPI_CTRL0_REG, cmd_opcode,
- AMD_SPI_OPCODE_MASK);
-}
-
-static inline void amd_spi_set_rx_count(struct spi_master *master,
- u8 rx_count)
-{
- amd_spi_setclear_reg8(master, AMD_SPI_RX_COUNT_REG, rx_count, 0xff);
-}
-
-static inline void amd_spi_set_tx_count(struct spi_master *master,
- u8 tx_count)
-{
- amd_spi_setclear_reg8(master, AMD_SPI_TX_COUNT_REG, tx_count, 0xff);
-}
-
-static void amd_spi_execute_opcode(struct spi_master *master)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
- bool spi_busy;
-
- /* Set ExecuteOpCode bit in the CTRL0 register */
- amd_spi_setclear_reg32(master, AMD_SPI_CTRL0_REG, AMD_SPI_EXEC_CMD,
- AMD_SPI_EXEC_CMD);
-
- /* poll for SPI bus to become idle */
- spi_busy = (ioread32((u8 *)amd_spi->io_remap_addr +
- AMD_SPI_CTRL0_REG) & AMD_SPI_BUSY) == AMD_SPI_BUSY;
- while (spi_busy) {
- set_current_state(TASK_INTERRUPTIBLE);
- schedule();
- set_current_state(TASK_RUNNING);
- spi_busy = (ioread32((u8 *)amd_spi->io_remap_addr +
- AMD_SPI_CTRL0_REG) & AMD_SPI_BUSY) == AMD_SPI_BUSY;
- }
-}
-
-/* Helper function */
-#ifdef CONFIG_SPI_DEBUG
-static void amd_spi_dump_reg(struct spi_master *master)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- printk(KERN_DEBUG DRIVER_NAME ": SPI CTRL 0 registers: 0x%.8x\n",
- ioread32((u8 *)amd_spi->io_remap_addr + AMD_SPI_CTRL0_REG));
- /*
- * We cannot read CTRL1 register, because reading it would
- * inadvertently increment the FIFO pointer.
- */
- printk(KERN_DEBUG DRIVER_NAME ": SPI ALT CS registers: 0x%.2x\n",
- ioread8((u8 *)amd_spi->io_remap_addr + AMD_SPI_ALT_CS_REG));
- printk(KERN_DEBUG DRIVER_NAME ": SPI Tx Byte Count: 0x%.2x\n",
- ioread8((u8 *)amd_spi->io_remap_addr + AMD_SPI_TX_COUNT_REG));
- printk(KERN_DEBUG DRIVER_NAME ": SPI Rx Byte Count: 0x%.2x\n",
- ioread8((u8 *)amd_spi->io_remap_addr + AMD_SPI_RX_COUNT_REG));
- printk(KERN_DEBUG DRIVER_NAME ": SPI Status registers: 0x%.8x\n",
- ioread32((u8 *)amd_spi->io_remap_addr + AMD_SPI_STATUS_REG));
-}
-#else
-static void amd_spi_dump_reg(struct spi_master *master) {}
-#endif
-
-
-static int amd_spi_master_setup(struct spi_device *spi)
-{
- struct spi_master *master = spi->master;
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- amd_spi->controller_data.chip_select = spi->chip_select;
-
- amd_spi_select_chip(master);
-
- return 0;
-}
-
-static int amd_spi_master_transfer(struct spi_master *master,
- struct spi_message *msg)
-{
- struct amd_spi *amd_spi = spi_master_get_devdata(master);
-
- /*
- * Add new message to the queue and let the kernel thread know
- * about it.
- */
- list_add_tail(&msg->queue, &amd_spi->msg_queue);
- wake_up_interruptible(&amd_spi->wq);
-
- return 0;
-}
-static int amd_spi_thread(void *t)
-{
- struct amd_spi *amd_spi = t;
- struct spi_master *master = amd_spi->master;
- struct spi_transfer *transfer = NULL;
- struct spi_message *message = NULL;
- int direction = 0,i = 0,saved_index = 0;
- int opcode_found = 0,recv_flag = 0,tx_len = 0,rx_len = 0;
- u8 cmd_opcode = 0;
- long timeout = 0;
- u8 *buffer = NULL;
-
- /*
- * What we do here is actually pretty simple. We pick one message
- * at a time from the message queue set up by the controller, and
- * then process all the spi_transfers of that spi_message in one go.
- * We then remove the message from the queue, and complete the
- * transaction. This might not be the best approach, but this is how
- * we chose to implement this. Note that out SPI controller has FIFO
- * size of 70 bytes, but we consider it to contain a maximum of
- * 64-bytes of data and 3-bytes of address.
- */
- while (1) {
- /*
- * Let us wait on a wait queue till the message queue is empty.
- */
- do {
- timeout = wait_event_interruptible_timeout(amd_spi->wq,
- !list_empty(&amd_spi->msg_queue),1000);
-
- /* check stop condition */
- if (kthread_should_stop()) {
- set_current_state(TASK_RUNNING);
- return 0;
- }
- } while(timeout == 0);
-
- /*
- * Else, pull the very first message from the queue and process
- * all transfers within that message. And process the messages
- * in a pure linear fashion. We also remove the spi_message
- * from the queue.
- */
- message = list_entry(amd_spi->msg_queue.next,
- struct spi_message, queue);
- list_del_init(&message->queue);
-
- /* We store the CS# line to be used for this spi_message */
- amd_spi->controller_data.chip_select =
- message->spi->chip_select;
-
- /* Setting all variables to default value. */
- direction = i = 0;
- opcode_found = 0;
- recv_flag = tx_len = rx_len = 0;
- cmd_opcode = 0;
- buffer = NULL;
- saved_index = 0;
-
- amd_spi_select_chip(master);
-
- /*
- * This loop extracts spi_transfers from the spi message,
- * programs the command into command register. Pointer variable
- * *buffer* points to either tx_buf or rx_buf of spi_transfer
- * depending on direction of transfer. Also programs FIFO of
- * controller if data has to be transmitted.
- */
- list_for_each_entry(transfer, &message->transfers,
- transfer_list)
- {
- if(transfer->rx_buf != NULL)
- direction = RECEIVE;
- else if(transfer->tx_buf != NULL)
- direction = TRANSMIT;
-
- switch (direction) {
- case TRANSMIT:
- buffer = (u8 *)transfer->tx_buf;
-
- if(opcode_found != 1) {
- /* Store no. of bytes to be sent into
- * FIFO */
- tx_len = transfer->len - 1;
- /* Store opcode */
- cmd_opcode = *(u8 *)transfer->tx_buf;
- /* Pointing to start of TX data */
- buffer++;
- /* Program the command register*/
- amd_spi_set_opcode(master, cmd_opcode);
- opcode_found = 1;
- } else {
- /* Store no. of bytes to be sent into
- * FIFO */
- tx_len = transfer->len;
- }
-
- /* Write data into the FIFO. */
- for (i = 0; i < tx_len; i++) {
- iowrite8(buffer[i],
- ((u8 *)amd_spi->io_remap_addr +
- AMD_SPI_FIFO_BASE +
- i + saved_index));
- }
-
- /* Set no. of bytes to be transmitted */
- amd_spi_set_tx_count(master,
- tx_len + saved_index);
-
- /*
- * Saving the index, from where next
- * spi_transfer's data will be stored in FIFO.
- */
- saved_index = i;
- break;
- case RECEIVE:
- /* Store no. of bytes to be received from
- * FIFO */
- rx_len = transfer->len;
- buffer = (u8 *)transfer->rx_buf;
- recv_flag=1;
- break;
- }
- }
-
- /* Set the RX count to the number of bytes to expect in
- * response */
- amd_spi_set_rx_count(master, rx_len );
- amd_spi_clear_fifo_ptr(master);
- amd_spi_dump_reg(master);
- /* Executing command */
- amd_spi_execute_opcode(master);
- amd_spi_dump_reg(master);
-
- if(recv_flag == 1) {
- /* Read data from FIFO to receive buffer */
- for (i = 0; i < rx_len; i++) {
- buffer[i] = ioread8((u8 *)amd_spi->io_remap_addr
- + AMD_SPI_FIFO_BASE
- + tx_len + i);
- }
-
- recv_flag = 0;
- }
-
- /* Update statistics */
- message->actual_length = tx_len + rx_len + 1 ;
- /* complete the transaction */
- message->status = 0;
- spi_finalize_current_message(master);
- }
-
- return 0;
-}
-
-static int amd_spi_pci_probe(struct pci_dev *pdev,
- const struct pci_device_id *id)
-{
- struct device *dev = &pdev->dev;
- struct spi_master *master;
- struct amd_spi *amd_spi;
- u32 io_base_addr;
- int err = 0;
-
- /* Allocate storage for spi_master and driver private data */
- master = spi_alloc_master(dev, sizeof(struct amd_spi));
- if (master == NULL) {
- dev_err(dev, "Error allocating SPI master\n");
- return -ENOMEM;
- }
-
- amd_spi = spi_master_get_devdata(master);
- amd_spi->master = master;
-
- /*
- * Lets first get the base address of SPI registers. The SPI Base
- * Address is stored at offset 0xA0 into the LPC PCI configuration
- * space. As per the specification, it is stored at bits 6:31 of the
- * register. The address is aligned at 64-byte boundary,
- * so we should just mask the lower 6 bits and get the address.
- */
- pci_read_config_dword(pdev, AMD_PCI_LPC_SPI_BASE_ADDR_REG,
- &io_base_addr);
- amd_spi->io_base_addr = io_base_addr & AMD_SPI_BASE_ADDR_MASK;
- amd_spi->io_remap_addr = ioremap_nocache(amd_spi->io_base_addr,
- AMD_SPI_MEM_SIZE);
- if (amd_spi->io_remap_addr == NULL) {
- dev_err(dev, "ioremap of SPI registers failed\n");
- err = -ENOMEM;
- goto err_free_master;
- }
- dev_dbg(dev, "io_base_addr: 0x%.8lx, io_remap_address: %p\n",
- amd_spi->io_base_addr, amd_spi->io_remap_addr);
- INIT_LIST_HEAD(&amd_spi->msg_queue);
- init_waitqueue_head(&amd_spi->wq);
- amd_spi->kthread_spi = kthread_run(amd_spi_thread, amd_spi,
- "amd_spi_thread");
-
- /* Now lets initialize the fields of spi_master */
- master->bus_num = 0; /*
- * This should be the same as passed in
- * spi_board_info structure
- */
- master->num_chipselect = 4; /* Can be overwritten later during setup */
- master->mode_bits = 0;
- master->flags = 0;
- master->setup = amd_spi_master_setup;
- master->transfer_one_message = amd_spi_master_transfer;
- /* Register the controller with SPI framework */
- err = spi_register_master(master);
- if (err) {
- dev_err(dev, "error registering SPI controller\n");
- goto err_iounmap;
- }
- pci_set_drvdata(pdev, amd_spi);
-
- return 0;
-
-err_iounmap:
- iounmap(amd_spi->io_remap_addr);
-err_free_master:
- spi_master_put(master);
-
- return 0;
-}
-
-static void amd_spi_pci_remove(struct pci_dev *pdev)
-{
- struct amd_spi *amd_spi = pci_get_drvdata(pdev);
-
- kthread_stop(amd_spi->kthread_spi);
- iounmap(amd_spi->io_remap_addr);
- spi_unregister_master(amd_spi->master);
- spi_master_put(amd_spi->master);
- pci_set_drvdata(pdev, NULL);
-}
-
-static struct pci_driver amd_spi_pci_driver = {
- .name = "amd_spi",
- .id_table = amd_spi_pci_device_id,
- .probe = amd_spi_pci_probe,
- .remove = amd_spi_pci_remove,
-};
-
-static int __init amd_spi_init(void)
-{
- int ret;
-
- pr_info("AMD SPI Driver v%s\n", SPI_VERSION);
-
- ret = pci_register_driver(&amd_spi_pci_driver);
- if (ret)
- return ret;
-
- return 0;
-}
-module_init(amd_spi_init);
-
-static void __exit amd_spi_exit(void)
-{
- pci_unregister_driver(&amd_spi_pci_driver);
-}
-module_exit(amd_spi_exit);
-
-MODULE_LICENSE("Dual BSD/GPL");
-MODULE_AUTHOR("Arindam Nath <arindam.nath@amd.com>");
-MODULE_AUTHOR("Sanjay Mehta <sanju.mehta@amd.com>");
-MODULE_DESCRIPTION("AMD SPI Master Controller Driver");
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.h b/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.h
deleted file mode 100644
index ec58b9a8..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/files/spi_amd.h
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef SPI_AMD_H
-#define SPI_AMD_H
-
-#define DRIVER_NAME "spi_amd"
-#define SPI_VERSION "1.0"
-
-#define AMD_SPI_CTRL0_REG 0x00
- #define AMD_SPI_EXEC_CMD (0x1 << 16)
- #define AMD_SPI_OPCODE_MASK 0xFF
- #define AMD_SPI_FIFO_CLEAR (0x1 << 20)
- #define AMD_SPI_BUSY (0x1 << 31)
-#define AMD_SPI_ALT_CS_REG 0x1D
- #define AMD_SPI_ALT_CS_MASK 0x3
-#define AMD_SPI_FIFO_BASE 0x80
-#define AMD_SPI_TX_COUNT_REG 0x48
-#define AMD_SPI_RX_COUNT_REG 0x4B
-#define AMD_SPI_STATUS_REG 0x4C
-
-#define AMD_PCI_LPC_SPI_BASE_ADDR_REG 0xA0
-#define AMD_SPI_BASE_ADDR_MASK ~0x3F
-#define AMD_SPI_MEM_SIZE 200
-
-#define PCI_DEVICE_ID_AMD_LPC_BRIDGE 0x790E
-
-#define TRANSMIT 1
-#define RECEIVE 2
-
-#endif /* SPI_AMD_H */
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.c b/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.c
deleted file mode 100644
index 8547afd1..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.c
+++ /dev/null
@@ -1,517 +0,0 @@
-/*****************************************************************************
-*
-* spirom.c - SPI ROM client driver
-*
-* Copyright (c) 2014, Advanced Micro Devices, Inc.
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*
-***************************************************************************/
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/ioctl.h>
-#include <linux/fs.h>
-#include <linux/device.h>
-#include <linux/err.h>
-#include <linux/list.h>
-#include <linux/errno.h>
-#include <linux/mutex.h>
-#include <linux/slab.h>
-#include <linux/spi/spi.h>
-#include <linux/pci.h>
-#include <linux/delay.h>
-
-#include <linux/uaccess.h>
-
-#include "spirom.h"
-
-#define SPIROM_VERSION "0.2"
-
-/*
- * SPI has a character major number assigned. We allocate minor numbers
- * dynamically using a bitmask. You must use hotplug tools, such as udev
- * (or mdev with busybox) to create and destroy the /dev/spiromB.C device
- * nodes, since there is no fixed association of minor numbers with any
- * particular SPI bus or device.
- */
-#define SPIROM_MAJOR 153 /* assigned */
-#define N_SPI_MINORS 32 /* ... up to 256 */
-
-#define SPI_BUS 0
-#define SPI_BUS_CS1 0
-
-static unsigned long minors[N_SPI_MINORS / BITS_PER_LONG];
-
-
-struct spirom_data {
- dev_t devt;
- spinlock_t spi_lock;
- struct spi_device *spi;
- struct list_head device_entry;
- struct completion done;
-
- struct mutex buf_lock;
- unsigned users;
-};
-
-static LIST_HEAD(device_list);
-static DEFINE_MUTEX(device_list_lock);
-
-/*-------------------------------------------------------------------------*/
-
-/*
- * We can't use the standard synchronous wrappers for file I/O; we
- * need to protect against async removal of the underlying spi_device.
- */
-static void spirom_complete(void *arg)
-{
- complete(arg);
-}
-
-static ssize_t
-spirom_sync(struct spirom_data *spirom, struct spi_message *message)
-{
- int status;
-
- message->complete = spirom_complete;
- message->context = &spirom->done;
-
- spin_lock_irq(&spirom->spi_lock);
- if (spirom->spi == NULL)
- status = -ESHUTDOWN;
- else
- status = spi_async(spirom->spi, message);
- spin_unlock_irq(&spirom->spi_lock);
-
- if (status == 0) {
- /*
- * There might be cases where the controller driver has been
- * unloaded in the middle of a transaction. So we might end up
- * in a situation where we will be waiting for an event which
- * will never happen. So we provide a timeout of 1 second for
- * situations like this.
- */
- wait_for_completion_timeout(&spirom->done, HZ);
- status = message->status;
- if (status == 0)
- status = message->actual_length;
- }
- return status;
-}
-
-static int spirom_message(struct spirom_data *spirom,
- struct spi_ioc_transfer *u_trans, unsigned long arg)
-{
- struct spi_message msg;
- struct spi_transfer *transfer;
- u8 *buffer;
- int status = u_trans->len;
-
- buffer = u_trans->buf;
- spi_message_init(&msg);
-
- /* The very first spi_transfer will contain the command only */
- transfer = kzalloc(sizeof(struct spi_transfer), GFP_KERNEL);
- if (!transfer)
- return -ENOMEM;
-
- transfer->tx_buf = buffer;
- transfer->len = 1;
- buffer += transfer->len;
- spi_message_add_tail(transfer, &msg);
-
- /*
- * If the command expects an address as its argument, we populate
- * it in the very next spi_transfer.
- */
- if (u_trans->addr_present) {
- transfer = kzalloc(sizeof(struct spi_transfer), GFP_KERNEL);
- if (!transfer)
- return -ENOMEM;
-
- transfer->tx_buf = buffer;
- transfer->len = 3; // 3-byte address
- buffer += transfer->len;
- spi_message_add_tail(transfer, &msg);
- }
-
- /*
- * Next is data, which can have a maximum of 64-bytes, the size limited
- * by the number of bytes that can stored in the controller FIFO.
- */
- if (u_trans->len) {
- transfer = kzalloc(sizeof(struct spi_transfer), GFP_KERNEL);
- if (!transfer)
- return -ENOMEM;
-
- if (u_trans->direction == TRANSMIT)
- transfer->tx_buf = buffer;
- else if (u_trans->direction == RECEIVE)
- transfer->rx_buf = buffer;
-
- transfer->len = u_trans->len;
- /* No need to increment buffer pointer */
- spi_message_add_tail(transfer, &msg);
- }
-
- status = spirom_sync(spirom, &msg);
-
- if (u_trans->direction == RECEIVE) {
- /*
- * The received data should have been populated in
- * u_trans->buf, so we just need to copy it into the
- * user-space buffer.
- */
- buffer = u_trans->buf;
- if (u_trans->addr_present) {
- buffer += 4; // 1-byte command and 3-byte address
- if(__copy_to_user((u8 __user *)
- (((struct spi_ioc_transfer *)arg)->buf) + 4,
- buffer, u_trans->len)) {
- status = -EFAULT;
- }
- } else {
- buffer += 1; // 1-byte command only
- if(__copy_to_user((u8 __user *)
- (((struct spi_ioc_transfer *)arg)->buf) + 1,
- buffer, u_trans->len)) {
- status = -EFAULT;
- }
- }
- }
-
- /* Done with everything, free the memory taken by spi_transfer */
- while (msg.transfers.next != &msg.transfers) {
- transfer = list_entry(msg.transfers.next, struct spi_transfer,
- transfer_list);
- msg.transfers.next = transfer->transfer_list.next;
- transfer->transfer_list.next->prev = &msg.transfers;
- kfree(transfer);
- }
-
- return status;
-}
-
-static long
-spirom_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
-{
- int err = 0;
- int retval = 0;
- struct spirom_data *spirom;
- struct spi_device *spi;
- u32 tmp;
- struct spi_ioc_transfer *ioc;
-
- /* Check type and command number */
- if (_IOC_TYPE(cmd) != SPI_IOC_MAGIC)
- return -ENOTTY;
-
- /* Check access direction once here; don't repeat below.
- * IOC_DIR is from the user perspective, while access_ok is
- * from the kernel perspective; so they look reversed.
- */
- if (_IOC_DIR(cmd) & _IOC_READ)
- err = !access_ok((void __user *)arg, _IOC_SIZE(cmd));
- if (err == 0 && _IOC_DIR(cmd) & _IOC_WRITE)
- err = !access_ok((void __user *)arg, _IOC_SIZE(cmd));
- if (err)
- return -EFAULT;
-
- /* guard against device removal before, or while,
- * we issue this ioctl.
- */
- spirom = filp->private_data;
- spin_lock_irq(&spirom->spi_lock);
- spi = spi_dev_get(spirom->spi);
- spin_unlock_irq(&spirom->spi_lock);
-
- if (spi == NULL)
- return -ESHUTDOWN;
-
- /* use the buffer lock here for triple duty:
- * - prevent I/O (from us) so calling spi_setup() is safe;
- * - prevent concurrent SPI_IOC_WR_* from morphing
- * data fields while SPI_IOC_RD_* reads them;
- * - SPI_IOC_MESSAGE needs the buffer locked "normally".
- */
- mutex_lock(&spirom->buf_lock);
-
- /* segmented and/or full-duplex I/O request */
- if (_IOC_NR(cmd) != _IOC_NR(SPI_IOC_MESSAGE(0)) ||
- _IOC_DIR(cmd) !=_IOC_WRITE) {
- retval = -ENOTTY;
- goto out;
- }
-
- tmp = sizeof(struct spi_ioc_transfer);
-
- /* copy into scratch area */
- ioc = kzalloc(tmp, GFP_KERNEL);
- if (!ioc) {
- retval = -ENOMEM;
- goto out;
- }
- if (__copy_from_user(ioc, (struct spi_ioc_transfer __user *)arg,
- tmp)) {
- kfree(ioc);
- retval = -EFAULT;
- goto out;
- }
-
- /* translate to spi_message, execute */
- retval = spirom_message(spirom, ioc, arg);
- kfree(ioc);
-
-out:
- mutex_unlock(&spirom->buf_lock);
- spi_dev_put(spi);
- return retval;
-}
-
-static int spirom_open(struct inode *inode, struct file *filp)
-{
- struct spirom_data *spirom;
- int status = -ENXIO;
-
- mutex_lock(&device_list_lock);
-
- list_for_each_entry(spirom, &device_list, device_entry) {
- if (spirom->devt == inode->i_rdev) {
- status = 0;
- break;
- }
- }
- if (status == 0) {
- if (status == 0) {
- spirom->users++;
- filp->private_data = spirom;
- nonseekable_open(inode, filp);
- }
- } else
- pr_debug("spirom: nothing for minor %d\n", iminor(inode));
-
- mutex_unlock(&device_list_lock);
- return status;
-}
-
-static int spirom_release(struct inode *inode, struct file *filp)
-{
- struct spirom_data *spirom;
- int status = 0;
-
- mutex_lock(&device_list_lock);
- spirom = filp->private_data;
- filp->private_data = NULL;
-
- /* last close? */
- spirom->users--;
- if (!spirom->users) {
- int dofree;
-
- /* ... after we unbound from the underlying device? */
- spin_lock_irq(&spirom->spi_lock);
- dofree = (spirom->spi == NULL);
- spin_unlock_irq(&spirom->spi_lock);
-
- if (dofree)
- kfree(spirom);
- }
- mutex_unlock(&device_list_lock);
-
- return status;
-}
-
-static const struct file_operations spirom_fops = {
- .owner = THIS_MODULE,
- .unlocked_ioctl = spirom_ioctl,
- .open = spirom_open,
- .release = spirom_release,
-};
-
-static int __init add_spi_device_to_bus(void)
-{
- struct spi_master *spi_master;
- struct spi_device *spi_device;
- struct spi_board_info spi_info;
-
- spi_master = spi_busnum_to_master(SPI_BUS);
- if (!spi_master) {
- printk(KERN_ALERT "Please make sure to \'modprobe "
- "spi_amd\' driver first\n");
- return -1;
- }
- memset(&spi_info, 0, sizeof(struct spi_board_info));
-
- strlcpy(spi_info.modalias, "spirom", SPI_NAME_SIZE);
- spi_info.bus_num = SPI_BUS; //Bus number of SPI master
- spi_info.chip_select = SPI_BUS_CS1; //CS on which SPI device is connected
-
- spi_device = spi_new_device(spi_master, &spi_info);
- if (!spi_device)
- return -ENODEV;
-
- return 0;
-}
-
-/*-------------------------------------------------------------------------*/
-
-/* The main reason to have this class is to make mdev/udev create the
- * /dev/spiromB.C character device nodes exposing our userspace API.
- * It also simplifies memory management.
- */
-
-static struct class *spirom_class;
-
-/*-------------------------------------------------------------------------*/
-
-static int spirom_probe(struct spi_device *spi)
-{
- struct spirom_data *spirom;
- int status;
- unsigned long minor;
-
- /* Allocate driver data */
- spirom = kzalloc(sizeof(*spirom), GFP_KERNEL);
- if (!spirom)
- return -ENOMEM;
-
- /* Initialize the driver data */
- spirom->spi = spi;
- spin_lock_init(&spirom->spi_lock);
- mutex_init(&spirom->buf_lock);
-
- INIT_LIST_HEAD(&spirom->device_entry);
- init_completion(&spirom->done);
-
- /* If we can allocate a minor number, hook up this device.
- * Reusing minors is fine so long as udev or mdev is working.
- */
- mutex_lock(&device_list_lock);
- minor = find_first_zero_bit(minors, N_SPI_MINORS);
- if (minor < N_SPI_MINORS) {
- struct device *dev;
-
- spirom->devt = MKDEV(SPIROM_MAJOR, minor);
- dev = device_create(spirom_class, &spi->dev, spirom->devt,
- spirom, "spirom%d.%d",
- spi->master->bus_num, spi->chip_select);
- status = IS_ERR(dev) ? PTR_ERR(dev) : 0;
- } else {
- dev_dbg(&spi->dev, "no minor number available!\n");
- status = -ENODEV;
- }
- if (status == 0) {
- set_bit(minor, minors);
- list_add(&spirom->device_entry, &device_list);
- }
- mutex_unlock(&device_list_lock);
-
- if (status == 0)
- spi_set_drvdata(spi, spirom);
- else
- kfree(spirom);
-
- return status;
-}
-
-static int spirom_remove(struct spi_device *spi)
-{
- struct spirom_data *spirom = spi_get_drvdata(spi);
-
- /* make sure ops on existing fds can abort cleanly */
- spin_lock_irq(&spirom->spi_lock);
- spirom->spi = NULL;
- spi_set_drvdata(spi, NULL);
- spin_unlock_irq(&spirom->spi_lock);
-
- /* prevent new opens */
- mutex_lock(&device_list_lock);
- list_del(&spirom->device_entry);
- clear_bit(MINOR(spirom->devt), minors);
- device_destroy(spirom_class, spirom->devt);
- if (spirom->users == 0)
- kfree(spirom);
- mutex_unlock(&device_list_lock);
-
- return 0;
-}
-
-static struct spi_driver spirom_spi = {
- .driver = {
- .name = "spirom",
- .owner = THIS_MODULE,
- },
- .probe = spirom_probe,
- .remove = spirom_remove,
-
- /* NOTE: suspend/resume methods are not necessary here.
- * We don't do anything except pass the requests to/from
- * the underlying controller. The refrigerator handles
- * most issues; the controller driver handles the rest.
- */
-};
-
-/*-------------------------------------------------------------------------*/
-
-static int __init spirom_init(void)
-{
- int status;
-
- pr_info("AMD SPIROM Driver v%s\n", SPIROM_VERSION);
-
- /* Claim our 256 reserved device numbers. Then register a class
- * that will key udev/mdev to add/remove /dev nodes. Last, register
- * the driver which manages those device numbers.
- */
- BUILD_BUG_ON(N_SPI_MINORS > 256);
- status = register_chrdev(SPIROM_MAJOR, "spi", &spirom_fops);
- if (status < 0)
- return status;
-
- spirom_class = class_create(THIS_MODULE, "spirom");
- if (IS_ERR(spirom_class)) {
- unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name);
- return PTR_ERR(spirom_class);
- }
-
- status = spi_register_driver(&spirom_spi);
- if (status < 0) {
- class_destroy(spirom_class);
- unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name);
- }
-
- status = add_spi_device_to_bus();
- if (status < 0) {
- spi_unregister_driver(&spirom_spi);
- class_destroy(spirom_class);
- unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name);
- }
-
- return status;
-}
-module_init(spirom_init);
-
-static void __exit spirom_exit(void)
-{
- spi_unregister_driver(&spirom_spi);
- class_destroy(spirom_class);
- unregister_chrdev(SPIROM_MAJOR, spirom_spi.driver.name);
-}
-module_exit(spirom_exit);
-
-MODULE_AUTHOR("Arindam Nath <arindam.nath@amd.com>");
-MODULE_DESCRIPTION("User mode SPI ROM interface");
-MODULE_LICENSE("GPL v2");
-MODULE_ALIAS("spi:spirom");
diff --git a/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.h b/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.h
deleted file mode 100644
index 941b357a..00000000
--- a/meta-amd-bsp/recipes-kernel/amd-spi/files/spirom.h
+++ /dev/null
@@ -1,53 +0,0 @@
-#ifndef SPIROM_H
-#define SPIROM_H
-
-#include <linux/types.h>
-
-/*---------------------------------------------------------------------------*/
-
-/* IOCTL commands */
-
-#define SPI_IOC_MAGIC 'k'
-
-#define TRANSMIT 1
-#define RECEIVE 2
-
-/*
- * struct spi_ioc_transfer - interface structure between application and ioctl
- *
- * @buf: Buffer to hold 1-byte command, 3-bytes address, and 64-byte data for
- * transmit or receive. The internal FIFO of our controller can hold a
- * maximum of 70 bytes, including the address. But here we assume the
- * maximum data excluding address to be 64-bytes long.
- *
- * @direction: Direction of data transfer, either TRANSMIT or RECEIVE.
- *
- * @len: Length of data excluding command and address.
- *
- * @addr_present: Flag to indicate whether 'buf' above contains an address.
- */
-struct spi_ioc_transfer {
- __u8 buf[64 + 1 + 3];
- __u8 direction;
- __u8 len;
- __u8 addr_present;
-};
-
-/* not all platforms use <asm-generic/ioctl.h> or _IOC_TYPECHECK() ... */
-#define SPI_MSGSIZE(N) \
- ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \
- ? ((N)*(sizeof (struct spi_ioc_transfer))) : 0)
-#define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)])
-
-/* SPI ROM command codes */
-#define ROM_WREN 0x06
-#define ROM_WRDI 0x04
-#define ROM_RDSR 0x05
-#define ROM_RDID 0x9F
-#define ROM_CHIP_ERASE 0x60
-#define ROM_SECTOR_ERASE 0x20
-#define ROM_BLOCK_ERASE 0xD8
-#define ROM_READ 0x03
-#define ROM_WRITE 0x02
-
-#endif /* SPIROM_H */
diff --git a/meta-amd-bsp/recipes-kernel/kmod/files/blacklist-ccp.conf b/meta-amd-bsp/recipes-kernel/kmod/files/blacklist-ccp.conf
new file mode 100644
index 00000000..3389f0c7
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/kmod/files/blacklist-ccp.conf
@@ -0,0 +1,2 @@
+blacklist ccp
+blacklist ccp_crypto
diff --git a/meta-amd-bsp/recipes-kernel/kmod/kmod_%.bbappend b/meta-amd-bsp/recipes-kernel/kmod/kmod_%.bbappend
new file mode 100644
index 00000000..3ce16fe9
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/kmod/kmod_%.bbappend
@@ -0,0 +1,8 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += "file://blacklist-ccp.conf"
+
+do_install_append_ethanolx () {
+ install -m755 ${WORKDIR}/blacklist-ccp.conf \
+ ${D}${sysconfdir}/modprobe.d/blacklist-ccp.conf
+}
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0001-usb-xhci-Add-LPM-support-to-AMD-xhci-controller.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0001-usb-xhci-Add-LPM-support-to-AMD-xhci-controller.patch
new file mode 100644
index 00000000..387ea135
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0001-usb-xhci-Add-LPM-support-to-AMD-xhci-controller.patch
@@ -0,0 +1,32 @@
+From c4c82690a760351b6e0b0d387f7ab40066531c81 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Fri, 24 Jul 2020 15:43:52 +0530
+Subject: [PATCH 01/10] usb: xhci: Add LPM support to AMD xhci controller
+
+xHCI quirk for LPM and Runtime power management for AMD Raven xHCI
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/usb/host/xhci-pci.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
+index 5bbccc9a0179..1d939747ba29 100644
+--- a/drivers/usb/host/xhci-pci.c
++++ b/drivers/usb/host/xhci-pci.c
+@@ -172,6 +172,12 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
+ if (pdev->vendor == PCI_VENDOR_ID_AMD)
+ xhci->quirks |= XHCI_TRUST_TX_LENGTH;
+
++ if (pdev->vendor == PCI_VENDOR_ID_AMD &&
++ (pdev->device == 0x15e0 || pdev->device == 0x15e1 || pdev->device == 0x15e5)) {
++ xhci->quirks |= XHCI_LPM_SUPPORT;
++ xhci->quirks |= XHCI_DEFAULT_PM_RUNTIME_ALLOW;
++ }
++
+ if ((pdev->vendor == PCI_VENDOR_ID_AMD) &&
+ ((pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4) ||
+ (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_3) ||
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0002-amd-xgbe-fix-for-the-crash-which-happens-during-SFP-.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0002-amd-xgbe-fix-for-the-crash-which-happens-during-SFP-.patch
new file mode 100644
index 00000000..9cbb46a0
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0002-amd-xgbe-fix-for-the-crash-which-happens-during-SFP-.patch
@@ -0,0 +1,77 @@
+From 1cbf1b80948bcb1c46b9674d6ff8f2b2629d1327 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Thu, 13 Feb 2020 15:26:20 +0530
+Subject: [PATCH 02/10] amd-xgbe fix for the crash which happens during SFP
+ hotplug
+
+ INFO: task kworker/u32:3:238 blocked for more than 120 seconds.
+ Tainted: G E 5.4.2-sfp-fix+ #58
+ "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
+ kworker/u32:3 D 0 238 2 0x80004000
+ Workqueue: enp2s0f1 xgbe_service [amd_xgbe]
+ Call Trace:
+ ? __schedule+0x293/0x700
+ schedule+0x2f/0xa0
+ schedule_preempt_disabled+0xa/0x10
+ __mutex_lock.isra.9+0x26d/0x4e0
+ ? xgbe_phy_get_comm_ownership+0x1f/0x110 [amd_xgbe]
+ xgbe_phy_get_comm_ownership+0x1f/0x110 [amd_xgbe]
+ xgbe_phy_mii_read+0x28/0xb0 [amd_xgbe]
+ ? kernfs_put+0xe9/0x190
+ __mdiobus_read+0x3b/0xd0
+ __phy_modify_changed+0x2b/0x80
+ phy_modify+0x38/0x60
+ phy_suspend+0x84/0xc0
+ phy_detach+0x5e/0x120
+ xgbe_phy_free_phy_device.isra.22+0x1d/0x50 [amd_xgbe]
+ xgbe_phy_sfp_mod_absent.isra.25+0xe/0x50 [amd_xgbe]
+ xgbe_phy_sfp_detect+0x16a/0x9b0 [amd_xgbe]
+ ? xgbe_phy_link_status+0x10a/0x490 [amd_xgbe]
+ xgbe_phy_link_status+0x10a/0x490 [amd_xgbe]
+ xgbe_phy_status+0x57/0x380 [amd_xgbe]
+ process_one_work+0x1f4/0x3e0
+ worker_thread+0x2d/0x3e0
+ ? process_one_work+0x3e0/0x3e0
+ kthread+0x113/0x130
+ ? kthread_park+0x90/0x90
+ ret_from_fork+0x22/0x40
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index 18e48b3bc402..90f33c3ddb32 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -1283,7 +1283,7 @@ static int xgbe_phy_sfp_read_eeprom(struct xgbe_prv_data *pdata)
+
+ memcpy(&phy_data->sfp_eeprom, &sfp_eeprom, sizeof(sfp_eeprom));
+
+- xgbe_phy_free_phy_device(pdata);
++
+ } else {
+ phy_data->sfp_changed = 0;
+ }
+@@ -1320,7 +1320,6 @@ static void xgbe_phy_sfp_mod_absent(struct xgbe_prv_data *pdata)
+ {
+ struct xgbe_phy_data *phy_data = pdata->phy_data;
+
+- xgbe_phy_free_phy_device(pdata);
+
+ phy_data->sfp_mod_absent = 1;
+ phy_data->sfp_phy_avail = 0;
+@@ -1372,6 +1371,9 @@ static void xgbe_phy_sfp_detect(struct xgbe_prv_data *pdata)
+ xgbe_phy_sfp_phy_settings(pdata);
+
+ xgbe_phy_put_comm_ownership(pdata);
++
++ if((phy_data->sfp_mod_absent) || (phy_data->sfp_changed))
++ xgbe_phy_free_phy_device(pdata);
+ }
+
+ static int xgbe_phy_module_eeprom(struct xgbe_prv_data *pdata,
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0003-amd-xgbe-Fix-NETDEV-WATCHDOG-transmit-queue-timed-ou.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0003-amd-xgbe-Fix-NETDEV-WATCHDOG-transmit-queue-timed-ou.patch
new file mode 100644
index 00000000..0f349c8c
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0003-amd-xgbe-Fix-NETDEV-WATCHDOG-transmit-queue-timed-ou.patch
@@ -0,0 +1,32 @@
+From f8d8a70eba5e18fc11c7c7db44cfcd5469d52690 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Sun, 12 Apr 2020 20:49:35 +0530
+Subject: [PATCH 03/10] amd-xgbe Fix NETDEV WATCHDOG: transmit queue timed out
+
+netif_carrier_off() called immediately after netif_tx_stop_all_queues()
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 +++
+ 1 file changed, 3 insertions(+)
+ mode change 100644 => 100755 drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+old mode 100644
+new mode 100755
+index 395eb0b52680..230c9c4cc9b5
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+@@ -1180,6 +1180,9 @@ int xgbe_powerdown(struct net_device *netdev, unsigned int caller)
+ netif_device_detach(netdev);
+
+ netif_tx_stop_all_queues(netdev);
++ /* Bug fix to crash while resetting the port */
++ netif_carrier_off(pdata->netdev);
++ netif_dbg(pdata, link, pdata->netdev," netif_carrier_off is doing before stopping PHY \n");
+
+ xgbe_stop_timers(pdata);
+ flush_workqueue(pdata->dev_workqueue);
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0004-spi-spidev-Add-dummy-spidev-device-to-SPI-bus.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0004-spi-spidev-Add-dummy-spidev-device-to-SPI-bus.patch
new file mode 100644
index 00000000..7efbde04
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0004-spi-spidev-Add-dummy-spidev-device-to-SPI-bus.patch
@@ -0,0 +1,100 @@
+From 838a8a77639dc2c1bb349830fe75025aacbe096b Mon Sep 17 00:00:00 2001
+From: Sanjay R Mehta <sanju.mehta@amd.com>
+Date: Tue, 3 Mar 2020 14:44:41 +0530
+Subject: [PATCH 04/10] spi: spidev: Add dummy spidev device to SPI bus
+
+Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/spi/spidev.c | 40 +++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 39 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
+index 859910ec8d9f..710d9d8b5383 100644
+--- a/drivers/spi/spidev.c
++++ b/drivers/spi/spidev.c
+@@ -27,6 +27,8 @@
+
+ #include <linux/uaccess.h>
+
++#define SPI_BUS 0
++#define SPI_BUS_CS1 0
+
+ /*
+ * This supports access to SPI devices using normal userspace I/O calls.
+@@ -46,6 +48,7 @@
+
+ static DECLARE_BITMAP(minors, N_SPI_MINORS);
+
++struct spi_device *spi_device;
+
+ /* Bit masks for spi_device.mode management. Note that incorrect
+ * settings for some settings can cause *lots* of trouble for other
+@@ -741,7 +744,7 @@ static int spidev_probe(struct spi_device *spi)
+ of_device_is_compatible(spi->dev.of_node, "spidev"),
+ "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);
+
+- spidev_probe_acpi(spi);
++// spidev_probe_acpi(spi);
+
+ /* Allocate driver data */
+ spidev = kzalloc(sizeof(*spidev), GFP_KERNEL);
+@@ -827,6 +830,32 @@ static struct spi_driver spidev_spi_driver = {
+
+ /*-------------------------------------------------------------------------*/
+
++static int __init add_spi_device_to_bus(void)
++{
++ struct spi_master *spi_master;
++ struct spi_board_info spi_info;
++
++ spi_master = spi_busnum_to_master(SPI_BUS);
++ if (!spi_master) {
++ printk(KERN_ALERT "Please make sure to \'modprobe "
++ "spi_amd\' driver first\n");
++ return -1;
++ }
++ memset(&spi_info, 0, sizeof(struct spi_board_info));
++
++ strlcpy(spi_info.modalias, "spidev", SPI_NAME_SIZE);
++ spi_info.bus_num = SPI_BUS; //Bus number of SPI master
++ spi_info.chip_select = SPI_BUS_CS1; //CS on which SPI device is connected
++
++ spi_device = spi_new_device(spi_master, &spi_info);
++ if (!spi_device)
++ return -ENODEV;
++
++ return 0;
++}
++
++
++
+ static int __init spidev_init(void)
+ {
+ int status;
+@@ -851,6 +880,14 @@ static int __init spidev_init(void)
+ class_destroy(spidev_class);
+ unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
+ }
++
++ status = add_spi_device_to_bus();
++ if (status < 0) {
++ spi_unregister_driver(&spidev_spi_driver);
++ class_destroy(spidev_class);
++ unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
++ }
++
+ return status;
+ }
+ module_init(spidev_init);
+@@ -858,6 +895,7 @@ module_init(spidev_init);
+ static void __exit spidev_exit(void)
+ {
+ spi_unregister_driver(&spidev_spi_driver);
++ spi_unregister_device(spi_device);
+ class_destroy(spidev_class);
+ unregister_chrdev(SPIDEV_MAJOR, spidev_spi_driver.driver.name);
+ }
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0005-amd-xgbe-Fix-for-Network-fluctuations.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0005-amd-xgbe-Fix-for-Network-fluctuations.patch
new file mode 100644
index 00000000..72638d6d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0005-amd-xgbe-Fix-for-Network-fluctuations.patch
@@ -0,0 +1,39 @@
+From a3cab0a6e63a95ad35ce408a4e455fe6354d8aa0 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Tue, 12 Jan 2021 15:11:03 +0530
+Subject: [PATCH 05/10] amd-xgbe: Fix for Network fluctuations
+
+BEL SFP, when connected to amd-xgbe shows frequent link down and up events on dmesg.
+Refer ticket EMBDEV-8951. This fix avoids the frquent link up/down issue.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index 90f33c3ddb32..5307f7e6e64b 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -1049,6 +1049,18 @@ static int xgbe_phy_find_phy_device(struct xgbe_prv_data *pdata)
+ }
+ phy_data->phydev = phydev;
+
++ switch (phy_data->port_mode) {
++ case XGBE_PORT_MODE_SFP:
++ /* reset the sfp phy EMBDEV-8951 */
++ if(phydev)
++ genphy_soft_reset(phydev);
++ else
++ netdev_err(pdata->netdev, "phy reset failed\n");
++ break;
++ default:
++ break;
++ }
++
+ xgbe_phy_external_phy_quirks(pdata);
+
+ linkmode_and(phydev->advertising, phydev->advertising,
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0006-amd-xgbe-sets-XGBE_LINK_INIT-when-there-is-a-link-fa.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0006-amd-xgbe-sets-XGBE_LINK_INIT-when-there-is-a-link-fa.patch
new file mode 100644
index 00000000..a506c211
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0006-amd-xgbe-sets-XGBE_LINK_INIT-when-there-is-a-link-fa.patch
@@ -0,0 +1,39 @@
+From d97a0266f1b8d3b76b4aa581eb7b19603ff8fcea Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Fri, 23 Oct 2020 01:45:15 +0530
+Subject: [PATCH 06/10] amd-xgbe sets XGBE_LINK_INIT when there is a link
+ failure
+
+When "link down" happens due to a link partner, the xgbe driver
+will not set XGBE_LINK_INIT. This is observed when the port speed
+capability is set to 10G in backplane mode.
+
+This fix sets XGBE_LINK_INIT when there is a link failure and
+XGBE_LINK_INIT is not set. This helps the driver to restart AN
+when AN link timeout happens.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+index 4e97b4869522..91397cf3c5ab 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+@@ -1371,6 +1371,12 @@ static void xgbe_phy_status(struct xgbe_prv_data *pdata)
+ xgbe_phy_status_result(pdata);
+
+ netif_carrier_off(pdata->netdev);
++
++ if (link_aneg && ((pdata->phy_if.phy_impl.cur_mode(pdata) == XGBE_MODE_KR) ||
++ (pdata->phy_if.phy_impl.cur_mode(pdata) == XGBE_MODE_KX_1000))) {
++ if (!test_bit(XGBE_LINK_INIT, &pdata->dev_state))
++ set_bit(XGBE_LINK_INIT, &pdata->dev_state);
++ }
+ }
+
+ adjust_link:
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0007-amd-xgbe-improved-KR-training-sequence.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0007-amd-xgbe-improved-KR-training-sequence.patch
new file mode 100644
index 00000000..92c253e3
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0007-amd-xgbe-improved-KR-training-sequence.patch
@@ -0,0 +1,286 @@
+From 1d9082fe8167fe3d2c9db39a22a727b99496d172 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Sat, 9 Jan 2021 12:26:09 +0530
+Subject: [PATCH 07/10] amd-xgbe: improved KR training sequence
+
+amd-xgbe driver handles KR training sequence directly by
+programming the h/w IP registers. This causes KR training
+failure if the h/w blocks are not operated correctly or they are
+not in sync. The new sequence increase the stability of AN process
+in KR mode by making sure that the h/w blocks are in expected
+state when the AN is in progress.
+
+This patch fix the problem of long linkup time due to repeated KR failure
+observed in AMD platforms.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Signed-off-by: Rahul Kumar <rahul.kumar1@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-common.h | 8 +++
+ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 44 ++++++++++++++--
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 56 ++++++++++++++-------
+ drivers/net/ethernet/amd/xgbe/xgbe.h | 5 ++
+ 4 files changed, 92 insertions(+), 21 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-common.h b/drivers/net/ethernet/amd/xgbe/xgbe-common.h
+index b2cd3bdba9f8..ae1d553962dd 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-common.h
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-common.h
+@@ -1279,6 +1279,10 @@
+ #define MDIO_PMA_10GBR_FECCTRL 0x00ab
+ #endif
+
++#ifndef MDIO_PMA_RX_CTRL0
++#define MDIO_PMA_RX_CTRL0 0x8050
++#endif
++
+ #ifndef MDIO_PMA_RX_CTRL1
+ #define MDIO_PMA_RX_CTRL1 0x8051
+ #endif
+@@ -1327,6 +1331,10 @@
+ #define MDIO_VEND2_AN_STAT 0x8002
+ #endif
+
++#ifndef MDIO_PMA_RX_EQ_CTRL
++#define MDIO_PMA_RX_EQ_CTRL 0x8009
++#endif
++
+ #ifndef MDIO_VEND2_PMA_CDR_CONTROL
+ #define MDIO_VEND2_PMA_CDR_CONTROL 0x8056
+ #endif
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+index 91397cf3c5ab..f4359407269a 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+@@ -402,6 +402,16 @@ static void xgbe_an73_set(struct xgbe_prv_data *pdata, bool enable,
+ reg |= MDIO_AN_CTRL1_RESTART;
+
+ XMDIO_WRITE(pdata, MDIO_MMD_AN, MDIO_CTRL1, reg);
++
++ if (xgbe_in_kr_mode(pdata) && (enable || restart)) {
++ reg = XMDIO_READ(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL);
++ reg |= XGBE_KR_TRAINING_ENABLE;
++ reg |= XGBE_KR_TRAINING_START;
++ XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
++
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_EQ_CTRL,
++ BIT(15), BIT(15)); /* Disable RX Adapter */
++ }
+ }
+
+ static void xgbe_an73_restart(struct xgbe_prv_data *pdata)
+@@ -409,7 +419,7 @@ static void xgbe_an73_restart(struct xgbe_prv_data *pdata)
+ xgbe_an73_enable_interrupts(pdata);
+ xgbe_an73_set(pdata, true, true);
+
+- netif_dbg(pdata, link, pdata->netdev, "CL73 AN enabled/restarted\n");
++ netif_dbg(pdata, link, pdata->netdev, "CL73 AN enabled/restarted, CL72 started\n");
+ }
+
+ static void xgbe_an73_disable(struct xgbe_prv_data *pdata)
+@@ -489,20 +499,40 @@ static enum xgbe_an xgbe_an73_tx_training(struct xgbe_prv_data *pdata,
+ XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_FECCTRL, reg);
+
+ /* Start KR training */
++ if (!pdata->phy_if.phy_impl.kr_training_cdroff(pdata))
++ netif_dbg(pdata, link, pdata->netdev, "setting phy_data->phy_cdr_notrack\n");
++
++ pdata->cdr_delay_required = 1;
++
+ if (pdata->phy_if.phy_impl.kr_training_pre)
+ pdata->phy_if.phy_impl.kr_training_pre(pdata);
+
+ reg = XMDIO_READ(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL);
+- reg |= XGBE_KR_TRAINING_ENABLE;
+ reg |= XGBE_KR_TRAINING_START;
+ XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
+
++ pdata->kr_done = 1;
++
+ netif_dbg(pdata, link, pdata->netdev,
+ "KR training initiated\n");
+
++ /* set RX_EQ_MGMT_MODE to disable RX Adapt Requests */
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_EQ_CTRL, BIT(15), BIT(15));
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_VEND2_PMA_CDR_CONTROL,
++ XGBE_PMA_CDR_TRACK_EN_MASK,
++ XGBE_PMA_CDR_TRACK_EN_OFF);
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_CTRL0, BIT(8), 0);
+ if (pdata->phy_if.phy_impl.kr_training_post)
+ pdata->phy_if.phy_impl.kr_training_post(pdata);
+
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_CTRL0, BIT(8), BIT(8));
++ pdata->cdr_delay_required = 0;
++ udelay(1);
++ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_RX_EQ_CTRL,
++ BIT(15), 0);
++ if (pdata->phy_if.phy_impl.update_cdr_delay)
++ pdata->phy_if.phy_impl.update_cdr_delay(pdata);
++
+ return XGBE_AN_PAGE_RECEIVED;
+ }
+
+@@ -897,8 +927,6 @@ static void xgbe_an73_state_machine(struct xgbe_prv_data *pdata)
+ pdata->kx_state = XGBE_RX_BPA;
+ pdata->an_start = 0;
+
+- if (pdata->phy_if.phy_impl.an_post)
+- pdata->phy_if.phy_impl.an_post(pdata);
+
+ netif_dbg(pdata, link, pdata->netdev, "CL73 AN result: %s\n",
+ xgbe_state_as_string(pdata->an_result));
+@@ -1243,6 +1271,9 @@ static int __xgbe_phy_config_aneg(struct xgbe_prv_data *pdata, bool set_mode)
+ /* Re-enable auto-negotiation interrupt */
+ enable_irq(pdata->an_irq);
+
++ if (pdata->phy_if.phy_impl.an_post)
++ pdata->phy_if.phy_impl.an_post(pdata);
++
+ xgbe_an_init(pdata);
+ xgbe_an_restart(pdata);
+
+@@ -1360,6 +1391,10 @@ static void xgbe_phy_status(struct xgbe_prv_data *pdata)
+ clear_bit(XGBE_LINK_INIT, &pdata->dev_state);
+
+ netif_carrier_on(pdata->netdev);
++
++ if (link_aneg && pdata->kr_done)
++ pdata->phy_if.phy_impl.reset_cdr_delay(pdata);
++
+ } else {
+ if (test_bit(XGBE_LINK_INIT, &pdata->dev_state)) {
+ xgbe_check_link_timeout(pdata);
+@@ -1454,6 +1489,7 @@ static int xgbe_phy_start(struct xgbe_prv_data *pdata)
+
+ /* Indicate the PHY is up and running */
+ pdata->phy_started = 1;
++ pdata->an_result = XGBE_AN_NO_LINK;
+
+ xgbe_an_init(pdata);
+ xgbe_an_enable_interrupts(pdata);
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index 5307f7e6e64b..88663acae8b3 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -2949,13 +2949,16 @@ static void xgbe_phy_cdr_track(struct xgbe_prv_data *pdata)
+ if (!phy_data->phy_cdr_notrack)
+ return;
+
+- usleep_range(phy_data->phy_cdr_delay,
+- phy_data->phy_cdr_delay + 500);
++ /* when there is no link, no need to use the cdr delay, when ever a page is */
++ /* received , pdata->cdr_delay_required is set to 1 */
++ if (pdata->cdr_delay_required) {
++ usleep_range(phy_data->phy_cdr_delay,
++ phy_data->phy_cdr_delay + 500);
++ }
+
+ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_VEND2_PMA_CDR_CONTROL,
+ XGBE_PMA_CDR_TRACK_EN_MASK,
+ XGBE_PMA_CDR_TRACK_EN_ON);
+-
+ phy_data->phy_cdr_notrack = 0;
+ }
+
+@@ -2972,9 +2975,7 @@ static void xgbe_phy_cdr_notrack(struct xgbe_prv_data *pdata)
+ XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_VEND2_PMA_CDR_CONTROL,
+ XGBE_PMA_CDR_TRACK_EN_MASK,
+ XGBE_PMA_CDR_TRACK_EN_OFF);
+-
+ xgbe_phy_rrc(pdata);
+-
+ phy_data->phy_cdr_notrack = 1;
+ }
+
+@@ -2984,6 +2985,36 @@ static void xgbe_phy_kr_training_post(struct xgbe_prv_data *pdata)
+ xgbe_phy_cdr_track(pdata);
+ }
+
++static void xgbe_phy_reset_cdr_delay(struct xgbe_prv_data *pdata)
++{
++ struct xgbe_phy_data *phy_data = pdata->phy_data;
++
++ phy_data->phy_cdr_delay = XGBE_CDR_DELAY_INIT;
++ pdata->kr_done = 0;
++}
++
++static void xgbe_phy_update_cdr_delay(struct xgbe_prv_data *pdata)
++{
++ struct xgbe_phy_data *phy_data = pdata->phy_data;
++
++ if (phy_data->phy_cdr_delay < XGBE_CDR_DELAY_MAX)
++ phy_data->phy_cdr_delay += XGBE_CDR_DELAY_INC;
++ else
++ phy_data->phy_cdr_delay = XGBE_CDR_DELAY_INIT;
++}
++
++static int xgbe_phy_kr_training_cdroff(struct xgbe_prv_data *pdata)
++{
++ int ret;
++ struct xgbe_phy_data *phy_data = pdata->phy_data;
++
++ ret = phy_data->phy_cdr_notrack;
++ if (!phy_data->phy_cdr_notrack)
++ phy_data->phy_cdr_notrack = 1;
++
++ return ret;
++}
++
+ static void xgbe_phy_kr_training_pre(struct xgbe_prv_data *pdata)
+ {
+ if (pdata->debugfs_an_cdr_track_early)
+@@ -3001,18 +3032,6 @@ static void xgbe_phy_an_post(struct xgbe_prv_data *pdata)
+ break;
+
+ xgbe_phy_cdr_track(pdata);
+-
+- switch (pdata->an_result) {
+- case XGBE_AN_READY:
+- case XGBE_AN_COMPLETE:
+- break;
+- default:
+- if (phy_data->phy_cdr_delay < XGBE_CDR_DELAY_MAX)
+- phy_data->phy_cdr_delay += XGBE_CDR_DELAY_INC;
+- else
+- phy_data->phy_cdr_delay = XGBE_CDR_DELAY_INIT;
+- break;
+- }
+ break;
+ default:
+ break;
+@@ -3451,6 +3470,9 @@ void xgbe_init_function_ptrs_phy_v2(struct xgbe_phy_if *phy_if)
+
+ phy_impl->kr_training_pre = xgbe_phy_kr_training_pre;
+ phy_impl->kr_training_post = xgbe_phy_kr_training_post;
++ phy_impl->kr_training_cdroff = xgbe_phy_kr_training_cdroff;
++ phy_impl->reset_cdr_delay = xgbe_phy_reset_cdr_delay;
++ phy_impl->update_cdr_delay = xgbe_phy_update_cdr_delay;
+
+ phy_impl->module_info = xgbe_phy_module_info;
+ phy_impl->module_eeprom = xgbe_phy_module_eeprom;
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
+index ba8321ec1ee7..c99b34c41f71 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe.h
++++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
+@@ -888,6 +888,9 @@ struct xgbe_phy_impl_if {
+ /* Pre/Post KR training enablement support */
+ void (*kr_training_pre)(struct xgbe_prv_data *);
+ void (*kr_training_post)(struct xgbe_prv_data *);
++ int (*kr_training_cdroff)(struct xgbe_prv_data *pdata);
++ void (*reset_cdr_delay)(struct xgbe_prv_data *pdata);
++ void (*update_cdr_delay)(struct xgbe_prv_data *pdata);
+
+ /* SFP module related info */
+ int (*module_info)(struct xgbe_prv_data *pdata,
+@@ -1254,6 +1257,8 @@ struct xgbe_prv_data {
+ unsigned int fec_ability;
+ unsigned long an_start;
+ enum xgbe_an_mode an_mode;
++ unsigned int kr_done;
++ unsigned int cdr_delay_required;
+
+ /* I2C support */
+ struct xgbe_i2c i2c;
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0008-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0008-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch
new file mode 100644
index 00000000..29be3aee
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0008-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch
@@ -0,0 +1,33 @@
+From 739c48e581242c57425de1a632d307e4c7a036dd Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Tue, 10 Nov 2020 12:42:28 +0530
+Subject: [PATCH 08/10] amd-xgbe: rrc is required only for Fixed PHY
+ configuration
+
+xgbe driver does RRC in every 10 seconds if the link is down.
+When AN is enabled and KR training is in progress,
+doing RRC cause KR training failure. The patch enables RRC only
+if AN is disabled.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index 88663acae8b3..a043c30358d2 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -2638,7 +2638,8 @@ static int xgbe_phy_link_status(struct xgbe_prv_data *pdata, int *an_restart)
+ /* No link, attempt a receiver reset cycle */
+ if (phy_data->rrc_count++ > XGBE_RRC_FREQUENCY) {
+ phy_data->rrc_count = 0;
+- xgbe_phy_rrc(pdata);
++ if (pdata->phy.autoneg == AUTONEG_DISABLE)
++ xgbe_phy_rrc(pdata);
+ }
+
+ return 0;
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0009-amd-xgbe-increased-cdr-delay.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0009-amd-xgbe-increased-cdr-delay.patch
new file mode 100644
index 00000000..19eedbf1
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0009-amd-xgbe-increased-cdr-delay.patch
@@ -0,0 +1,35 @@
+From f811f3596ae62941ce01aa84beef4159844de39f Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Wed, 11 Nov 2020 12:13:33 +0530
+Subject: [PATCH 09/10] amd-xgbe: increased cdr delay
+
+amd-xgbe driver needs delay to emable CDR.
+Some link partner's use 20ms of idle time before sending valid clock.
+The patch uses a delay of 22ms for the first time and increases
+by a step of 22ms.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index a043c30358d2..f3566a480f2d 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -149,9 +149,9 @@
+ #define XGBE_RATECHANGE_COUNT 500
+
+ /* CDR delay values for KR support (in usec) */
+-#define XGBE_CDR_DELAY_INIT 10000
+-#define XGBE_CDR_DELAY_INC 10000
+-#define XGBE_CDR_DELAY_MAX 100000
++#define XGBE_CDR_DELAY_INIT 22000
++#define XGBE_CDR_DELAY_INC 22000
++#define XGBE_CDR_DELAY_MAX 110000
+
+ /* RRC frequency during link status check */
+ #define XGBE_RRC_FREQUENCY 10
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0010-amd-xgbe-synchronization-between-AN-state-machine-an.patch b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0010-amd-xgbe-synchronization-between-AN-state-machine-an.patch
new file mode 100644
index 00000000..8fd1c8b5
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/0010-amd-xgbe-synchronization-between-AN-state-machine-an.patch
@@ -0,0 +1,123 @@
+From bff033e9aa3ebf9d7e2bb42be9d635e9c65bcbe0 Mon Sep 17 00:00:00 2001
+From: Sudheesh Mavila <sudheesh.mavila@amd.com>
+Date: Sat, 9 Jan 2021 23:41:36 +0530
+Subject: [PATCH 10/10] amd-xgbe: synchronization between AN state machine and
+ status polling timer thread
+
+xgbe driver uses a TIMEOUT to restart AN process if link is down.
+This create issue when TIMEOUT comes in between a KR training or RCC
+is in process. The patch avoids AN restart if TIMEOUT happens
+during KR cycle or RRC.
+
+TIMEOUT value also reduced to 1 sec to enable fast
+synchronization between LP.
+
+Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
+---
+ drivers/net/ethernet/amd/xgbe/xgbe-mdio.c | 29 +++++++++++++++++++--
+ drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 1 +
+ drivers/net/ethernet/amd/xgbe/xgbe.h | 4 ++-
+ 3 files changed, 31 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+index f4359407269a..c70c38d96020 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
+@@ -512,6 +512,7 @@ static enum xgbe_an xgbe_an73_tx_training(struct xgbe_prv_data *pdata,
+ XMDIO_WRITE(pdata, MDIO_MMD_PMAPMD, MDIO_PMA_10GBR_PMD_CTRL, reg);
+
+ pdata->kr_done = 1;
++ pdata->kr_start_time = jiffies;
+
+ netif_dbg(pdata, link, pdata->netdev,
+ "KR training initiated\n");
+@@ -884,6 +885,8 @@ static void xgbe_an73_state_machine(struct xgbe_prv_data *pdata)
+ break;
+
+ case XGBE_AN_PAGE_RECEIVED:
++ if (xgbe_in_kr_mode(pdata))
++ pdata->an_int = 0;
+ pdata->an_state = xgbe_an73_page_received(pdata);
+ pdata->an_supported++;
+ break;
+@@ -1306,11 +1309,34 @@ static bool xgbe_phy_aneg_done(struct xgbe_prv_data *pdata)
+ static void xgbe_check_link_timeout(struct xgbe_prv_data *pdata)
+ {
+ unsigned long link_timeout;
++ int wait = 200;
++ unsigned long kr_time;
++ unsigned long rrc_time;
+
+ link_timeout = pdata->link_check + (XGBE_LINK_TIMEOUT * HZ);
+ if (time_after(jiffies, link_timeout)) {
+ netif_dbg(pdata, link, pdata->netdev, "AN link timeout\n");
+- xgbe_phy_config_aneg(pdata);
++ /* AN restart should not happen within 500ms of start of RRC or KR tarining */
++ /* This loop ensures no AN restart during RRC window and KR training window */
++ while (wait--) {
++ mutex_lock(&pdata->an_mutex);
++ kr_time = pdata->kr_start_time + msecs_to_jiffies(XGBE_AN_MS_TIMEOUT);
++ rrc_time = pdata->rrc_start_time + msecs_to_jiffies(XGBE_AN_MS_TIMEOUT);
++ mutex_unlock(&pdata->an_mutex);
++ if (time_after(jiffies, kr_time) && time_after(jiffies, rrc_time))
++ break;
++ if (pdata->an_result == XGBE_AN_COMPLETE)
++ break;
++
++ usleep_range(5000, 6000);
++ }
++ /* AN restart is required, if AN result is not COMPLETE */
++ if (pdata->an_result != XGBE_AN_COMPLETE)
++ xgbe_phy_config_aneg(pdata);
++ else if ((pdata->an_result == XGBE_AN_COMPLETE) &&
++ (xgbe_cur_mode(pdata) == XGBE_MODE_KX_1000))
++ xgbe_phy_config_aneg(pdata);
++
+ }
+ }
+
+@@ -1489,7 +1515,6 @@ static int xgbe_phy_start(struct xgbe_prv_data *pdata)
+
+ /* Indicate the PHY is up and running */
+ pdata->phy_started = 1;
+- pdata->an_result = XGBE_AN_NO_LINK;
+
+ xgbe_an_init(pdata);
+ xgbe_an_enable_interrupts(pdata);
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+index f3566a480f2d..f24b8121db2e 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
++++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
+@@ -2977,6 +2977,7 @@ static void xgbe_phy_cdr_notrack(struct xgbe_prv_data *pdata)
+ XGBE_PMA_CDR_TRACK_EN_MASK,
+ XGBE_PMA_CDR_TRACK_EN_OFF);
+ xgbe_phy_rrc(pdata);
++ pdata->rrc_start_time = jiffies;
+ phy_data->phy_cdr_notrack = 1;
+ }
+
+diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
+index c99b34c41f71..3ed98e2f8695 100644
+--- a/drivers/net/ethernet/amd/xgbe/xgbe.h
++++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
+@@ -288,7 +288,7 @@
+
+ /* Auto-negotiation */
+ #define XGBE_AN_MS_TIMEOUT 500
+-#define XGBE_LINK_TIMEOUT 5
++#define XGBE_LINK_TIMEOUT 1
+
+ #define XGBE_SGMII_AN_LINK_STATUS BIT(1)
+ #define XGBE_SGMII_AN_LINK_SPEED (BIT(2) | BIT(3))
+@@ -1258,6 +1258,8 @@ struct xgbe_prv_data {
+ unsigned long an_start;
+ enum xgbe_an_mode an_mode;
+ unsigned int kr_done;
++ unsigned long kr_start_time;
++ unsigned long rrc_start_time;
+ unsigned int cdr_delay_required;
+
+ /* I2C support */
+--
+2.17.1
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/afalg.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/afalg.cfg
new file mode 100644
index 00000000..3a101779
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/afalg.cfg
@@ -0,0 +1,41 @@
+#
+# General setup
+#
+CONFIG_AUDIT=y
+CONFIG_HAVE_ARCH_AUDITSYSCALL=y
+CONFIG_AUDITSYSCALL=y
+
+CONFIG_INTEGRITY_AUDIT=y
+
+#
+# Crypto core or helper
+#
+
+CONFIG_CRYPTO_USER=m
+CONFIG_CRYPTO_CRYPTD=m
+
+# Authenticated Encryption with Associated Data
+#
+CONFIG_CRYPTO_ECHAINIV=m
+
+
+#
+# Ciphers
+#
+CONFIG_CRYPTO_DES3_EDE_X86_64=m
+
+#
+# Random Number Generation
+#
+CONFIG_CRYPTO_ANSI_CPRNG=m
+CONFIG_CRYPTO_DRBG_MENU=y
+CONFIG_CRYPTO_DRBG_HMAC=y
+CONFIG_CRYPTO_DRBG_HASH=y
+CONFIG_CRYPTO_DRBG_CTR=y
+CONFIG_CRYPTO_DRBG=y
+CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_USER_API=m
+CONFIG_CRYPTO_USER_API_HASH=m
+CONFIG_CRYPTO_USER_API_SKCIPHER=m
+CONFIG_CRYPTO_USER_API_RNG=m
+CONFIG_CRYPTO_USER_API_AEAD=m
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-ccp.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-ccp.cfg
new file mode 100644
index 00000000..109cda5c
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-ccp.cfg
@@ -0,0 +1,27 @@
+CONFIG_SERIAL_8250_DMA=y
+CONFIG_DMADEVICES=y
+# CONFIG_DMADEVICES_DEBUG is not set
+#
+# DMA Devices
+#
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_VIRTUAL_CHANNELS=y
+CONFIG_DMA_ACPI=y
+# CONFIG_INTEL_IDMA64 is not set
+# CONFIG_INTEL_IOATDMA is not set
+# CONFIG_QCOM_HIDMA_MGMT is not set
+# CONFIG_QCOM_HIDMA is not set
+CONFIG_DW_DMAC_CORE=y
+# CONFIG_DW_DMAC is not set
+# CONFIG_DW_DMAC_PCI is not set
+CONFIG_HSU_DMA=y
+#
+# DMA Clients
+#
+# CONFIG_ASYNC_TX_DMA is not set
+# CONFIG_DMATEST is not set
+CONFIG_CRYPTO_DEV_CCP=y
+CONFIG_CRYPTO_DEV_CCP_DD=m
+CONFIG_CRYPTO_DEV_CCP_CRYPTO=m
+CONFIG_CRYPTO_DEV_SP_CCP=y
+CONFIG_CRYPTO_DEV_SP_PSP=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-emmc-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-emmc-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-emmc-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-spi-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-spi-patches.scc
new file mode 100644
index 00000000..6c97c1aa
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-spi-patches.scc
@@ -0,0 +1 @@
+patch 0004-spi-spidev-Add-dummy-spidev-device-to-SPI-bus.patch
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-usb-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-usb-patches.scc
new file mode 100644
index 00000000..76ea98f4
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-usb-patches.scc
@@ -0,0 +1 @@
+patch 0001-usb-xhci-Add-LPM-support-to-AMD-xhci-controller.patch
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe-patches.scc
new file mode 100644
index 00000000..e2922c00
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe-patches.scc
@@ -0,0 +1,8 @@
+patch 0002-amd-xgbe-fix-for-the-crash-which-happens-during-SFP-.patch
+patch 0003-amd-xgbe-Fix-NETDEV-WATCHDOG-transmit-queue-timed-ou.patch
+patch 0005-amd-xgbe-Fix-for-Network-fluctuations.patch
+patch 0006-amd-xgbe-sets-XGBE_LINK_INIT-when-there-is-a-link-fa.patch
+patch 0007-amd-xgbe-improved-KR-training-sequence.patch
+patch 0008-amd-xgbe-rrc-is-required-only-for-Fixed-PHY-configur.patch
+patch 0009-amd-xgbe-increased-cdr-delay.patch
+patch 0010-amd-xgbe-synchronization-between-AN-state-machine-an.patch
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe.cfg
new file mode 100644
index 00000000..463ed1e8
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amd-xgbe.cfg
@@ -0,0 +1,51 @@
+CONFIG_MDIO=y
+CONFIG_AMD_XGBE=y
+CONFIG_AMD_XGBE_HAVE_ECC=y
+CONFIG_PHYLIB=y
+CONFIG_MDIO_GPIO=y
+
+CONFIG_USB_USBNET=y
+CONFIG_USB_NET_AX8817X=y
+CONFIG_USB_NET_AX88179_178A=y
+CONFIG_USB_NET_CDCETHER=y
+# CONFIG_USB_NET_CDC_EEM is not set
+CONFIG_USB_NET_CDC_NCM=y
+# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set
+# CONFIG_USB_NET_CDC_MBIM is not set
+# CONFIG_USB_NET_DM9601 is not set
+# CONFIG_USB_NET_SR9700 is not set
+# CONFIG_USB_NET_SR9800 is not set
+# CONFIG_USB_NET_SMSC75XX is not set
+# CONFIG_USB_NET_SMSC95XX is not set
+# CONFIG_USB_NET_GL620A is not set
+CONFIG_USB_NET_NET1080=y
+# CONFIG_USB_NET_PLUSB is not set
+# CONFIG_USB_NET_MCS7830 is not set
+# CONFIG_USB_NET_RNDIS_HOST is not set
+CONFIG_USB_NET_CDC_SUBSET_ENABLE=y
+CONFIG_USB_NET_CDC_SUBSET=y
+# CONFIG_USB_ALI_M5632 is not set
+# CONFIG_USB_AN2720 is not set
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+# CONFIG_USB_EPSON2888 is not set
+# CONFIG_USB_KC2190 is not set
+CONFIG_USB_NET_ZAURUS=y
+CONFIG_USB_NET_CX82310_ETH=y
+# CONFIG_USB_NET_KALMIA is not set
+# CONFIG_USB_NET_QMI_WWAN is not set
+# CONFIG_USB_HSO is not set
+# CONFIG_USB_NET_INT51X1 is not set
+# CONFIG_USB_IPHETH is not set
+# CONFIG_USB_SIERRA_NET is not set
+# CONFIG_USB_VL600 is not set
+# CONFIG_USB_NET_CH9200 is not set
+
+CONFIG_VFIO_PCI=y
+
+CONFIG_X86_X2APIC=y
+CONFIG_X86_NUMACHIP=y
+CONFIG_INET_TCP_DIAG=m
+CONFIG_INET_UDP_DIAG=m
+CONFIG_INET_DIAG=m
+CONFIG_NETLABEL=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-extra-config.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-extra-config.cfg
new file mode 100644
index 00000000..3a88bccf
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-extra-config.cfg
@@ -0,0 +1,305 @@
+CONFIG_PERF_EVENTS_INTEL_UNCORE=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_CROSS_MEMORY_ATTACH=y
+CONFIG_USELIB=y
+CONFIG_HAVE_ARCH_AUDITSYSCALL=y
+CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
+CONFIG_SRCU=y
+# CONFIG_TASKS_RCU is not set
+CONFIG_BUILD_BIN2C=y
+CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
+CONFIG_PAGE_COUNTER=y
+CONFIG_BPF=y
+CONFIG_MULTIUSER=y
+CONFIG_SGETMASK_SYSCALL=y
+CONFIG_SYSFS_SYSCALL=y
+# CONFIG_BPF_SYSCALL is not set
+CONFIG_ADVISE_SYSCALLS=y
+CONFIG_HAVE_DMA_CONTIGUOUS=y
+CONFIG_HAVE_ARCH_HUGE_VMAP=y
+CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
+CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
+# CONFIG_MODULE_COMPRESS is not set
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_X86_FEATURE_NAMES=y
+# CONFIG_X86_GOLDFISH is not set
+# CONFIG_IOSF_MBI_DEBUG is not set
+CONFIG_X86_VSYSCALL_EMULATION=y
+CONFIG_X86_DIRECT_GBPAGES=y
+CONFIG_MEMORY_BALLOON=y
+# CONFIG_ZSWAP is not set
+# CONFIG_ZPOOL is not set
+# CONFIG_ZBUD is not set
+CONFIG_GENERIC_EARLY_IOREMAP=y
+# CONFIG_X86_PMEM_LEGACY is not set
+# CONFIG_EFI_MIXED is not set
+CONFIG_HAVE_LIVEPATCH=y
+# CONFIG_LIVEPATCH is not set
+CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
+CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
+CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
+CONFIG_ACPI_HOTPLUG_IOAPIC=y
+# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set
+CONFIG_HAVE_ACPI_APEI=y
+CONFIG_HAVE_ACPI_APEI_NMI=y
+# CONFIG_PMIC_OPREGION is not set
+CONFIG_PMC_ATOM=y
+CONFIG_NET_UDP_TUNNEL=m
+# CONFIG_NET_FOU is not set
+# CONFIG_NET_FOU_IP_TUNNELS is not set
+# CONFIG_GENEVE is not set
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_BRIDGE_NETFILTER=m
+CONFIG_NF_NAT_REDIRECT=m
+# CONFIG_NETFILTER_XT_NAT is not set
+# CONFIG_NF_LOG_ARP is not set
+# CONFIG_NF_LOG_IPV4 is not set
+CONFIG_NF_REJECT_IPV4=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+# CONFIG_IP_NF_NAT is not set
+# CONFIG_NF_REJECT_IPV6 is not set
+# CONFIG_NF_LOG_IPV6 is not set
+CONFIG_TIPC_MEDIA_UDP=y
+# CONFIG_NET_ACT_VLAN is not set
+# CONFIG_NET_ACT_BPF is not set
+# CONFIG_NET_ACT_CONNMARK is not set
+# CONFIG_MPLS is not set
+# CONFIG_NET_SWITCHDEV is not set
+CONFIG_BT_BREDR=y
+CONFIG_BT_LE=y
+# CONFIG_BT_SELFTEST is not set
+CONFIG_BT_DEBUGFS=y
+CONFIG_BT_INTEL=m
+CONFIG_BT_BCM=m
+CONFIG_BT_HCIBTUSB_BCM=y
+# CONFIG_BT_HCIUART_INTEL is not set
+# CONFIG_BT_HCIUART_BCM is not set
+CONFIG_UEVENT_HELPER=y
+# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
+CONFIG_ALLOW_DEV_COREDUMP=y
+# CONFIG_BLK_DEV_PMEM is not set
+# CONFIG_INTEL_MEI_TXE is not set
+# CONFIG_ECHO is not set
+# CONFIG_CXL_BASE is not set
+# CONFIG_SCSI_AM53C974 is not set
+# CONFIG_SCSI_WD719X is not set
+# CONFIG_DM_ERA is not set
+# CONFIG_DM_LOG_WRITES is not set
+# CONFIG_IPVLAN is not set
+# CONFIG_NET_VENDOR_AGERE is not set
+# CONFIG_ET131X is not set
+# CONFIG_ALTERA_TSE is not set
+# CONFIG_BCMGENET is not set
+# CONFIG_CX_ECAT is not set
+# CONFIG_FM10K is not set
+# CONFIG_NET_VENDOR_QUALCOMM is not set
+# CONFIG_NET_VENDOR_ROCKER is not set
+# CONFIG_NET_VENDOR_SAMSUNG is not set
+# CONFIG_SXGBE_ETH is not set
+# CONFIG_BCM7XXX_PHY is not set
+# CONFIG_MDIO_BCM_UNIMAC is not set
+CONFIG_USB_NET_DRIVERS=y
+# CONFIG_ATH9K_DYNACK is not set
+# CONFIG_ATH9K_CHANNEL_CONTEXT is not set
+CONFIG_ATH9K_PCOEM=y
+CONFIG_BRCMFMAC_PROTO_BCDC=y
+# CONFIG_BRCMFMAC_PCIE is not set
+CONFIG_IWLWIFI_LEDS=y
+# CONFIG_RTL8723BE is not set
+# CONFIG_RTL8192EE is not set
+# CONFIG_RTL8821AE is not set
+# CONFIG_RSI_91X is not set
+# CONFIG_MOUSE_ELAN_I2C is not set
+# CONFIG_TABLET_SERIAL_WACOM4 is not set
+# CONFIG_TOUCHSCREEN_GOODIX is not set
+# CONFIG_TOUCHSCREEN_ELAN is not set
+# CONFIG_TOUCHSCREEN_SX8654 is not set
+CONFIG_DEVMEM=y
+CONFIG_SERIAL_EARLYCON=y
+# CONFIG_SERIAL_8250_FINTEK is not set
+# CONFIG_SERIAL_SC16IS7XX is not set
+# CONFIG_IPMI_SSIF is not set
+# CONFIG_TCG_CRB is not set
+# CONFIG_TCG_TIS_ST33ZP24 is not set
+# CONFIG_XILLYBUS is not set
+CONFIG_ACPI_I2C_OPREGION=y
+# CONFIG_I2C_SLAVE is not set
+# CONFIG_SPI_CADENCE is not set
+# CONFIG_SPMI is not set
+# CONFIG_PINCTRL_BAYTRAIL is not set
+# CONFIG_PINCTRL_CHERRYVIEW is not set
+# CONFIG_PINCTRL_SUNRISEPOINT is not set
+CONFIG_GPIOLIB_IRQCHIP=y
+# CONFIG_GPIO_DWAPB is not set
+# CONFIG_GPIO_F7188X is not set
+# CONFIG_GPIO_ICH is not set
+# CONFIG_GPIO_SCH311X is not set
+# CONFIG_GPIO_ADP5588 is not set
+# CONFIG_GPIO_BT8XX is not set
+# CONFIG_BATTERY_GAUGE_LTC2941 is not set
+# CONFIG_SENSORS_APPLESMC is not set
+# CONFIG_SENSORS_G760A is not set
+# CONFIG_SENSORS_G762 is not set
+# CONFIG_SENSORS_I5500 is not set
+# CONFIG_SENSORS_CORETEMP is not set
+# CONFIG_SENSORS_POWR1220 is not set
+# CONFIG_SENSORS_LTC2945 is not set
+# CONFIG_SENSORS_LTC4151 is not set
+# CONFIG_SENSORS_LTC4215 is not set
+# CONFIG_SENSORS_LTC4222 is not set
+# CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LTC4260 is not set
+# CONFIG_SENSORS_LTC4261 is not set
+# CONFIG_SENSORS_MAX1111 is not set
+# CONFIG_SENSORS_MAX16065 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX1668 is not set
+# CONFIG_SENSORS_MAX197 is not set
+# CONFIG_SENSORS_MAX6639 is not set
+# CONFIG_SENSORS_MAX6642 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_MAX6697 is not set
+# CONFIG_SENSORS_MCP3021 is not set
+# CONFIG_SENSORS_ADCXX is not set
+# CONFIG_SENSORS_NTC_THERMISTOR is not set
+# CONFIG_SENSORS_NCT6683 is not set
+# CONFIG_SENSORS_NCT6775 is not set
+# CONFIG_SENSORS_NCT7802 is not set
+# CONFIG_SENSORS_NCT7904 is not set
+# CONFIG_SENSORS_SHTC1 is not set
+# CONFIG_SENSORS_SMM665 is not set
+# CONFIG_SENSORS_ADC128D818 is not set
+# CONFIG_SENSORS_TMP103 is not set
+# CONFIG_THERMAL_GOV_BANG_BANG is not set
+# CONFIG_INTEL_SOC_DTS_THERMAL is not set
+# CONFIG_INT340X_THERMAL is not set
+# CONFIG_XILINX_WATCHDOG is not set
+# CONFIG_CADENCE_WATCHDOG is not set
+CONFIG_BCMA_DRIVER_PCI=y
+# CONFIG_MFD_BCM590XX is not set
+# CONFIG_MFD_AXP20X is not set
+# CONFIG_MFD_DA9150 is not set
+# CONFIG_MFD_DLN2 is not set
+# CONFIG_MFD_INTEL_QUARK_I2C_GPIO is not set
+# CONFIG_INTEL_SOC_PMIC is not set
+# CONFIG_MFD_MAX77843 is not set
+# CONFIG_MFD_MT6397 is not set
+# CONFIG_MFD_MENF21BMC is not set
+# CONFIG_MFD_RT5033 is not set
+# CONFIG_MFD_RN5T618 is not set
+# CONFIG_MFD_SKY81452 is not set
+# CONFIG_MFD_TPS65218 is not set
+# CONFIG_MEDIA_SDR_SUPPORT is not set
+# CONFIG_USB_GSPCA_DTCS033 is not set
+# CONFIG_USB_GSPCA_TOUPTEK is not set
+# CONFIG_DRM_I2C_ADV7511 is not set
+# CONFIG_DRM_VGEM is not set
+# CONFIG_HSA_AMD is not set
+CONFIG_FB_CMDLINE=y
+CONFIG_HDMI=y
+CONFIG_DUMMY_CONSOLE_COLUMNS=80
+CONFIG_DUMMY_CONSOLE_ROWS=25
+# CONFIG_HID_BETOP_FF is not set
+# CONFIG_HID_CP2112 is not set
+# CONFIG_HID_GT683R is not set
+# CONFIG_HID_LENOVO is not set
+# CONFIG_HID_LOGITECH_HIDPP is not set
+# CONFIG_HID_PENMOUNT is not set
+# CONFIG_HID_PLANTRONICS is not set
+# CONFIG_HID_RMI is not set
+# CONFIG_USB_OTG_FSM is not set
+CONFIG_USB_XHCI_PCI=y
+# CONFIG_USB_MAX3421_HCD is not set
+# CONFIG_USB_UAS is not set
+# CONFIG_USBIP_CORE is not set
+# CONFIG_USB_ISP1760 is not set
+# CONFIG_USB_LINK_LAYER_TEST is not set
+# CONFIG_USB_CHAOSKEY is not set
+# CONFIG_USB_LED_TRIG is not set
+# CONFIG_MMC_USDHI6ROL0 is not set
+# CONFIG_MMC_TOSHIBA_PCI is not set
+# CONFIG_LEDS_CLASS_FLASH is not set
+# CONFIG_LEDS_LP8860 is not set
+# CONFIG_EDAC_IE31200 is not set
+# CONFIG_RTC_DRV_ABB5ZES3 is not set
+# CONFIG_RTC_DRV_ABX80X is not set
+# CONFIG_RTC_DRV_PCF85063 is not set
+# CONFIG_RTC_DRV_DS1343 is not set
+# CONFIG_RTC_DRV_DS1347 is not set
+# CONFIG_RTC_DRV_MCP795 is not set
+# CONFIG_RTC_DRV_DS1685_FAMILY is not set
+# CONFIG_RTC_DRV_DS2404 is not set
+# CONFIG_RTC_DRV_XGENE is not set
+# CONFIG_FB_SM750 is not set
+# CONFIG_GS_FPGABOOT is not set
+# CONFIG_UNISYSSPAR is not set
+# CONFIG_FB_TFT is not set
+# CONFIG_DELL_SMO8800 is not set
+# CONFIG_TOSHIBA_HAPS is not set
+# CONFIG_COMMON_CLK_PXA is not set
+# CONFIG_COMMON_CLK_CDCE706 is not set
+# CONFIG_ATMEL_PIT is not set
+# CONFIG_SH_TIMER_CMT is not set
+# CONFIG_SH_TIMER_MTU2 is not set
+# CONFIG_SH_TIMER_TMU is not set
+# CONFIG_EM_TIMER_STI is not set
+# CONFIG_SOC_TI is not set
+# CONFIG_PM_DEVFREQ_EVENT is not set
+# CONFIG_BCM_KONA_USB2_PHY is not set
+# CONFIG_MCB is not set
+CONFIG_RAS=y
+# CONFIG_ANDROID is not set
+CONFIG_EFI_RUNTIME_WRAPPERS=y
+# CONFIG_F2FS_FS is not set
+# CONFIG_FS_DAX is not set
+# CONFIG_OVERLAY_FS is not set
+CONFIG_KERNFS=y
+CONFIG_EFIVAR_FS=m
+# CONFIG_SQUASHFS_LZ4 is not set
+# CONFIG_PSTORE_PMSG is not set
+# CONFIG_NFSD_PNFS is not set
+CONFIG_GRACE_PERIOD=y
+CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
+# CONFIG_DEBUG_INFO_SPLIT is not set
+# CONFIG_DEBUG_INFO_DWARF4 is not set
+# CONFIG_GDB_SCRIPTS is not set
+# CONFIG_PAGE_OWNER is not set
+# CONFIG_PAGE_EXTENSION is not set
+CONFIG_HAVE_ARCH_KASAN=y
+# CONFIG_KASAN is not set
+CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
+# CONFIG_SCHED_STACK_END_CHECK is not set
+# CONFIG_DEBUG_TIMEKEEPING is not set
+# CONFIG_LOCK_TORTURE_TEST is not set
+# CONFIG_PROVE_RCU is not set
+# CONFIG_TORTURE_TEST is not set
+# CONFIG_TRACEPOINT_BENCHMARK is not set
+# CONFIG_TEST_HEXDUMP is not set
+# CONFIG_TEST_RHASHTABLE is not set
+# CONFIG_TEST_LKM is not set
+# CONFIG_TEST_BPF is not set
+# CONFIG_TEST_FIRMWARE is not set
+# CONFIG_TEST_UDELAY is not set
+# CONFIG_MEMTEST is not set
+CONFIG_INTEGRITY=y
+# CONFIG_INTEGRITY_SIGNATURE is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_GCM=m
+CONFIG_CRYPTO_GHASH=m
+# CONFIG_CRYPTO_DES3_EDE_X86_64 is not set
+# CONFIG_CRYPTO_DRBG_MENU is not set
+# CONFIG_CRYPTO_USER_API_RNG is not set
+# CONFIG_CRYPTO_DEV_QAT_DH895xCC is not set
+CONFIG_KVM_COMPAT=y
+# CONFIG_HAVE_ARCH_BITREVERSE is not set
+CONFIG_RATIONAL=y
+CONFIG_ARCH_HAS_FAST_MULTIPLIER=y
+# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_GLOB=y
+# CONFIG_GLOB_SELFTEST is not set
+CONFIG_UIO=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-standard-only.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-standard-only.cfg
new file mode 100644
index 00000000..bfc1701d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-standard-only.cfg
@@ -0,0 +1,3 @@
+CONFIG_TRANSPARENT_HUGEPAGE=y
+CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
+CONFIG_X86_POWERNOW_K8=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-config.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-config.cfg
new file mode 100644
index 00000000..76a144e0
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-config.cfg
@@ -0,0 +1,396 @@
+CONFIG_X86_BIGSMP=y
+
+#
+# IRQ subsystem
+#
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_IRQ_DOMAIN=y
+
+CONFIG_CGROUP_PERF=y
+# CONFIG_CGROUP_DEBUG is not set
+CONFIG_CHECKPOINT_RESTORE=y
+CONFIG_SCHED_AUTOGROUP=y
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_BLK_DEV_BSGLIB=y
+CONFIG_BLK_DEV_INTEGRITY=y
+CONFIG_BLK_DEV_THROTTLING=y
+CONFIG_BLK_CMDLINE_PARSER=y
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+
+#
+# IO Schedulers
+#
+CONFIG_X86_AMD_PLATFORM_DEVICE=y
+CONFIG_PROCESSOR_SELECT=y
+CONFIG_CPU_SUP_AMD=y
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_GART_IOMMU=y
+CONFIG_SWIOTLB=y
+CONFIG_NR_CPUS=256
+CONFIG_X86_MCE=y
+CONFIG_X86_MCE_AMD=y
+CONFIG_X86_MCE_INJECT=m
+
+#
+# Performance monitoring
+#
+CONFIG_MICROCODE=y
+CONFIG_MICROCODE_AMD=y
+CONFIG_X86_MSR=m
+CONFIG_X86_CPUID=m
+CONFIG_NUMA=y
+CONFIG_AMD_NUMA=y
+CONFIG_X86_64_ACPI_NUMA=y
+CONFIG_NODES_SHIFT=6
+CONFIG_ARCH_MEMORY_PROBE=y
+CONFIG_NEED_MULTIPLE_NODES=y
+CONFIG_MEMORY_ISOLATION=y
+CONFIG_HAVE_BOOTMEM_INFO_NODE=y
+CONFIG_MEMORY_HOTPLUG=y
+CONFIG_MEMORY_HOTPLUG_SPARSE=y
+CONFIG_MEMORY_HOTREMOVE=y
+CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
+CONFIG_BOUNCE=y
+CONFIG_MMU_NOTIFIER=y
+CONFIG_KSM=y
+CONFIG_MEMORY_FAILURE=y
+CONFIG_CLEANCACHE=y
+CONFIG_FRONTSWAP=y
+CONFIG_CMA=y
+CONFIG_KEXEC=y
+CONFIG_CRASH_DUMP=y
+CONFIG_PHYSICAL_ALIGN=0x1000000
+CONFIG_RANDOMIZE_MEMORY=y
+CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0xa
+CONFIG_COMPAT_VDSO=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
+CONFIG_USE_PERCPU_NUMA_NODE_ID=y
+
+#
+# Power management and ACPI options
+#
+CONFIG_ARCH_HIBERNATION_HEADER=y
+CONFIG_HIBERNATE_CALLBACKS=y
+CONFIG_HIBERNATION=y
+CONFIG_PM_STD_PARTITION=""
+CONFIG_PM_TRACE=y
+CONFIG_PM_TRACE_RTC=y
+CONFIG_ACPI_VIDEO=m
+CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_SBS=m
+CONFIG_ACPI_HED=y
+CONFIG_ACPI_BGRT=y
+CONFIG_ACPI_APEI=y
+CONFIG_ACPI_APEI_PCIEAER=y
+CONFIG_ACPI_APEI_MEMORY_FAILURE=y
+CONFIG_ACPI_APEI_EINJ=m
+CONFIG_ACPI_APEI_ERST_DEBUG=m
+CONFIG_SFI=y
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+
+#
+# CPU frequency scaling drivers
+#
+CONFIG_X86_PCC_CPUFREQ=y
+CONFIG_X86_ACPI_CPUFREQ=y
+CONFIG_X86_ACPI_CPUFREQ_CPB=y
+CONFIG_X86_POWERNOW_K8=y
+CONFIG_X86_AMD_FREQ_SENSITIVITY=m
+CONFIG_X86_SPEEDSTEP_CENTRINO=y
+CONFIG_X86_P4_CLOCKMOD=m
+
+#
+# shared options
+#
+CONFIG_X86_SPEEDSTEP_LIB=m
+
+
+#
+# Bus options (PCI etc.)
+#
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_REALLOC_ENABLE_AUTO=y
+CONFIG_PCI_STUB=m
+CONFIG_PCI_ATS=y
+CONFIG_PCI_IOV=y
+CONFIG_PCI_PRI=y
+CONFIG_PCI_PASID=y
+CONFIG_HOTPLUG_PCI_CPCI=y
+CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
+
+#
+# PCI host controller drivers
+#
+CONFIG_AMD_NB=y
+
+#
+# RapidIO Switch drivers
+#
+CONFIG_X86_SYSFB=y
+
+
+#
+# Queueing/Scheduling
+#
+CONFIG_NET_SCH_FQ=m
+#
+# Misc devices
+#
+CONFIG_ENCLOSURE_SERVICES=m
+
+#
+# EEPROM support
+#
+CONFIG_EEPROM_LEGACY=m
+
+
+#
+# Controllers with non-SFF native interface
+#
+CONFIG_SATA_AHCI_PLATFORM=m
+
+
+#
+# Distributed Switch Architecture drivers
+#
+CONFIG_E1000=y
+CONFIG_E1000E=y
+CONFIG_E1000E_HWTS=y
+CONFIG_IGB=y
+CONFIG_IGB_HWMON=y
+CONFIG_IGBVF=y
+CONFIG_IXGB=y
+CONFIG_IXGBE=y
+CONFIG_IXGBE_HWMON=y
+CONFIG_IXGBEVF=y
+
+#
+# MDIO bus device drivers
+#
+CONFIG_MDIO_GPIO=m
+
+#
+# MII PHY device drivers
+#
+CONFIG_AMD_PHY=m
+
+CONFIG_SERIAL_8250_NR_UARTS=48
+CONFIG_SERIAL_8250_RUNTIME_UARTS=32
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+CONFIG_SERIAL_8250_DW=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_IPMI_HANDLER=m
+CONFIG_NVRAM=m
+
+#
+# PCMCIA character devices
+#
+CONFIG_HANGCHECK_TIMER=m
+CONFIG_TCG_TPM=y
+
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_PIIX4=m
+#
+# I2C system bus drivers (mostly embedded / system-on-chip)
+#
+CONFIG_I2C_CBUS_GPIO=m
+CONFIG_I2C_DESIGNWARE_CORE=y
+CONFIG_I2C_DESIGNWARE_PLATFORM=y
+CONFIG_I2C_DESIGNWARE_PCI=m
+CONFIG_I2C_DESIGNWARE_BAYTRAIL=y
+CONFIG_I2C_GPIO=m
+CONFIG_I2C_KEMPLD=m
+CONFIG_I2C_OCORES=m
+CONFIG_SPI=y
+# CONFIG_SPI_DEBUG is not set
+CONFIG_SPI_MASTER=y
+#
+# SPI Protocol Masters
+#
+CONFIG_SPI_SPIDEV=m
+#
+# Pin controllers
+#
+CONFIG_PINCTRL_AMD=y
+CONFIG_GPIOLIB=y
+CONFIG_GPIO_ACPI=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_GENERIC=y
+#
+# Memory mapped GPIO drivers
+#
+CONFIG_GPIO_GENERIC_PLATFORM=y
+
+#
+# PCI GPIO expanders
+#
+CONFIG_GPIO_ML_IOH=m
+
+#
+# Native drivers
+#
+CONFIG_SENSORS_K10TEMP=m
+CONFIG_SENSORS_FAM15H_POWER=m
+
+#
+# ACPI drivers
+#
+CONFIG_SENSORS_ACPI_POWER=m
+
+
+#
+# Graphics support
+#
+CONFIG_AGP_AMD64=y
+CONFIG_VGA_SWITCHEROO=y
+
+
+#
+# Frame buffer Devices
+#
+
+#
+# Frame buffer hardware drivers
+#
+
+#
+# Console display driver support
+#
+
+
+#
+# CODEC drivers
+#
+
+
+#
+# USB HID support
+#
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+
+CONFIG_USB_OHCI_HCD_PCI=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+
+#
+# MMC/SD/SDIO Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_MINORS=8
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_SPI=m
+
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EDAC=y
+CONFIG_EDAC_LEGACY_SYSFS=y
+CONFIG_EDAC_DECODE_MCE=y
+CONFIG_EDAC_AMD64=y
+CONFIG_EDAC_AMD64_ERROR_INJECTION=y
+
+#
+# DMABUF options
+#
+CONFIG_AUXDISPLAY=y
+
+
+#
+# Clock Source drivers
+#
+CONFIG_IOMMU_API=y
+CONFIG_IOMMU_SUPPORT=y
+
+#
+# Generic IOMMU Pagetable Support
+#
+CONFIG_IOMMU_IOVA=y
+CONFIG_AMD_IOMMU=y
+CONFIG_AMD_IOMMU_V2=y
+CONFIG_DMAR_TABLE=y
+CONFIG_IRQ_REMAP=y
+
+#
+# Broadcom SoC drivers
+#
+CONFIG_PM_DEVFREQ=y
+
+#
+# DEVFREQ Governors
+#
+CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
+CONFIG_DEVFREQ_GOV_PERFORMANCE=y
+CONFIG_DEVFREQ_GOV_POWERSAVE=y
+CONFIG_DEVFREQ_GOV_USERSPACE=y
+# CONFIG_DEVFREQ_GOV_PASSIVE is not set
+
+
+CONFIG_MEMORY=y
+
+#
+# Firmware Drivers
+#
+CONFIG_EDD=y
+CONFIG_EDD_OFF=y
+CONFIG_DMI_SYSFS=m
+
+#
+# EFI (Extensible Firmware Interface) Support
+#
+CONFIG_EFI_VARS=y
+CONFIG_EFI_VARS_PSTORE=m
+CONFIG_EFI_RUNTIME_MAP=y
+CONFIG_UEFI_CPER=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_UDF_FS=m
+
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_VMCORE=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_PSTORE=y
+
+#
+# Compile-time checks and compiler options
+#
+CONFIG_DEBUG_KERNEL=y
+
+CONFIG_SECURITYFS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_INTERVAL_TREE=y
+
+#
+# Graphics support
+#
+
+#
+# Console display driver support
+#
+
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-features.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-features.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-features.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86-user-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86.cfg
new file mode 100644
index 00000000..b321cee6
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/amdx86.cfg
@@ -0,0 +1,59 @@
+CONFIG_PRINTK=y
+
+# Basic hardware support for the box - network, USB, PCI, sound
+CONFIG_NETDEVICES=y
+CONFIG_ATA=y
+CONFIG_ATA_GENERIC=y
+CONFIG_ATA_SFF=y
+CONFIG_PCI=y
+CONFIG_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PCI=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB=y
+CONFIG_PATA_SCH=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_NET=y
+CONFIG_USB_UHCI_HCD=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_SG=y
+
+# Make sure these are on, otherwise the bootup won't be fun
+CONFIG_EXT3_FS=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_MODULES=y
+CONFIG_SHMEM=y
+CONFIG_TMPFS=y
+CONFIG_PACKET=y
+
+CONFIG_I2C=y
+CONFIG_AGP=y
+CONFIG_PM=y
+CONFIG_ACPI=y
+CONFIG_INPUT=y
+
+# Needed for booting (and using) USB memory sticks
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+
+CONFIG_RD_GZIP=y
+
+# Filesystems
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V4=y
+CONFIG_QFMT_V2
+CONFIG_QUOTA=y
+CONFIG_QUOTA_NETLINK_INTERFACE=y
+CONFIG_QUOTA_TREE=m
+CONFIG_QUOTACTL=y
+CONFIG_SQUASHFS=y
+CONFIG_SQUASHFS_XATTR=y
+CONFIG_SQUASHFS_ZLIB=y
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_TMPFS_XATTR=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/disable-graphics.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/disable-graphics.cfg
new file mode 100644
index 00000000..da9cb204
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/disable-graphics.cfg
@@ -0,0 +1,4 @@
+# CONFIG_FB is not set
+# CONFIG_DRM is not set
+# CONFIG_AGP is not set
+# CONFIG_VGA_SWITCHEROO is not set
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/dpdk.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/dpdk.cfg
new file mode 100644
index 00000000..00225509
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/dpdk.cfg
@@ -0,0 +1,5 @@
+CONFIG_UIO_PCI_GENERIC=m
+
+CONFIG_VFIO_PCI=m
+CONFIG_VFIO_VIRQFD=m
+CONFIG_VFIO_NOIOMMU=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/kvm.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/kvm.cfg
new file mode 100644
index 00000000..f4ca1c77
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25-amdx86/kvm.cfg
@@ -0,0 +1,39 @@
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+# CONFIG_TASK_XACCT is not set
+
+CONFIG_USER_RETURN_NOTIFIER=y
+CONFIG_PREEMPT_NOTIFIERS=y
+CONFIG_VFIO_IOMMU_TYPE1=y
+CONFIG_VFIO_VIRQFD=y
+CONFIG_VFIO=y
+# CONFIG_VFIO_NOIOMMU is not set
+CONFIG_VFIO_PCI=y
+# CONFIG_VFIO_PCI_VGA is not set
+CONFIG_VFIO_PCI_MMAP=y
+CONFIG_VFIO_PCI_INTX=y
+CONFIG_VFIO_PCI_IGD=y
+CONFIG_IRQ_BYPASS_MANAGER=y
+CONFIG_VIRT_DRIVERS=y
+CONFIG_SCHED_INFO=y
+CONFIG_VIRTIO_PCI_LEGACY=y
+CONFIG_VIRTIO_INPUT=y
+
+CONFIG_HAVE_KVM_IRQCHIP=y
+CONFIG_HAVE_KVM_IRQFD=y
+CONFIG_HAVE_KVM_IRQ_ROUTING=y
+CONFIG_HAVE_KVM_EVENTFD=y
+CONFIG_KVM_MMIO=y
+CONFIG_KVM_ASYNC_PF=y
+CONFIG_HAVE_KVM_MSI=y
+CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
+CONFIG_KVM_VFIO=y
+CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
+CONFIG_KVM_COMPAT=y
+CONFIG_HAVE_KVM_IRQ_BYPASS=y
+CONFIG_KVM=y
+# CONFIG_KVM_INTEL is not set
+CONFIG_KVM_AMD=y
+# CONFIG_KVM_MMU_AUDIT is not set
+
+CONFIG_KVM_AMD_SEV=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-emmc-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-emmc-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-emmc-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-spi-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-spi-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-spi-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-usb-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-usb-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-usb-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-wdt-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-wdt-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-wdt-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-xgbe-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-xgbe-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amd-xgbe-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amdgpu-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amdgpu-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/amdgpu-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/console.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/console.cfg
new file mode 100644
index 00000000..9e30450e
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/console.cfg
@@ -0,0 +1,7 @@
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB_TILEBLITTING=y
+CONFIG_FB_EFI=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FB_VESA=y
+CONFIG_FB_SIMPLE=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-bluetooth.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-bluetooth.cfg
new file mode 100644
index 00000000..ce6ddb43
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-bluetooth.cfg
@@ -0,0 +1 @@
+# CONFIG_BT is not set
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-intel-graphics.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-intel-graphics.cfg
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-intel-graphics.cfg
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-kgdb.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-kgdb.cfg
new file mode 100644
index 00000000..b8a2218b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/disable-kgdb.cfg
@@ -0,0 +1 @@
+# CONFIG_KGDB is not set
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-bluetooth.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-bluetooth.cfg
new file mode 100644
index 00000000..581830f0
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-bluetooth.cfg
@@ -0,0 +1,13 @@
+CONFIG_BT=m
+CONFIG_BT_RFCOMM=m
+CONFIG_BT_BNEP=m
+CONFIG_BT_HIDP=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIBTSDIO=m
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIVHCI=m
+CONFIG_BT_MRVL=m
+CONFIG_BT_ATH3K=m
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-kgdb.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-kgdb.cfg
new file mode 100644
index 00000000..55f296b2
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/enable-kgdb.cfg
@@ -0,0 +1,3 @@
+CONFIG_KGDB=y
+CONFIG_KGDB_LOW_LEVEL_TRAP=y
+CONFIG_KGDB_KDB=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/hid.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/hid.cfg
new file mode 100644
index 00000000..cbab0fa7
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/hid.cfg
@@ -0,0 +1,5 @@
+CONFIG_HID_A4TECH=m
+CONFIG_HID_LOGITECH=m
+CONFIG_HID_LOGITECH_DJ=m
+CONFIG_HID_MICROSOFT=m
+CONFIG_HID_MULTITOUCH=m
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/logo.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/logo.cfg
new file mode 100644
index 00000000..9772c12e
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/logo.cfg
@@ -0,0 +1 @@
+CONFIG_LOGO=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/misc-patches.scc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/misc-patches.scc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/misc-patches.scc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/sound.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/sound.cfg
new file mode 100644
index 00000000..250714ae
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/sound.cfg
@@ -0,0 +1,29 @@
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_SEQUENCER=y
+CONFIG_SND_SEQ_DUMMY=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_HRTIMER=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_SND_PCSP=y
+CONFIG_SND_HDA_GENERIC=y
+CONFIG_SND_HDA_INTEL=y
+CONFIG_SND_HDA_HWDEP=y
+CONFIG_SND_HDA_INPUT_BEEP=y
+CONFIG_SND_HDA_PATCH_LOADER=y
+CONFIG_SND_HDA_CODEC_REALTEK=y
+CONFIG_SND_HDA_CODEC_ANALOG=y
+CONFIG_SND_HDA_CODEC_SIGMATEL=y
+CONFIG_SND_HDA_CODEC_VIA=y
+CONFIG_SND_HDA_CODEC_HDMI=y
+CONFIG_SND_HDA_CODEC_CIRRUS=y
+CONFIG_SND_HDA_CODEC_CONEXANT=y
+CONFIG_SND_HDA_CODEC_CA0110=y
+CONFIG_SND_HDA_CODEC_CA0132=y
+CONFIG_SND_HDA_CODEC_CMEDIA=y
+CONFIG_SND_HDA_CODEC_SI3054=y
+CONFIG_SND_USB_AUDIO=y
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+CONFIG_SND_SEQUENCER_OSS=y
+CONFIG_SND_SOC=m
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/spi-driver.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/spi-driver.cfg
new file mode 100644
index 00000000..67795055
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/spi-driver.cfg
@@ -0,0 +1 @@
+CONFIG_SPI_AMD=m
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/usb-serial.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/usb-serial.cfg
new file mode 100644
index 00000000..11402439
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/usb-serial.cfg
@@ -0,0 +1 @@
+CONFIG_USB_SERIAL_MOS7840=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wdt-driver.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wdt-driver.cfg
new file mode 100644
index 00000000..a4f53782
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wdt-driver.cfg
@@ -0,0 +1 @@
+CONFIG_SP5100_TCO=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wifi-drivers.cfg b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wifi-drivers.cfg
new file mode 100644
index 00000000..8b407303
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-5.10.25/wifi-drivers.cfg
@@ -0,0 +1,9 @@
+CONFIG_CFG80211_WEXT=y
+CONFIG_WEXT_CORE=y
+CONFIG_WEXT_PROC=y
+CONFIG_IWLWIFI=m
+CONFIG_IWLDVM=m
+CONFIG_IWLWIFI_OPMODE_MODULAR=y
+CONFIG_CARL9170=m
+CONFIG_CARL9170_LEDS=y
+CONFIG_CARL9170_WPC=y
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-amdx86_5.10.inc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-amdx86_5.10.inc
new file mode 100644
index 00000000..395f1538
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-amdx86_5.10.inc
@@ -0,0 +1,36 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto-${LINUX_VERSION}-amdx86:"
+
+SRC_URI_append_amdx86 += "file://amdx86-user-features.scc \
+ file://amdx86-user-patches.scc \
+ file://amdx86.cfg \
+ file://amdx86-user-config.cfg \
+ file://amdx86-extra-config.cfg \
+ file://amd-xgbe.cfg \
+ file://amd-ccp.cfg \
+ file://kvm.cfg \
+ ${@bb.utils.contains('EXTRA_IMAGE_FEATURES', 'amd-feature-networking', 'file://dpdk.cfg', '', d)} \
+ file://afalg.cfg \
+ file://disable-graphics.cfg \
+ file://amdx86-standard-only.cfg \
+"
+
+SRC_URI_remove_amdx86 = " file://sound.cfg"
+
+do_validate_branches_append() {
+ # Droping configs related to sound generating spurious warnings
+ sed -i '/kconf hardware snd_hda_intel.cfg/d' ${WORKDIR}/${KMETA}/features/sound/snd_hda_intel.scc
+
+ # Droping configs related to graphics generating spurious warnings
+ sed -i '/CONFIG_DRM/d' ${WORKDIR}/${KMETA}/bsp/common-pc/common-pc-gfx.cfg
+ sed -i '/kconf hardware i915.cfg/d' ${WORKDIR}/${KMETA}/features/i915/i915.scc
+
+ # Droping configs related to vga/framebuffer-console generating spurious warnings
+ sed -i '/CONFIG_FB/d' ${WORKDIR}/${KMETA}/bsp/common-pc/common-pc-gfx.cfg
+ sed -i '/CONFIG_FRAMEBUFFER_CONSOLE/d' ${WORKDIR}/${KMETA}/bsp/common-pc/common-pc-gfx.cfg
+ sed -i '/CONFIG_FB/d' ${WORKDIR}/${KMETA}/cfg/efi-ext.cfg
+ sed -i '/CONFIG_FRAMEBUFFER_CONSOLE/d' ${WORKDIR}/${KMETA}/cfg/efi-ext.cfg
+
+ # Drop configs limiting the max number of cpus - we use our own setting in amdx86-user-config.cfg
+ sed -i '/CONFIG_NR_CPUS/d' ${WORKDIR}/${KMETA}/cfg/smp.cfg
+ sed -i '/CONFIG_NR_CPUS/d' ${WORKDIR}/${KMETA}/cfg/smp_64.cfg
+}
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-common_5.10.inc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-common_5.10.inc
new file mode 100644
index 00000000..f0e4fab9
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-common_5.10.inc
@@ -0,0 +1,27 @@
+INC_PR := "r0"
+PR := "${INC_PR}.1"
+
+KMACHINE_amd ?= "common-pc-64"
+SRCREV_meta_amd ?= "031f6c76e488a3563f35258c72ff1de3e25a512e"
+LINUX_VERSION_amd ?= "5.10.25"
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto-${LINUX_VERSION}:"
+
+SRC_URI_append_amd = " file://amd-xgbe-patches.scc \
+ file://amd-emmc-patches.scc \
+ file://amd-spi-patches.scc \
+ file://amd-usb-patches.scc \
+ file://amd-wdt-patches.scc \
+ file://logo.cfg \
+ file://console.cfg \
+ file://sound.cfg \
+ file://hid.cfg \
+ file://usb-serial.cfg \
+ file://spi-driver.cfg \
+ file://wdt-driver.cfg \
+ file://wifi-drivers.cfg \
+ file://disable-intel-graphics.cfg \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'file://enable-bluetooth.cfg', 'file://disable-bluetooth.cfg', d)} \
+ ${@bb.utils.contains('DISTRO', 'poky-amd', 'file://enable-kgdb.cfg', 'file://disable-kgdb.cfg', d)}"
+
+KERNEL_FEATURES_append_amd = " cfg/smp.scc"
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-e3000_5.10.inc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-e3000_5.10.inc
new file mode 100644
index 00000000..c33aa632
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-e3000_5.10.inc
@@ -0,0 +1,3 @@
+require linux-yocto-amdx86_5.10.inc
+
+COMPATIBLE_MACHINE = "e3000"
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-ethanolx_5.10.inc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-ethanolx_5.10.inc
new file mode 100644
index 00000000..614df797
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-ethanolx_5.10.inc
@@ -0,0 +1,3 @@
+require linux-yocto-amdx86_5.10.inc
+
+COMPATIBLE_MACHINE = "ethanolx"
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-rt_5.10.bbappend b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-rt_5.10.bbappend
new file mode 100644
index 00000000..a70452fe
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-rt_5.10.bbappend
@@ -0,0 +1,6 @@
+require linux-yocto-common_5.10.inc
+
+KBRANCH_amd ?= "v5.10/standard/preempt-rt/base"
+SRCREV_machine_amd ?= "be2935bce35f9adb6d0e735d42651e81a5094adf"
+
+include linux-yocto-${MACHINE}_5.10.inc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-v1000_5.10.inc b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-v1000_5.10.inc
new file mode 100644
index 00000000..a4ca1efc
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto-v1000_5.10.inc
@@ -0,0 +1,3 @@
+require linux-yocto-amdx86_5.10.inc
+
+COMPATIBLE_MACHINE = "v1000"
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto_5.10.bbappend b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto_5.10.bbappend
new file mode 100644
index 00000000..9b45f237
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux-5.10/linux-yocto_5.10.bbappend
@@ -0,0 +1,9 @@
+require linux-yocto-common_5.10.inc
+
+KBRANCH_amd ?= "v5.10/standard/base"
+SRCREV_machine_amd ?= "cf5b0320cf4544d3db9ce3ddd6ddb7553a610651"
+
+SRC_URI_append_amdgpu += "file://amdgpu-patches.scc \
+ file://misc-patches.scc"
+
+include linux-yocto-${MACHINE}_5.10.inc
diff --git a/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-rome_5.4.inc b/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-ethanolx_5.4.inc
index f5361a7a..c1cf9826 100644
--- a/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-rome_5.4.inc
+++ b/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-ethanolx_5.4.inc
@@ -1,3 +1,3 @@
require linux-yocto-amdx86_5.4.inc
-COMPATIBLE_MACHINE = "rome"
+COMPATIBLE_MACHINE = "ethanolx"
diff --git a/meta-amd-distro/conf/layer.conf b/meta-amd-distro/conf/layer.conf
index 04a5ba54..9f9fb56f 100644
--- a/meta-amd-distro/conf/layer.conf
+++ b/meta-amd-distro/conf/layer.conf
@@ -8,6 +8,6 @@ BBFILE_COLLECTIONS += "amd-distro"
BBFILE_PATTERN_amd-distro = "^${LAYERDIR}/"
BBFILE_PRIORITY_amd-distro = "12"
-LAYERSERIES_COMPAT_amd-distro = "dunfell"
+LAYERSERIES_COMPAT_amd-distro = "hardknott"
LAYERDEPENDS_amd-distro = "yocto"