blob: 2065e63a6c29b5ac0df08afbbab5e16f81ac1f5f [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001
2############################################################################
3#
4# Makefile -- Build for rootfs makefile.
5#
6# Copyright (c) 2001-2004, SnapGear (www.snapgear.com)
7# Copyright (c) 2001, Lineo
8#
9# Add by zhouwei 2010-08-06 for freescale imx28 platform
10#
11############################################################################
12CP = cp
13ROMFS_DIR = $(ROMFSDIR)
14$(warning CONFIG_WIFI_MODULE=$(CONFIG_WIFI_MODULE))
15.PHONY: romfs wifi
16
17ifneq ($(CONFIG_WIFI_MODULE), )
18CPWIFI=wifi
19endif
20
21$(warning CPWIFI=$(CPWIFI))
22all:
23
24romfs: $(CPWIFI)
25 chmod +x ./scripts/*.sh
26 $(CP) -f ./scripts/*.sh $(ROMFS_DIR)/sbin/
27 #$(CP) -f ./scripts/*.txt $(ROMFS_DIR)/sbin/
28 mkdir -p $(ROMFS_DIR)/etc_ro/
29 $(CP) -f ./etc/*.conf $(ROMFS_DIR)/etc_ro/
30 $(CP) -f ./etc/options.auth $(ROMFS_DIR)/etc_ro/
31 $(CP) -f ./etc/options.noauth $(ROMFS_DIR)/etc_ro/
32 $(CP) -f ./etc/initchat $(ROMFS_DIR)/etc_ro/
33ifneq ($(CONFIG_USE_WEBUI_SECURITY),yes)
34 $(CP) -f ./etc/pap-secrets $(ROMFS_DIR)/etc_ro/
35 $(CP) -f ./etc/chap-secrets $(ROMFS_DIR)/etc_ro/
36endif
37ifeq ($(USE_FOTA),yes)
38 mkdir -p $(ROMFS_DIR)/recovery/sbin
39 $(CP) -f ./scripts/to_mnt_ubifs.sh $(ROMFS_DIR)/recovery/sbin/
40endif
41wifi:
42 @echo "copying wifi script"
43
44ifeq ($(CONFIG_WIFI_MODULE), realtek)
45 @echo "copying wifi realtek script"
46 mkdir -p $(ROMFS_DIR)/etc_ro/
47 $(CP) -rf ./wifi/* $(ROMFS_DIR)/etc_ro/
48ifeq ($(CONFIG_WIFI_RTL_WPA2),yes)
49 chmod +x ./wifi_script/realtek_wpa2/*
50 $(CP) -rf ./wifi_script/realtek_wpa2/* $(ROMFS_DIR)/sbin/
51else
52 chmod +x ./wifi_script/realtek/*
53 $(CP) -rf ./wifi_script/realtek/* $(ROMFS_DIR)/sbin/
54endif
55else
56 chmod +x ./wifi_script/realtek/*
57ifeq ($(CONFIG_MIN_8M_VERSION), n)
58 $(CP) -rf ./wifi_script/realtek/zte_qrcode_create.sh $(ROMFS_DIR)/sbin/
59else
60ifeq ($(CONFIG_MMI_LCD),yes)
61 $(CP) -rf ./wifi_script/realtek/zte_qrcode_create.sh $(ROMFS_DIR)/sbin/
62endif
63endif
64endif
65
66