Skip to content

Commit

Permalink
mmc: disable MMC_CAP_ERASE for MACH_U1 in case I try to build this re…
Browse files Browse the repository at this point in the history
…po for s2

and build script + tiny fix in tmu for s2
  • Loading branch information
gokhanmoral committed Jun 17, 2012
1 parent 13dfaec commit c432773
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-exynos/tmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ extern int mali_voltage_lock_init(void);
extern int mali_voltage_lock_push(int lock_vol);
extern int mali_voltage_lock_pop(void);
#define CONFIG_TC_VOLTAGE /* Temperature compensated voltage */
#else
#define mali_voltage_lock_push(msg...) 0
#define mali_voltage_lock_pop(msg...) 0
#endif

static unsigned int get_curr_temp(struct s5p_tmu_info *info)
Expand Down
1 change: 1 addition & 0 deletions build_kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export KERNELDIR=`readlink -f .`
export RAMFS_SOURCE=`readlink -f $KERNELDIR/../ramfs-sgs3`
export PARENT_DIR=`readlink -f ..`
export USE_SEC_FIPS_MODE=true
CROSS_COMPILE=$PARENT_DIR/android_prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

if [ "${1}" != "" ];then
export KERNELDIR=`readlink -f ${1}`
Expand Down
4 changes: 4 additions & 0 deletions drivers/mmc/host/mshci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2048,7 +2048,11 @@ int mshci_add_host(struct mshci_host *host)
mmc->ops = &mshci_ops;
mmc->f_min = 400000;
mmc->f_max = host->max_clk;
#ifdef CONFIG_MACH_U1
mmc->caps |= MMC_CAP_SDIO_IRQ;
#else
mmc->caps |= MMC_CAP_SDIO_IRQ | MMC_CAP_ERASE;
#endif

mmc->caps |= MMC_CAP_4_BIT_DATA;

Expand Down
46 changes: 46 additions & 0 deletions sgs2-build_kernel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/sh
export KERNELDIR=`readlink -f .`
export INITRAMFS_SOURCE=`readlink -f $KERNELDIR/../initramfs3`
export PARENT_DIR=`readlink -f ..`
export USE_SEC_FIPS_MODE=true

if [ "${1}" != "" ];then
export KERNELDIR=`readlink -f ${1}`
fi

INITRAMFS_TMP="/tmp/initramfs-source"

if [ ! -f $KERNELDIR/.config ];
then
make siyah_sgs2_defconfig
fi

. $KERNELDIR/.config

export ARCH=arm

cd $KERNELDIR/
nice -n 10 make -j4 || exit 1

#remove previous initramfs files
rm -rf $INITRAMFS_TMP
rm -rf $INITRAMFS_TMP.cpio
#copy initramfs files to tmp directory
cp -ax $INITRAMFS_SOURCE $INITRAMFS_TMP
#clear git repositories in initramfs
find $INITRAMFS_TMP -name .git -exec rm -rf {} \;
#remove empty directory placeholders
find $INITRAMFS_TMP -name EMPTY_DIRECTORY -exec rm -rf {} \;
rm -rf $INITRAMFS_TMP/tmp/*
#remove mercurial repository
rm -rf $INITRAMFS_TMP/.hg
#copy modules into initramfs
mkdir -p $INITRAMFS/lib/modules
find -name '*.ko' -exec cp -av {} $INITRAMFS_TMP/lib/modules/ \;
${CROSS_COMPILE}strip --strip-unneeded $INITRAMFS_TMP/lib/modules/*

nice -n 10 make -j3 zImage CONFIG_INITRAMFS_SOURCE="$INITRAMFS_TMP" || exit 1

#cp $KERNELDIR/arch/arm/boot/zImage zImage
$KERNELDIR/mkshbootimg.py $KERNELDIR/zImage $KERNELDIR/arch/arm/boot/zImage $KERNELDIR/payload.tar $KERNELDIR/recovery.tar.xz

0 comments on commit c432773

Please sign in to comment.