On Monday 15 June 2009 12:58:18 Ferenc Wagner wrote:
> Bastian Bittorf <[email protected]> writes:
>
> > * Ferenc Wagner <[email protected]> [14.06.2009 14:45]:
> >
> >> Why is that ifconfig there at all?
> >
> > because I didn't found the time till now, to make a function
> > ifconfig() which is made known @common_func and translates the known
> > calls to 'ip'. Give me some weeks and i will send a patch to discard
> > 'ifconfig' ... (i promised this at WCW2009...)
>
> Heh, I meant what its purpose was, not why it isn't an ip command
> instead. :) Btw. ifconfig up started to spit out a page allocation
> failure (attached at the end of this mail) but seems to work otherwise
> OK...
>
> >> what I understand from it). For my purposes using a region with
> >> smaller blocks for jffs2 would be a big gain, as currently I've got a
> >> single 64 KB erase block for it, which obviously does not fly. Is it
> >> really possible?
> >
> > AFAIK the blocksize is fixed/hardlocked for this flashchip to 64k.
> > Ever played with 'printk-patch' or similar things the get a smaller kernel?
>
> Not yet. But would that by me another 64k? I don't think so... By
> optimising the kernel for size I'm at 4 (!) erase blocks now, so I'd
> need one more to get an operating jffs2. But this agains gives me the
> feeling that jffs2 is rather inefficient at using flash space: I need
> 384k to store a single byte! :/ I wonder how much more I could store
> there in this case...
I am running a OpenWRT with a 2.6 kernel on a WAP54G.
It's rather difficult to get it stripped down, but it _does_ work. The device
does run in production since several months.
So what are the issues? It turns out RAM is _not_ an issue. Just disable all
services
that are not absolutely required (dhcp, etc...) and you'll get enough free RAM.
The issue is flash. In fact the 5 erase blocks are the issue.
First start with disabling _everything_ that is not needed to keep the device
alife.
In the kernel and in the openwrt config (busybox config, too).
The second step is to search for big flash consumers. It turns out the crypto
modules
do consume a large amount of flash. Even if the functionality is already
compiled into
the kernel image itself. Attached is a patch which strips down several hundred
kiB of
flash space. I think it doesn't apply anymore to current trunk, but you might
get the idea.
Another rather big flash consumer is the b43 driver firmware. There's an option
in openwrt
config to include only the necessary firmware files. Use it.
I'm not sure if this is any useful for you running a 2.4 image, but I just
wanted to drop it
into the discussion. Have fun!
Index: target/linux/brcm47xx/config-2.6.28
===================================================================
--- target/linux/brcm47xx/config-2.6.28 (revision 15160)
+++ target/linux/brcm47xx/config-2.6.28 (working copy)
@@ -1,6 +1,6 @@
CONFIG_32BIT=y
# CONFIG_64BIT is not set
-# CONFIG_8139TOO is not set
+# CONFIG_AIO is not set
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
@@ -9,14 +9,13 @@
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ARPD is not set
CONFIG_B44=y
-CONFIG_B44_PCI=y
-CONFIG_B44_PCICORE_AUTOSELECT=y
-CONFIG_B44_PCI_AUTOSELECT=y
-CONFIG_BASE_SMALL=0
+# CONFIG_BASE_FULL is not set
+CONFIG_BASE_SMALL=1
CONFIG_BCM47XX=y
CONFIG_BITREVERSE=y
-# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_BLK_DEV_INITRD is not set
# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_BUG is not set
CONFIG_CEVT_R4K=y
CONFIG_CFE=y
CONFIG_CLASSIC_RCU=y
@@ -52,14 +51,32 @@
# CONFIG_CPU_TX39XX is not set
# CONFIG_CPU_TX49XX is not set
# CONFIG_CPU_VR41XX is not set
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_ALGAPI2=y
+CONFIG_CRYPTO_ARC4=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_RNG2=y
CONFIG_CSRC_R4K=y
-CONFIG_DEVPORT=y
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_IOSCHED="noop"
+CONFIG_DEFAULT_NOOP=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
# CONFIG_DM9000 is not set
CONFIG_DMA_NEED_PCI_MAP_STATE=y
CONFIG_DMA_NONCOHERENT=y
CONFIG_EARLY_PRINTK=y
-# CONFIG_FIXED_PHY is not set
+# CONFIG_EPOLL is not set
+# CONFIG_EVENTFD is not set
# CONFIG_FREEZER is not set
+# CONFIG_FUTEX is not set
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CMOS_UPDATE=y
@@ -76,8 +93,9 @@
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
CONFIG_HAVE_IDE=y
CONFIG_HAVE_OPROFILE=y
+# CONFIG_HIGH_RES_TIMERS is not set
CONFIG_HW_HAS_PCI=y
-CONFIG_HW_RANDOM=y
+# CONFIG_HW_RANDOM is not set
CONFIG_HZ=250
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
@@ -86,18 +104,29 @@
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
# CONFIG_IDE is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT=y
-CONFIG_INPUT_EVDEV=y
-CONFIG_INPUT_POLLDEV=y
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_MULTIPLE_TABLES is not set
+# CONFIG_IP_ROUTE_MULTIPATH is not set
# CONFIG_IP_ROUTE_VERBOSE is not set
CONFIG_IRQ_CPU=y
# CONFIG_ISDN is not set
-CONFIG_KALLSYMS=y
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+# CONFIG_JFFS2_SUMMARY is not set
CONFIG_KMOD=y
# CONFIG_LEDS_ALIX is not set
-CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_GPIO is not set
+# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set
+# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
+# CONFIG_LEDS_TRIGGER_NETDEV is not set
+# CONFIG_LEDS_TRIGGER_TIMER is not set
# CONFIG_LEMOTE_FULONG is not set
+CONFIG_LOG_BUF_SHIFT=12
+CONFIG_MAC80211_RC_DEFAULT="minstrel"
+CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
+# CONFIG_MAC80211_RC_DEFAULT_PID is not set
+CONFIG_MAC80211_RC_MINSTREL=y
+# CONFIG_MAC80211_RC_PID is not set
# CONFIG_MACH_ALCHEMY is not set
# CONFIG_MACH_DECSTATION is not set
# CONFIG_MACH_EMMA is not set
@@ -117,6 +146,8 @@
# CONFIG_MIPS_MT_SMP is not set
# CONFIG_MIPS_MT_SMTC is not set
# CONFIG_MIPS_SIM is not set
+# CONFIG_MISC_DEVICES is not set
+# CONFIG_MODULE_UNLOAD is not set
CONFIG_MTD=y
# CONFIG_MTD_ABSENT is not set
CONFIG_MTD_BCM47XX=y
@@ -125,7 +156,7 @@
# CONFIG_MTD_BLOCK2MTD is not set
CONFIG_MTD_CFI=y
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_AMDSTD is not set
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_CFI_I4 is not set
@@ -148,17 +179,17 @@
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_ONENAND is not set
CONFIG_MTD_PARTITIONS=y
-# CONFIG_MTD_PCI is not set
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_PLATRAM is not set
-# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_SLRAM is not set
-# CONFIG_NATSEMI is not set
-# CONFIG_NF_DEFRAG_IPV4 is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_NETWORK_FILESYSTEMS is not set
+# CONFIG_NET_SCHED is not set
# CONFIG_NO_IOPORT is not set
# CONFIG_NXP_STB220 is not set
# CONFIG_NXP_STB225 is not set
@@ -167,22 +198,15 @@
CONFIG_PAGE_SIZE_4KB=y
# CONFIG_PAGE_SIZE_64KB is not set
# CONFIG_PAGE_SIZE_8KB is not set
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
+# CONFIG_PARTITION_ADVANCED is not set
# CONFIG_PCSPKR_PLATFORM is not set
-CONFIG_PHYLIB=y
# CONFIG_PHYS_ADDR_T_64BIT is not set
# CONFIG_PMC_MSP is not set
# CONFIG_PMC_YOSEMITE is not set
# CONFIG_PNX8550_JBS is not set
# CONFIG_PNX8550_STB810 is not set
-# CONFIG_PROBE_INITRD_HEADER is not set
# CONFIG_PROC_KCORE is not set
# CONFIG_PROM_EMU is not set
-# CONFIG_R6040 is not set
-CONFIG_RFKILL=y
-CONFIG_RFKILL_INPUT=y
-CONFIG_RFKILL_LEDS=y
CONFIG_RTC_LIB=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
@@ -190,12 +214,15 @@
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
CONFIG_SERIAL_8250_EXTENDED=y
# CONFIG_SERIAL_8250_MANY_PORTS is not set
+CONFIG_SERIAL_8250_NR_UARTS=1
# CONFIG_SERIAL_8250_RSA is not set
+CONFIG_SERIAL_8250_RUNTIME_UARTS=1
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SGI_IP22 is not set
# CONFIG_SGI_IP27 is not set
# CONFIG_SGI_IP28 is not set
# CONFIG_SGI_IP32 is not set
+# CONFIG_SHMEM is not set
# CONFIG_SIBYTE_BIGSUR is not set
# CONFIG_SIBYTE_CARMEL is not set
# CONFIG_SIBYTE_CRHINE is not set
@@ -204,32 +231,36 @@
# CONFIG_SIBYTE_RHONE is not set
# CONFIG_SIBYTE_SENTOSA is not set
# CONFIG_SIBYTE_SWARM is not set
+# CONFIG_SIGNALFD is not set
+# CONFIG_SLAB is not set
+CONFIG_SLOB=y
+CONFIG_SQUASHFS_EMBEDDED=y
+CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=1
CONFIG_SSB=y
-CONFIG_SSB_B43_PCI_BRIDGE=y
-CONFIG_SSB_DEBUG=y
CONFIG_SSB_DRIVER_EXTIF=y
-CONFIG_SSB_DRIVER_GIGE=y
CONFIG_SSB_DRIVER_MIPS=y
-CONFIG_SSB_DRIVER_PCICORE=y
-CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
CONFIG_SSB_EMBEDDED=y
-CONFIG_SSB_PCICORE_HOSTMODE=y
-CONFIG_SSB_PCIHOST=y
-CONFIG_SSB_PCIHOST_POSSIBLE=y
CONFIG_SSB_POSSIBLE=y
CONFIG_SSB_SERIAL=y
-CONFIG_SSB_SPROM=y
-CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_SSB_SILENT=y
+# CONFIG_SWAP is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_SYSCTL_SYSCALL is not set
+# CONFIG_SYSVIPC is not set
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
CONFIG_SYS_HAS_EARLY_PRINTK=y
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
-# CONFIG_TC35815 is not set
-CONFIG_TICK_ONESHOT=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+# CONFIG_TIMERFD is not set
+CONFIG_TINY_SHMEM=y
+# CONFIG_TMPFS is not set
CONFIG_TRAD_SIGNALS=y
-CONFIG_USB_SUPPORT=y
+# CONFIG_UNIX98_PTYS is not set
# CONFIG_VGASTATE is not set
-# CONFIG_VIA_RHINE is not set
# CONFIG_WATCHDOG is not set
+# CONFIG_WIRELESS_EXT_SYSFS is not set
+# CONFIG_WIRELESS_OLD_REGULATORY is not set
CONFIG_ZONE_DMA_FLAG=0
Index: package/kernel/modules/crypto.mk
===================================================================
--- package/kernel/modules/crypto.mk (revision 15160)
+++ package/kernel/modules/crypto.mk (working copy)
@@ -40,7 +40,7 @@
ECB=ecb \
DEFLATE=deflate
-crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
+crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))=y
crypto_file=$(if $(findstring y,$($(call
crypto_confvar,$(1)))),,$(LINUX_DIR)/crypto/$(word 2,$(subst
=,$(space),$(1))).$(LINUX_KMOD_SUFFIX))
crypto_name=$(if $(findstring y,$($(call crypto_confvar,$(1)))),,$(word
2,$(subst =,$(space),$(1))))
@@ -50,8 +50,8 @@
SUBMENU:=$(CRYPTO_MENU)
TITLE:=Core CryptoAPI modules
KCONFIG:=CONFIG_CRYPTO=y CONFIG_CRYPTO_HMAC $(foreach
mod,$(CRYPTO_MODULES),$(call crypto_confvar,$(mod)))
- FILES:=$(foreach mod,$(CRYPTO_MODULES),$(call crypto_file,$(mod)))
- AUTOLOAD:=$(call AutoLoad,01,$(foreach mod,$(CRYPTO_MODULES),$(call
crypto_name,$(mod))))
+# FILES:=$(foreach mod,$(CRYPTO_MODULES),$(call crypto_file,$(mod)))
+# AUTOLOAD:=$(call AutoLoad,01,$(foreach mod,$(CRYPTO_MODULES),$(call
crypto_name,$(mod))))
endef
define KernelPackage/crypto-core/2.4
--
Greetings, Michael.
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel