summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--MAINTAINERS6
-rwxr-xr-xMAKEALL63
-rw-r--r--Makefile10
-rw-r--r--README5
-rw-r--r--board/iomega/iconnect/iconnect.c2
-rw-r--r--board/iomega/iconnect/iconnect.h2
-rw-r--r--board/iomega/iconnect/kwbimage.cfg2
-rw-r--r--board/raidsonic/ib62x0/ib62x0.c2
-rw-r--r--board/raidsonic/ib62x0/ib62x0.h2
-rw-r--r--board/raidsonic/ib62x0/kwbimage.cfg2
-rw-r--r--common/cmd_led.c6
-rw-r--r--disk/part.c2
-rw-r--r--doc/DocBook/Makefile2
-rw-r--r--doc/kwboot.12
-rw-r--r--drivers/serial/serial_pl01x.c4
-rw-r--r--fs/cbfs/Makefile4
-rw-r--r--fs/cbfs/cbfs.c3
-rw-r--r--fs/ext4/dev.c1
-rw-r--r--fs/ext4/ext4_common.c14
-rw-r--r--fs/ext4/ext4_journal.c3
-rw-r--r--fs/ext4/ext4fs.c13
-rw-r--r--include/cbfs.h72
-rw-r--r--include/configs/ib62x0.h2
-rw-r--r--include/configs/iconnect.h2
-rw-r--r--lib/lzma/LzmaDec.c14
-rw-r--r--lib/lzma/LzmaDec.h6
-rw-r--r--lib/lzma/Types.h36
-rw-r--r--lib/lzma/history.txt35
-rw-r--r--lib/lzma/lzma.txt34
30 files changed, 233 insertions, 120 deletions
diff --git a/.gitignore b/.gitignore
index 1ac43f2..a163728 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,12 +38,12 @@
/u-boot.sha1
/u-boot.dis
/u-boot.lds
-/u-boot.lst
/u-boot.ubl
/u-boot.ais
/u-boot.dtb
/u-boot.sb
/u-boot.geany
+/include/u-boot.lst
#
# Generated files
diff --git a/MAINTAINERS b/MAINTAINERS
index 428b006..b24ba19 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7,6 +7,10 @@
# and Cc: the <u-boot@lists.denx.de> mailing list. #
# #
# Note: lists sorted by Maintainer Name #
+# Note: These are the maintainers for specific *boards*. The #
+# custodians for general architectures and subsystems can #
+# be found here -- http://www.denx.de/wiki/U-Boot/Custodians #
+# #
#########################################################################
@@ -801,7 +805,7 @@ Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
apx4devkit i.MX28
-Luka Perkov <uboot@lukaperkov.net>
+Luka Perkov <luka@openwrt.org>
ib62x0 ARM926EJS
iconnect ARM926EJS
diff --git a/MAKEALL b/MAKEALL
index 46c0212..5b06c54 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -20,6 +20,8 @@ usage()
-m, --maintainers List all targets and maintainer email
-M, --mails List all targets and all affilated emails
-C, --check Enable build checking
+ -n, --continue Continue (skip boards already built)
+ -r, --rebuild-errors Rebuild any boards that errored
-h, --help This help output
Selections by these options are logically ANDed; if the same option
@@ -52,8 +54,8 @@ usage()
exit ${ret}
}
-SHORT_OPTS="ha:c:v:s:lmMC"
-LONG_OPTS="help,arch:,cpu:,vendor:,soc:,list,maintainers,mails,check"
+SHORT_OPTS="ha:c:v:s:lmMCnr"
+LONG_OPTS="help,arch:,cpu:,vendor:,soc:,list,maintainers,mails,check,continue,rebuild-errors"
# Option processing based on util-linux-2.13/getopt-parse.bash
@@ -73,6 +75,8 @@ SELECTED=''
ONLY_LIST=''
PRINT_MAINTS=''
MAINTAINERS_ONLY=''
+CONTINUE=''
+REBUILD_ERRORS=''
while true ; do
case "$1" in
@@ -115,6 +119,12 @@ while true ; do
-C|--check)
CHECK='C=1'
shift ;;
+ -n|--continue)
+ CONTINUE='y'
+ shift ;;
+ -r|--rebuild-errors)
+ REBUILD_ERRORS='y'
+ shift ;;
-l|--list)
ONLY_LIST='y'
shift ;;
@@ -198,7 +208,9 @@ fi
OUTPUT_PREFIX="${BUILD_DIR}"
[ -d ${LOG_DIR} ] || mkdir "${LOG_DIR}" || exit 1
-find "${LOG_DIR}/" -type f -exec rm -f {} +
+if [ "$CONTINUE" != 'y' -a "$REBUILD_ERRORS" != 'y' ] ; then
+ find "${LOG_DIR}/" -type f -exec rm -f {} +
+fi
LIST=""
@@ -208,6 +220,7 @@ ERR_LIST=""
WRN_CNT=0
WRN_LIST=""
TOTAL_CNT=0
+SKIP_CNT=0
CURRENT_CNT=0
OLDEST_IDX=1
RC=0
@@ -616,6 +629,13 @@ list_target() {
donep="${LOG_DIR}/._done_"
skipp="${LOG_DIR}/._skip_"
+build_target_killed() {
+ echo "Aborted $target build."
+ # Remove the logs for this board since it was aborted
+ rm -f ${LOG_DIR}/$target.MAKELOG ${LOG_DIR}/$target.ERR
+ exit
+}
+
build_target() {
target=$1
build_idx=$2
@@ -628,6 +648,7 @@ build_target() {
if [ $BUILD_MANY == 1 ] ; then
output_dir="${OUTPUT_PREFIX}/${target}"
mkdir -p "${output_dir}"
+ trap build_target_killed TERM
else
output_dir="${OUTPUT_PREFIX}"
fi
@@ -646,6 +667,8 @@ build_target() {
fi
if [ $BUILD_MANY == 1 ] ; then
+ trap - TERM
+
${MAKE} -s tidy
if [ -s ${LOG_DIR}/${target}.ERR ] ; then
@@ -724,10 +747,20 @@ build_targets() {
: $((CURRENT_CNT += 1))
rm -f "${donep}${TOTAL_CNT}"
rm -f "${skipp}${TOTAL_CNT}"
- if [ $BUILD_MANY == 1 ] ; then
- build_target ${t} ${TOTAL_CNT} &
+ if [ "$CONTINUE" = 'y' -a -e ${LOG_DIR}/$t.MAKELOG ] ; then
+ : $((SKIP_CNT += 1))
+ touch "${donep}${TOTAL_CNT}"
+ elif [ "$REBUILD_ERRORS" = 'y' -a ! -e ${LOG_DIR}/$t.ERR ] ; then
+ : $((SKIP_CNT += 1))
+ touch "${donep}${TOTAL_CNT}"
else
- build_target ${t} ${TOTAL_CNT}
+ if [ $BUILD_MANY == 1 ] ; then
+ build_target ${t} ${TOTAL_CNT} &
+ else
+ CUR_TGT="${t}"
+ build_target ${t} ${TOTAL_CNT}
+ CUR_TGT=''
+ fi
fi
fi
@@ -751,7 +784,11 @@ build_targets() {
#-----------------------------------------------------------------------
kill_children() {
- kill -- "-$1"
+ local pgid=`ps -p $$ --no-headers -o "%r" | tr -d ' '`
+ local children=`pgrep -g $pgid | grep -v $$ | grep -v $pgid`
+
+ kill $children 2> /dev/null
+ wait $children 2> /dev/null
exit
}
@@ -759,6 +796,9 @@ kill_children() {
print_stats() {
if [ "$ONLY_LIST" == 'y' ] ; then return ; fi
+ # Only count boards that completed
+ : $((TOTAL_CNT = `find ${skipp}* 2> /dev/null | wc -l`))
+
rm -f ${donep}* ${skipp}*
if [ $BUILD_MANY == 1 ] && [ -e "${OUTPUT_PREFIX}/ERR" ] ; then
@@ -768,10 +808,17 @@ print_stats() {
WRN_LIST=`grep -riwL error ${OUTPUT_PREFIX}/ERR/`
WRN_LIST=`for f in $WRN_LIST ; do echo -n " $(basename $f)" ; done`
WRN_CNT=`echo $WRN_LIST | wc -w | awk '{print $1}'`
+ else
+ # Remove the logs for any board that was interrupted
+ rm -f ${LOG_DIR}/${CUR_TGT}.MAKELOG ${LOG_DIR}/${CUR_TGT}.ERR
fi
+ : $((TOTAL_CNT -= ${SKIP_CNT}))
echo ""
echo "--------------------- SUMMARY ----------------------------"
+ if [ "$CONTINUE" = 'y' -o "$REBUILD_ERRORS" = 'y' ] ; then
+ echo "Boards skipped: ${SKIP_CNT}"
+ fi
echo "Boards compiled: ${TOTAL_CNT}"
if [ ${ERR_CNT} -gt 0 ] ; then
echo "Boards with errors: ${ERR_CNT} (${ERR_LIST} )"
@@ -782,7 +829,7 @@ print_stats() {
echo "----------------------------------------------------------"
if [ $BUILD_MANY == 1 ] ; then
- kill_children $$ &
+ kill_children
fi
exit $RC
diff --git a/Makefile b/Makefile
index 2132ebf..de96861 100644
--- a/Makefile
+++ b/Makefile
@@ -390,12 +390,12 @@ __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD))
ifneq ($(CONFIG_BOARD_SIZE_LIMIT),)
BOARD_SIZE_CHECK = \
@actual=`wc -c $@ | awk '{print $$1}'`; \
- limit=$(CONFIG_BOARD_SIZE_LIMIT); \
+ limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \
if test $$actual -gt $$limit; then \
- echo "$@ exceeds file size limit:"; \
- echo " limit: $$limit bytes"; \
- echo " actual: $$actual bytes"; \
- echo " excess: $$((actual - limit)) bytes"; \
+ echo "$@ exceeds file size limit:" >&2 ; \
+ echo " limit: $$limit bytes" >&2 ; \
+ echo " actual: $$actual bytes" >&2 ; \
+ echo " excess: $$((actual - limit)) bytes" >&2; \
exit 1; \
fi
else
diff --git a/README b/README
index 0f5dfad..5a86ae9 100644
--- a/README
+++ b/README
@@ -54,6 +54,11 @@ In case of problems see the CHANGELOG and CREDITS files to find out
who contributed the specific port. The MAINTAINERS file lists board
maintainers.
+Note: There is no CHANGELOG file in the actual U-Boot source tree;
+it can be created dynamically from the Git log using:
+
+ make CHANGELOG
+
Where to get help:
==================
diff --git a/board/iomega/iconnect/iconnect.c b/board/iomega/iconnect/iconnect.c
index 6ee2128..8cfb4e6 100644
--- a/board/iomega/iconnect/iconnect.c
+++ b/board/iomega/iconnect/iconnect.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2009-2012
* Wojciech Dubowik <wojciech.dubowik@neratec.com>
- * Luka Perkov <uboot@lukaperkov.net>
+ * Luka Perkov <luka@openwrt.org>
*
* See file CREDITS for list of people who contributed to this
* project.
diff --git a/board/iomega/iconnect/iconnect.h b/board/iomega/iconnect/iconnect.h
index 2fb3e5e..8b6fe1b 100644
--- a/board/iomega/iconnect/iconnect.h
+++ b/board/iomega/iconnect/iconnect.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2009-2012
* Wojciech Dubowik <wojciech.dubowik@neratec.com>
- * Luka Perkov <uboot@lukaperkov.net>
+ * Luka Perkov <luka@openwrt.org>
*
* See file CREDITS for list of people who contributed to this
* project.
diff --git a/board/iomega/iconnect/kwbimage.cfg b/board/iomega/iconnect/kwbimage.cfg
index 6c9dfe3..4b64dab 100644
--- a/board/iomega/iconnect/kwbimage.cfg
+++ b/board/iomega/iconnect/kwbimage.cfg
@@ -1,7 +1,7 @@
#
# (C) Copyright 2009-2012
# Wojciech Dubowik <wojciech.dubowik@neratec.com>
-# Luka Perkov <uboot@lukaperkov.net>
+# Luka Perkov <luka@openwrt.org>
#
# See file CREDITS for list of people who contributed to this
# project.
diff --git a/board/raidsonic/ib62x0/ib62x0.c b/board/raidsonic/ib62x0/ib62x0.c
index b7e6e41..5f0f396 100644
--- a/board/raidsonic/ib62x0/ib62x0.c
+++ b/board/raidsonic/ib62x0/ib62x0.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2011-2012
* Gerald Kerma <dreagle@doukki.net>
- * Luka Perkov <uboot@lukaperkov.net>
+ * Luka Perkov <luka@openwrt.org>
* Simon Baatz <gmbnomis@gmail.com>
*
* See file CREDITS for list of people who contributed to this
diff --git a/board/raidsonic/ib62x0/ib62x0.h b/board/raidsonic/ib62x0/ib62x0.h
index 0118c2b..3315696 100644
--- a/board/raidsonic/ib62x0/ib62x0.h
+++ b/board/raidsonic/ib62x0/ib62x0.h
@@ -2,7 +2,7 @@
* Copyright (C) 2011-2012
* Gerald Kerma <dreagle@doukki.net>
* Simon Baatz <gmbnomis@gmail.com>
- * Luka Perkov <uboot@lukaperkov.net>
+ * Luka Perkov <luka@openwrt.org>
*
* See file CREDITS for list of people who contributed to this
* project.
diff --git a/board/raidsonic/ib62x0/kwbimage.cfg b/board/raidsonic/ib62x0/kwbimage.cfg
index bd594eb..bade627 100644
--- a/board/raidsonic/ib62x0/kwbimage.cfg
+++ b/board/raidsonic/ib62x0/kwbimage.cfg
@@ -2,7 +2,7 @@
# Copyright (C) 2011-2012
# Gerald Kerma <dreagle@doukki.net>
# Simon Baatz <gmbnomis@gmail.com>
-# Luka Perkov <uboot@lukaperkov.net>
+# Luka Perkov <luka@openwrt.org>
#
# See file CREDITS for list of people who contributed to this
# project.
diff --git a/common/cmd_led.c b/common/cmd_led.c
index d83b3ba..7f5ab43 100644
--- a/common/cmd_led.c
+++ b/common/cmd_led.c
@@ -140,7 +140,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
U_BOOT_CMD(
led, 3, 1, do_led,
- "led\t- ["
+ "["
#ifdef CONFIG_BOARD_SPECIFIC_LED
#ifdef STATUS_LED_BIT
"0|"
@@ -167,6 +167,6 @@ U_BOOT_CMD(
#ifdef STATUS_LED_BLUE
"blue|"
#endif
- "all] [on|off|toggle]\n",
- "led [led_name] [on|off|toggle] sets or clears led(s)\n"
+ "all] [on|off|toggle]",
+ "[led_name] [on|off|toggle] sets or clears led(s)"
);
diff --git a/disk/part.c b/disk/part.c
index 4646f68..7bdc90e 100644
--- a/disk/part.c
+++ b/disk/part.c
@@ -199,7 +199,7 @@ void dev_print (block_dev_desc_t *dev_desc)
break;
}
puts ("\n");
- if ((dev_desc->lba * dev_desc->blksz)>0L) {
+ if (dev_desc->lba > 0L && dev_desc->blksz > 0L) {
ulong mb, mb_quot, mb_rem, gb, gb_quot, gb_rem;
lbaint_t lba;
diff --git a/doc/DocBook/Makefile b/doc/DocBook/Makefile
index da88b32..521e8bc 100644
--- a/doc/DocBook/Makefile
+++ b/doc/DocBook/Makefile
@@ -8,7 +8,7 @@
include $(TOPDIR)/config.mk
-DOCBOOKS := linker_lists.xml stdio.xml
+DOCBOOKS := fs.xml linker_lists.xml stdio.xml
###
# The build process is as follows (targets):
diff --git a/doc/kwboot.1 b/doc/kwboot.1
index ed08398..25fe69a 100644
--- a/doc/kwboot.1
+++ b/doc/kwboot.1
@@ -79,6 +79,6 @@ Adjust the baud rate on \fITTY\fP. Default rate is 115200.
Daniel Stodden <daniel.stodden@gmail.com>
.br
-Luka Perkov <uboot@lukaperkov.net>
+Luka Perkov <luka@openwrt.org>
.br
David Purdy <david.c.purdy@gmail.com>
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index b331be7..dfdba9f 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -163,8 +163,8 @@ static int pl01x_serial_init(void)
}
#endif
/* Finally, enable the UART */
- writel(UART_PL011_CR_UARTEN | UART_PL011_CR_TXE | UART_PL011_CR_RXE,
- &regs->pl011_cr);
+ writel(UART_PL011_CR_UARTEN | UART_PL011_CR_TXE | UART_PL011_CR_RXE |
+ UART_PL011_CR_RTS, &regs->pl011_cr);
return 0;
}
diff --git a/fs/cbfs/Makefile b/fs/cbfs/Makefile
index 2be8a68..e0e6de6 100644
--- a/fs/cbfs/Makefile
+++ b/fs/cbfs/Makefile
@@ -1,6 +1,4 @@
-#
-# See file CREDITS for list of people who contributed to this
-# project.
+# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
diff --git a/fs/cbfs/cbfs.c b/fs/cbfs/cbfs.c
index cae6d56..1b25a15 100644
--- a/fs/cbfs/cbfs.c
+++ b/fs/cbfs/cbfs.c
@@ -1,9 +1,6 @@
/*
* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
diff --git a/fs/ext4/dev.c b/fs/ext4/dev.c
index 1596a92..464a67d 100644
--- a/fs/ext4/dev.c
+++ b/fs/ext4/dev.c
@@ -52,6 +52,7 @@ void ext4fs_set_blk_dev(block_dev_desc_t *rbdd, disk_partition_t *info)
part_info = info;
part_offset = info->start;
get_fs()->total_sect = (info->size * info->blksz) / SECTOR_SIZE;
+ get_fs()->dev_desc = rbdd;
}
int ext4fs_devread(int sector, int byte_offset, int byte_len, char *buf)
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 323875f..f12b805 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -378,7 +378,6 @@ void ext4fs_update_parent_dentry(char *filename, int *p_ino, int file_type)
struct ext_filesystem *fs = get_fs();
/* directory entry */
struct ext2_dirent *dir;
- char *ptr = NULL;
char *temp_dir = NULL;
zero_buffer = zalloc(fs->blksz);
@@ -415,7 +414,6 @@ restart:
if (ext4fs_log_journal(root_first_block_buffer, first_block_no_of_root))
goto fail;
dir = (struct ext2_dirent *)root_first_block_buffer;
- ptr = (char *)dir;
totalbytes = 0;
while (dir->direntlen > 0) {
/*
@@ -483,14 +481,12 @@ restart:
break;
dir = (struct ext2_dirent *)((char *)dir + templength);
- ptr = (char *)dir;
}
/* make a pointer ready for creating next directory entry */
templength = dir->direntlen;
totalbytes = totalbytes + templength;
dir = (struct ext2_dirent *)((char *)dir + templength);
- ptr = (char *)dir;
/* get the next available inode number */
inodeno = ext4fs_get_new_inode_no();
@@ -1200,6 +1196,11 @@ static void alloc_double_indirect_block(struct ext2_inode *file_inode,
status = ext4fs_devread(di_blockno_parent *
fs->sect_perblk, 0,
fs->blksz, (char *)di_parent_buffer);
+
+ if (!status) {
+ printf("%s: Device read error!\n", __func__);
+ goto fail;
+ }
memset(di_parent_buffer, '\0', fs->blksz);
/*
@@ -1227,6 +1228,11 @@ static void alloc_double_indirect_block(struct ext2_inode *file_inode,
fs->sect_perblk, 0,
fs->blksz,
(char *)di_child_buff);
+
+ if (!status) {
+ printf("%s: Device read error!\n", __func__);
+ goto fail;
+ }
memset(di_child_buff, '\0', fs->blksz);
/* filling of actual datablocks for each child */
for (j = 0; j < (fs->blksz / sizeof(int)); j++) {
diff --git a/fs/ext4/ext4_journal.c b/fs/ext4/ext4_journal.c
index 8a252d6..9f01708 100644
--- a/fs/ext4/ext4_journal.c
+++ b/fs/ext4/ext4_journal.c
@@ -410,7 +410,7 @@ int ext4fs_check_journal_state(int recovery_flag)
int transaction_state = TRANSACTION_COMPLETE;
int prev_desc_logical_no = 0;
int curr_desc_logical_no = 0;
- int ofs, flags, block;
+ int ofs, flags;
struct ext2_inode inode_journal;
struct journal_superblock_t *jsb = NULL;
struct journal_header_t *jdb = NULL;
@@ -453,7 +453,6 @@ int ext4fs_check_journal_state(int recovery_flag)
i = be32_to_cpu(jsb->s_first);
while (1) {
- block = be32_to_cpu(jsb->s_first);
blknr = read_allocated_block(&inode_journal, i);
memset(temp_buff1, '\0', fs->blksz);
ext4fs_devread(blknr * fs->sect_perblk,
diff --git a/fs/ext4/ext4fs.c b/fs/ext4/ext4fs.c
index 06536ba..f02c215 100644
--- a/fs/ext4/ext4fs.c
+++ b/fs/ext4/ext4fs.c
@@ -40,6 +40,7 @@
#include <linux/stat.h>
#include <linux/time.h>
#include <asm/byteorder.h>
+#include <div64.h>
#include "ext4_common.h"
int ext4fs_symlinknest;
@@ -930,7 +931,6 @@ static int ext4fs_write_file(struct ext2_inode *file_inode,
int previous_block_number = -1;
int delayed_start = 0;
int delayed_extent = 0;
- int delayed_skipfirst = 0;
int delayed_next = 0;
char *delayed_buf = NULL;
@@ -963,7 +963,6 @@ static int ext4fs_write_file(struct ext2_inode *file_inode,
previous_block_number = blknr;
delayed_start = blknr;
delayed_extent = blockend;
- delayed_skipfirst = skipfirst;
delayed_buf = buf;
delayed_next = blknr +
(blockend >> SECTOR_BITS);
@@ -972,7 +971,6 @@ static int ext4fs_write_file(struct ext2_inode *file_inode,
previous_block_number = blknr;
delayed_start = blknr;
delayed_extent = blockend;
- delayed_skipfirst = skipfirst;
delayed_buf = buf;
delayed_next = blknr +
(blockend >> SECTOR_BITS);
@@ -1013,8 +1011,6 @@ int ext4fs_write(const char *fname, unsigned char *buffer,
unsigned int blks_reqd_for_file;
unsigned int blocks_remaining;
int existing_file_inodeno;
- char filename[256];
-
char *temp_ptr = NULL;
long int itable_blkno;
long int parent_itable_blkno;
@@ -1023,6 +1019,9 @@ int ext4fs_write(const char *fname, unsigned char *buffer,
unsigned int inodes_per_block;
unsigned int ibmap_idx;
struct ext_filesystem *fs = get_fs();
+ ALLOC_CACHE_ALIGN_BUFFER(char, filename, 256);
+ memset(filename, 0x00, sizeof(filename));
+
g_parent_inode = zalloc(sizeof(struct ext2_inode));
if (!g_parent_inode)
goto fail;
@@ -1051,8 +1050,8 @@ int ext4fs_write(const char *fname, unsigned char *buffer,
}
/* calucalate how many blocks required */
bytes_reqd_for_file = sizebytes;
- blks_reqd_for_file = bytes_reqd_for_file / fs->blksz;
- if (bytes_reqd_for_file % fs->blksz != 0) {
+ blks_reqd_for_file = lldiv(bytes_reqd_for_file, fs->blksz);
+ if (do_div(bytes_reqd_for_file, fs->blksz) != 0) {
blks_reqd_for_file++;
debug("total bytes for a file %u\n", blks_reqd_for_file);
}
diff --git a/include/cbfs.h b/include/cbfs.h
index 6ea3f35..5bb12c3 100644
--- a/include/cbfs.h
+++ b/include/cbfs.h
@@ -1,9 +1,6 @@
/*
* Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
*
- * See file CREDITS for list of people who contributed to this
- * project.
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
@@ -77,46 +74,47 @@ struct cbfs_cachenode {
extern enum cbfs_result file_cbfs_result;
-/*
- * Return a string describing the most recent error condition.
+/**
+ * file_cbfs_error() - Return a string describing the most recent error
+ * condition.
*
* @return A pointer to the constant string.
*/
const char *file_cbfs_error(void);
-/*
- * Initialize the CBFS driver and load metadata into RAM.
+/**
+ * file_cbfs_init() - Initialize the CBFS driver and load metadata into RAM.
*
- * @param end_of_rom Points to the end of the ROM the CBFS should be read
+ * @end_of_rom: Points to the end of the ROM the CBFS should be read
* from.
*/
void file_cbfs_init(uintptr_t end_of_rom);
-/*
- * Get the header structure for the current CBFS.
+/**
+ * file_cbfs_get_header() - Get the header structure for the current CBFS.
*
* @return A pointer to the constant structure, or NULL if there is none.
*/
const struct cbfs_header *file_cbfs_get_header(void);
-/*
- * Get a handle for the first file in CBFS.
+/**
+ * file_cbfs_get_first() - Get a handle for the first file in CBFS.
*
* @return A handle for the first file in CBFS, NULL on error.
*/
const struct cbfs_cachenode *file_cbfs_get_first(void);
-/*
- * Get a handle to the file after this one in CBFS.
+/**
+ * file_cbfs_get_next() - Get a handle to the file after this one in CBFS.
*
- * @param file A pointer to the handle to advance.
+ * @file: A pointer to the handle to advance.
*/
void file_cbfs_get_next(const struct cbfs_cachenode **file);
-/*
- * Find a file with a particular name in CBFS.
+/**
+ * file_cbfs_find() - Find a file with a particular name in CBFS.
*
- * @param name The name to search for.
+ * @name: The name to search for.
*
* @return A handle to the file, or NULL on error.
*/
@@ -127,53 +125,55 @@ const struct cbfs_cachenode *file_cbfs_find(const char *name);
/* All of the functions below can be used without first initializing CBFS. */
/***************************************************************************/
-/*
- * Find a file with a particular name in CBFS without using the heap.
+/**
+ * file_cbfs_find_uncached() - Find a file with a particular name in CBFS
+ * without using the heap.
*
- * @param end_of_rom Points to the end of the ROM the CBFS should be read
+ * @end_of_rom: Points to the end of the ROM the CBFS should be read
* from.
- * @param name The name to search for.
+ * @name: The name to search for.
*
* @return A handle to the file, or NULL on error.
*/
const struct cbfs_cachenode *file_cbfs_find_uncached(uintptr_t end_of_rom,
const char *name);
-/*
- * Get the name of a file in CBFS.
+/**
+ * file_cbfs_name() - Get the name of a file in CBFS.
*
- * @param file The handle to the file.
+ * @file: The handle to the file.
*
* @return The name of the file, NULL on error.
*/
const char *file_cbfs_name(const struct cbfs_cachenode *file);
-/*
- * Get the size of a file in CBFS.
+/**
+ * file_cbfs_size() - Get the size of a file in CBFS.
*
- * @param file The handle to the file.
+ * @file: The handle to the file.
*
* @return The size of the file, zero on error.
*/
u32 file_cbfs_size(const struct cbfs_cachenode *file);
-/*
- * Get the type of a file in CBFS.
+/**
+ * file_cbfs_type() - Get the type of a file in CBFS.
*
- * @param file The handle to the file.
+ * @file: The handle to the file.
*
* @return The type of the file, zero on error.
*/
u32 file_cbfs_type(const struct cbfs_cachenode *file);
-/*
- * Read a file from CBFS into RAM
+/**
+ * file_cbfs_read() - Read a file from CBFS into RAM
*
- * @param file A handle to the file to read.
- * @param buffer Where to read it into memory.
+ * @file: A handle to the file to read.
+ * @buffer: Where to read it into memory.
+ * @maxsize: Maximum number of bytes to read
*
* @return If positive or zero, the number of characters read. If negative, an
- * error occurred.
+ * error occurred.
*/
long file_cbfs_read(const struct cbfs_cachenode *file, void *buffer,
unsigned long maxsize);
diff --git a/include/configs/ib62x0.h b/include/configs/ib62x0.h
index 85856f2..f646ae5 100644
--- a/include/configs/ib62x0.h
+++ b/include/configs/ib62x0.h
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2011-2012
* Gerald Kerma <dreagle@doukki.net>
- * Luka Perkov <uboot@lukaperkov.net>
+ * Luka Perkov <luka@openwrt.org>
*
* See file CREDITS for list of people who contributed to this
* project.
diff --git a/include/configs/iconnect.h b/include/configs/iconnect.h
index 2b523c9..ba57849 100644
--- a/include/configs/iconnect.h
+++ b/include/configs/iconnect.h
@@ -1,7 +1,7 @@
/*
* (C) Copyright 2009-2012
* Wojciech Dubowik <wojciech.dubowik@neratec.com>
- * Luka Perkov <uboot@lukaperkov.net>
+ * Luka Perkov <luka@openwrt.org>
*
* See file CREDITS for list of people who contributed to this
* project.
diff --git a/lib/lzma/LzmaDec.c b/lib/lzma/LzmaDec.c
index f941da2..4f45f80 100644
--- a/lib/lzma/LzmaDec.c
+++ b/lib/lzma/LzmaDec.c
@@ -1,5 +1,5 @@
/* LzmaDec.c -- LZMA Decoder
-2008-11-06 : Igor Pavlov : Public domain */
+2009-09-20 : Igor Pavlov : Public domain */
#include <config.h>
#include <common.h>
@@ -116,12 +116,6 @@
StopCompilingDueBUG
#endif
-static const Byte kLiteralNextStates[kNumStates * 2] =
-{
- 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5,
- 7, 7, 7, 7, 7, 7, 7, 10, 10, 10, 10, 10
-};
-
#define LZMA_DIC_MIN (1 << 12)
/* First LZMA-symbol is always decoded.
@@ -180,6 +174,7 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
if (state < kNumLitStates)
{
+ state -= (state < 4) ? state : 3;
symbol = 1;
WATCHDOG_RESET();
@@ -190,6 +185,7 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
{
unsigned matchByte = p->dic[(dicPos - rep0) + ((dicPos < rep0) ? dicBufSize : 0)];
unsigned offs = 0x100;
+ state -= (state < 10) ? 3 : 6;
symbol = 1;
WATCHDOG_RESET();
@@ -207,9 +203,6 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
}
dic[dicPos++] = (Byte)symbol;
processedPos++;
-
- state = kLiteralNextStates[state];
- /* if (state < 4) state = 0; else if (state < 10) state -= 3; else state -= 6; */
continue;
}
else
@@ -395,7 +388,6 @@ static int MY_FAST_CALL LzmaDec_DecodeReal(CLzmaDec *p, SizeT limit, const Byte
else if (distance >= checkDicSize)
return SZ_ERROR_DATA;
state = (state < kNumStates + kNumLitStates) ? kNumLitStates : kNumLitStates + 3;
- /* state = kLiteralNextStates[state]; */
}
len += kMatchMinLen;
diff --git a/lib/lzma/LzmaDec.h b/lib/lzma/LzmaDec.h
index 7fba87f..63aa505 100644
--- a/lib/lzma/LzmaDec.h
+++ b/lib/lzma/LzmaDec.h
@@ -1,8 +1,8 @@
/* LzmaDec.h -- LZMA Decoder
-2008-10-04 : Igor Pavlov : Public domain */
+2009-02-07 : Igor Pavlov : Public domain */
-#ifndef __LZMADEC_H
-#define __LZMADEC_H
+#ifndef __LZMA_DEC_H
+#define __LZMA_DEC_H
#include "Types.h"
diff --git a/lib/lzma/Types.h b/lib/lzma/Types.h
index 1af5cfc..8afcba5 100644
--- a/lib/lzma/Types.h
+++ b/lib/lzma/Types.h
@@ -1,5 +1,5 @@
/* Types.h -- Basic types
-2008-11-23 : Igor Pavlov : Public domain */
+2010-10-09 : Igor Pavlov : Public domain */
#ifndef __7Z_TYPES_H
#define __7Z_TYPES_H
@@ -65,9 +65,11 @@ typedef unsigned long UInt64;
#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
+#define UINT64_CONST(n) n
#else
typedef long long int Int64;
typedef unsigned long long int UInt64;
+#define UINT64_CONST(n) n ## ULL
#endif
#endif
@@ -92,13 +94,11 @@ typedef int Bool;
#endif
#define MY_CDECL __cdecl
-#define MY_STD_CALL __stdcall
-#define MY_FAST_CALL MY_NO_INLINE __fastcall
+#define MY_FAST_CALL __fastcall
#else
#define MY_CDECL
-#define MY_STD_CALL
#define MY_FAST_CALL
#endif
@@ -108,6 +108,16 @@ typedef int Bool;
typedef struct
{
+ Byte (*Read)(void *p); /* reads one byte, returns 0 in case of EOF or error */
+} IByteIn;
+
+typedef struct
+{
+ void (*Write)(void *p, Byte b);
+} IByteOut;
+
+typedef struct
+{
SRes (*Read)(void *p, void *buf, size_t *size);
/* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
(output(*size) < input(*size)) is allowed */
@@ -140,7 +150,7 @@ typedef struct
typedef struct
{
- SRes (*Look)(void *p, void **buf, size_t *size);
+ SRes (*Look)(void *p, const void **buf, size_t *size);
/* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.
(output(*size) > input(*size)) is not allowed
(output(*size) < input(*size)) is allowed */
@@ -205,4 +215,20 @@ typedef struct
#define IAlloc_Alloc(p, size) (p)->Alloc((p), size)
#define IAlloc_Free(p, a) (p)->Free((p), a)
+#ifdef _WIN32
+
+#define CHAR_PATH_SEPARATOR '\\'
+#define WCHAR_PATH_SEPARATOR L'\\'
+#define STRING_PATH_SEPARATOR "\\"
+#define WSTRING_PATH_SEPARATOR L"\\"
+
+#else
+
+#define CHAR_PATH_SEPARATOR '/'
+#define WCHAR_PATH_SEPARATOR L'/'
+#define STRING_PATH_SEPARATOR "/"
+#define WSTRING_PATH_SEPARATOR L"/"
+
+#endif
+
#endif
diff --git a/lib/lzma/history.txt b/lib/lzma/history.txt
index aadf825..443511b 100644
--- a/lib/lzma/history.txt
+++ b/lib/lzma/history.txt
@@ -1,6 +1,41 @@
HISTORY of the LZMA SDK
-----------------------
+9.18 beta 2010-11-02
+-------------------------
+- New small SFX module for installers (SfxSetup).
+
+
+9.12 beta 2010-03-24
+-------------------------
+- The BUG in LZMA SDK 9.* was fixed: LZMA2 codec didn't work,
+ if more than 10 threads were used (or more than 20 threads in some modes).
+
+
+9.11 beta 2010-03-15
+-------------------------
+- PPMd compression method support
+
+
+9.09 2009-12-12
+-------------------------
+- The bug was fixed:
+ Utf16_To_Utf8 funstions in UTFConvert.cpp and 7zMain.c
+ incorrectly converted surrogate characters (the code >= 0x10000) to UTF-8.
+- Some bugs were fixed
+
+
+9.06 2009-08-17
+-------------------------
+- Some changes in ANSI-C 7z Decoder interfaces.
+
+
+9.04 2009-05-30
+-------------------------
+- LZMA2 compression method support
+- xz format support
+
+
4.65 2009-02-03
-------------------------
- Some minor fixes
diff --git a/lib/lzma/lzma.txt b/lib/lzma/lzma.txt
index aa20f9d..144cd9a 100644
--- a/lib/lzma/lzma.txt
+++ b/lib/lzma/lzma.txt
@@ -1,4 +1,4 @@
-LZMA SDK 4.65
+LZMA SDK 9.20
-------------
LZMA SDK provides the documentation, samples, header files, libraries,
@@ -20,6 +20,10 @@ LICENSE
LZMA SDK is written and placed in the public domain by Igor Pavlov.
+Some code in LZMA SDK is based on public domain code from another developers:
+ 1) PPMd var.H (2001): Dmitry Shkarin
+ 2) SHA-256: Wei Dai (Crypto++ library)
+
LZMA SDK Contents
-----------------
@@ -33,7 +37,7 @@ LZMA SDK includes:
UNIX/Linux version
------------------
To compile C++ version of file->file LZMA encoding, go to directory
-C++/7zip/Compress/LZMA_Alone
+CPP/7zip/Bundles/LzmaCon
and call make to recompile it:
make -f makefile.gcc clean all
@@ -49,6 +53,7 @@ lzma.txt - LZMA SDK description (this file)
7zC.txt - 7z ANSI-C Decoder description
methods.txt - Compression method IDs for .7z
lzma.exe - Compiled file->file LZMA encoder/decoder for Windows
+7zr.exe - 7-Zip with 7z/lzma/xz support.
history.txt - history of the LZMA SDK
@@ -66,7 +71,7 @@ C/ - C files
LzmaEnc.* - LZMA encoding
LzmaLib.* - LZMA Library for DLL calling
Types.h - Basic types for another .c files
- Threads.* - The code for multithreading.
+ Threads.* - The code for multithreading.
LzmaLib - LZMA Library (.DLL for Windows)
@@ -86,12 +91,6 @@ CPP/ -- CPP files
Compress - files related to compression/decompression
- Copy - Copy coder
- RangeCoder - Range Coder (special code of compression/decompression)
- LZMA - LZMA compression/decompression on C++
- LZMA_Alone - file->file LZMA compression/decompression
- Branch - Filters for x86, IA-64, ARM, ARM-Thumb, PowerPC and SPARC code
-
Archive - files related to archiving
Common - common files for archive handling
@@ -100,6 +99,7 @@ CPP/ -- CPP files
Bundles - Modules that are bundles of other modules
Alone7z - 7zr.exe: Standalone version of 7z.exe that supports only 7z/LZMA/BCJ/BCJ2
+ LzmaCon - lzma.exe: LZMA compression/decompression
Format7zR - 7zr.dll: Reduced version of 7za.dll: extracting/compressing to 7z/LZMA/BCJ/BCJ2
Format7zExtractR - 7zxr.dll: Reduced version of 7zxa.dll: extracting from 7z/LZMA/BCJ/BCJ2.
@@ -369,8 +369,8 @@ Interface:
propData - LZMA properties (5 bytes)
propSize - size of propData buffer (5 bytes)
finishMode - It has meaning only if the decoding reaches output limit (*destLen).
- LZMA_FINISH_ANY - Decode just destLen bytes.
- LZMA_FINISH_END - Stream must be finished after (*destLen).
+ LZMA_FINISH_ANY - Decode just destLen bytes.
+ LZMA_FINISH_END - Stream must be finished after (*destLen).
You can use LZMA_FINISH_END, when you know that
current output buffer covers last bytes of stream.
alloc - Memory allocator.
@@ -431,7 +431,7 @@ Memory Requirements:
{
...
int res = LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen,
- const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode);
+ const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode);
...
}
@@ -527,7 +527,8 @@ static ISzAlloc g_Alloc = { SzAlloc, SzFree };
LzmaEnc_Destroy(enc, &g_Alloc, &g_Alloc);
-If callback function return some error code, LzmaEnc_Encode also returns that code.
+If callback function return some error code, LzmaEnc_Encode also returns that code
+or it can return the code like SZ_ERROR_READ, SZ_ERROR_WRITE or SZ_ERROR_PROGRESS.
Single-call RAM->RAM Compression
@@ -549,8 +550,8 @@ Return code:
-LZMA Defines
-------------
+Defines
+-------
_LZMA_SIZE_OPT - Enable some optimizations in LZMA Decoder to get smaller executable code.
@@ -562,6 +563,9 @@ _LZMA_UINT32_IS_ULONG - Define it if int is 16-bit on your compiler and long is
_LZMA_NO_SYSTEM_SIZE_T - Define it if you don't want to use size_t type.
+_7ZIP_PPMD_SUPPPORT - Define it if you don't want to support PPMD method in AMSI-C .7z decoder.
+
+
C++ LZMA Encoder/Decoder
~~~~~~~~~~~~~~~~~~~~~~~~
C++ LZMA code use COM-like interfaces. So if you want to use it,