Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
Hi, About activating device tree on build OpenWRT with Raspberry pi. We tried to add patch 0002-kernel-fix-build-with-CONFIG_MTD-unset.patch to /target/linux/generic/patches-3.18 in second try to /target/linux/brcm2708/patches-3.18 but we still got below error: Applying patch generic/0002-kernel-fix-build-with-CONFIG_MTD-unset.patch (Stripping trailing CRs from patch; use --binary to disable.) can't find file to patch at input line 21 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |From f98ce9c7abf1e13443d129aba0e01fe63265445f Mon Sep 17 00:00:00 2001 |From: Hauke Mehrtens ha...@hauke-m.de mailto:ha...@hauke-m.de |Date: Sun, 12 Jul 2015 13:39:30 +0200 |Subject: [PATCH 2/2] kernel: fix build with CONFIG_MTD unset | |of_get_mac_address_mtd() accesses functions behind CONFIG_MTD without |checking if it is available, deactivate this function if |of_get_mac_address_mtd is not available. | |Signed-off-by: Hauke Mehrtens ha...@hauke-m.de mailto:ha...@hauke-m.de |--- | .../patches-3.18/681-NET-add-of_get_mac_address_mtd.patch | 13 +++-- | .../patches-4.0/681-NET-add-of_get_mac_address_mtd.patch| 13 +++-- | .../patches-4.1/681-NET-add-of_get_mac_address_mtd.patch| 13 +++-- | 3 files changed, 33 insertions(+), 6 deletions(-) | |diff --git a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch |index 8ce17fe..2603f11 100644 |--- a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch |+++ b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch -- No file to patch. Skipping patch. 2 out of 2 hunks ignored (Stripping trailing CRs from patch; use --binary to disable.) can't find file to patch at input line 62 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff --git a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch |index 8ce17fe..2603f11 100644 |--- a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch |+++ b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch -- No file to patch. Skipping patch. 2 out of 2 hunks ignored (Stripping trailing CRs from patch; use --binary to disable.) can't find file to patch at input line 103 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff --git a/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch |index 6542898..ecbe75c 100644 |--- a/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch |+++ b/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch -- No file to patch. Skipping patch. 2 out of 2 hunks ignored Patch generic/0002-kernel-fix-build-with-CONFIG_MTD-unset.patch does not apply (enforce with -f) make[4]: *** [/home/jernej/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_eabi /linux-brcm2708_bcm2708/linux-3.18.18/.quilt_checked] Error 1 make[4]: Leaving directory `/home/jernej/openwrt/target/linux/brcm2708' make[3]: *** [compile] Error 2 make[3]: Leaving directory `/home/jernej/openwrt/target/linux' make[2]: *** [target/linux/compile] Error 2 make[2]: Leaving directory `/home/jernej/openwrt' make[1]: *** [/home/jernej/openwrt/staging_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_ea bi/stamp/.target_compile] Error 2 make[1]: Leaving directory `/home/jernej/openwrt' make: *** [world] Error 2 With Best Regards, Mit Freundlichen Grüßen Jernej Izak smime.p7s Description: S/MIME cryptographic signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
ok, let me have a look, my testing showed that it worked, maybe i tested the wrong tree... On 14/07/2015 10:08, Jernej Izak wrote: Hi, About activating device tree on build OpenWRT with Raspberry pi. We tried to add patch “0002-kernel-fix-build-with-CONFIG_MTD-unset.patch” to “/target/linux/generic/patches-3.18” in second try to “/target/linux/brcm2708/patches-3.18 but we still got below error: /Applying patch generic/0002-kernel-fix-build-with-CONFIG_MTD-unset.patch (Stripping trailing CRs from patch; use --binary to disable.) can't find file to patch at input line 21 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |From f98ce9c7abf1e13443d129aba0e01fe63265445f Mon Sep 17 00:00:00 2001 |From: Hauke Mehrtens ha...@hauke-m.de mailto:ha...@hauke-m.de |Date: Sun, 12 Jul 2015 13:39:30 +0200 |Subject: [PATCH 2/2] kernel: fix build with CONFIG_MTD unset | |of_get_mac_address_mtd() accesses functions behind CONFIG_MTD without |checking if it is available, deactivate this function if |of_get_mac_address_mtd is not available. | |Signed-off-by: Hauke Mehrtens ha...@hauke-m.de mailto:ha...@hauke-m.de |--- | .../patches-3.18/681-NET-add-of_get_mac_address_mtd.patch | 13 +++-- | .../patches-4.0/681-NET-add-of_get_mac_address_mtd.patch| 13 +++-- | .../patches-4.1/681-NET-add-of_get_mac_address_mtd.patch| 13 +++-- | 3 files changed, 33 insertions(+), 6 deletions(-) | |diff --git a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch |index 8ce17fe..2603f11 100644 |--- a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch |+++ b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch -- No file to patch. Skipping patch. 2 out of 2 hunks ignored (Stripping trailing CRs from patch; use --binary to disable.) can't find file to patch at input line 62 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff --git a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch |index 8ce17fe..2603f11 100644 |--- a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch |+++ b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch -- No file to patch. Skipping patch. 2 out of 2 hunks ignored (Stripping trailing CRs from patch; use --binary to disable.) can't find file to patch at input line 103 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff --git a/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch |index 6542898..ecbe75c 100644 |--- a/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch |+++ b/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch -- No file to patch. Skipping patch. 2 out of 2 hunks ignored Patch generic/0002-kernel-fix-build-with-CONFIG_MTD-unset.patch does not apply (enforce with -f) make[4]: *** [/home/jernej/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2708/linux-3.18.18/.quilt_checked] Error 1 make[4]: Leaving directory `/home/jernej/openwrt/target/linux/brcm2708' make[3]: *** [compile] Error 2 make[3]: Leaving directory `/home/jernej/openwrt/target/linux' make[2]: *** [target/linux/compile] Error 2 make[2]: Leaving directory `/home/jernej/openwrt' make[1]: *** [/home/jernej/openwrt/staging_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_eabi/stamp/.target_compile] Error 2 make[1]: Leaving directory `/home/jernej/openwrt' make: *** [world] Error 2/ /With Best Regards, Mit//Freundlichen Grüßen/ Jernej Izak ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
On 2015-07-14 10:08, Jernej Izak wrote: Hi, About activating device tree on build OpenWRT with Raspberry pi. We tried to add patch “0002-kernel-fix-build-with-CONFIG_MTD-unset.patch” to “/target/linux/generic/patches-3.18” in second try to “/target/linux/brcm2708/patches-3.18 but we still got below error: /Applying patch generic/0002-kernel-fix-build-with-CONFIG_MTD-unset.patch (Stripping trailing CRs from patch; use --binary to disable.) can't find file to patch at input line 21 Perhaps you used the wrong -p or --strip option? The patch is meant to be applied on the OpenWrt tree directly, not copied to a target patches directory. - Felix ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
current HEAD seems to build fine for me. could you retry with the patch i merged today ? On 14/07/2015 10:10, John Crispin wrote: ok, let me have a look, my testing showed that it worked, maybe i tested the wrong tree... On 14/07/2015 10:08, Jernej Izak wrote: Hi, About activating device tree on build OpenWRT with Raspberry pi. We tried to add patch “0002-kernel-fix-build-with-CONFIG_MTD-unset.patch” to “/target/linux/generic/patches-3.18” in second try to “/target/linux/brcm2708/patches-3.18 but we still got below error: /Applying patch generic/0002-kernel-fix-build-with-CONFIG_MTD-unset.patch (Stripping trailing CRs from patch; use --binary to disable.) can't find file to patch at input line 21 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |From f98ce9c7abf1e13443d129aba0e01fe63265445f Mon Sep 17 00:00:00 2001 |From: Hauke Mehrtens ha...@hauke-m.de mailto:ha...@hauke-m.de |Date: Sun, 12 Jul 2015 13:39:30 +0200 |Subject: [PATCH 2/2] kernel: fix build with CONFIG_MTD unset | |of_get_mac_address_mtd() accesses functions behind CONFIG_MTD without |checking if it is available, deactivate this function if |of_get_mac_address_mtd is not available. | |Signed-off-by: Hauke Mehrtens ha...@hauke-m.de mailto:ha...@hauke-m.de |--- | .../patches-3.18/681-NET-add-of_get_mac_address_mtd.patch | 13 +++-- | .../patches-4.0/681-NET-add-of_get_mac_address_mtd.patch| 13 +++-- | .../patches-4.1/681-NET-add-of_get_mac_address_mtd.patch| 13 +++-- | 3 files changed, 33 insertions(+), 6 deletions(-) | |diff --git a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch |index 8ce17fe..2603f11 100644 |--- a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch |+++ b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch -- No file to patch. Skipping patch. 2 out of 2 hunks ignored (Stripping trailing CRs from patch; use --binary to disable.) can't find file to patch at input line 62 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff --git a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch |index 8ce17fe..2603f11 100644 |--- a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch |+++ b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch -- No file to patch. Skipping patch. 2 out of 2 hunks ignored (Stripping trailing CRs from patch; use --binary to disable.) can't find file to patch at input line 103 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |diff --git a/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch |index 6542898..ecbe75c 100644 |--- a/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch |+++ b/target/linux/generic/patches-4.1/681-NET-add-of_get_mac_address_mtd.patch -- No file to patch. Skipping patch. 2 out of 2 hunks ignored Patch generic/0002-kernel-fix-build-with-CONFIG_MTD-unset.patch does not apply (enforce with -f) make[4]: *** [/home/jernej/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2708/linux-3.18.18/.quilt_checked] Error 1 make[4]: Leaving directory `/home/jernej/openwrt/target/linux/brcm2708' make[3]: *** [compile] Error 2 make[3]: Leaving directory `/home/jernej/openwrt/target/linux' make[2]: *** [target/linux/compile] Error 2 make[2]: Leaving directory `/home/jernej/openwrt' make[1]: *** [/home/jernej/openwrt/staging_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_eabi/stamp/.target_compile] Error 2 make[1]: Leaving directory `/home/jernej/openwrt' make: *** [world] Error 2/ /With Best Regards, Mit//Freundlichen Grüßen/ Jernej Izak ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
Hi, Revision from today without any changes fails with: + dd bs=512 if=/home/jernej/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_ea bi/linux-brcm2708_bcm2708/tmp/openwrt-brcm2708-bcm2708-rpi-b-ext4-sdcard.bin .boot of=/home/jernej/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_ea bi/linux-brcm2708_bcm2708/tmp/openwrt-brcm2708-bcm2708-rpi-b-ext4-sdcard.bin seek=8192 conv=notrunc 40960+0 records in 40960+0 records out 20971520 bytes (21 MB) copied, 0.0961893 s, 218 MB/s + dd bs=512 if=/home/jernej/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_ea bi/linux-brcm2708_bcm2708/root.ext4 of=/home/jernej/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_ea bi/linux-brcm2708_bcm2708/tmp/openwrt-brcm2708-bcm2708-rpi-b-ext4-sdcard.bin seek=57344 conv=notrunc 98304+0 records in 98304+0 records out 50331648 bytes (50 MB) copied, 0.184787 s, 272 MB/s ifneq (y,) bash: -c: line 0: syntax error near unexpected token `y,' bash: -c: line 0: `ifneq (y,)' make[5]: *** [/home/jernej/openwrt/build_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_eabi /linux-brcm2708_bcm2708/tmp/openwrt-brcm2708-bcm2708-rpi-b-ext4-sdcard.bin] Error 1 make[5]: Leaving directory `/home/jernej/openwrt/target/linux/brcm2708/image' make[4]: *** [install] Error 2 make[4]: Leaving directory `/home/jernej/openwrt/target/linux/brcm2708' make[3]: *** [install] Error 2 make[3]: Leaving directory `/home/jernej/openwrt/target/linux' make[2]: *** [target/linux/install] Error 2 make[2]: Leaving directory `/home/jernej/openwrt' make[1]: *** [/home/jernej/openwrt/staging_dir/target-arm_arm1176jzf-s+vfp_musl-1.1.10_ea bi/stamp/.target_install] Error 2 make[1]: Leaving directory `/home/jernej/openwrt' make: *** [world] Error 2 With Best Regards, Mit Freundlichen Grüßen Jernej Izak smime.p7s Description: S/MIME cryptographic signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
On 07/14/2015 12:43 PM, Jernej Izak wrote: ifneq (y,) bash: -c: line 0: syntax error near unexpected token `y,' bash: -c: line 0: `ifneq (y,)' That looks like being caused by my brcm2708: Implement sysupgrade (commit 49f8801514837980bd80dd3fa1c24e82897d2e5c)... I tested it but blogic committed a slightly different version which seems to be broken. I'm checking it now... bruno ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
On 14/07/2015 14:41, Bruno Randolf wrote: On 07/14/2015 12:43 PM, Jernej Izak wrote: ifneq (y,) bash: -c: line 0: syntax error near unexpected token `y,' bash: -c: line 0: `ifneq (y,)' That looks like being caused by my brcm2708: Implement sysupgrade (commit 49f8801514837980bd80dd3fa1c24e82897d2e5c)... I tested it but blogic committed a slightly different version which seems to be broken. I'm checking it now... bruno i used the version in patchwork, was that not the one to use ? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
On 07/14/2015 04:07 PM, John Crispin wrote: its not about blaming but about figuring out what went wrong. Right, same here :) i will be on the laptop that i used for merging in abotu an hour and will see int he logs which commands i called and which patch i applied exactly It's commit ad8e7742b637c36c4f5c32d1d2e8df1f2b32a31b brcm2708: add DT support which changed the image generation process. After that my patch seemed to apply but the logic changed. Today I can't work on this any more, but the easiest way would be to remove the GZIP stuff for now and add it back later. bruno ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
On 14/07/2015 17:18, Bruno Randolf wrote: On 07/14/2015 04:07 PM, John Crispin wrote: its not about blaming but about figuring out what went wrong. Right, same here :) i will be on the laptop that i used for merging in abotu an hour and will see int he logs which commands i called and which patch i applied exactly It's commit ad8e7742b637c36c4f5c32d1d2e8df1f2b32a31b brcm2708: add DT support which changed the image generation process. After that my patch seemed to apply but the logic changed. Today I can't work on this any more, but the easiest way would be to remove the GZIP stuff for now and add it back later. bruno ok so i revert the change to target/linux/brcm2708/image/Makefile only ? ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
On 07/14/2015 03:34 PM, John Crispin wrote: On 14/07/2015 14:41, Bruno Randolf wrote: On 07/14/2015 12:43 PM, Jernej Izak wrote: ifneq (y,) bash: -c: line 0: syntax error near unexpected token `y,' bash: -c: line 0: `ifneq (y,)' That looks like being caused by my brcm2708: Implement sysupgrade (commit 49f8801514837980bd80dd3fa1c24e82897d2e5c)... I tested it but blogic committed a slightly different version which seems to be broken. I'm checking it now... bruno i used the version in patchwork, was that not the one to use ? Yes. I'm not blaming you and I'm not exactly sure what happened, but I think the image generation process has been changed in the mean time. E.g. my patch (and the one in patchwork http://patchwork.ozlabs.org/patch/494584/) had the mcopy lines before ./gen_rpi_sdcard_img.sh and the one you applied has them in a different target. Also now the image is generated in target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/tmp/ and before directly in bin/brcm2708/... Something must have changed in the way the target is evaluated so that ifneq is interpreted as a shell command. And also there are other places now where the .gz ending would have to be handled. bruno ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
On 14/07/2015 17:05, Bruno Randolf wrote: On 07/14/2015 03:34 PM, John Crispin wrote: On 14/07/2015 14:41, Bruno Randolf wrote: On 07/14/2015 12:43 PM, Jernej Izak wrote: ifneq (y,) bash: -c: line 0: syntax error near unexpected token `y,' bash: -c: line 0: `ifneq (y,)' That looks like being caused by my brcm2708: Implement sysupgrade (commit 49f8801514837980bd80dd3fa1c24e82897d2e5c)... I tested it but blogic committed a slightly different version which seems to be broken. I'm checking it now... bruno i used the version in patchwork, was that not the one to use ? Yes. I'm not blaming you and I'm not exactly sure what happened, but I think the image generation process has been changed in the mean time. E.g. my patch (and the one in patchwork http://patchwork.ozlabs.org/patch/494584/) had the mcopy lines before ./gen_rpi_sdcard_img.sh and the one you applied has them in a different target. Also now the image is generated in target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/tmp/ and before directly in bin/brcm2708/... Something must have changed in the way the target is evaluated so that ifneq is interpreted as a shell command. And also there are other places now where the .gz ending would have to be handled. bruno its not about blaming but about figuring out what went wrong. i will be on the laptop that i used for merging in abotu an hour and will see int he logs which commands i called and which patch i applied exactly ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Build errors when activating the Device Tree flag for Raspberry Pi
On 07/12/2015 06:44 AM, Michael Neurohr wrote: Hi, I'm trying to activate the Device Tree for Raspberry Pi builds. Therefore I changed the flag # CONFIG_BCM2709_DT is not set to CONFIG_BCM2709_DT=y in /home/mine/gitrepos/openwrt2/target/linux/brcm2708/bcm2709/config-default and /home/mine/gitrepos/openwrt2/target/linux/brcm2708/bcm2708/config-default When building for BRCM2709/08 I'm getting the error == LD init/built-in.o drivers/built-in.o: In function `of_get_mac_address_mtd': /home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/drivers/of/of_net.c:106: undefined reference to `get_mtd_device_nm' /home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/drivers/of/of_net.c:110: undefined reference to `mtd_read' /home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/drivers/of/of_net.c:111: undefined reference to `put_mtd_device' make[5]: *** [vmlinux] Error 1 make[5]: Leaving directory `/home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17' make[4]: *** [/home/mine/gitrepos/openwrt2/build_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/linux-brcm2708_bcm2709/linux-3.18.17/.image] Error 2 make[4]: Leaving directory `/home/mine/gitrepos/openwrt2/target/linux/brcm2708' make[3]: *** [install] Error 2 make[3]: Leaving directory `/home/mine/gitrepos/openwrt2/target/linux' make[2]: *** [target/linux/install] Error 2 make[2]: Leaving directory `/home/mine/gitrepos/openwrt2' make[1]: *** [/home/mine/gitrepos/openwrt2/staging_dir/target-arm_cortex-a7+vfp_musl-1.1.10_eabi/stamp/.target_install] Error 2 make[1]: Leaving directory `/home/mine/gitrepos/openwrt2' make: *** [world] Error 2 == Is it possible at all to activate the Device Tree for Raspberry builds at all? I'm working on the master of git://openwrt.org/openwrt.git Thanks, Michael Somehow CONFIG_MTD is not activate in your config, please try the attached patch t make OpenWrt still build in such cases. Hauke From f98ce9c7abf1e13443d129aba0e01fe63265445f Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens ha...@hauke-m.de Date: Sun, 12 Jul 2015 13:39:30 +0200 Subject: [PATCH 2/2] kernel: fix build with CONFIG_MTD unset of_get_mac_address_mtd() accesses functions behind CONFIG_MTD without checking if it is available, deactivate this function if of_get_mac_address_mtd is not available. Signed-off-by: Hauke Mehrtens ha...@hauke-m.de --- .../patches-3.18/681-NET-add-of_get_mac_address_mtd.patch | 13 +++-- .../patches-4.0/681-NET-add-of_get_mac_address_mtd.patch| 13 +++-- .../patches-4.1/681-NET-add-of_get_mac_address_mtd.patch| 13 +++-- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch index 8ce17fe..2603f11 100644 --- a/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch +++ b/target/linux/generic/patches-3.18/681-NET-add-of_get_mac_address_mtd.patch @@ -23,11 +23,12 @@ Signed-off-by: John Crispin blo...@openwrt.org /** * of_get_phy_mode - Get phy mode for given device_node -@@ -75,3 +76,43 @@ const void *of_get_mac_address(struct de +@@ -75,3 +76,45 @@ const void *of_get_mac_address(struct de return NULL; } EXPORT_SYMBOL(of_get_mac_address); + ++#ifdef CONFIG_MTD +int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac) +{ + struct device_node *mtd_np = NULL; @@ -67,13 +68,21 @@ Signed-off-by: John Crispin blo...@openwrt.org + return ret; +} +EXPORT_SYMBOL_GPL(of_get_mac_address_mtd); ++#endif --- a/include/linux/of_net.h +++ b/include/linux/of_net.h -@@ -11,6 +11,7 @@ +@@ -11,6 +11,14 @@ #include linux/of.h extern int of_get_phy_mode(struct device_node *np); extern const void *of_get_mac_address(struct device_node *np); ++#ifdef CONFIG_MTD +extern int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac); ++#else ++static inline int of_get_mac_address_mtd(struct device_node *np, unsigned char *mac) ++{ ++ return -ENOENT; ++} ++endif #else static inline int of_get_phy_mode(struct device_node *np) { diff --git a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch index 8ce17fe..2603f11 100644 --- a/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch +++ b/target/linux/generic/patches-4.0/681-NET-add-of_get_mac_address_mtd.patch @@ -23,11 +23,12 @@ Signed-off-by: John Crispin blo...@openwrt.org /** *