Moved the following packages to inteno-packages-broadcom:v3.5

bcmhotproxy
bcmkernel
brcm-h
broadcom-diag
broadcom-nvram
broadcom-utils
mcpd
This commit is contained in:
Fredrik Åsberg 2016-01-26 15:02:13 +01:00
parent 750d5ff091
commit a1e4de11f0
21 changed files with 0 additions and 3627 deletions

View file

@ -1,54 +0,0 @@
#
# Copyright (C) 2006-2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=bcmhotproxy
PKG_VERSION:=1.0.0
PKG_RELEASE:=13
PKG_SOURCE_VERSION:=63a265031b870a0aa6b45352cf28224518a31638
PKG_SOURCE_PROTO:=git
ifeq ($(CONFIG_BCM_OPEN),y)
PKG_SOURCE_URL:=http://public.inteno.se/bcmhotproxy
else
PKG_SOURCE_URL:=git@public.inteno.se:bcmhotproxy
endif
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
STAMP_PREPARED:=$(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
include $(INCLUDE_DIR)/package.mk
define Package/bcmhotproxy
SECTION:=utils
CATEGORY:=Base system
TITLE:=Daemon That feeds broadcom driver calls to hotplug2
endef
define Package/bcmhotproxy/description
This package contains a Daemon that will listen to link events from broadcoms adsl driver and etherent driver and proxy them to hotplug
endef
target=$(firstword $(subst -, ,$(BOARD)))
MAKE_FLAGS += TARGET="$(target)"
TARGET_CFLAGS += -Dtarget_$(target)=1 -Wall
define Package/bcmhotproxy/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/etc/
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bcmhotproxy $(1)/sbin/
endef
$(eval $(call BuildPackage,bcmhotproxy))

View file

@ -1,20 +0,0 @@
#!/bin/sh /etc/rc.common
START=15
STOP=95
USE_PROCD=1
NAME=bcmhotproxy
PROG=/sbin/bcmhotproxy
start_service() {
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance
}
stop() {
service_stop /sbin/bcmhotproxy
}

View file

@ -1,231 +0,0 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# update this based on the Broadcom SDK version, 4.14L.04 -> 414040
BRCM_SDK_VERSION:=414040
ifeq ($(CONFIG_BCM_OPEN),y)
$(error "OPEN SDK compile not tested with this kernel!")
endif
PKG_NAME:=bcmkernel-3.4
PKG_VERSION:=$(BRCM_SDK_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_URL:=git@iopsys.inteno.se:bcmkernel-4.14L.04
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8216815ced065e527681a079ad0e17fbb007baec
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_SDK_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BRCM_SDK_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
export CONFIG_BCM_CHIP_ID
export CONFIG_BCM_KERNEL_PROFILE
export CONFIG_SECURE_BOOT_CFE
BCM_BS_PROFILE = $(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
BCM_KERNEL_VERSION:=3.4.11-rt19
BCM_SDK_VERSION:=bcm963xx
RSTRIP:=true
define Package/bcmkernel/removevoice
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
ifeq ($(CONFIG_BCM_ENDPOINT_MODULE),y)
define Package/bcmkernel/removevoice
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
endif
define Package/bcmkernel/removei2c
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
ifeq ($(CONFIG_BCM_I2C),y)
define Package/bcmkernel/removei2c
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
endif
define Package/bcmkernel/install
$(INSTALL_DIR) $(1)/lib/bcm
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/etc/adsl
$(INSTALL_DIR) $(1)/etc/wlan
$(INSTALL_DIR) $(1)/etc/cms_entity_info.d
# Install header files
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/shared/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/countryArchive.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/countryArchive.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/codec/codec.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec/codec.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h
echo "#define BCM_SDK_VERSION $(BRCM_SDK_VERSION)" > $(STAGING_DIR)/usr/include/bcm_sdk_version.h
# create symlink to kernel build directory
rm -f $(BUILD_DIR)/bcmkernel
ln -sfn $(PKG_SOURCE_SUBDIR) $(BUILD_DIR)/bcmkernel
# Install binaries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/bin/* $(1)/usr/sbin/
rm -f $(1)/usr/sbin/dhcp6c
rm -f $(1)/usr/sbin/dhcp6s
rm -f $(1)/usr/sbin/dhcpc
rm -f $(1)/usr/sbin/dhcpd
rm -f $(1)/usr/sbin/dnsproxy
rm -f $(1)/usr/sbin/httpd
rm -f $(1)/usr/sbin/openssl
rm -f $(1)/usr/sbin/racoon
rm -f $(1)/usr/sbin/ripd
rm -f $(1)/usr/sbin/send_cms_msg
rm -f $(1)/usr/sbin/sshd
rm -f $(1)/usr/sbin/ssk
rm -f $(1)/usr/sbin/telnetd
rm -f $(1)/usr/sbin/tr64c
rm -f $(1)/usr/sbin/tr69c
rm -f $(1)/usr/sbin/ubi*
rm -f $(1)/usr/sbin/udhcpd
rm -f $(1)/usr/sbin/upnp
rm -f $(1)/usr/sbin/upnpd
rm -f $(1)/usr/sbin/vodsl
rm -f $(1)/usr/sbin/wlmngr
rm -f $(1)/usr/sbin/zebra
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/eid_bcm_kthreads.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/symbol_table.txt $(1)/etc/cms_entity_info.d/
# Install libraries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/gpl/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/private/* $(1)/usr/lib/
mv $(1)/usr/lib/ld-uClibc.so.0 $(1)/lib/bcm/
mv $(1)/usr/lib/libc.so.0 $(1)/lib/bcm/
mv $(1)/usr/lib/libdl.so.0 $(1)/lib/bcm/
mv $(1)/usr/lib/libgcc_s.so.1 $(1)/lib/bcm/
mv $(1)/usr/lib/libpthread.so.0 $(1)/lib/bcm/
rm -f $(1)/usr/lib/libcrypt.so.0
rm -f $(1)/usr/lib/libm.so.0
rm -f $(1)/usr/lib/libutil.so.0
rm -f $(1)/usr/lib/libcms_boardctl.so
rm -f $(1)/usr/lib/libcms_msg.so
rm -f $(1)/usr/lib/libcms_util.so
rm -f $(1)/usr/lib/libcrypto.so.0.9.7
rm -f $(1)/usr/lib/libssl.so.0.9.7
rm -f $(1)/usr/lib/libnvram.so
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/public/* $(1)/usr/lib/
rm -rf $(1)/usr/lib/modules
rm -rf $(1)/usr/lib/private
rm -rf $(1)/usr/lib/public
rm -rf $(1)/usr/lib/gpl
# Install kernel modules
rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/*
mkdir -p $(1)/lib/
mkdir -p $(1)/lib/modules/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/extra/* $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/
find $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel/ -name *.ko -exec cp {} $(1)/lib/modules/$(BCM_KERNEL_VERSION)/ \;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/wlan/*_map.bin $(1)/etc/wlan
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/telephonyProfiles.d $(1)/etc/
# rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bcm_usb.ko
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)strip --remove-section=.note --remove-section=.comment $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -O binary $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm
# bootloader nor
# cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/bcm9$(CONFIG_BCM_CHIP_ID)_cfe.w $(KDIR)/bcm_bootloader_cfe.w
# ram part of the bootloader for nand boot
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin $(KDIR)/cferam.001
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/cfe$(CONFIG_BCM_CHIP_ID)_nand.v $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/cfe/ $(KDIR)/cfe
# dd if=$(KDIR)/vmlinux.bcm.elf of=$(KDIR)/vmlinux.bcm bs=4096 count=1
# $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
$(call Package/bcmkernel/removevoice,$(1))
$(call Package/bcmkernel/removei2c,$(1))
endef

View file

@ -1,266 +0,0 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# update this based on the Broadcom SDK version, 4.16L.02 -> 416020
# 4.16L.02A -> 416021
BRCM_SDK_VERSION:=416021
ifeq ($(CONFIG_BCM_OPEN),y)
$(error "OPEN SDK compile not tested with this kernel!")
endif
PKG_NAME:=bcmkernel-3.4
PKG_VERSION:=$(BRCM_SDK_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_URL:=git@iopsys.inteno.se:bcmkernel-4.16L.02A
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=00e673bd751d19059cb3ed5fd2dbf3831a7e0401
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_SDK_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BRCM_SDK_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
export CONFIG_BCM_CHIP_ID
export CONFIG_BCM_KERNEL_PROFILE
export CONFIG_SECURE_BOOT_CFE
BCM_BS_PROFILE = $(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
BCM_KERNEL_VERSION:=3.4.11-rt19
BCM_SDK_VERSION:=bcm963xx
RSTRIP:=true
define Package/bcmkernel/removevoice
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
ifeq ($(CONFIG_BCM_ENDPOINT_MODULE),y)
define Package/bcmkernel/removevoice
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
endif
define Package/bcmkernel/removesound
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
endef
ifeq ($(BCM_USBSOUND_MODULES),y)
define Package/bcmkernel/removesound
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
endef
endif
define Package/bcmkernel/removei2c
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
ifeq ($(CONFIG_BCM_I2C),y)
define Package/bcmkernel/removei2c
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
endif
define Package/bcmkernel/removebluetooth
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bnep.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/btusb.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/rfcomm.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/hci_uart.ko
endef
ifeq ($(CONFIG_BCM_BLUETOOTH),y)
define Package/bcmkernel/removebluetooth
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko etc...
endef
endif
define Package/bcmkernel/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/etc/adsl
$(INSTALL_DIR) $(1)/etc/wlan
$(INSTALL_DIR) $(1)/etc/cms_entity_info.d
# Install header files
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/shared/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/countryArchive.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/countryArchive.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/codec/codec.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec/codec.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/userspace/private/apps/vodsl/voip/inc/tpProfiles.h $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
echo "#define BCM_SDK_VERSION $(BRCM_SDK_VERSION)" > $(STAGING_DIR)/usr/include/bcm_sdk_version.h
# create symlink to kernel build directory
rm -f $(BUILD_DIR)/bcmkernel
ln -sfn $(PKG_SOURCE_SUBDIR) $(BUILD_DIR)/bcmkernel
# Install binaries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/bin/* $(1)/usr/sbin/
rm -f $(1)/usr/sbin/dhcp6c
rm -f $(1)/usr/sbin/dhcp6s
rm -f $(1)/usr/sbin/dhcpc
rm -f $(1)/usr/sbin/dhcpd
rm -f $(1)/usr/sbin/dnsproxy
rm -f $(1)/usr/sbin/httpd
rm -f $(1)/usr/sbin/openssl
rm -f $(1)/usr/sbin/racoon
rm -f $(1)/usr/sbin/ripd
rm -f $(1)/usr/sbin/send_cms_msg
rm -f $(1)/usr/sbin/sshd
rm -f $(1)/usr/sbin/ssk
rm -f $(1)/usr/sbin/telnetd
rm -f $(1)/usr/sbin/tr64c
rm -f $(1)/usr/sbin/tr69c
rm -f $(1)/usr/sbin/ubi*
rm -f $(1)/usr/sbin/udhcpd
rm -f $(1)/usr/sbin/upnp
rm -f $(1)/usr/sbin/upnpd
rm -f $(1)/usr/sbin/vodsl
rm -f $(1)/usr/sbin/wlmngr
rm -f $(1)/usr/sbin/zebra
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/eid_bcm_kthreads.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/symbol_table.txt $(1)/etc/cms_entity_info.d/
# Install libraries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/gpl/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/private/* $(1)/usr/lib/
rm -f $(1)/usr/lib/ld-uClibc.so.0
rm -f $(1)/usr/lib/libc.so.0
rm -f $(1)/usr/lib/libdl.so.0
rm -f $(1)/usr/lib/libgcc_s.so.1
rm -f $(1)/usr/lib/libpthread.so.0
rm -f $(1)/usr/lib/libm.so.0
rm -f $(1)/usr/lib/libutil.so.0
rm -f $(1)/usr/lib/libcms_boardctl.so
rm -f $(1)/usr/lib/libcms_msg.so
rm -f $(1)/usr/lib/libcms_util.so
rm -f $(1)/usr/lib/libnvram.so
rm -f $(1)/usr/lib/libcrypt.so.0
rm -f $(1)/usr/lib/libcrypto.so
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so
rm -f $(1)/usr/lib/libcrypto.so.0.9.7
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so.0.9.7
rm -f $(1)/usr/lib/libssl.so
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so
rm -f $(1)/usr/lib/libssl.so.0.9.7
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so.0.9.7
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/public/* $(1)/usr/lib/
rm -rf $(1)/usr/lib/modules
rm -rf $(1)/usr/lib/private
rm -rf $(1)/usr/lib/public
rm -rf $(1)/usr/lib/gpl
# Install kernel modules
rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/*
mkdir -p $(1)/lib/
mkdir -p $(1)/lib/modules/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/extra/* $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/
find $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel/ -name *.ko -exec cp {} $(1)/lib/modules/$(BCM_KERNEL_VERSION)/ \;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/wlan/* $(1)/etc/wlan
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/telephonyProfiles.d $(1)/etc/
# rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bcm_usb.ko
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)strip --remove-section=.note --remove-section=.comment $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -O binary $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm
# bootloader nor
# cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/bcm9$(CONFIG_BCM_CHIP_ID)_cfe.w $(KDIR)/bcm_bootloader_cfe.w
# ram part of the bootloader for nand boot
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin $(KDIR)/cferam.001
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/cfe$(CONFIG_BCM_CHIP_ID)_nand.v $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/cfe/ $(KDIR)/cfe
# dd if=$(KDIR)/vmlinux.bcm.elf of=$(KDIR)/vmlinux.bcm bs=4096 count=1
# $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
$(call Package/bcmkernel/removevoice,$(1))
$(call Package/bcmkernel/removesound,$(1))
# $(call Package/bcmkernel/removei2c,$(1))
endef

View file

@ -1,278 +0,0 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# update this based on the Broadcom SDK version, 4.16L.03 -> 416030
BRCM_SDK_VERSION:=416030
ifneq ($(CONFIG_BCM_OPEN),y)
PKG_NAME:=bcmkernel-3.4
PKG_VERSION:=$(BRCM_SDK_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_URL:=git@iopsys.inteno.se:bcmkernel
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=080f1533553e7341e48995e7f9024cbf79a24120
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_SDK_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
endif
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BRCM_SDK_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
export CONFIG_BCM_CHIP_ID
export CONFIG_BCM_CFE_PASSWORD
export CONFIG_BCM_KERNEL_PROFILE
export CONFIG_SECURE_BOOT_CFE
BCM_BS_PROFILE = $(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
BCM_KERNEL_VERSION:=3.4.11-rt19
BCM_SDK_VERSION:=bcm963xx
RSTRIP:=true
define Package/bcmkernel/removevoice
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
ifeq ($(CONFIG_BCM_ENDPOINT_MODULE),y)
define Package/bcmkernel/removevoice
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
endif
define Package/bcmkernel/removesound
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
endef
ifeq ($(BCM_USBSOUND_MODULES),y)
define Package/bcmkernel/removesound
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
endef
endif
define Package/bcmkernel/removei2c
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
ifeq ($(CONFIG_BCM_I2C),y)
define Package/bcmkernel/removei2c
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
endif
define Package/bcmkernel/removebluetooth
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bnep.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/btusb.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/rfcomm.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/hci_uart.ko
endef
ifeq ($(CONFIG_BCM_BLUETOOTH),y)
define Package/bcmkernel/removebluetooth
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko etc...
endef
endif
define Package/bcmkernel/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/etc/adsl
$(INSTALL_DIR) $(1)/etc/wlan
$(INSTALL_DIR) $(1)/etc/cms_entity_info.d
# Install header files
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/shared/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/countryArchive.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/countryArchive.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/codec/codec.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec/codec.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h
ifneq ($(CONFIG_BCM_OPEN),y)
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/userspace/private/apps/vodsl/voip/inc/tpProfiles.h $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
endif
echo "#define BCM_SDK_VERSION $(BRCM_SDK_VERSION)" > $(STAGING_DIR)/usr/include/bcm_sdk_version.h
# create symlink to kernel build directory
rm -f $(BUILD_DIR)/bcmkernel
ln -sfn $(PKG_SOURCE_SUBDIR) $(BUILD_DIR)/bcmkernel
# Install binaries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/bin/* $(1)/usr/sbin/
rm -f $(1)/usr/sbin/dhcp6c
rm -f $(1)/usr/sbin/dhcp6s
rm -f $(1)/usr/sbin/dhcpc
rm -f $(1)/usr/sbin/dhcpd
rm -f $(1)/usr/sbin/dnsproxy
rm -f $(1)/usr/sbin/httpd
rm -f $(1)/usr/sbin/openssl
rm -f $(1)/usr/sbin/racoon
rm -f $(1)/usr/sbin/ripd
rm -f $(1)/usr/sbin/send_cms_msg
rm -f $(1)/usr/sbin/sshd
rm -f $(1)/usr/sbin/ssk
rm -f $(1)/usr/sbin/telnetd
rm -f $(1)/usr/sbin/tr64c
rm -f $(1)/usr/sbin/tr69c
rm -f $(1)/usr/sbin/ubi*
rm -f $(1)/usr/sbin/udhcpd
rm -f $(1)/usr/sbin/upnp
rm -f $(1)/usr/sbin/upnpd
rm -f $(1)/usr/sbin/vodsl
rm -f $(1)/usr/sbin/wlmngr
rm -f $(1)/usr/sbin/zebra
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/eid_bcm_kthreads.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/symbol_table.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/init.d/bcm-base-drivers.sh $(1)/lib/
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/rdpa_init.sh ]; then $(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/rdpa_init.sh $(1)/etc/; fi;
# Install libraries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/gpl/* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/private/* $(1)/usr/lib/
rm -f $(1)/usr/lib/ld-uClibc.so.0
rm -f $(1)/usr/lib/libc.so.0
rm -f $(1)/usr/lib/libdl.so.0
rm -f $(1)/usr/lib/libgcc_s.so.1
rm -f $(1)/usr/lib/libpthread.so.0
rm -f $(1)/usr/lib/libm.so.0
rm -f $(1)/usr/lib/libutil.so.0
rm -f $(1)/usr/lib/libcms_boardctl.so
rm -f $(1)/usr/lib/libcms_msg.so
rm -f $(1)/usr/lib/libcms_util.so
rm -f $(1)/usr/lib/libnvram.so
rm -f $(1)/usr/lib/libcrypt.so.0
rm -f $(1)/usr/lib/libbcm_crc.so
rm -f $(1)/usr/lib/libbcm_flashutil.so
rm -f $(1)/usr/lib/libcrypto.so
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so
rm -f $(1)/usr/lib/libcrypto.so.0.9.7
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so.0.9.7
rm -f $(1)/usr/lib/libssl.so
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so
rm -f $(1)/usr/lib/libssl.so.0.9.7
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so.0.9.7
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/public/* $(1)/usr/lib/
$(CP) --remove-destination $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/public/* $(1)/usr/lib/
rm -rf $(1)/usr/lib/modules
rm -rf $(1)/usr/lib/private
rm -rf $(1)/usr/lib/public
rm -rf $(1)/usr/lib/gpl
# Install kernel modules
rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/*
mkdir -p $(1)/lib/modules/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/extra/* $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/
#cp -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel/ $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
find $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel/ -name *.ko -exec cp {} $(1)/lib/modules/$(BCM_KERNEL_VERSION)/ \;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/wlan/* $(1)/etc/wlan
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/telephonyProfiles.d $(1)/etc/
# rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bcm_usb.ko
# Alternative DECT modules taken from the Natalie package and if that is not selected, no DECT modules should be loaded
rm -f $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/dect.ko
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)strip --remove-section=.note --remove-section=.comment $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -O binary $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm
# bootloader nor
# cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/bcm9$(CONFIG_BCM_CHIP_ID)_cfe.w $(KDIR)/bcm_bootloader_cfe.w
# ram part of the bootloader for nand boot
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin ]; then cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin $(KDIR)/cferam.001; fi;
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID)ram.bin ]; then cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID)ram.bin $(KDIR)/cferam.001; fi;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/cfe$(CONFIG_BCM_CHIP_ID)_nand.v $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/cfe/ $(KDIR)/cfe
# dd if=$(KDIR)/vmlinux.bcm.elf of=$(KDIR)/vmlinux.bcm bs=4096 count=1
# $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
$(call Package/bcmkernel/removevoice,$(1))
$(call Package/bcmkernel/removesound,$(1))
# $(call Package/bcmkernel/removei2c,$(1))
endef

View file

@ -1,299 +0,0 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# update this based on the Broadcom SDK version, 4.16L.04 -> 416040
BRCM_SDK_VERSION:=416040
ifneq ($(CONFIG_BCM_OPEN),y)
PKG_NAME:=bcmkernel-3.4
PKG_VERSION:=$(BRCM_SDK_VERSION)
PKG_RELEASE:=1
PKG_SOURCE_URL:=git@iopsys.inteno.se:bcmkernel
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=6841fd80fd0ca27836ac24186544e4d174230dde
PKG_SOURCE:=$(PKG_NAME)-$(BRCM_SDK_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
endif
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(BRCM_SDK_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
export CONFIG_BCM_CHIP_ID
export CONFIG_BCM_CFE_PASSWORD
export CONFIG_BCM_KERNEL_PROFILE
export CONFIG_SECURE_BOOT_CFE
IBOARDID = $(shell echo $(CONFIG_TARGET_IBOARDID) |sed s/\"//g)
BCM_BS_PROFILE = $(shell echo $(CONFIG_BCM_KERNEL_PROFILE) | sed s/\"//g)
BCM_KERNEL_VERSION:=3.4.11-rt19
BCM_SDK_VERSION:=bcm963xx
RSTRIP:=true
define Package/bcmkernel/removevoice
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
ifeq ($(CONFIG_BCM_ENDPOINT_MODULE),y)
define Package/bcmkernel/removevoice
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/endpointdd.ko
endef
endif
define Package/bcmkernel/removesound
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd
touch $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/soundcore.ko
endef
ifeq ($(BCM_USBSOUND_MODULES),y)
define Package/bcmkernel/removesound
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/snd*
endef
endif
define Package/bcmkernel/removei2c
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
ifeq ($(CONFIG_BCM_I2C),y)
define Package/bcmkernel/removei2c
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/i2c*
endef
endif
define Package/bcmkernel/removebluetooth
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bnep.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/btusb.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/rfcomm.ko
rm $(1)/lib/modules/$(BCM_KERNEL_VERSION)/hci_uart.ko
endef
ifeq ($(CONFIG_BCM_BLUETOOTH),y)
define Package/bcmkernel/removebluetooth
echo not removing $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bluetooth.ko etc...
endef
endif
define Package/bcmkernel/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/etc/adsl
$(INSTALL_DIR) $(1)/etc/wlan
$(INSTALL_DIR) $(1)/etc/cms_entity_info.d
# Install header files
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/shared/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx
$(CP) -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountryCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLogCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/countryArchive.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/countryArchive.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc/vrgCountry.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/casCtl.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/codec/codec.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec/codec.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/endpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/vrgEndpt.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/LinuxUser/bosTypesLinuxUser.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMutex.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSpinlock.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMsgQ.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCritSect.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTime.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSem.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfgCustom.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosIpAddr.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTimer.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosError.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosLog.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSleep.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosMisc.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosCfg.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosEvent.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosTask.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosUtil.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosInit.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosSocket.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/bosFile.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvSlic.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvApm.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvCas.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h $(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc/xdrvTypes.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endptvoicestats.h
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h $(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/endpointdrv.h
ifneq ($(CONFIG_BCM_OPEN),y)
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/userspace/private/apps/vodsl/voip/inc/tpProfiles.h $(STAGING_DIR)/usr/include/bcm963xx/userspace/private/apps/vodsl/voip/inc
endif
echo "#define BCM_SDK_VERSION $(BRCM_SDK_VERSION)" > $(STAGING_DIR)/usr/include/bcm_sdk_version.h
# create symlink to kernel build directory
rm -f $(BUILD_DIR)/bcmkernel
ln -sfn $(PKG_SOURCE_SUBDIR) $(BUILD_DIR)/bcmkernel
# Install binaries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/bin/* $(1)/usr/sbin/
rm -f $(1)/usr/sbin/bcmmserver
rm -f $(1)/usr/sbin/dhcp6c
rm -f $(1)/usr/sbin/dhcp6s
rm -f $(1)/usr/sbin/dhcpc
rm -f $(1)/usr/sbin/dhcpd
rm -f $(1)/usr/sbin/dnsproxy
rm -f $(1)/usr/sbin/httpd
rm -f $(1)/usr/sbin/openssl
rm -f $(1)/usr/sbin/racoon
rm -f $(1)/usr/sbin/ripd
rm -f $(1)/usr/sbin/send_cms_msg
rm -f $(1)/usr/sbin/smbd
rm -f $(1)/usr/sbin/smbpasswd
rm -f $(1)/usr/sbin/sshd
rm -f $(1)/usr/sbin/ssk
rm -f $(1)/usr/sbin/sqlite3
rm -f $(1)/usr/sbin/telnetd
rm -f $(1)/usr/sbin/tr64c
rm -f $(1)/usr/sbin/tr69c
rm -f $(1)/usr/sbin/ubi*
rm -f $(1)/usr/sbin/udhcpd
rm -f $(1)/usr/sbin/upnp
rm -f $(1)/usr/sbin/upnpd
rm -f $(1)/usr/sbin/visdata
rm -f $(1)/usr/sbin/vis-datacollector
rm -f $(1)/usr/sbin/vis-dcon
rm -f $(1)/usr/sbin/vodsl
rm -f $(1)/usr/sbin/vpmstats
rm -f $(1)/usr/sbin/wlmngr
rm -f $(1)/usr/sbin/zebra
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/eid_bcm_kthreads.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/cms_entity_info.d/symbol_table.txt $(1)/etc/cms_entity_info.d/
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/init.d/bcm-base-drivers.sh $(1)/lib/
sed -i '/bcm_usb\.ko/d' $(1)/lib/bcm-base-drivers.sh
sed -i 's|/kernel/.*/|/|' $(1)/lib/bcm-base-drivers.sh
ifneq ($(findstring _$(IBOARDID)_,_DG150ALV2_DG200AL_DG301AL_DG400_VG50_),)
# Don't load any DECT drivers (have external voice or no voice at all)
sed -i '/dect\.ko/d' $(1)/lib/bcm-base-drivers.sh
sed -i '/dectshim\.ko/d' $(1)/lib/bcm-base-drivers.sh
else ifneq ($(findstring _$(IBOARDID)_,_D150_DG150V2_DG200_VOX25_),)
# Load dectshim driver only (have voice but no dect)
sed -i '/dect\.ko/d' $(1)/lib/bcm-base-drivers.sh
else ifneq ($(findstring _$(IBOARDID)_,_CG300_CG301_D301_EG300_),)
# Load both dect and dectshim driver (have internal dect)
else
echo Error: Unknown IBOARDID "$(IBOARDID)"!
false
endif
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/rdpa_init.sh ]; then $(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/rdpa_init.sh $(1)/etc/; fi;
# Install libraries
$(CP) $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/* $(1)/usr/lib/
rm -f $(1)/usr/lib/ld-uClibc.so.0
rm -f $(1)/usr/lib/libbdlna-dms-aal.so
rm -f $(1)/usr/lib/libbdlna-dms.so
rm -f $(1)/usr/lib/libbdlna.so
rm -f $(1)/usr/lib/libbmedia.so
rm -f $(1)/usr/lib/libb_playback_ip.so
rm -f $(1)/usr/lib/libc.so.0
rm -f $(1)/usr/lib/libcrypt.so.0
rm -f $(1)/usr/lib/libdl.so.0
rm -f $(1)/usr/lib/libgcc_s.so.1
rm -f $(1)/usr/lib/libm.so.0
rm -f $(1)/usr/lib/libpthread.so.0
rm -f $(1)/usr/lib/libsqlite3.so*
rm -f $(1)/usr/lib/libutil.so.0
rm -f $(1)/usr/lib/libwifihttp.so
rm -f $(1)/usr/lib/libwlvisualization.so
rm -f $(1)/usr/lib/libxml2.so*
rm -f $(1)/usr/lib/libcrypto.so
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so
rm -f $(1)/usr/lib/libcrypto.so.0.9.7
ln -s /usr/lib/libcrypto.so.1.0.0 $(1)/usr/lib/libcrypto.so.0.9.7
rm -f $(1)/usr/lib/libssl.so
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so
rm -f $(1)/usr/lib/libssl.so.0.9.7
ln -s /usr/lib/libssl.so.1.0.0 $(1)/usr/lib/libssl.so.0.9.7
rm -rf $(1)/usr/lib/modules
rm -rf $(1)/usr/lib/private
rm -rf $(1)/usr/lib/public
rm -rf $(1)/usr/lib/gpl
# Install kernel modules
rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/*
mkdir -p $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/extra $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
#cp -r $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel $(1)/lib/modules/$(BCM_KERNEL_VERSION)/
find $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/lib/modules/$(BCM_KERNEL_VERSION)/kernel/ -name *.ko -exec cp {} $(1)/lib/modules/$(BCM_KERNEL_VERSION)/ \;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/wlan/* $(1)/etc/wlan
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/$(BCM_BS_PROFILE)/fs/etc/telephonyProfiles.d $(1)/etc/
# rm -rf $(1)/lib/modules/$(BCM_KERNEL_VERSION)/bcm_usb.ko
# Alternative DECT modules taken from the Natalie package and if that is not selected, no DECT modules should be loaded
rm -f $(1)/lib/modules/$(BCM_KERNEL_VERSION)/extra/dect.ko
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)strip --remove-section=.note --remove-section=.comment $(KDIR)/vmlinux.bcm.elf
$(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -O binary $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/kernel/linux-3.4rt/vmlinux $(KDIR)/vmlinux.bcm
# bootloader nor
# cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/bcm9$(CONFIG_BCM_CHIP_ID)_cfe.w $(KDIR)/bcm_bootloader_cfe.w
# ram part of the bootloader for nand boot
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin ]; then cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID).bin $(KDIR)/cferam.001; fi;
if [ -a $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID)ram.bin ]; then cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_ram/cfe$(CONFIG_BCM_CHIP_ID)ram.bin $(KDIR)/cferam.001; fi;
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/cfe/build/broadcom/bcm63xx_rom/cfe$(CONFIG_BCM_CHIP_ID)_nand.v $(KDIR)/cfe$(CONFIG_BCM_CHIP_ID)_nand.v
cp -R $(PKG_BUILD_DIR)/$(BCM_SDK_VERSION)/targets/cfe/ $(KDIR)/cfe
# dd if=$(KDIR)/vmlinux.bcm.elf of=$(KDIR)/vmlinux.bcm bs=4096 count=1
# $(KERNEL_CROSS)objcopy $(OBJCOPY_STRIP) -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
$(call Package/bcmkernel/removevoice,$(1))
$(call Package/bcmkernel/removesound,$(1))
# $(call Package/bcmkernel/removei2c,$(1))
endef

View file

@ -1,97 +0,0 @@
menu "Profile and CFE"
depends on PACKAGE_bcmkernel
config BCM_OPEN
bool
prompt "Build package for Public SDK"
default n
help
Set this to build an package using a release tarball with the proprietary components removed.
choice
prompt "Broadcom SDK version"
default BRCM_SDK_VER_416030
help
Version of the Broadcom SDK to use.
config BRCM_SDK_VER_414040
bool
prompt "bcmkernel-4.14L.04"
config BRCM_SDK_VER_416021
bool
prompt "bcmkernel-4.16L.02A"
config BRCM_SDK_VER_416030
bool
prompt "bcmkernel-4.16L.03"
config BRCM_SDK_VER_416040
bool
prompt "bcmkernel-4.16L.04"
endchoice
config BCM_KERNEL_PROFILE
string
prompt "Broadcom kernel profile"
default "96368GWV"
help
Profile to build the broadcom software with, 96368GWV, 963268GWV, 96362GWV, 96816GWV, 96816OV
config BCM_CFE_PASSWORD
string
prompt "Broadcom cfe password"
default ""
config BCM_CHIP_ID
string
prompt "Broadcom chip id"
default "6368"
help
Chip id to build the cfe with, 6328|6362|6368|6816|63268
config BCM_BLNAND
string
prompt "Broadcom boot loader nand"
default "0"
help
Set this to 1 to build a boot loader for nand flash
config BCM_ENDPOINT_MODULE
bool
prompt "Broadcom endpoint voice FXS support"
default y
help
Set this to include the endpoint module in image
config BCM_USBSOUND_MODULES
bool
prompt "Broadcom USB audio support"
default n
help
Set this to include sound support modules in image
config BCM_I2C
bool
prompt "Broadcom I2C support"
default n
help
Set this to include the i2c modules in image
config BCM_BLUETOOTH
bool
prompt "Broadcom Bluetooth support"
default n
help
Set this to include the Bluetooth modules in image
config SECURE_BOOT_CFE
prompt "Secure boot CFE"
bool
endmenu

View file

@ -1,64 +0,0 @@
#
# Primary/common bcmkernel makefile for all versions of Broadcom SDKs
#
include $(TOPDIR)/rules.mk
define Package/bcmkernel
SECTION:=net
CATEGORY:=Base system
TITLE:=Broadcom sdk 3.4 kernel
URL:=
MENU:=1
endef
define Package/bcmkernel/description
Broadcom kernel and userspace, compiled with the broadcom supplied tool-chain.
endef
define Package/bcmkernel/config
source "$(SOURCE)/Config.in"
endef
# Include SDK version specific makefile based on config selection
ifeq ($(CONFIG_ARCH),)
-include $(TOPDIR)/.config
endif
ifeq ($(CONFIG_BCM_OPEN),y)
PKG_NAME:=bcmopen
PKG_VERSION:=consumer
PKG_RELEASE:=1
TARGET_VERSION=$(shell echo $(CONFIG_TARGET_VERSION) | sed s/\"//g)
TARGET_IBOARDID=$(shell echo $(CONFIG_TARGET_IBOARDID) | sed s/\"//g)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).$(TARGET_VERSION).$(TARGET_IBOARDID).tar.gz
PKG_SOURCE_URL:=http://ihgsp.inteno.se/ihgsp/consumer/
endif
ifeq ($(CONFIG_BRCM_SDK_VER_414040),y)
include ./414040.mk
else ifeq ($(CONFIG_BRCM_SDK_VER_416021),y)
include ./416021.mk
else ifeq ($(CONFIG_BRCM_SDK_VER_416030),y)
include ./416030.mk
else ifeq ($(CONFIG_BRCM_SDK_VER_416040),y)
include ./416040.mk
else
# Make 'make menuconfig' work even though no SDK version specified
PKG_VERSION:=none
include $(INCLUDE_DIR)/package.mk
endif
# hack to be able to compile just the userspace part.
# TOPDIR=$PWD make -C package/bcmkernel userspace
userspace:
$(call Build/Compile/Default, userspace)
$(eval $(call BuildPackage,bcmkernel))

View file

@ -1,54 +0,0 @@
#
# Copyright (C) 2006-2008 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=brcm-h
PKG_VERSION:=1
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=git@iopsys.inteno.se:brcm-h
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=HEAD
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk
include $(INCLUDE_DIR)/kernel.mk
define Package/brcm-h
SECTION:=net
CATEGORY:=Base system
TITLE:=Broadcom header files
URL:=
endef
define Package/brcm-h/description
Broadcom header files
endef
define Package/brcm--h/install
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/brcm
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/bcmdrivers/opensource/include/bcm963xx/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/voice_res_gw/inc/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/voice_res_gw/codec/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/* $(STAGING_DIR)/usr/include/brcm \
$(CP) -r $(PACKAGE_BUILD_DIR)/bcm963xx/xChange/dslx_common/xchg_drivers/inc/* $(STAGING_DIR)/usr/include/brcm \
endef
$(eval $(call BuildPackage,brcm-h))

View file

@ -1,37 +0,0 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=broadcom-diag
PKG_RELEASE:=10
include $(INCLUDE_DIR)/package.mk
define KernelPackage/diag
SUBMENU:=Other modules
DEPENDS:=@TARGET_brcm47xx
TITLE:=Driver for router LEDs and Buttons
FILES:=$(PKG_BUILD_DIR)/diag.ko
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
SUBDIRS="$(PKG_BUILD_DIR)" \
EXTRA_CFLAGS="$(BUILDFLAGS)" \
modules
endef
$(eval $(call KernelPackage,diag))

View file

@ -1,17 +0,0 @@
#
# Makefile for diag driver
#
# Copyright (C) 2005 Felix Fietkau <nbd@openwrt.org>
#
# 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.
#
obj-m := diag.o
ifeq ($(MAKING_MODULES),1)
-include $(TOPDIR)/Rules.make
endif

File diff suppressed because it is too large Load diff

View file

@ -1,134 +0,0 @@
/*
* diag.h - GPIO interface driver for Broadcom boards
*
* Copyright (C) 2006 Mike Baker <mbm@openwrt.org>,
* Felix Fietkau <nbd@openwrt.org>
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include <linux/irq.h>
#define MODULE_NAME "diag"
#define MAX_GPIO 16
#define FLASH_TIME HZ/6
enum polarity_t {
REVERSE = 0,
NORMAL = 1,
INPUT = 2,
};
enum {
PROC_BUTTON,
PROC_LED,
PROC_MODEL,
PROC_GPIOMASK
};
struct prochandler_t {
int type;
void *ptr;
};
struct button_t {
struct prochandler_t proc;
char *name;
u32 gpio;
unsigned long seen;
u8 pressed;
};
struct led_t {
struct prochandler_t proc;
char *name;
u32 gpio;
u8 polarity;
u8 flash;
u8 state;
};
struct platform_t {
char *name;
struct button_t buttons[MAX_GPIO];
u32 button_mask;
u32 button_polarity;
void (*platform_init)(void);
struct led_t leds[MAX_GPIO];
};
struct event_t {
struct work_struct wq;
unsigned long seen;
char *name, *action;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
struct sk_buff *skb;
#else
char *scratch;
char *argv[4];
char *envp[7];
u8 enr, anr;
#endif
};
extern char *nvram_get(char *str);
static struct platform_t platform;
/* buttons */
static void register_buttons(struct button_t *b);
static void unregister_buttons(struct button_t *b);
static void hotplug_button(struct work_struct *work);
static irqreturn_t button_handler(int irq, void *dev_id);
/* leds */
static void register_leds(struct led_t *l);
static void unregister_leds(struct led_t *l);
static void set_led_extif(struct led_t *led);
static void led_flash(unsigned long dummy);
/* 2.4 compatibility */
#ifndef TIMER_INITIALIZER
#define TIMER_INITIALIZER(_function, _expires, _data) \
{ \
/* _expires and _data currently unused */ \
function: _function \
}
#endif
static struct timer_list led_timer = TIMER_INITIALIZER(&led_flash, 0, 0);
/* proc */
static struct proc_dir_entry *diag, *leds;
static ssize_t diag_proc_read(struct file *file, char *buf, size_t count, loff_t *ppos);
static ssize_t diag_proc_write(struct file *file, const char *buf, size_t count, loff_t *ppos);
static struct file_operations diag_proc_fops = {
read: diag_proc_read,
write: diag_proc_write
};
static struct prochandler_t proc_model = { .type = PROC_MODEL };
static struct prochandler_t proc_gpiomask = { .type = PROC_GPIOMASK };

View file

@ -1,16 +0,0 @@
#ifndef __DIAG_GPIO_H
#define __DIAG_GPIO_H
#include <linux/interrupt.h>
#include <linux/ssb/ssb_embedded.h>
#include <linux/gpio.h>
#include <bcm47xx.h>
#define EXTIF_ADDR 0x1f000000
#define EXTIF_UART (EXTIF_ADDR + 0x00800000)
#define GPIO_TYPE_NORMAL (0x0 << 24)
#define GPIO_TYPE_EXTIF (0x1 << 24)
#define GPIO_TYPE_MASK (0xf << 24)
#endif /* __DIAG_GPIO_H */

View file

@ -1,61 +0,0 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=broadcom-nvram
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=8b6018d9ce5e292f0a4a3e86f8fa7d8bc003c3fb
PKG_SOURCE_PROTO:=git
ifeq ($(CONFIG_BCM_OPEN),y)
PKG_SOURCE_URL:=http://public.inteno.se/broadcom-nvram
else
PKG_SOURCE_URL:=git@public.inteno.se:broadcom-nvram
endif
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
STAMP_PREPARED:=$(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
include $(INCLUDE_DIR)/package.mk
LDFLAGS+= \
-Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
-Wl,-rpath-link=$(STAGING_DIR)/lib
RSTRIP:=true
define Package/bcmnvram
CATEGORY:=Libraries
TITLE:=Broadcom nvram emulator library
URL:=
DEPENDS:=PACKAGE_libuci:libuci
endef
define Package/bcmnvram/description
Broadcom nvram to uci wrapper
endef
target=$(firstword $(subst -, ,$(BOARD)))
MAKE_FLAGS += TARGET="$(target)"
TARGET_CFLAGS += -Dtarget_$(target)=1 -Wall
define Package/bcmnvram/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/bin
cp $(PKG_BUILD_DIR)/libnvram.so $(1)/usr/lib/
cp $(PKG_BUILD_DIR)/uci_test $(1)/usr/bin/
endef
$(eval $(call BuildPackage,bcmnvram))

View file

@ -1,3 +0,0 @@
config 'broadcom' 'nvram'

View file

@ -1,115 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=broadcom-utils
PKG_VERSION:=0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=2d83316221fe1e3be7d86c1d44d99b00b62f2373
PKG_SOURCE_PROTO:=git
ifeq ($(CONFIG_BCM_OPEN),y)
PKG_SOURCE_URL:=http://public.inteno.se/broadcom-utils
else
PKG_SOURCE_URL:=git@public.inteno.se:broadcom-utils
endif
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
############################################################################## #
include $(INCLUDE_DIR)/package.mk
define Package/broadcom-utils/Default
SECTION:=utils
CATEGORY:=Broadcom utilities
TITLE:=Broadcom utilities
DEPENDS:=bcmkernel
endef
define Package/broadcom-utils/description
This package contains useful broadcom related utilities.
endef
target=$(firstword $(subst -, ,$(BOARD)))
_make_flags := $(MAKE_FLAGS)
_target_cflags := $(TARGET_CFLAGS)
############################################################################## #
# brcm_fw_tool #
############################################################################## #
MAKE_FLAGS := $(_make_flags)
TARGET_CFLAGS := $(_target_cflags) -Dtarget_$(target)=1 -Wall
PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
ifdef CONFIG_MTD_REDBOOT_PARTS
MAKE_FLAGS += FIS_SUPPORT=1
TARGET_CFLAGS += -DFIS_SUPPORT=1
endif
define Package/brcm_fw_tool
$(call Package/broadcom-utils/Default)
TITLE:=Update utility for Broadcom nand firmware images
endef
define Package/brcm_fw_tool/description
This package contains an utility useful to upgrade from other firmware or
older OpenWrt releases.
endef
define Build/brcm_fw_tool/prepare
mkdir -p $(PKG_BUILD_DIR)/brcm_fw_tool
$(CP) $(PKG_SOURCE_SUBDIR)/brcm_fw_tool/* $(PKG_BUILD_DIR)/brcm_fw_tool/
endef
define Package/brcm_fw_tool/install
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/brcm_fw_tool/brcm_fw_tool $(1)/sbin/
endef
############################################################################## #
# brcminfo #
############################################################################## #
MAKE_FLAGS := $(_make_flags)
TARGET_CFLAGS := $(_target_cflags) -D$(CONFIG_TARGET_IBOARDID) -Dtarget_$(target)=1 -Wall
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
EXTRA_CFLAGS += -DBOS_OS_LINUXUSER
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx/
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx/
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/endpt/inc/
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/inc
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/codec
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_common/bos/publicInc/
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/voice_res_gw/casCtl/inc/
EXTRA_CFLAGS += -I$(STAGING_DIR)/usr/include/bcm963xx/xChange/dslx_common/xchg_drivers/inc
define Package/brcminfo
$(call Package/broadcom-utils/Default)
TITLE:=Broadcom voice driver info utility
endef
define Package/brcminfo/description
Utility that prints information regarding voice configuration
endef
define Build/brcminfo/prepare
mkdir -p $(PKG_BUILD_DIR)/brcminfo
$(CP) $(PKG_SOURCE_SUBDIR)/brcminfo/* $(PKG_BUILD_DIR)/brcminfo/
endef
define Package/brcminfo/install
$(INSTALL_DIR) $(1)/usr/bin
cp $(PKG_BUILD_DIR)/brcminfo/brcminfo $(1)/usr/bin/
endef
############################################################################## #
$(eval $(call BuildPackage,brcminfo))
$(eval $(call BuildPackage,brcm_fw_tool))

View file

@ -1,36 +0,0 @@
#
# Copyright (C) 2013 Inteno
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mcpd
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/mcpd
CATEGORY:=Network
SUBMENU:=IPTV
TITLE:=Multicast Daemon
endef
define Package/mcpd/description
Multicast Daemon
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./files/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/mcpd/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,mcpd))

View file

@ -1,15 +0,0 @@
config mcpd 'mcpd'
option igmp_proxy_interfaces 'wan'
option igmp_default_version '2'
option igmp_query_interval '125'
option igmp_query_response_interval '100'
option igmp_last_member_query_interval '10'
option igmp_robustness_value '2'
option igmp_max_groups '25'
option igmp_max_sources '10'
option igmp_max_members '25'
option igmp_fast_leave '1'
option igmp_proxy_enable '1'
option igmp_snooping_enable '2'
option igmp_snooping_interfaces 'br-lan'

View file

@ -1,7 +0,0 @@
#!/bin/sh
[ "$ACTION" = ifup ] || exit 0
pidof mcpd >/dev/null || exit 0
/etc/init.d/mcpd enabled && /etc/init.d/mcpd reload

View file

@ -1,137 +0,0 @@
#!/bin/sh /etc/rc.common
include /lib/network
START=99
STOP=10
USE_PROCD=1
NAME=mcpd
PROG=/usr/sbin/mcpd
dscp_mark() {
local mark=$1
local dm=0
while [[ $dm -le 56 ]]; do
iptables -t mangle -D POSTROUTING -p igmp -j DSCP --set-dscp $dm 2>/dev/null
dm=$((dm+2))
done
[ -n "$mark" ] && iptables -t mangle -A POSTROUTING -p igmp -j DSCP --set-dscp-class $mark
}
mcpd_configure() {
local igmp_snooping_enable
local igmp_snooping_interfaces
local igmp_proxy_interfaces
local igmp_proxy_enable
local device
local proxdevs=""
local proxbridge=""
local bridged=0
local routed=0
local _i
config_load mcpd
config_get igmp_snooping_enable mcpd igmp_snooping_enable
config_get igmp_snooping_interfaces mcpd igmp_snooping_interfaces
config_get igmp_proxy_interfaces mcpd igmp_proxy_interfaces
config_get igmp_proxy_enable mcpd igmp_proxy_enable
# disable port snooping on all bridges
for br in $(brctl show | grep 'br-' | awk '{print$1}' | tr '\n' ' '); do
brctl enableportsnooping $br 0
done
grep igmp /etc/config/mcpd | awk '{print $2 $3}' | sed -e "s/[\'\"]/ /g" | tr "_" "-" > /var/mcpd.conf
for proxif in $igmp_proxy_interfaces; do
json_load "$(ifstatus $proxif)"
json_get_var device l3_device
case "$device" in
br-*)
bridged=1
proxbridge="$device"
json_load "$(devstatus $device)"
_i=1
json_select bridge-members
while json_get_var dev $_i; do
case "$dev" in
*.*)
ifconfig $dev | grep RUNNING >/dev/null && proxdevs="$proxdevs $dev" && break
;;
esac
_i=$(($_i + 1))
done
json_select ..
;;
*)
proxdevs="$proxdevs $device"
;;
esac
done
if [ $igmp_proxy_enable -eq 1 ]; then
sed -i "s/igmp-proxy-interfaces.*/igmp-proxy-interfaces $proxdevs/" /tmp/mcpd.conf
else
sed -i "s/igmp-proxy-interfaces.*/igmp-proxy-interfaces /" /tmp/mcpd.conf
fi
echo "igmp-mcast-interfaces $proxdevs" >> /tmp/mcpd.conf
sed -i "s/igmp-snooping-interfaces.*/igmp-snooping-interfaces $igmp_snooping_interfaces/" /tmp/mcpd.conf
for snpif in $igmp_snooping_interfaces; do
case "$snpif" in
br-*)
# enable port snooping on the bridge
/usr/sbin/brctl enableportsnooping $snpif "$igmp_snooping_enable"
if [ "$snpif" != "$proxbridge" ]; then
routed=1
json_load "$(devstatus $snpif)"
_i=1
json_select bridge-members
while json_get_var dev $_i; do
case "$dev" in
*.*)
routed=0
;;
esac
_i=$(($_i + 1))
done
json_select ..
fi
;;
eth%d|wl%d*)
routed=1
;;
esac
done
if [ "$((bridged+routed))" == "2" ]; then
# enable bridged+routed igmp snooping mode
echo "igmp-bridged-routed 1" >> /tmp/mcpd.conf
fi
config_get igmp_dscp_mark mcpd igmp_dscp_mark
dscp_mark $igmp_dscp_mark
}
service_triggers() {
procd_add_reload_trigger network mcpd
}
start_service() {
mcpd_configure
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance
}
stop_service() {
service_stop $PROG
}
reload_service() {
stop
start
}