Skip to content

Commit

Permalink
Merge pull request #1 from goulderb/bdfcdd66382429d409b12349797c78052…
Browse files Browse the repository at this point in the history
…01629b4

Lagfree and Smoothass for the Stratosphere and changed default configuration.
  • Loading branch information
rhcp011235 committed Jul 12, 2012
2 parents 7ccad20 + bdfcdd6 commit 98e2e10
Show file tree
Hide file tree
Showing 11 changed files with 1,453 additions and 63 deletions.
4 changes: 2 additions & 2 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1211,8 +1211,8 @@ source kernel/Kconfig.preempt
config HZ
int
default 128 if ARCH_L7200
default 320 if S5P_HIGH_RES_TIMERS
default 320 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PV210
default 256 if S5P_HIGH_RES_TIMERS
default 200 if ARCH_EBSA110 || ARCH_S3C2410 || ARCH_S5P6440 || ARCH_S5P6442 || ARCH_S5PV210
default OMAP_32K_TIMER_HZ if ARCH_OMAP && OMAP_32K_TIMER
default AT91_TIMER_HZ if ARCH_AT91
default 100
Expand Down
40 changes: 29 additions & 11 deletions arch/arm/configs/stratosphere_defconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.35.7-EP4
# Sun Jan 8 12:40:18 2012
# Linux kernel version: 2.6.35.7-EI2
# Wed Jul 11 00:37:21 2012
#
CONFIG_ARM=y
CONFIG_HAVE_PWM=y
Expand Down Expand Up @@ -164,17 +164,18 @@ CONFIG_LBDAF=y
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_IOSCHED_VR=y
CONFIG_IOSCHED_BFQ=y
CONFIG_CGROUP_BFQIO=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_BFQ is not set
CONFIG_DEFAULT_VR=y
CONFIG_DEFAULT_BFQ=y
# CONFIG_DEFAULT_VR is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="vr"
CONFIG_DEFAULT_IOSCHED="bfq"
# CONFIG_INLINE_SPIN_TRYLOCK is not set
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK is not set
Expand Down Expand Up @@ -405,7 +406,7 @@ CONFIG_PAGE_OFFSET=0xC0000000
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_HZ=320
CONFIG_HZ=256
# CONFIG_THUMB2_KERNEL is not set
CONFIG_AEABI=y
CONFIG_OABI_COMPAT=y
Expand Down Expand Up @@ -454,13 +455,23 @@ CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y
CONFIG_CPU_FREQ_GOV_SMARTASS2=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SMARTASS2 is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_LAGFREE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_SMOOTHASS is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_INTERACTIVE=y
# CONFIG_CPU_FREQ_GOV_SMARTASS is not set
CONFIG_CPU_FREQ_GOV_SMARTASS2=y
CONFIG_CPU_FREQ_GOV_LAGFREE=y
CONFIG_CPU_FREQ_MIN_TICKS=10
CONFIG_CPU_FREQ_SAMPLING_LATENCY_MULTIPLIER=1000
# CONFIG_CPU_FREQ_GOV_SMOOTHASS is not set
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
Expand Down Expand Up @@ -1797,6 +1808,8 @@ CONFIG_ANDROID_LOW_MEMORY_KILLER=y
# RAR Register Driver
#
# CONFIG_IIO is not set
CONFIG_RAMZSWAP=y
# CONFIG_RAMZSWAP_STATS is not set
# CONFIG_BATMAN_ADV is not set
# CONFIG_FB_SM7XX is not set

Expand Down Expand Up @@ -1825,9 +1838,12 @@ CONFIG_SAMSUNG_PHONE_TTY=m
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT23=y
CONFIG_EXT4_FS_XATTR=y
# CONFIG_EXT4_FS_POSIX_ACL is not set
# CONFIG_EXT4_FS_SECURITY is not set
# CONFIG_EXT4_DEBUG is not set
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
Expand Down Expand Up @@ -2206,6 +2222,8 @@ CONFIG_CRC32=y
CONFIG_LIBCRC32C=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_DECOMPRESS_GZIP=y
CONFIG_REED_SOLOMON=y
CONFIG_REED_SOLOMON_ENC8=y
Expand Down
114 changes: 67 additions & 47 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,72 +5,92 @@
#
#

export DEVICE="strat"

# setup
WORK=`pwd`
DATE=$(date +%m%d)
export WORK=`pwd`
export DATE=$(date +%m%d)


# Edit This for your Toolchain Dir
TOOLCHAIN=/opt/toolchains/2009q3-68/bin/arm-none-eabi-
# Declare TOOLCHAIN in the environment: TOOLCHAIN="/blah" sh build.sh
if [ -z "$TOOLCHAIN" ]; then
export TOOLCHAIN=arm-eabi-
fi


# execution!
cd ..

# check for device we're building for
DEVICE="strat"
cd "$DEVICE"_initramfs

# Move out the .git so we dont have a huge kernel and we dont boot :)
mv .git ../.git_ramfs


# Ensure the initramfs exists for our device.
if [ -d "${DEVICE}_initramfs" ]; then
cd "${DEVICE}_initramfs"

# Move out the .git so we dont have a huge kernel and we dont boot :)
if [ -d ".git" ]; then
mv .git ../.git_ramfs
fi

# build the kernel
cd $WORK
echo "***** Building for $DEVICE *****"
# Build the kernel
cd $WORK
echo "***** Building for $DEVICE *****"

# Make Clean and remove everything
make ARCH=arm CROSS_COMPILE="$TOOLCHAIN" mrproper
# Use make mrproper to clean up the directory.
make ARCH=arm CROSS_COMPILE="$TOOLCHAIN" mrproper

# Clean the update.zip area
rm -f update/*.zip update/kernel_update/zImage
# Clean the update.zip area
rm -f update/*.zip update/kernel_update/zImage

# Move out the .git for the kenrel
# Thanks Imnuts for the idea
mv .git ../.git_kernel
# Move out the .git for the kenrel
# Thanks Imnuts for the idea
if [ -d ".git" ]; then
mv .git ../.git_kernel
fi

make ARCH=arm CROSS_COMPILE="$TOOLCHAIN" stratosphere_defconfig
make ARCH=arm CROSS_COMPILE="$TOOLCHAIN" -j16
if [ $? != 0 ]; then
make ARCH=arm CROSS_COMPILE="$TOOLCHAIN" stratosphere_defconfig
make ARCH=arm CROSS_COMPILE="$TOOLCHAIN" -j16
if [ $? != 0 ]; then
echo -e "FAIL!\n\n"
cd ..
mv .git_ramfs "$DEVICE"_initramfs/.git
mv .git_kernel "$WORK"/.git
if [ -d ".git_ramfs" ]; then
mv .git_ramfs "$DEVICE"_initramfs/.git
fi

if [ -d ".git_kernel" ]; then
mv .git_kernel "$WORK"/.git
fi

exit 1
else
echo -e "Success!\n"
rm -f "$WORK"/*log.txt
fi
fi

# Build a recovery odin file
cp arch/arm/boot/zImage recovery.bin
tar -c recovery.bin > "${DATE}_${DEVICE}_recovery.tar"
md5sum -t "${DATE}_${DEVICE}_recovery.tar" >> "${DATE}_${DEVICE}_recovery.tar"
mv "${DATE}_${DEVICE}_recovery.tar" "${DATE}_${DEVICE}_recovery.tar.md5"
rm recovery.bin

# Make the CWM Zip
cp arch/arm/boot/zImage update/kernel_update/zImage
cd update
zip -r -q ../"${DATE}_${DEVICE}.zip" .

# Finish up
cd ../../

# Build a recovery odin file
cp arch/arm/boot/zImage recovery.bin
tar -c recovery.bin > "$DATE"_"$DEVICE"_recovery.tar
md5sum -t "$DATE"_"$DEVICE"_recovery.tar >> "$DATE"_"$DEVICE"_recovery.tar
mv "$DATE"_"$DEVICE"_recovery.tar "$DATE"_"$DEVICE"_recovery.tar.md5
rm recovery.bin

# Make the CWM Zip
cp arch/arm/boot/zImage update/kernel_update/zImage
cd update
zip -r -q kernel_update.zip .
mv kernel_update.zip ../"$DATE"_"$DEVICE".zip

# Finish up
cd ../../
mv .git_ramfs "$DEVICE"_initramfs/.git
mv .git_kernel "$WORK"/.git
cd $WORK
echo -e "***** Successfully compiled for $DEVICE *****\n"
if [ -d ".git_ramfs" ]; then
mv .git_ramfs "$DEVICE"_initramfs/.git
fi

if [ -d ".git_kernel" ]; then
mv .git_kernel "$WORK"/.git
fi

cd $WORK
echo -e "***** Successfully compiled for $DEVICE *****\n"
else
echo "No initramfs found! Aborting."
exit 1
fi
58 changes: 58 additions & 0 deletions drivers/cpufreq/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,26 @@ config CPU_FREQ_DEFAULT_GOV_SMARTASS2
select CPU_FREQ_GOV_SMARTASS2
help
Use the CPUFreq governor 'smartassV2' as default.

config CPU_FREQ_DEFAULT_GOV_LAGFREE
bool "lagfree"
select CPU_FREQ_GOV_LAGFREE
select CPU_FREQ_GOV_PERFORMANCE
help
Use the CPUFreq governor 'lagfree' as default. This allows
you to get a full dynamic frequency capable system by simply
loading your cpufreq low-level hardware driver.
Be aware that not all cpufreq drivers support the lagfree
governor. If unsure have a look at the help section of the
driver. Fallback governor will be the performance governor.

config CPU_FREQ_DEFAULT_GOV_SMOOTHASS
bool "smoothass"
select CPU_FREQ_GOV_SMOOTHASS
select CPU_FREQ_GOV_PERFORMANCE
help
Use CPUFREQ smoothass as default.

endchoice

config CPU_FREQ_GOV_PERFORMANCE
Expand Down Expand Up @@ -229,5 +249,43 @@ config CPU_FREQ_GOV_SMARTASS2
'smartassV2' - a "smart" governor
If in doubt, say N.

config CPU_FREQ_GOV_LAGFREE
tristate "'lagfree' cpufreq governor"
depends on CPU_FREQ
help
'lagfree' - this driver is rather similar to the 'ondemand'
governor both in its source code and its purpose, the difference is
its optimisation for better suitability in a battery powered
environment. The frequency is gracefully increased and decreased
rather than jumping to 100% when speed is required.

To compile this driver as a module, choose M here: the
module will be called cpufreq_lagfree.

For details, take a look at linux/Documentation/cpu-freq.

If in doubt, say N.

config CPU_FREQ_MIN_TICKS
int "Ticks between governor polling interval."
depends on CPU_FREQ_GOV_LAGFREE
default 10
help
Minimum number of ticks between polling interval for governors.

config CPU_FREQ_SAMPLING_LATENCY_MULTIPLIER
int "Sampling rate multiplier for governors."
depends on CPU_FREQ_GOV_LAGFREE
default 1000
help
Sampling latency rate multiplied by the cpu switch latency.
Affects governor polling.

config CPU_FREQ_GOV_SMOOTHASS
tristate "'smoothass' governor"
depends on CPU_FREQ
help
Slightly more aggressive smartass

endif # CPU_FREQ

3 changes: 3 additions & 0 deletions drivers/cpufreq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o
obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE) += cpufreq_interactive.o
obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS) += cpufreq_smartass.o
obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS2) += cpufreq_smartass2.o
obj-$(CONFIG_CPU_FREQ_GOV_LAGFREE) += cpufreq_lagfree.o
obj-$(CONFIG_CPU_FREQ_GOV_SMOOTHASS) += cpufreq_smoothass.o


# CPUfreq cross-arch helpers
obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o
Expand Down
Loading

0 comments on commit 98e2e10

Please sign in to comment.