diff options
Diffstat (limited to 'target')
-rw-r--r-- | target/arm/Makefile | 5 | ||||
-rw-r--r-- | target/config/Config.in.runtime | 74 | ||||
-rw-r--r-- | target/cris/Makefile | 5 | ||||
-rw-r--r-- | target/linux/config/Config.in.block | 2 | ||||
-rw-r--r-- | target/linux/config/Config.in.fs | 1 | ||||
-rw-r--r-- | target/linux/config/Config.in.netdevice | 1 | ||||
-rw-r--r-- | target/linux/patches/2.6.36/brcm.patch | 87 | ||||
-rw-r--r-- | target/mipsel/Makefile | 29 | ||||
-rw-r--r-- | target/tools/squashfs/Makefile | 4 | ||||
-rw-r--r-- | target/tools/squashfs/patches/honour-cflags.patch | 11 | ||||
-rw-r--r-- | target/tools/squashfs/patches/squashfs-bsd.patch | 173 |
11 files changed, 331 insertions, 61 deletions
diff --git a/target/arm/Makefile b/target/arm/Makefile index c2885e917..141d2c279 100644 --- a/target/arm/Makefile +++ b/target/arm/Makefile @@ -10,10 +10,7 @@ include $(TOPDIR)/mk/image.mk KERNEL:=$(LINUX_DIR)/kernel-adk LOADADDR:=0x20008000 -$(TOOLS_BUILD_DIR): - @mkdir -p $(TOOLS_BUILD_DIR) - -tools-compile: $(TOOLS_BUILD_DIR) +tools-compile: $(MAKE) -C ../tools/uboot-mkimage kernel-install: tools-compile diff --git a/target/config/Config.in.runtime b/target/config/Config.in.runtime index aa9cfda6d..03fb04c29 100644 --- a/target/config/Config.in.runtime +++ b/target/config/Config.in.runtime @@ -66,3 +66,77 @@ config ADK_RUNTIME_KBD_LAYOUT depends on ADK_TARGET_WITH_INPUT help Predefine the keyboard layout for the embedded system. + +choice +prompt "Initial login shell for the root user" +default ADK_ROOTSH_ASH + +config ADK_ROOTSH_ASH + select BUSYBOX_ASH + bool "ash (busybox)" + help + Use the minimalistic ash variant that is part of busybox + as standard login shell for the superuser. This is the + default, but discouraged due to its frugality. + +config ADK_ROOTSH_BASH + select ADK_PACKAGE_BASH + bool "bash (GNU Bourne-Again Shell)" + help + Use GNU bash as standard login shell for the superuser. + +config ADK_ROOTSH_MKSH + select ADK_PACKAGE_MKSH + bool "mksh (MirBSD Korn Shell)" + help + Use mksh (a Korn Shell variant) as standard login shell + for the superuser. + +config ADK_ROOTSH_TCSH + select ADK_PACKAGE_TCSH + bool "tcsh (Tenex C Shell)" + help + Use tcsh (a C Shell variant) as standard login shell + for the superuser. + +config ADK_ROOTSH_ZSH + select ADK_PACKAGE_ZSH + bool "zsh (The Z Shell)" + help + Use zsh as standard login shell for the superuser. + +endchoice + +choice +prompt "System /bin/sh (POSIX script shell)" +default ADK_BINSH_ASH + +config ADK_BINSH_ASH + select BUSYBOX_ASH + bool "ash (busybox)" + help + Use the minimalistic ash variant that is part of busybox + as system shell. This is the default and rather small and + fast, but lacks scripting features. + +config ADK_BINSH_BASH + select ADK_PACKAGE_BASH + bool "bash (GNU Bourne-Again Shell)" + help + Use GNU bash as system shell. This is discouraged due to + its size and slowness. + +config ADK_BINSH_MKSH + select ADK_PACKAGE_MKSH + bool "mksh (MirBSD Korn Shell)" + help + Use mksh (a Korn Shell variant) as system shell, which is + both small and powerful, so quite suited for this task. + +config ADK_BINSH_ZSH + select ADK_PACKAGE_ZSH + bool "zsh (The Z Shell)" + help + Use zsh as system shell. This is probably a bad idea. + +endchoice diff --git a/target/cris/Makefile b/target/cris/Makefile index 1e072f78e..0b4ba3a4d 100644 --- a/target/cris/Makefile +++ b/target/cris/Makefile @@ -9,10 +9,7 @@ include $(TOPDIR)/mk/image.mk KERNEL:=$(LINUX_DIR)/arch/cris/boot/zImage -$(TOOLS_BUILD_DIR): - @mkdir -p $(TOOLS_BUILD_DIR) - -tools-compile: $(TOOLS_BUILD_DIR) +tools-compile: $(MAKE) -C ../tools/mkfimage ifneq ($(ADK_HOST_DARWIN),y) $(MAKE) -C ../tools/e100boot prepare compile install diff --git a/target/linux/config/Config.in.block b/target/linux/config/Config.in.block index 25344228a..1019477c1 100644 --- a/target/linux/config/Config.in.block +++ b/target/linux/config/Config.in.block @@ -155,6 +155,8 @@ config ADK_KPACKAGE_KMOD_SATA_AHCI config ADK_KPACKAGE_KMOD_BLK_DEV_LOOP prompt "kmod-blk-dev-loop................. Loop mount support" tristate + select ADK_KERNEL_BLOCK + select ADK_KERNEL_BLK_DEV default n help Saying Y here will allow you to use a regular file as a block diff --git a/target/linux/config/Config.in.fs b/target/linux/config/Config.in.fs index 852d46c6a..6ce885677 100644 --- a/target/linux/config/Config.in.fs +++ b/target/linux/config/Config.in.fs @@ -40,6 +40,7 @@ config ADK_KPACKAGE_KMOD_EXPORTFS help config ADK_KERNEL_SQUASHFS + prompt ".................................. SquashFS filesystem" boolean select ADK_KERNEL_MISC_FILESYSTEMS default n diff --git a/target/linux/config/Config.in.netdevice b/target/linux/config/Config.in.netdevice index a8361651e..ef12cbe0c 100644 --- a/target/linux/config/Config.in.netdevice +++ b/target/linux/config/Config.in.netdevice @@ -319,6 +319,7 @@ config ADK_KPACKAGE_KMOD_B43 tristate select ADK_KPACKAGE_KMOD_FW_LOADER depends on ADK_TARGET_WITH_SSB || ADK_TARGET_WITH_MINIPCI + default y if ADK_TARGET_SYSTEM_LINKSYS_WRT54G default n help Driver for Broadcom B43xx wireless chips. diff --git a/target/linux/patches/2.6.36/brcm.patch b/target/linux/patches/2.6.36/brcm.patch index 44db7d0d5..10a9a4947 100644 --- a/target/linux/patches/2.6.36/brcm.patch +++ b/target/linux/patches/2.6.36/brcm.patch @@ -1,4 +1,3 @@ -diff -Nur linux-2.6.36.orig/arch/mips/bcm47xx/Makefile linux-2.6.36/arch/mips/bcm47xx/Makefile --- linux-2.6.36.orig/arch/mips/bcm47xx/Makefile 2010-10-20 22:30:22.000000000 +0200 +++ linux-2.6.36/arch/mips/bcm47xx/Makefile 2010-12-22 16:39:15.000000000 +0100 @@ -3,4 +3,4 @@ @@ -7,16 +6,16 @@ diff -Nur linux-2.6.36.orig/arch/mips/bcm47xx/Makefile linux-2.6.36/arch/mips/bc -obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o wgt634u.o +obj-y := gpio.o irq.o nvram.o prom.o serial.o setup.o time.o platform.o -diff -Nur linux-2.6.36.orig/arch/mips/bcm47xx/platform.c linux-2.6.36/arch/mips/bcm47xx/platform.c ---- linux-2.6.36.orig/arch/mips/bcm47xx/platform.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.36/arch/mips/bcm47xx/platform.c 2010-12-22 16:57:43.000000000 +0100 -@@ -0,0 +1,81 @@ +--- /dev/null Fri Jan 7 17:21:57 2011 ++++ linux-2.6.36/arch/mips/bcm47xx/platform.c Fri Jan 7 17:21:42 2011 +@@ -0,0 +1,147 @@ +/* + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * -+ * Copyright (C) 2010 Waldemar Brodkorb <wbx@openadk.org> ++ * Copyright (C) 2010, 2011 Waldemar Brodkorb <wbx@openadk.org> ++ * Copyright © 2007, 2011 Thorsten Glaser <tg@freewrt.org> + */ + +#include <linux/platform_device.h> @@ -28,19 +27,35 @@ diff -Nur linux-2.6.36.orig/arch/mips/bcm47xx/platform.c linux-2.6.36/arch/mips/ +#include <asm/mach-bcm47xx/nvram.h> + +#define NVRAM_FLASH_SIZE 0x10000 ++#define CFGFS_FLASH_SIZE (64 * 1024) + +static struct mtd_partition bcm47xx_partitions[] = { ++#define SLOT_CFE 0 + { + .name = "cfe", + .offset = 0, + .size = 0x40000, /* 256k */ + .mask_flags = MTD_WRITEABLE /* force read-only */ + }, ++#define SLOT_LINUX 1 + { + .name = "linux", + .offset = 0, + .size = 0, + }, ++#define SLOT_ROOTFS 2 ++ { ++ .name = "rootfs", ++ .offset = 0, ++ .size = 0, ++ }, ++#define SLOT_CFGFS 3 ++ { ++ .name = "cfgfs", ++ .offset = 0, ++ .size = 0, ++ }, ++#define SLOT_NVRAM 4 + { + .name = "nvram", + .offset = 0, @@ -69,18 +84,67 @@ diff -Nur linux-2.6.36.orig/arch/mips/bcm47xx/platform.c linux-2.6.36/arch/mips/ + &bcm47xx_flash, +}; + ++struct bcm47xx_trx_header { ++#define BCM47XX_TRX_MAGIC 0x30524448 ++ u32 magic; ++ u32 len; ++ u32 crc32; ++ u32 flag_version; ++ u32 offsets[3]; ++}; ++ ++#define UPTODOWN(slot, psize) do { \ ++ posn -= psize; left -= psize; \ ++ bcm47xx_partitions[slot].offset = posn; \ ++ bcm47xx_partitions[slot].size = psize; \ ++} while (/* CONSTCOND */ 0) ++ +static int __init bcm47xx_register_devices(void) +{ + u32 flash_size; ++ size_t left, posn; + struct ssb_mipscore *mcore = &ssb_bcm47xx.mipscore; ++ struct bcm47xx_trx_header *trx_hdr; ++ ++ trx_hdr = (void *)KSEG1ADDR(mcore->flash_window + 0x40000); + + /* devices might have 2, 4 or 8 MB flash size */ ++#ifdef BCM47XX_OVERRIDE_FLASHSIZE ++ flash_size = BCM47XX_OVERRIDE_FLASHSIZE; ++ mcore->flash_window_size = flash_size; ++#define BCM47XX_OVERRODE_FLASHSIZE " (overridden)" ++#else + flash_size = mcore->flash_window_size; -+ printk(KERN_INFO "FLASH SIZE: %x\n", flash_size); -+ bcm47xx_partitions[1].offset = 0x40000; -+ bcm47xx_partitions[1].size = flash_size - NVRAM_FLASH_SIZE - 0x40000; -+ bcm47xx_partitions[2].offset = flash_size - NVRAM_FLASH_SIZE; -+ bcm47xx_partitions[2].size = NVRAM_FLASH_SIZE; ++#define BCM47XX_OVERRODE_FLASHSIZE "" ++#endif ++ printk(KERN_INFO "FLASH SIZE%s: %x\n", BCM47XX_OVERRODE_FLASHSIZE, ++ flash_size); ++ ++ left = flash_size - 0x40000; ++ posn = flash_size; ++ UPTODOWN(SLOT_NVRAM, NVRAM_FLASH_SIZE); ++ UPTODOWN(SLOT_CFGFS, CFGFS_FLASH_SIZE); ++ bcm47xx_partitions[SLOT_LINUX].offset = 0x40000; ++ bcm47xx_partitions[SLOT_LINUX].size = left; ++ ++ if (trx_hdr->magic == BCM47XX_TRX_MAGIC) { ++ bcm47xx_partitions[SLOT_ROOTFS].offset = ++ bcm47xx_partitions[SLOT_LINUX].offset + ++ trx_hdr->offsets[1]; ++ bcm47xx_partitions[SLOT_ROOTFS].size = ++ bcm47xx_partitions[SLOT_LINUX].size - ++ trx_hdr->offsets[1]; ++ } else ++ printk("bcm47xx/platform: no TRX header found\n"); ++ ++ printk(KERN_INFO "=== Flash map dump ===\n"); ++ for (posn = 0; posn < bcm47xx_flash_data.nr_parts; ++posn) ++ printk(KERN_INFO " #%u %08X @%08X '%s'\n", ++ (unsigned int)posn, ++ (unsigned int)bcm47xx_partitions[posn].size, ++ (unsigned int)bcm47xx_partitions[posn].offset, ++ bcm47xx_partitions[posn].name); ++ printk(KERN_INFO "=== Hope this works, have a nice day\n"); + + bcm47xx_flash_data.width = mcore->flash_buswidth; + bcm47xx_flash_resource.start = mcore->flash_window; @@ -92,7 +156,6 @@ diff -Nur linux-2.6.36.orig/arch/mips/bcm47xx/platform.c linux-2.6.36/arch/mips/ +} + +device_initcall(bcm47xx_register_devices); -diff -Nur linux-2.6.36.orig/drivers/ssb/driver_mipscore.c linux-2.6.36/drivers/ssb/driver_mipscore.c --- linux-2.6.36.orig/drivers/ssb/driver_mipscore.c 2010-10-20 22:30:22.000000000 +0200 +++ linux-2.6.36/drivers/ssb/driver_mipscore.c 2010-12-22 16:38:53.000000000 +0100 @@ -193,7 +193,7 @@ diff --git a/target/mipsel/Makefile b/target/mipsel/Makefile index d0aa6e5c9..b04bc9011 100644 --- a/target/mipsel/Makefile +++ b/target/mipsel/Makefile @@ -5,15 +5,17 @@ include $(TOPDIR)/rules.mk include $(TOPDIR)/mk/kernel.mk include $(TOPDIR)/mk/modules.mk include $(TOPDIR)/mk/kernel-build.mk + +ifeq (${ADK_TARGET_SYSTEM_LINKSYS_WRT54G},y) +CUSTOM_ROOTFSSQUASHFS_BUILD=1 +endif + include $(TOPDIR)/mk/image.mk KERNEL:=$(LINUX_DIR)/vmlinux OSTRIP:=-R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id -$(TOOLS_BUILD_DIR): - @mkdir -p $(TOOLS_BUILD_DIR) - -tools-compile: $(TOOLS_BUILD_DIR) +tools-compile: $(MAKE) -C ../tools/trx $(MAKE) -C ../tools/addpattern $(MAKE) -C ../tools/srec2bin @@ -21,9 +23,18 @@ tools-compile: $(TOOLS_BUILD_DIR) ifeq ($(ADK_TARGET_SYSTEM_LINKSYS_WRT54G),y) kernel-install: tools-compile - $(TARGET_CROSS)objcopy $(OSTRIP) -S $(LINUX_DIR)/vmlinux \ - $(LINUX_DIR)/vmlinux.stripped - @gzip -c9 $(LINUX_DIR)/vmlinux.stripped > $(BUILD_DIR)/$(TARGET_KERNEL) + ${TARGET_CROSS}objcopy ${OSTRIP} -S ${LINUX_DIR}/vmlinub.elf \ + ${BUILD_DIR}/${TARGET_KERNEL} + +${BUILD_DIR}/${ROOTFSSQUASHFS}: ${BUILD_DIR}/root.squashfs + ${TARGET_CROSS}objcopy -O binary ${BUILD_DIR}/${TARGET_KERNEL} \ + ${BUILD_DIR}/${TARGET_KERNEL}.bin + gzip -n9 <${BUILD_DIR}/${TARGET_KERNEL}.bin \ + >${BUILD_DIR}/${TARGET_KERNEL}.bin.gz + printf '\0' >>${BUILD_DIR}/${TARGET_KERNEL}.bin.gz + PATH='${TARGET_PATH}' trx -o $@~ ${BUILD_DIR}/${TARGET_KERNEL}.bin.gz \ + -a 1024 ${BUILD_DIR}/root.squashfs + PATH='${TARGET_PATH}' addpattern -4 -p W54G -v v4.20.6 -g -i $@~ -o $@ endif ifeq ($(ADK_TARGET_SYSTEM_LINKSYS_AG241),y) @@ -49,7 +60,7 @@ imageinstall: kernel-install $(BIN_DIR)/$(ROOTFSUSERTARBALL) @echo "If you just want to update, use adkupdate." endif ifeq ($(ADK_TARGET_FS),squashfs) -imageinstall: kernel-install $(BIN_DIR)/$(ROOTFSSQUASHFS) +imageinstall: kernel-install ${BUILD_DIR}/${ROOTFSSQUASHFS} @if [ $$(stat -f %z ${BUILD_DIR}/${ROOTFSSQUASHFS}) -gt 3801088 ];then \ echo 'Image is too big!'; \ else \ @@ -74,7 +85,7 @@ ifeq ($(ADK_TARGET_SYSTEM_LINKSYS_AG241),y) endif ifeq ($(ADK_TARGET_SYSTEM_LINKSYS_WRT54G),y) @echo 'Type following on the CFE prompt to boot the kernel:' - @echo 'CFE> boot -z -elf -tftp 192.168.1.254:$(BIN_DIR)/${TARGET_KERNEL}' + @echo 'CFE> boot -elf -tftp 192.168.1.254:$(BIN_DIR)/${TARGET_KERNEL}' endif endif ifeq ($(ADK_TARGET_FS),archive) diff --git a/target/tools/squashfs/Makefile b/target/tools/squashfs/Makefile index 3f22d8a56..cfe4a5339 100644 --- a/target/tools/squashfs/Makefile +++ b/target/tools/squashfs/Makefile @@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:= squashfs PKG_VERSION:= 4.0 -PKG_RELEASE:= 1 +PKG_RELEASE:= 2 PKG_MD5SUM:= a3c23391da4ebab0ac4a75021ddabf96 PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=squashfs/} DISTFILES:= ${PKG_NAME}${PKG_VERSION}.tar.gz @@ -14,7 +14,7 @@ WRKDIST= ${WRKDIR}/$(PKG_NAME)${PKG_VERSION} include ../rules.mk $(WRKBUILD)/.compiled: ${WRKDIST}/.prepared - $(MAKE) -C $(WRKBUILD)/squashfs-tools + ${MAKE} -C ${WRKBUILD}/squashfs-tools CC='${HOSTCC}' touch $@ ${STAGING_HOST_DIR}/bin/mksquashfs: $(WRKBUILD)/.compiled diff --git a/target/tools/squashfs/patches/honour-cflags.patch b/target/tools/squashfs/patches/honour-cflags.patch new file mode 100644 index 000000000..2ee7de909 --- /dev/null +++ b/target/tools/squashfs/patches/honour-cflags.patch @@ -0,0 +1,11 @@ +--- squashfs4.0/squashfs-tools/Makefile~ Sun Apr 5 02:03:12 2009 ++++ squashfs4.0/squashfs-tools/Makefile Fri Jan 7 16:16:46 2011 +@@ -2,7 +2,7 @@ INSTALL_DIR = /usr/local/bin + + INCLUDEDIR = . + +-CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 ++CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2 ${HOSTCFLAGS} + + all: mksquashfs unsquashfs + diff --git a/target/tools/squashfs/patches/squashfs-bsd.patch b/target/tools/squashfs/patches/squashfs-bsd.patch index 6e23ed8d6..578b9017f 100644 --- a/target/tools/squashfs/patches/squashfs-bsd.patch +++ b/target/tools/squashfs/patches/squashfs-bsd.patch @@ -1,26 +1,14 @@ -diff -Nur squashfs4.0.orig/squashfs-tools/mksquashfs.c squashfs4.0/squashfs-tools/mksquashfs.c ---- squashfs4.0.orig/squashfs-tools/mksquashfs.c Sun Apr 5 23:22:48 2009 -+++ squashfs4.0/squashfs-tools/mksquashfs.c Tue Dec 29 18:23:15 2009 -@@ -48,16 +48,9 @@ - #include <regex.h> - #include <fnmatch.h> +--- squashfs4.0~/squashfs-tools/mksquashfs.c Sun Apr 5 21:22:24 2009 ++++ squashfs4.0/squashfs-tools/mksquashfs.c Fri Jan 7 20:36:08 2011 +@@ -24,6 +24,7 @@ + #define FALSE 0 + #define TRUE 1 --#ifndef linux --#define __BYTE_ORDER BYTE_ORDER --#define __BIG_ENDIAN BIG_ENDIAN --#define __LITTLE_ENDIAN LITTLE_ENDIAN --#include <sys/sysctl.h> --#else --#include <endian.h> --#include <sys/sysinfo.h> --#endif +#include <sys/param.h> - -+ - #include "squashfs_fs.h" - #include "squashfs_swap.h" - #include "mksquashfs.h" -@@ -3688,23 +3681,9 @@ + #include <pwd.h> + #include <grp.h> + #include <time.h> +@@ -3688,23 +3689,9 @@ void initialise_threads() signal(SIGUSR1, sigusr1_handler); if(processors == -1) { @@ -46,7 +34,7 @@ diff -Nur squashfs4.0.orig/squashfs-tools/mksquashfs.c squashfs4.0/squashfs-tool processors = get_nprocs(); #endif } -@@ -3974,9 +3953,15 @@ +@@ -3974,9 +3961,15 @@ int excluded(struct pathnames *paths, ch int match = use_regex ? regexec(path->name[i].preg, name, (size_t) 0, NULL, 0) == 0 : @@ -62,9 +50,36 @@ diff -Nur squashfs4.0.orig/squashfs-tools/mksquashfs.c squashfs4.0/squashfs-tool if(match && path->name[i].paths == NULL) { /* match on a leaf component, any subdirectories -diff -Nur squashfs4.0.orig/squashfs-tools/pseudo.c squashfs4.0/squashfs-tools/pseudo.c ---- squashfs4.0.orig/squashfs-tools/pseudo.c Sun Apr 5 04:01:58 2009 -+++ squashfs4.0/squashfs-tools/pseudo.c Tue Dec 29 18:07:33 2009 +--- squashfs4.0~/squashfs-tools/mksquashfs.h Thu Feb 19 18:30:44 2009 ++++ squashfs4.0/squashfs-tools/mksquashfs.h Fri Jan 7 20:40:01 2011 +@@ -24,7 +24,9 @@ + * + */ + +-#if __BYTE_ORDER == __BIG_ENDIAN ++#ifndef __BYTE_ORDER ++#error Which endianness? __BYTE_ORDER is not defined. ++#elif __BYTE_ORDER == __BIG_ENDIAN + #define SQUASHFS_SWAP_SHORTS(s, d, n) swap_le16_num(s, d, n) + #define SQUASHFS_SWAP_INTS(s, d, n) swap_le32_num(s, d, n) + #define SQUASHFS_SWAP_LONG_LONGS(s, d, n) swap_le64_num(s, d, n) +@@ -34,11 +36,13 @@ + #define SWAP_LE64(s, d, field) swap_le64(&((s)->field), &((d)->field)) + #define SWAP_LES16(s, d, field) swap_le16((unsigned short *) &((s)->field), \ + (unsigned short *) &((d)->field)) +-#else ++#elif __BYTE_ORDER == __LITTLE_ENDIAN + #define SQUASHFS_MEMCPY(s, d, n) memcpy(d, s, n) + #define SQUASHFS_SWAP_SHORTS(s, d, n) memcpy(d, s, n * sizeof(short)) + #define SQUASHFS_SWAP_INTS(s, d, n) memcpy(d, s, n * sizeof(int)) + #define SQUASHFS_SWAP_LONG_LONGS(s, d, n) \ + memcpy(d, s, n * sizeof(long long)) ++#else ++#error Which endianness (PDP endian? Worse?) + #endif + #endif +--- squashfs4.0~/squashfs-tools/pseudo.c Sun Apr 5 02:01:34 2009 ++++ squashfs4.0/squashfs-tools/pseudo.c Fri Jan 7 20:35:31 2011 @@ -30,6 +30,11 @@ #include <string.h> #include <stdlib.h> @@ -77,9 +92,107 @@ diff -Nur squashfs4.0.orig/squashfs-tools/pseudo.c squashfs4.0/squashfs-tools/ps #include "pseudo.h" -diff -Nur squashfs4.0.orig/squashfs-tools/unsquashfs.c squashfs4.0/squashfs-tools/unsquashfs.c ---- squashfs4.0.orig/squashfs-tools/unsquashfs.c Sun Apr 5 23:23:06 2009 -+++ squashfs4.0/squashfs-tools/unsquashfs.c Tue Dec 29 18:25:56 2009 +--- squashfs4.0~/squashfs-tools/read_fs.h Thu Feb 19 18:28:56 2009 ++++ squashfs4.0/squashfs-tools/read_fs.h Fri Jan 7 20:40:00 2011 +@@ -24,7 +24,9 @@ + * + */ + +-#if __BYTE_ORDER == __BIG_ENDIAN ++#ifndef __BYTE_ORDER ++#error Which endianness? __BYTE_ORDER is not defined. ++#elif __BYTE_ORDER == __BIG_ENDIAN + #define SQUASHFS_SWAP_SHORTS(d, s, n) swap_le16_num(s, d, n) + #define SQUASHFS_SWAP_INTS(d, s, n) swap_le32_num(s, d, n) + #define SQUASHFS_SWAP_LONG_LONGS(d, s, n) swap_le64_num(s, d, n) +@@ -34,11 +36,13 @@ + #define SWAP_LE64(d, s, field) swap_le64(&((s)->field), &((d)->field)) + #define SWAP_LES16(d, s, field) swap_le16((unsigned short *) &((s)->field), \ + (unsigned short *) &((d)->field)) +-#else ++#elif __BYTE_ORDER == __LITTLE_ENDIAN + #define SQUASHFS_MEMCPY(d, s, n) memcpy(d, s, n) + #define SQUASHFS_SWAP_SHORTS(d, s, n) memcpy(d, s, n * sizeof(short)) + #define SQUASHFS_SWAP_INTS(d, s, n) memcpy(d, s, n * sizeof(int)) + #define SQUASHFS_SWAP_LONG_LONGS(d, s, n) \ + memcpy(d, s, n * sizeof(long long)) ++#else ++#error Which endianness (PDP endian? Worse?) + #endif + #endif +--- squashfs4.0~/squashfs-tools/squashfs_compat.h Mon Mar 16 04:27:03 2009 ++++ squashfs4.0/squashfs-tools/squashfs_compat.h Fri Jan 7 20:39:59 2011 +@@ -768,12 +768,16 @@ typedef union squashfs_inode_header_2 sq + * macros used to swap each structure entry, taking into account + * bitfields and different bitfield placing conventions on differing architectures + */ +-#if __BYTE_ORDER == __BIG_ENDIAN ++#ifndef __BYTE_ORDER ++#error Which endianness? __BYTE_ORDER is not defined. ++#elif __BYTE_ORDER == __BIG_ENDIAN + /* convert from big endian to little endian */ + #define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, tbits, b_pos) +-#else ++#elif __BYTE_ORDER == __LITTLE_ENDIAN + /* convert from little endian to big endian */ + #define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, tbits, 64 - tbits - b_pos) ++#else ++#error Which endianness (PDP endian? Worse?) + #endif + + #define _SQUASHFS_SWAP(value, p, pos, tbits, SHIFT) {\ +--- squashfs4.0~/squashfs-tools/squashfs_swap.h Fri Feb 20 19:41:56 2009 ++++ squashfs4.0/squashfs-tools/squashfs_swap.h Fri Jan 7 20:39:59 2011 +@@ -27,7 +27,9 @@ + * macros to convert each stucture from big endian to little endian + */ + +-#if __BYTE_ORDER == __BIG_ENDIAN ++#ifndef __BYTE_ORDER ++#error Which endianness? __BYTE_ORDER is not defined. ++#elif __BYTE_ORDER == __BIG_ENDIAN + extern void swap_le16(unsigned short *, unsigned short *); + extern void swap_le32(unsigned int *, unsigned int *); + extern void swap_le64(long long *, long long *); +@@ -256,7 +258,7 @@ extern void inswap_le64_num(long long *, + #define SQUASHFS_INSWAP_SHORTS(s, n) inswap_le16_num(s, n) + #define SQUASHFS_INSWAP_INTS(s, n) inswap_le32_num(s, n) + #define SQUASHFS_INSWAP_LONG_LONGS(s, n) inswap_le64_num(s, n) +-#else ++#elif __BYTE_ORDER == __LITTLE_ENDIAN + #define SQUASHFS_SWAP_SUPER_BLOCK(s, d) \ + SQUASHFS_MEMCPY(s, d, sizeof(*(s))) + #define SQUASHFS_SWAP_DIR_INDEX(s, d) \ +@@ -308,5 +310,7 @@ extern void inswap_le64_num(long long *, + #define SQUASHFS_INSWAP_SHORTS(s, n) + #define SQUASHFS_INSWAP_INTS(s, n) + #define SQUASHFS_INSWAP_LONG_LONGS(s, n) ++#else ++#error Which endianness (PDP endian? Worse?) + #endif + #endif +--- squashfs4.0~/squashfs-tools/swap.c Thu Mar 26 04:39:52 2009 ++++ squashfs4.0/squashfs-tools/swap.c Fri Jan 7 20:40:00 2011 +@@ -27,7 +27,9 @@ + #include <endian.h> + #endif + +-#if __BYTE_ORDER == __BIG_ENDIAN ++#ifndef __BYTE_ORDER ++#error Which endianness? __BYTE_ORDER is not defined. ++#elif __BYTE_ORDER == __BIG_ENDIAN + void swap_le16(unsigned short *src, unsigned short *dest) + { + unsigned char *s = (unsigned char *) src; +@@ -120,4 +122,6 @@ void inswap_le##BITS##_num(TYPE *s, int + INSWAP_LE_NUM(16, unsigned short) + INSWAP_LE_NUM(32, unsigned int) + INSWAP_LE_NUM(64, long long) ++#elif __BYTE_ORDER != __LITTLE_ENDIAN ++#error Which endianness (PDP endian? Worse?) + #endif +--- squashfs4.0~/squashfs-tools/unsquashfs.c Sun Apr 5 21:22:42 2009 ++++ squashfs4.0/squashfs-tools/unsquashfs.c Fri Jan 7 20:35:31 2011 @@ -21,6 +21,8 @@ * unsquashfs.c */ @@ -89,7 +202,7 @@ diff -Nur squashfs4.0.orig/squashfs-tools/unsquashfs.c squashfs4.0/squashfs-tool #include "unsquashfs.h" #include "squashfs_swap.h" #include "squashfs_compat.h" -@@ -1193,10 +1195,17 @@ +@@ -1193,10 +1195,17 @@ int matches(struct pathnames *paths, cha struct pathname *path = paths->path[n]; for(i = 0; i < path->names; i++) { int match = use_regex ? @@ -107,7 +220,7 @@ diff -Nur squashfs4.0.orig/squashfs-tools/unsquashfs.c squashfs4.0/squashfs-tool if(match && path->name[i].paths == NULL) /* * match on a leaf component, any subdirectories -@@ -1795,21 +1804,7 @@ +@@ -1795,21 +1804,7 @@ void initialise_threads(int fragment_buf if(processors == -1) { #ifndef linux |