Merge branch 'for-next/misc'
This commit is contained in:
commit
8f2c6a3d2b
61
Makefile
61
Makefile
|
@ -744,68 +744,11 @@ PHONY += $(barebox-dirs)
|
|||
$(barebox-dirs): prepare scripts
|
||||
$(Q)$(MAKE) $(build)=$@
|
||||
|
||||
# Build the kernel release string
|
||||
#
|
||||
# The KERNELRELEASE value built here is stored in the file
|
||||
# include/config/kernel.release, and is used when executing several
|
||||
# make targets, such as "make install" or "make modules_install."
|
||||
#
|
||||
# The eventual kernel release string consists of the following fields,
|
||||
# shown in a hierarchical format to show how smaller parts are concatenated
|
||||
# to form the larger and final value, with values coming from places like
|
||||
# the Makefile, kernel config options, make command line options and/or
|
||||
# SCM tag information.
|
||||
#
|
||||
# $(KERNELVERSION)
|
||||
# $(VERSION) eg, 2
|
||||
# $(PATCHLEVEL) eg, 6
|
||||
# $(SUBLEVEL) eg, 18
|
||||
# $(EXTRAVERSION) eg, -rc6
|
||||
# $(localver-full)
|
||||
# $(localver)
|
||||
# localversion* (all localversion* files)
|
||||
# $(CONFIG_LOCALVERSION) (from kernel config setting)
|
||||
# $(localver-auto) (only if CONFIG_LOCALVERSION_AUTO is set)
|
||||
# ./scripts/setlocalversion (SCM tag, if one exists)
|
||||
# $(LOCALVERSION) (from make command line if provided)
|
||||
#
|
||||
# Note how the final $(localver-auto) string is included *only* if the
|
||||
# kernel config option CONFIG_LOCALVERSION_AUTO is selected. Also, at the
|
||||
# moment, only git is supported but other SCMs can edit the script
|
||||
# scripts/setlocalversion and add the appropriate checks as needed.
|
||||
|
||||
nullstring :=
|
||||
space := $(nullstring) # end of line
|
||||
|
||||
___localver = $(objtree)/localversion* $(srctree)/localversion*
|
||||
__localver = $(sort $(wildcard $(___localver)))
|
||||
# skip backup files (containing '~')
|
||||
_localver = $(foreach f, $(__localver), $(if $(findstring ~, $(f)),,$(f)))
|
||||
|
||||
localver = $(subst $(space),, \
|
||||
$(shell cat /dev/null $(_localver)) \
|
||||
$(patsubst "%",%,$(CONFIG_LOCALVERSION)))
|
||||
|
||||
# If CONFIG_LOCALVERSION_AUTO is set scripts/setlocalversion is called
|
||||
# and if the SCM is know a tag from the SCM is appended.
|
||||
# The appended tag is determined by the SCM used.
|
||||
#
|
||||
# Currently, only git is supported.
|
||||
# Other SCMs can edit scripts/setlocalversion and add the appropriate
|
||||
# checks as needed.
|
||||
ifdef CONFIG_LOCALVERSION_AUTO
|
||||
_localver-auto = $(shell $(CONFIG_SHELL) \
|
||||
$(srctree)/scripts/setlocalversion $(srctree))
|
||||
localver-auto = $(LOCALVERSION)$(_localver-auto)
|
||||
endif
|
||||
|
||||
localver-full = $(localver)$(localver-auto)
|
||||
|
||||
# Store (new) KERNELRELASE string in include/config/kernel.release
|
||||
kernelrelease = $(KERNELVERSION)$(localver-full)
|
||||
localversion = $(shell $(srctree)/scripts/setlocalversion $(srctree))
|
||||
include/config/kernel.release: include/config/auto.conf FORCE
|
||||
$(Q)rm -f $@
|
||||
$(Q)echo $(kernelrelease) > $@
|
||||
$(Q)echo $(KERNELVERSION)$(localversion) > $@
|
||||
|
||||
Doxyfile.version: include/config/auto.conf FORCE
|
||||
$(Q)rm -f $@
|
||||
|
|
|
@ -90,9 +90,25 @@ static struct i2c_gpio_platform_data i2c_gpio_pdata = {
|
|||
.udelay = 5, /* ~100 kHz */
|
||||
};
|
||||
|
||||
void v5_mmu_cache_flush(void);
|
||||
long cfa10036_get_ram_size(void)
|
||||
{
|
||||
volatile u32 *base = (void *)IMX_MEMORY_BASE;
|
||||
volatile u32 *ofs = base + SZ_128M / sizeof(u32);
|
||||
|
||||
*base = *ofs = 0xdeadbeef;
|
||||
*ofs = 0xbaadcafe;
|
||||
|
||||
v5_mmu_cache_flush();
|
||||
if (*base == 0xbaadcafe)
|
||||
return SZ_128M;
|
||||
else
|
||||
return SZ_256M;
|
||||
}
|
||||
|
||||
static int cfa10036_mem_init(void)
|
||||
{
|
||||
arm_add_mem_device("ram0", IMX_MEMORY_BASE, 128 * 1024 * 1024);
|
||||
arm_add_mem_device("ram0", IMX_MEMORY_BASE, cfa10036_get_ram_size());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
/*
|
||||
* arch/arm/include/asm/clkdev.h
|
||||
*
|
||||
* Copyright (C) 2008 Russell King.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Helper for the clk API to assist looking up a struct clk.
|
||||
*/
|
||||
#ifndef __ASM_CLKDEV_H
|
||||
#define __ASM_CLKDEV_H
|
||||
|
||||
#include <mach/clkdev.h>
|
||||
|
||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef __ASM_MACH_CLKDEV_H
|
||||
#define __ASM_MACH_CLKDEV_H
|
||||
|
||||
#define __clk_get(clk) ({ 1; })
|
||||
#define __clk_put(clk) do { } while (0)
|
||||
|
||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef __ASM_MACH_CLKDEV_H
|
||||
#define __ASM_MACH_CLKDEV_H
|
||||
|
||||
#define __clk_get(clk) ({ 1; })
|
||||
#define __clk_put(clk) do { } while (0)
|
||||
|
||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef __MACH_CLKDEV_H
|
||||
#define __MACH_CLKDEV_H
|
||||
|
||||
#define __clk_get(clk) ({ 1; })
|
||||
#define __clk_put(clk) do { } while (0)
|
||||
|
||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef __ASM_MACH_CLKDEV_H
|
||||
#define __ASM_MACH_CLKDEV_H
|
||||
|
||||
#define __clk_get(clk) ({ 1; })
|
||||
#define __clk_put(clk) do { } while (0)
|
||||
|
||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef __ASM_MACH_CLKDEV_H
|
||||
#define __ASM_MACH_CLKDEV_H
|
||||
|
||||
#define __clk_get(clk) ({ 1; })
|
||||
#define __clk_put(clk) do { } while (0)
|
||||
|
||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef __ASM_MACH_CLKDEV_H
|
||||
#define __ASM_MACH_CLKDEV_H
|
||||
|
||||
#define __clk_get(clk) ({ 1; })
|
||||
#define __clk_put(clk) do { } while (0)
|
||||
|
||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef __ASM_MACH_CLKDEV_H
|
||||
#define __ASM_MACH_CLKDEV_H
|
||||
|
||||
#define __clk_get(clk) ({ 1; })
|
||||
#define __clk_put(clk) do { } while (0)
|
||||
|
||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||
#ifndef __ASM_MACH_CLKDEV_H
|
||||
#define __ASM_MACH_CLKDEV_H
|
||||
|
||||
#define __clk_get(clk) ({ 1; })
|
||||
#define __clk_put(clk) do { } while (0)
|
||||
|
||||
#endif
|
|
@ -76,7 +76,7 @@ static int do_tftpb(int argc, char *argv[])
|
|||
if (ret)
|
||||
goto err_rmdir;
|
||||
|
||||
printk("%s: %s -> %s\n", __func__, source, dest);
|
||||
debug("%s: %s -> %s\n", __func__, source, dest);
|
||||
|
||||
ret = copy_file(source, dest, 1);
|
||||
|
||||
|
|
|
@ -296,13 +296,20 @@ static int mark_bad(const struct mtd_dev_info *mtd, struct ubi_scan_info *si, in
|
|||
static int flash_image(const struct mtd_dev_info *mtd,
|
||||
const struct ubigen_info *ui, struct ubi_scan_info *si)
|
||||
{
|
||||
int fd, img_ebs, eb, written_ebs = 0, divisor;
|
||||
int fd, img_ebs, eb, written_ebs = 0, divisor, ret = -1;
|
||||
off_t st_size;
|
||||
char *buf = NULL;
|
||||
|
||||
fd = open_file(&st_size);
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
buf = malloc(mtd->eb_size);
|
||||
if (!buf) {
|
||||
sys_errmsg("cannot allocate %d bytes of memory", mtd->eb_size);
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
img_ebs = st_size / mtd->eb_size;
|
||||
|
||||
if (img_ebs > si->good_cnt) {
|
||||
|
@ -312,8 +319,9 @@ static int flash_image(const struct mtd_dev_info *mtd,
|
|||
}
|
||||
|
||||
if (st_size % mtd->eb_size) {
|
||||
return sys_errmsg("file \"%s\" (size %lld bytes) is not multiple of ""eraseblock size (%d bytes)",
|
||||
args.image, (long long)st_size, mtd->eb_size);
|
||||
sys_errmsg("file \"%s\" (size %lld bytes) is not multiple of "
|
||||
"eraseblock size (%d bytes)",
|
||||
args.image, (long long)st_size, mtd->eb_size);
|
||||
goto out_close;
|
||||
}
|
||||
|
||||
|
@ -321,7 +329,6 @@ static int flash_image(const struct mtd_dev_info *mtd,
|
|||
divisor = img_ebs;
|
||||
for (eb = 0; eb < mtd->eb_cnt; eb++) {
|
||||
int err, new_len;
|
||||
char buf[mtd->eb_size];
|
||||
long long ec;
|
||||
|
||||
if (!args.quiet && !args.verbose) {
|
||||
|
@ -404,12 +411,13 @@ static int flash_image(const struct mtd_dev_info *mtd,
|
|||
|
||||
if (!args.quiet && !args.verbose)
|
||||
printf("\n");
|
||||
close(fd);
|
||||
return eb + 1;
|
||||
|
||||
ret = eb + 1;
|
||||
|
||||
out_close:
|
||||
free(buf);
|
||||
close(fd);
|
||||
return -1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int format(const struct mtd_dev_info *mtd,
|
||||
|
|
|
@ -17,10 +17,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <malloc.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <module.h>
|
||||
|
|
|
@ -14,11 +14,7 @@ while true; do
|
|||
|
||||
boot-entries-collect
|
||||
|
||||
menu -e -a -R -m boot -c "$global.editcmd /env/network/eth0" -d "Network settings"
|
||||
menu -e -a -R -m boot -c "$global.editcmd /env/config" -d "Config settings"
|
||||
menu -e -a -m boot -c "boot-entries-edit" -d "Edit boot entries"
|
||||
menu -e -a -m boot -c "init-entries-edit" -d "Edit init entries"
|
||||
menu -e -a -R -m boot -c "saveenv || echo \"failed to save environment\" && sleep 2" -d "Save settings"
|
||||
menu -e -a -m boot -c "settings" -d "Settings"
|
||||
menu -e -a -m boot -c 'PATH=$savepath; echo "enter exit to return to menu"; sh' -d "${DARK_YELLOW}Shell${NC}"
|
||||
menu -e -a -m boot -c reset -d "${RED}Reset${NC}"
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
export menu_exit=false
|
||||
|
||||
while true; do
|
||||
menu -a -m settings -d "${CYAN}Settings${NC}"
|
||||
|
||||
menu -e -a -R -m settings -c "$global.editcmd /env/network/eth0" -d "Network settings"
|
||||
menu -e -a -R -m settings -c "$global.editcmd /env/config" -d "Config settings"
|
||||
menu -e -a -m settings -c "settings-entries-edit" -d "Edit settings entries"
|
||||
menu -e -a -m settings -c "init-entries-edit" -d "Edit init entries"
|
||||
menu -e -a -R -m settings -c "saveenv || echo \"failed to save environment\" && sleep 2" -d "Save settings"
|
||||
menu -e -a -m settings -c "menu_exit=true" -d "back"
|
||||
|
||||
menu -s -m settings
|
||||
menu -r -m settings
|
||||
|
||||
if [ $menu_exit = true ]; then
|
||||
exit
|
||||
fi
|
||||
done
|
|
@ -95,8 +95,6 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id)
|
|||
struct clk *clk;
|
||||
|
||||
clk = clk_find(dev_id, con_id);
|
||||
if (clk && !__clk_get(clk))
|
||||
clk = NULL;
|
||||
|
||||
return clk ? clk : ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
@ -117,7 +115,6 @@ EXPORT_SYMBOL(clk_get);
|
|||
|
||||
void clk_put(struct clk *clk)
|
||||
{
|
||||
__clk_put(clk);
|
||||
}
|
||||
EXPORT_SYMBOL(clk_put);
|
||||
|
||||
|
|
|
@ -430,8 +430,10 @@ static int mmc_change_freq(struct mci *mci)
|
|||
}
|
||||
|
||||
/* No high-speed support */
|
||||
if (!mci->ext_csd[EXT_CSD_HS_TIMING])
|
||||
if (!mci->ext_csd[EXT_CSD_HS_TIMING]) {
|
||||
dev_dbg(mci->mci_dev, "No high-speed support\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* High Speed is set, there are two types: 52MHz and 26MHz */
|
||||
if (cardtype & EXT_CSD_CARD_TYPE_52)
|
||||
|
@ -669,7 +671,8 @@ static void mci_detect_version_from_csd(struct mci *mci)
|
|||
mci->version = MMC_VERSION_1_2;
|
||||
break;
|
||||
}
|
||||
printf("detected card version %s\n", vstr);
|
||||
|
||||
dev_info(mci->mci_dev, "detected card version %s\n", vstr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -891,8 +894,9 @@ static int mci_startup_mmc(struct mci *mci)
|
|||
mci_set_clock(mci, 52000000);
|
||||
else
|
||||
mci_set_clock(mci, 26000000);
|
||||
} else
|
||||
} else {
|
||||
mci_set_clock(mci, 20000000);
|
||||
}
|
||||
|
||||
/*
|
||||
* Unlike SD, MMC cards dont have a configuration register to notify
|
||||
|
@ -1169,7 +1173,7 @@ static int mci_sd_read(struct block_device *blk, void *buffer, int block,
|
|||
}
|
||||
|
||||
if (block > MAX_BUFFER_NUMBER) {
|
||||
pr_err("Cannot handle block number %d. Too large!\n", block);
|
||||
dev_err(mci->mci_dev, "Cannot handle block number %d. Too large!\n", block);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -1366,7 +1370,7 @@ static int mci_card_probe(struct mci *mci)
|
|||
/* start with a host interface reset */
|
||||
rc = (host->init)(host, mci->mci_dev);
|
||||
if (rc) {
|
||||
pr_err("Cannot reset the SD/MMC interface\n");
|
||||
dev_err(mci->mci_dev, "Cannot reset the SD/MMC interface\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -1376,7 +1380,7 @@ static int mci_card_probe(struct mci *mci)
|
|||
/* reset the card */
|
||||
rc = mci_go_idle(mci);
|
||||
if (rc) {
|
||||
pr_warning("Cannot reset the SD/MMC card\n");
|
||||
dev_warn(mci->mci_dev, "Cannot reset the SD/MMC card\n");
|
||||
goto on_error;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
menuconfig USB_GADGET
|
||||
depends on USB_HAVE_GADGET_DRIVER
|
||||
bool "USB gadget support"
|
||||
|
||||
config USB_HAVE_GADGET_DRIVER
|
||||
bool
|
||||
default y if ARCH_IMX || ARCH_MXS || ARCH_AT91 || ARCH_PXA
|
||||
|
||||
menuconfig USB_GADGET
|
||||
depends on USB_HAVE_GADGET_DRIVER
|
||||
bool "USB gadget support"
|
||||
|
||||
if USB_GADGET
|
||||
|
||||
config USB_GADGET_DUALSPEED
|
||||
|
|
|
@ -12,8 +12,6 @@
|
|||
#ifndef __CLKDEV_H
|
||||
#define __CLKDEV_H
|
||||
|
||||
#include <asm/clkdev.h>
|
||||
|
||||
struct clk;
|
||||
struct device_d;
|
||||
|
||||
|
|
|
@ -1,65 +1,171 @@
|
|||
#!/bin/sh
|
||||
# Print additional version information for non-release trees.
|
||||
#
|
||||
# This scripts adds local version information from the version
|
||||
# control systems git, mercurial (hg) and subversion (svn).
|
||||
#
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [srctree]" >&2
|
||||
echo "Usage: $0 [--save-scmversion] [srctree]" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
cd "${1:-.}" || usage
|
||||
scm_only=false
|
||||
srctree=.
|
||||
if test "$1" = "--save-scmversion"; then
|
||||
scm_only=true
|
||||
shift
|
||||
fi
|
||||
if test $# -gt 0; then
|
||||
srctree=$1
|
||||
shift
|
||||
fi
|
||||
if test $# -gt 0 -o ! -d "$srctree"; then
|
||||
usage
|
||||
fi
|
||||
|
||||
# Check for git and a git repo.
|
||||
if head=`git rev-parse --verify HEAD 2>/dev/null`; then
|
||||
# Do we have an untagged version?
|
||||
if git name-rev --tags HEAD | grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then
|
||||
if tag=`git describe 2>/dev/null`; then
|
||||
echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
|
||||
scm_version()
|
||||
{
|
||||
local short
|
||||
short=false
|
||||
|
||||
cd "$srctree"
|
||||
if test -e .scmversion; then
|
||||
cat .scmversion
|
||||
return
|
||||
fi
|
||||
if test "$1" = "--short"; then
|
||||
short=true
|
||||
fi
|
||||
|
||||
# Check for git and a git repo.
|
||||
if test -d .git && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
|
||||
|
||||
# If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
|
||||
# it, because this version is defined in the top level Makefile.
|
||||
if [ -z "`git describe --exact-match 2>/dev/null`" ]; then
|
||||
|
||||
# If only the short version is requested, don't bother
|
||||
# running further git commands
|
||||
if $short; then
|
||||
echo "+"
|
||||
return
|
||||
fi
|
||||
# If we are past a tagged commit (like
|
||||
# "v2.6.30-rc5-302-g72357d5"), we pretty print it.
|
||||
if atag="`git describe 2>/dev/null`"; then
|
||||
echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
|
||||
|
||||
# If we don't have a tag at all we print -g{commitish}.
|
||||
else
|
||||
printf '%s%s' -g $head
|
||||
fi
|
||||
fi
|
||||
|
||||
# Is this git on svn?
|
||||
if git config --get svn-remote.svn.url >/dev/null; then
|
||||
printf -- '-svn%s' "`git svn find-rev $head`"
|
||||
fi
|
||||
|
||||
# Update index only on r/w media
|
||||
[ -w . ] && git update-index --refresh --unmerged > /dev/null
|
||||
|
||||
# Check for uncommitted changes
|
||||
if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then
|
||||
printf '%s' -dirty
|
||||
fi
|
||||
|
||||
# All done with git
|
||||
return
|
||||
fi
|
||||
|
||||
# Are there uncommitted changes?
|
||||
git update-index --refresh --unmerged > /dev/null
|
||||
if git diff-index --name-only HEAD | grep -v "^scripts/package" \
|
||||
| read dummy; then
|
||||
printf '%s' -dirty
|
||||
# Check for mercurial and a mercurial repo.
|
||||
if test -d .hg && hgid=`hg id 2>/dev/null`; then
|
||||
# Do we have an tagged version? If so, latesttagdistance == 1
|
||||
if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then
|
||||
id=`hg log -r . --template '{latesttag}'`
|
||||
printf '%s%s' -hg "$id"
|
||||
else
|
||||
tag=`printf '%s' "$hgid" | cut -d' ' -f2`
|
||||
if [ -z "$tag" -o "$tag" = tip ]; then
|
||||
id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
|
||||
printf '%s%s' -hg "$id"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Are there uncommitted changes?
|
||||
# These are represented by + after the changeset id.
|
||||
case "$hgid" in
|
||||
*+|*+\ *) printf '%s' -dirty ;;
|
||||
esac
|
||||
|
||||
# All done with mercurial
|
||||
return
|
||||
fi
|
||||
|
||||
# All done with git
|
||||
exit
|
||||
fi
|
||||
|
||||
# Check for mercurial and a mercurial repo.
|
||||
if hgid=`hg id 2>/dev/null`; then
|
||||
tag=`printf '%s' "$hgid" | cut -d' ' -f2`
|
||||
|
||||
# Do we have an untagged version?
|
||||
if [ -z "$tag" -o "$tag" = tip ]; then
|
||||
id=`printf '%s' "$hgid" | sed 's/[+ ].*//'`
|
||||
printf '%s%s' -hg "$id"
|
||||
fi
|
||||
|
||||
# Are there uncommitted changes?
|
||||
# These are represented by + after the changeset id.
|
||||
case "$hgid" in
|
||||
*+|*+\ *) printf '%s' -dirty ;;
|
||||
esac
|
||||
|
||||
# All done with mercurial
|
||||
exit
|
||||
fi
|
||||
|
||||
# Check for svn and a svn repo.
|
||||
if rev=`svn info 2>/dev/null | grep '^Revision'`; then
|
||||
rev=`echo $rev | awk '{print $NF}'`
|
||||
changes=`svn status 2>/dev/null | grep '^[AMD]' | wc -l`
|
||||
|
||||
# Are there uncommitted changes?
|
||||
if [ $changes != 0 ]; then
|
||||
printf -- '-svn%s%s%s' "$rev" -dirty "$changes"
|
||||
else
|
||||
# Check for svn and a svn repo.
|
||||
if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then
|
||||
rev=`echo $rev | awk '{print $NF}'`
|
||||
printf -- '-svn%s' "$rev"
|
||||
fi
|
||||
|
||||
# All done with svn
|
||||
# All done with svn
|
||||
return
|
||||
fi
|
||||
}
|
||||
|
||||
collect_files()
|
||||
{
|
||||
local file res
|
||||
|
||||
for file; do
|
||||
case "$file" in
|
||||
*\~*)
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
if test -e "$file"; then
|
||||
res="$res$(cat "$file")"
|
||||
fi
|
||||
done
|
||||
echo "$res"
|
||||
}
|
||||
|
||||
if $scm_only; then
|
||||
if test ! -e .scmversion; then
|
||||
res=$(scm_version)
|
||||
echo "$res" >.scmversion
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
|
||||
if test -e include/config/auto.conf; then
|
||||
. include/config/auto.conf
|
||||
else
|
||||
echo "Error: kernelrelease not valid - run 'make prepare' to update it"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# localversion* files in the build and source directory
|
||||
res="$(collect_files localversion*)"
|
||||
if test ! "$srctree" -ef .; then
|
||||
res="$res$(collect_files "$srctree"/localversion*)"
|
||||
fi
|
||||
|
||||
# CONFIG_LOCALVERSION and LOCALVERSION (if set)
|
||||
res="${res}${CONFIG_LOCALVERSION}${LOCALVERSION}"
|
||||
|
||||
# scm version string if not at a tagged commit
|
||||
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
|
||||
# full scm version string
|
||||
res="$res$(scm_version)"
|
||||
else
|
||||
# append a plus sign if the repository is not in a clean
|
||||
# annotated or signed tagged state (as git describe only
|
||||
# looks at signed or annotated tags - git tag -a/-s) and
|
||||
# LOCALVERSION= is not specified
|
||||
if test "${LOCALVERSION+set}" != "set"; then
|
||||
scm=$(scm_version --short)
|
||||
res="$res${scm:++}"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$res"
|
||||
|
|
Loading…
Reference in New Issue