-touch .config
-cp .config .config.test
@$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
- -./scripts/configtest.pl
config: $(CONFIG)/conf
-touch .config
-cp .config .config.test
@$(CONFIG)/conf $(CONFIG_CONFIG_IN)
- -./scripts/configtest.pl
oldconfig: $(CONFIG)/conf
-touch .config
-cp .config .config.test
@$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
- -./scripts/configtest.pl
randconfig: $(CONFIG)/conf
-touch .config
-cp .config .config.test
@$(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
- -./scripts/configtest.pl
allyesconfig: $(CONFIG)/conf
#@$(CONFIG)/conf -y $(CONFIG_CONFIG_IN)
-touch .config
-cp .config .config.test
@$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
- -./scripts/configtest.pl
allnoconfig: $(CONFIG)/conf
-touch .config
-cp .config .config.test
@$(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
- -./scripts/configtest.pl
defconfig: $(CONFIG)/conf
-touch .config
-cp .config .config.test
@$(CONFIG)/conf -d $(CONFIG_CONFIG_IN)
- -./scripts/configtest.pl
#############################################################
#
# CONFIG_HIGHMEM is not set
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
-CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 init=/etc/preinit noinitrd console=ttyS0,115200"
+CONFIG_CMDLINE="root=/dev/mtdblock2 init=/etc/preinit noinitrd console=ttyS0,115200"
CONFIG_PCI=y
CONFIG_NONCOHERENT_IO=y
CONFIG_NEW_TIME_C=y
$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
$(PATCH) $(LINUX_DIR) $(LINUX_PATCHES)
-ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS_LZMA),y)
- $(PATCH) $(LINUX_DIR) target/squashfs-lzma/kernel-patch
-endif
touch $(LINUX_DIR)/.patched
$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
-cp $(LINUX_KCONFIG) $(LINUX_DIR)/.config
-ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS_LZMA),y)
- $(SED) "s,rootfstype=jffs2,rootfstype=squashfs," $(LINUX_DIR)/.config
-endif
-ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS),y)
- $(SED) "s,rootfstype=jffs2,rootfstype=squashfs," $(LINUX_DIR)/.config
-endif
- $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/Makefile
- $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" $(LINUX_DIR)/arch/mips/Makefile
+ $(SED) "s,^CROSS_COMPILE.*,CROSS_COMPILE=$(KERNEL_CROSS),g;" \
+ $(LINUX_DIR)/Makefile \
+ $(LINUX_DIR)/arch/mips/Makefile
$(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
$(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_KARCH) oldconfig include/linux/version.h
touch $(LINUX_DIR)/.configured
}
break;
case 'a':
- n = atoi(optarg);
+ errno = 0;
+ n = strtoul(optarg, &e, 0);
+ if (errno || (e == optarg) || *e) {
+ fprintf(stderr, "illegal numeric string\n");
+ usage();
+ }
if (cur_len & (n-1)) {
n = n - (cur_len & (n-1));
memset(buf + cur_len, 0, n);
}
break;
case 'b':
- n = atoi(optarg);
+ errno = 0;
+ n = strtoul(optarg, &e, 0);
+ if (errno || (e == optarg) || *e) {
+ fprintf(stderr, "illegal numeric string\n");
+ usage();
+ }
if (n < cur_len) {
fprintf(stderr, "WARNING: current length exceeds -b %d offset\n",n);
} else {
+++ /dev/null
-#!/usr/bin/perl
-
-my %change = (
- 'ROOTFS' => 'make linux-dirclean'
-);
-
-foreach my $change (keys %change) {
- my $v1 = `grep '$change' .config.test`;
- my $v2 = `grep '$change' .config`;
- $v1 eq $v2 or system($change{$change});
-}
choice
prompt "Target Root Filesystem"
source "target/jffs2/Config.in"
- source "target/squashfs/Config.in"
source "target/squashfs-lzma/Config.in"
endchoice
include target/device/Makefile.in
ifeq ($(strip $(BR2_TARGET_ROOTFS_JFFS2)),y)
-JFFS2FLAGS+=-a 131072
+include target/jffs2/blocksize.mk
+JFFS2FLAGS+=-a $(JFFS2_BLOCK_SIZE)
endif
--- /dev/null
+JFFS2_BLOCK_SIZE:=0x20000
#
#############################################################
+include target/jffs2/blocksize.mk
+
MTD_DIR:=$(BUILD_DIR)/mtd-20050122.orig
MTD_SOURCE=mtd_20050122.orig.tar.gz
MTD_SITE=http://ftp.debian.org/debian/pool/main/m/mtd
-@find $(TARGET_DIR) -type f -perm +111 | xargs $(SSTRIP) 2>/dev/null || true;
@rm -rf $(TARGET_DIR)/usr/man
@rm -rf $(TARGET_DIR)/usr/info
- $(MKFS_JFFS2) --pad --little-endian --squash -e 0x20000 \
+ $(MKFS_JFFS2) --pad --little-endian --squash -e $(JFFS2_BLOCK_SIZE) \
-d $(TARGET_DIR) -o $(IMAGE).jffs2
jffs2root-source: $(DL_DIR)/$(MTD_SOURCE)
+++ /dev/null
-config BR2_TARGET_ROOTFS_SQUASHFS
- bool "squashfs"
- help
- Build a squashfs root filesystem
-
+++ /dev/null
-#############################################################
-#
-# squashfs target
-#
-#############################################################
-
-SQUASHFS_DIR=$(BUILD_DIR)/squashfs2.1-r2
-SQUASHFS_SOURCE=squashfs2.1-r2.tar.gz
-SQUASHFS_SITE=http://dl.sourceforge.net/sourceforge/squashfs
-
-$(DL_DIR)/$(SQUASHFS_SOURCE):
- $(WGET) -P $(DL_DIR) $(SQUASHFS_SITE)/$(SQUASHFS_SOURCE)
-
-$(SQUASHFS_DIR)/.unpacked: $(DL_DIR)/$(SQUASHFS_SOURCE)
- zcat $(DL_DIR)/$(SQUASHFS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
- touch $(SQUASHFS_DIR)/.unpacked
-
-$(SQUASHFS_DIR)/squashfs-tools/mksquashfs: $(SQUASHFS_DIR)/.unpacked
- $(MAKE) -C $(SQUASHFS_DIR)/squashfs-tools;
-
-squashfs: $(SQUASHFS_DIR)/squashfs-tools/mksquashfs
-
-squashfs-source: $(DL_DIR)/$(SQUASHFS_SOURCE)
-
-squashfs-clean:
- -$(MAKE) -C $(SQUASHFS_DIR)/squashfs-tools clean
-
-squashfs-dirclean:
- rm -rf $(SQUASHFS_DIR)
-
-
-#############################################################
-#
-# Build the squashfs root filesystem image
-#
-#############################################################
-
-squashfsroot: squashfs
- @rm -rf $(TARGET_DIR)/usr/man
- @rm -rf $(TARGET_DIR)/usr/info
- $(SQUASHFS_DIR)/squashfs-tools/mksquashfs $(TARGET_DIR) $(IMAGE).squashfs -noappend -root-owned -le
-
-squashfsroot-source: squashfs-source
-
-squashfsroot-clean:
- -$(MAKE) -C $(SQUASHFS_DIR) clean
-
-squashfsroot-dirclean:
- rm -rf $(SQUASHFS_DIR)
-
-ifeq ($(strip $(BR2_TARGET_ROOTFS_SQUASHFS)),y)
-TARGETS+=squashfsroot openwrt-image
-ROOTFS=squashfs
-endif