View Single Post
  #48 (permalink)  
Old 11-04-2010, 05:40 PM
natemcnutty's Avatar
natemcnutty
VIP Member
Offline
 
Join Date: Nov 2009
Posts: 845
Reputation: 3070
natemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIPnatemcnutty is still contributing even after becoming a VIP
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: What modifications are necessary to create a fork that re-enables the home button

Quote:
Originally Posted by manekineko View Post
Good idea, just didn't want to step on anyone toes in making this the main thread for this patch.
Never have to worry about stepping on my toes

Also, here's the script of what I'm doing to compile. I'll update these occasionally when there are updates worthwhile to re-compile.

Code:
#!/bin/sh
#-------------------------------------------------------------------------
# Build Script for linux-msm-rhod-nand (Android on HTC) kernel, modules, XIP, and NBH
#-------------------------------------------------------------------------
#
# Set the following variables
# ANDROID -- directory with all android sources
ANDROID=~/android
# KERNEL_PATH -- directory containing the linux-msm kernel source
KERNEL_PATH=$ANDROID/linux-msm
# TOOLCHAIN_PATH -- directory containing the arm toolchain
TOOLCHAIN_PATH=$ANDROID/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi
# MODULES_PATH -- directory containing compcache and tiwlan directories
MODULES_PATH=$ANDROID/modules
# OUTPUT_PATH -- directory to write the kernel and modules gzip
OUTPUT_PATH=$ANDROID/output
# rootfs repository
ROOTFS=$ANDROID/eclair-rootfs
#-------------------------------------------------------------------------

# make directories (if they don't exist)
if [ ! -d $MODULES_PATH/mods ] ; then
mkdir $MODULES_PATH/mods
fi
if [ -d $ANDROID/rootfs/.tmp ] ; then
rm -rf $ANDROID/rootfs/.tmp
mkdir $ANDROID/rootfs/.tmp
else
mkdir $ANDROID/rootfs/.tmp
fi

# build kernel and modules
cd $KERNEL_PATH
git pull
git revert --no-commit 6c41ca69
make ARCH=arm htc_msm_android_defconfig
make ARCH=arm CROSS_COMPILE=$TOOLCHAIN_PATH- INSTALL_MOD_PATH=$MODULES_PATH/kernel-modules zImage modules modules_install
[ $? -eq 0 ] || fail "Kernel compilation failure"

# get kernel build version
KER_VER="$(cat $KERNEL_PATH/include/config/kernel.release)"

# copy all drivers to single level directory for compression
cd $MODULES_PATH/kernel-modules
kernmods=$(find -name "*.ko")
for i in $kernmods ; do
    cp $i $MODULES_PATH/mods
done

# compress modules to a tar.gz and move to output
cd $MODULES_PATH/mods
tar czf $MODULES_PATH/modules-$KER_VER.tar.gz .
cd ..
echo "Outputting files to $OUTPUT_PATH/sdcard"
mv modules-$KER_VER.tar.gz $OUTPUT_PATH

# move new kernel
mv $KERNEL_PATH/arch/arm/boot/zImage $OUTPUT_PATH

# build rootfs
# temporary directory to use for building rootfs
TMPDIR=$ANDROID/rootfs/.tmp
REPO="git://gitorious.org/xdandroid-eclair/eclair-rootfs.git"

cd $TMPDIR

REPODIR=${REPO##*/}
REPODIR=${REPODIR%.*}
git clone $REPO $REPODIR
cd $TMPDIR/$REPODIR
[ -z ${BRANCH} ] || git checkout "${BRANCH}"
git revert --no-commit 6c87dd04

GITDESCRIBE="$(git rev-parse --verify --short HEAD)"
DATE=$(date +%Y%m%d)

cd $TMPDIR
mkdir rootfs

cd $TMPDIR/$REPODIR
./scripts/gitclean.sh
cp -a . $TMPDIR/rootfs
chmod u+s $TMPDIR/rootfs/bin/pppd $TMPDIR/rootfs/bin/su

genext2fs --root $TMPDIR/rootfs -U -N 1024 -m 1 -b 15360 $OUTPUT_PATH/rootfs-"$DATE"-"$GITDESCRIBE".img

rm -rf $TMPDIR
I just did a quick and dirty modification of the rootfs build script, so sorry about that. The most important things are to revert the following two commits:

Kernel: git revert --no-commit 6c41ca69
Rootfs: git revert --no-commit 6c87dd04
Reply With Quote
This post has been thanked 2 times.