---
oprofile requires System.map, which is not included in the OpenWrt
image. I tried to modify Makefile to include it, but it doesn't seem
to be available at the point of executing Package/oprofile/install:

install -d -m0755 
/home/zajec/openwrt/openwrt.git/build_dir/target-mipsel_uClibc-0.9.33.2/oprofile-0.9.9/ipkg-brcm47xx/oprofile/boot
install -m0755 
/home/zajec/openwrt/openwrt.git/build_dir/target-mipsel_uClibc-0.9.33.2/linux-brcm47xx/linux-3.6.11/System.map
 
/home/zajec/openwrt/openwrt.git/build_dir/target-mipsel_uClibc-0.9.33.2/oprofile-0.9.9/ipkg-brcm47xx/oprofile/boot
install: cannot stat 
'/home/zajec/openwrt/openwrt.git/build_dir/target-mipsel_uClibc-0.9.33.2/linux-brcm47xx/linux-3.6.11/System.map':
 No such file or directory
make[3]: *** 
[/home/zajec/openwrt/openwrt.git/bin/brcm47xx/packages/oprofile_0.9.9-1_brcm47xx.ipk]
 Error 1
make[3]: Leaving directory 
`/home/zajec/openwrt/openwrt.git/package/devel/oprofile'
make[2]: *** [package/devel/oprofile/compile] Error 2
make[2]: Leaving directory `/home/zajec/openwrt/openwrt.git'
make[1]: *** 
[/home/zajec/openwrt/openwrt.git/staging_dir/target-mipsel_uClibc-0.9.33.2/stamp/.package_compile]
 Error 2
make[1]: Leaving directory `/home/zajec/openwrt/openwrt.git'
make: *** [world] Error 2

Is there any trick I can do to make oprofile include System.map? I tried
to add @PACKAGE_kernel dependency, but it didn't work.
---
 package/devel/oprofile/Makefile |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/devel/oprofile/Makefile b/package/devel/oprofile/Makefile
index f69b3ec..ec711e3 100644
--- a/package/devel/oprofile/Makefile
+++ b/package/devel/oprofile/Makefile
@@ -30,7 +30,7 @@ define Package/oprofile
   CATEGORY:=Development
   TITLE:=OProfile System Profiler
   URL:=http://oprofile.sourceforge.net
-  DEPENDS:=+libpopt +librt +kmod-oprofile +libstdcpp +objdump
+  DEPENDS:=@PACKAGE_kernel +libpopt +librt +kmod-oprofile +libstdcpp +objdump
 endef
 
 define Package/oprofile/description
@@ -85,6 +85,11 @@ define Package/oprofile/install
                $(PKG_INSTALL_DIR)/usr/share/oprofile/stl.pat \
                $(PKG_INSTALL_DIR)/usr/share/oprofile/$(patsubst 
x86,i386,$(LINUX_KARCH)) \
                $(1)/usr/share/oprofile/
+
+       $(INSTALL_DIR) $(1)/boot
+       $(INSTALL_BIN) \
+               $(LINUX_DIR)/System.map \
+               $(1)/boot
 endef
 
 $(eval $(call BuildPackage,oprofile))
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to