source: trunk/openwrt/target/linux/fonera2n/Makefile @ 2296

Last change on this file since 2296 was 2296, checked in by matthijs, 6 years ago

build-system: Fix building with TARGET_ROOTFS_INITRAMFS=y.

This allows a booting the image through TFTP instead of having to flash
the image onto the Fonera. This needs serial access to tell the
bootloader to boot from TFTP instead of internal flash, though.

This patch was tested only on 2.0n.

File size: 3.3 KB
Line 
1#
2# Copyright (C) 2008 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7include $(TOPDIR)/rules.mk
8
9ARCH:=mipsel
10BOARD:=fonera2n
11BOARDNAME:=La Fonera2.0N
12FEATURES:=squashfs
13LINUX_VERSION:=2.6.21.7
14
15include $(INCLUDE_DIR)/target.mk
16
17# Default packages common to all targets (even though this list is
18# duplicated between all targets, it should be kept identical).
19DEFAULT_PACKAGES = \
20        avahi-daemon \
21        base-files \
22        bridge \
23        busybox \
24        chat \
25        coova \
26        chillout \
27        dnsmasq-fon \
28        dropbear \
29        e2fsprogs \
30        ddns-scripts \
31        facebook \
32        fdisk \
33        firewall \
34        flickr \
35        fonbase \
36        foncheckrsa \
37        fonsmcd \
38        fonstate \
39        hotplug2 \
40        iptables \
41        ip \
42        kmod-fs-ext2 \
43        kmod-fs-ext3 \
44        kmod-fs-hfsplus \
45        kmod-fs-vfat \
46        kmod-gre \
47        kmod-ipt-nathelper \
48        kmod-loop \
49        kmod-nls-base \
50        kmod-nls-cp437 \
51        kmod-nls-iso8859-1 \
52        kmod-nls-utf8 \
53        kmod-usb-printer \
54        kmod-usb-serial \
55        kmod-usb-serial-hso \
56        kmod-usb-serial-option \
57        kmod-usb-serial-sierrawireless \
58        kmod-usb-storage \
59        kmod-video-core \
60        kmod-video-uvc \
61        libgcc \
62        luci-admin-fon \
63        luci-admin-fon-rpc \
64        luci-admin-rpc \
65        luci-app-ddns \
66        luci-app-downloadmanager \
67        luci-app-facebook \
68        luci-app-flickr \
69        luci-app-ffrpc \
70        luci-app-fonbrowser \
71        luci-app-fonfw \
72        luci-app-fonlivestats \
73        luci-app-fonbackup \
74        luci-app-openvpn \
75        luci-app-picasa \
76        luci-app-qos \
77        luci-app-torrent \
78        luci-app-twitter \
79        luci-app-wizard-fonera2 \
80        luci-app-youtube \
81        luci-cbi \
82        luci-core \
83        luci-fon \
84        luci-httpclient \
85        luci-i18n-english \
86        luci-json \
87        luci-lucid \
88        luci-nixio \
89        luci-sys \
90        luci-theme-fon \
91        luci-uci \
92        luci-uvl \
93        luci-uploadd \
94        luci-web \
95        miniupnpd \
96        mountd \
97        mtd \
98        ntfs-3g \
99        ntpclient \
100        onlined \
101        opkg \
102        ppp \
103        ppp-mod-pppoe \
104        pure-ftpd \
105        qos-scripts \
106        samba3 \
107        uci \
108        uclibc \
109        udevtrigger \
110        umtsd \
111
112# These are used during production in the Edimax factory (no need to
113# enable them in a regular build).
114#DEFAULT_PACKAGES += kmod-usb-net \
115#                    kmod-usb-net-asix
116
117# 2.0n specific ralink kernel drivers, a switch configuration userspace
118# utility and the wireless-tools (since ra_wifi doesn't strictly depend
119# on it, but we need it).
120DEFAULT_PACKAGES += ra_wifi \
121                    raswitch \
122                    ap_client \
123                    wireless-tools
124define Target/Description
125        Build firmware images for fonera20n
126endef
127
128ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
129  define Kernel/SetInitramfs/Extra
130        cp $(LINUX_DIR)/.config $(LINUX_DIR)/.config.tmp
131        grep -v -e CONFIG_RT2880_ROOTFS_IN_RAM -e CONFIG_RT2880_ROOTFS_IN_FLASH $(LINUX_DIR)/.config.tmp > $(LINUX_DIR)/.config
132        echo 'CONFIG_RT2880_ROOTFS_IN_RAM=y' >> $(LINUX_DIR)/.config
133        echo '# CONFIG_RT2880_ROOTFS_IN_FLASH is not set' >> $(LINUX_DIR)/.config
134        echo 'CONFIG_BLK_DEV_RAM_SIZE=8192' >> $(LINUX_DIR)/.config
135        echo 'CONFIG_INITRAMFS_LZMA=n' >> $(LINUX_DIR)/.config
136        echo 'CONFIG_BLK_DEV_RAM_COUNT=16' >> $(LINUX_DIR)/.config
137        echo 'CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024' >> $(LINUX_DIR)/.config
138  endef
139else
140  define Kernel/SetInitramfs/Extra
141        cp $(LINUX_DIR)/.config $(LINUX_DIR)/.config.tmp
142        grep -v -e CONFIG_RT2880_ROOTFS_IN_RAM -e CONFIG_RT2880_ROOTFS_IN_FLASH $(LINUX_DIR)/.config.tmp > $(LINUX_DIR)/.config
143        echo 'CONFIG_RT2880_ROOTFS_IN_FLASH=y' >> $(LINUX_DIR)/.config
144        echo '# CONFIG_RT2880_ROOTFS_IN_RAM is not set' >> $(LINUX_DIR)/.config
145  endef
146endif
147
148$(eval $(call BuildTarget))
Note: See TracBrowser for help on using the repository browser.