From 1f2bda9ba3b58eaf186a90369d64aad914217908 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sun, 27 Sep 2015 11:23:11 +0200 Subject: [PATCH 1/1] backports: enable build on x86_64. backports 4.1.1-1 is not stable so we need to stay on the older version. Signed-off-by: Arne Fitzenreiter --- lfs/backports | 3 +++ make.sh | 4 +-- ...ts-3.18.1-1_no_dma_sgtable_on_x86_64.patch | 26 +++++++++++++++++++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 src/patches/backports-3.18.1-1_no_dma_sgtable_on_x86_64.patch diff --git a/lfs/backports b/lfs/backports index 0bc6447419..b5aabef5d5 100644 --- a/lfs/backports +++ b/lfs/backports @@ -82,6 +82,9 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1-ipfire-build.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1-grsecurity.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1-add_usbnet_modules.patch +ifeq "$(MACHINE)" "x86_64" + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/backports-3.18.1-1_no_dma_sgtable_on_x86_64.patch +endif # DVB patches cd $(DIR_APP) && patch -Np2 < $(DIR_SRC)/src/patches/v4l-dvb_fix_tua6034_pll.patch diff --git a/make.sh b/make.sh index f307258696..c5cf466929 100755 --- a/make.sh +++ b/make.sh @@ -421,10 +421,10 @@ buildipfire() { case "${TARGET_ARCH}" in x86_64) ipfiremake linux KCFG="" -# ipfiremake backports KCFG="" + ipfiremake backports KCFG="" ipfiremake cryptodev KCFG="" ipfiremake e1000e KCFG="" - ipfiremake igb KCFG="" +# ipfiremake igb KCFG="" ipfiremake ixgbe KCFG="" ipfiremake xtables-addons KCFG="" ipfiremake linux-initrd KCFG="" diff --git a/src/patches/backports-3.18.1-1_no_dma_sgtable_on_x86_64.patch b/src/patches/backports-3.18.1-1_no_dma_sgtable_on_x86_64.patch new file mode 100644 index 0000000000..5a2d04e7ce --- /dev/null +++ b/src/patches/backports-3.18.1-1_no_dma_sgtable_on_x86_64.patch @@ -0,0 +1,26 @@ +diff -Naur backports-4.1.1-1.org/compat/dma-shared-helpers.c backports-4.1.1-1/compat/dma-shared-helpers.c +--- backports-4.1.1-1.org/compat/dma-shared-helpers.c 2015-07-01 23:10:37.000000000 +0200 ++++ backports-4.1.1-1/compat/dma-shared-helpers.c 2015-09-25 13:29:14.006762269 +0200 +@@ -20,22 +20,3 @@ + #endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,6,0) */ + #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) */ + +-#if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0) +-/* +- * Create scatter-list for the already allocated DMA buffer. +- */ +-int dma_common_get_sgtable(struct device *dev, struct sg_table *sgt, +- void *cpu_addr, dma_addr_t handle, size_t size) +-{ +- struct page *page = virt_to_page(cpu_addr); +- int ret; +- +- ret = sg_alloc_table(sgt, 1, GFP_KERNEL); +- if (unlikely(ret)) +- return ret; +- +- sg_set_page(sgt->sgl, page, PAGE_ALIGN(size), 0); +- return 0; +-} +-EXPORT_SYMBOL_GPL(dma_common_get_sgtable); +-#endif /* RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0) */ -- 2.39.2