PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2
Register Community Search

Notices


Reply
 
LinkBack Thread Tools Display Modes
  #121 (permalink)  
Old 03-16-2011, 12:29 PM
jerryyyyy's Avatar
Halfway to VIP Status
Offline
Pocket PC: Touch Pro 2
Carrier: Sprint
Location: Stanford, CA
 
Join Date: Jul 2007
Posts: 478
Reputation: 380
jerryyyyy is becoming a PPCGeeks regularjerryyyyy is becoming a PPCGeeks regularjerryyyyy is becoming a PPCGeeks regularjerryyyyy is becoming a PPCGeeks regular
Mentioned: 2 Post(s)
Tagged: 0 Thread(s)
Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin

Quote:
Originally Posted by rpierce99 View Post
afaik you don't want to just gzip the directory, what I did is write a short shell script that copies all of the .ko files (searching recursively) to a different folder and then gzips that, using the modues-versionstuff.tar.gz format. I don't remember where I found the example script (could have been the first post or a link from the first post) but I only had to make some small modifications to get it to work.
Worked fine. Thanks...
__________________
Sprint: G1000, HTC-6600, 6800, TP2 now Optimus S with Stock Android 2.2.2.
Reply With Quote
  #122 (permalink)  
Old 03-17-2011, 06:29 PM
MassStash's Avatar
Regular 'Geeker
Offline
Pocket PC: Rhodium
Carrier: Sprint
Location: Il
 
Join Date: Oct 2008
Posts: 437
Reputation: 285
MassStash is becoming a PPCGeeks regularMassStash is becoming a PPCGeeks regularMassStash is becoming a PPCGeeks regular
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Anyone try compiling a nand kernel lately?? nbh doesn't package up right for me or something. I can't get past first boot splash...

Off the slightly tweaked FRX05 Nandroid ROM, fuk winmo...
__________________
Rockin' The Official TouchPro 2 aka "The dopest phone with keyboard still":
F**k windows mobile, NAND flash to droid....
Reply With Quote
  #123 (permalink)  
Old 03-19-2011, 03:34 AM
tiger2wander's Avatar
PPCGeeks Regular
Offline
Pocket PC: Verizon TP2 CDMA XV6875 (RHOD500) - O2 XDA IIs
Carrier: VN Mobifone (GSM, 3G)
 
Join Date: Feb 2009
Posts: 107
Reputation: 150
tiger2wander is keeping up the good worktiger2wander is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin

Hi there,

I've just built success and got ruu_signed.NBH & modules-2.6.27.46-01254-g2a78bb6.tar.gz files.

Since new NAND version came and put everything inside device memory (only use sdcard for update) I want to known how to update zImage & modules.
Is there any guide to made androidupdate.tgz?
Can I use 'recovery' to update that file?

I was made a androidupdate.tgz by tar-zipped a directory with:
Code:
data
`-- modules
    |-- bcm4329.ko
    |-- cfg80211.ko
    |-- ip_queue.ko
    |-- iptable_filter.ko
....
then put it into /sdcard/andboot/androidupdate.tgz, update RHOIMG.NBH, reboot, stuck at boot. Error message: "not found rootfs" and fork a sh shell.

--
Best regard!
Uoc Nguyen
__________________
Reply With Quote
  #124 (permalink)  
Old 03-19-2011, 12:52 PM
natemcnutty's Avatar
VIP Member
Offline
Pocket PC: VZW Touch Pro 2
Carrier: Verizon Wireless
Threadstarter
 
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: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin

Quote:
Originally Posted by tiger2wander View Post
Hi there,

I've just built success and got ruu_signed.NBH & modules-2.6.27.46-01254-g2a78bb6.tar.gz files.

Since new NAND version came and put everything inside device memory (only use sdcard for update) I want to known how to update zImage & modules.
Is there any guide to made androidupdate.tgz?
Can I use 'recovery' to update that file?

I was made a androidupdate.tgz by tar-zipped a directory with:
Code:
data
`-- modules
    |-- bcm4329.ko
    |-- cfg80211.ko
    |-- ip_queue.ko
    |-- iptable_filter.ko
....
then put it into /sdcard/andboot/androidupdate.tgz, update RHOIMG.NBH, reboot, stuck at boot. Error message: "not found rootfs" and fork a sh shell.

--
Best regard!
Uoc Nguyen
You have the right idea with the modules. All modules just go in a tgz with the structure /data/modules inside it. All you really need to do is grab the correct initrd.gz from here: bootenv in Tinboot for linux-msm - Gitorious and put it in your /tinboot-linux-msm/kernel directory with the zImage.

Again, I apologize for the delay on updating the first post. I'm heading out to the zoo with the wife, but we'll be back in a couple of hours and I'll get it updated then. She has a baby shower after we get back, so that should give me plenty of time
__________________
Reply With Quote
This post has been thanked 1 times.
  #125 (permalink)  
Old 03-19-2011, 04:09 PM
tiger2wander's Avatar
PPCGeeks Regular
Offline
Pocket PC: Verizon TP2 CDMA XV6875 (RHOD500) - O2 XDA IIs
Carrier: VN Mobifone (GSM, 3G)
 
Join Date: Feb 2009
Posts: 107
Reputation: 150
tiger2wander is keeping up the good worktiger2wander is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin

yeah, thanks, that's what I need, man. I'll re-compile them tomorrow (here is 3:05AM, btw need asleep).

Also, if you are going to edit the first post, don't forget to modify some line to make newcomer do correct things!
Code:
cat ~/android/linux-msm-rhod-nand/arch/arm/include/config/kernel.release
to
Code:
cat ~/android/linux-msm-rhod-nand/include/config/kernel.release
and add '-p' option to mkdir command to make it automatically create missing parent path if any to collapse code, for example:
Code:
if [ ! -d "$ANDROID/output/sdcard" ] ; then
   mkdir -p $ANDROID/output/sdcard
fi
--
Best regard!
Uoc Nguyen
Reply With Quote
This post has been thanked 1 times.
  #126 (permalink)  
Old 03-19-2011, 10:40 PM
MassStash's Avatar
Regular 'Geeker
Offline
Pocket PC: Rhodium
Carrier: Sprint
Location: Il
 
Join Date: Oct 2008
Posts: 437
Reputation: 285
MassStash is becoming a PPCGeeks regularMassStash is becoming a PPCGeeks regularMassStash is becoming a PPCGeeks regular
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
I can't get past first boot splash stiiiiiiiiill....

Off the slightly tweaked FRX05 Nandroid ROM, fu(k winmo...
Reply With Quote
  #127 (permalink)  
Old 03-20-2011, 01:36 AM
natemcnutty's Avatar
VIP Member
Offline
Pocket PC: VZW Touch Pro 2
Carrier: Verizon Wireless
Threadstarter
 
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: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin

Quote:
Originally Posted by tiger2wander View Post
yeah, thanks, that's what I need, man. I'll re-compile them tomorrow (here is 3:05AM, btw need asleep).

Also, if you are going to edit the first post, don't forget to modify some line to make newcomer do correct things!
Code:
cat ~/android/linux-msm-rhod-nand/arch/arm/include/config/kernel.release
to
Code:
cat ~/android/linux-msm-rhod-nand/include/config/kernel.release
and add '-p' option to mkdir command to make it automatically create missing parent path if any to collapse code, for example:
Code:
if [ ! -d "$ANDROID/output/sdcard" ] ; then
   mkdir -p $ANDROID/output/sdcard
fi
--
Best regard!
Uoc Nguyen
I very much appreciate the help. As I've stated before, I wouldn't consider myself an expert at all with Linux, and any feedback is always welcome. I'm sure there are a lot of things in my scripts that could be improved, so keep them coming

Also, I just updated the first post with some of what I had. I'm still refining a few things, and the 2nd post will be updated shortly.
Reply With Quote
This post has been thanked 1 times.
  #128 (permalink)  
Old 03-20-2011, 03:12 AM
tiger2wander's Avatar
PPCGeeks Regular
Offline
Pocket PC: Verizon TP2 CDMA XV6875 (RHOD500) - O2 XDA IIs
Carrier: VN Mobifone (GSM, 3G)
 
Join Date: Feb 2009
Posts: 107
Reputation: 150
tiger2wander is keeping up the good worktiger2wander is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin

Great update, natemcnutty!
Reply With Quote
  #129 (permalink)  
Old 03-20-2011, 04:02 AM
tiger2wander's Avatar
PPCGeeks Regular
Offline
Pocket PC: Verizon TP2 CDMA XV6875 (RHOD500) - O2 XDA IIs
Carrier: VN Mobifone (GSM, 3G)
 
Join Date: Feb 2009
Posts: 107
Reputation: 150
tiger2wander is keeping up the good worktiger2wander is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin

Hey, natemcnutty

Need modify fullbuild.sh to fix this:
Code:
./fullbuild.sh: 38: Syntax error: "fi" unexpected (expecting "then")
from
Code:
 36 if [ ! -d $ANDROID/androidupdate/data/modules
 37      mkdir -p $ANDROID/androidupdate/data/modules
 38 fi
to
Code:
 36 if [ ! -d $ANDROID/androidupdate/data/modules ]; then
 37      mkdir -p $ANDROID/androidupdate/data/modules
 38 fi
previous snippets is missing ']; then' in 'if' clause, also we need to create system dir in androidupdate:
Code:
  39 if [ ! -d $ANDROID/androidupdate/system ]; then
  40      mkdir -p $ANDROID/androidupdate/system
  41 fi
Here is my modified script, tested and build successfully:
Code:
#!/bin/sh
#-------------------------------------------------------------------------
# Build Script for linux-msm-rhod-nand (Android on HTC) kernel, modules, XIP, and NBH
#-------------------------------------------------------------------------
#
# Set the following variables
# ANDROID -- Root director for Android files
ANDROID=~/android
# TINBOOT -- tinboot directory
TINBOOT=$ANDROID/tinboot-linux-msm
# KERNEL_PATH -- directory containing the linux-msm kernel source
KERNEL_PATH=$ANDROID/linux-msm-rhod-nand
# 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 for modules
MODULES_PATH=$TINBOOT/modules
#-------------------------------------------------------------------------

# do some cleanup before building if zImage already exists
echo "Removing previous zImage"
if [ -f $TINBOOT/kernel/zImage ] ; then
     rm $TINBOOT/kernel/zImage
fi

# build kernel and modules
#export ARCH=arm
cd $KERNEL_PATH
make clean
make ARCH=arm htc_msm_nand_defconfig
make ARCH=arm CROSS_COMPILE=$TOOLCHAIN_PATH- INSTALL_MOD_PATH=$MODULES_PATH zImage modules modules_install
[ $? -eq 0 ] || fail "Kernel compilation failure"

# copy all drivers to single level directory for compression
cd $MODULES_PATH
KERNMODS=$(find -name "*.ko")
if [ ! -d $ANDROID/androidupdate/data/modules ]; then
     mkdir -p $ANDROID/androidupdate/data/modules
fi
if [ ! -d $ANDROID/androidupdate/system ]; then
     mkdir -p $ANDROID/androidupdate/system
fi
for i in $KERNMODS ; do
     cp $i $ANDROID/androidupdate/data/modules
done

# compress modules to a tar.gz and move to output
echo "Outputting modules to Desktop"
cd $ANDROID/androidupdate
tar cvzf $ANDROID/androidupdate.tgz data system
rm -rf $ANDROID/androidupdate/data/modules
mkdir $ANDROID/androidupdate/data/modules

# clean up modules
rm -Rf $MODULES_PATH
mkdir $MODULES_PATH
rm -Rf $KERNEL_PATH/lib/modules

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

#-----start build XIP-----
# remove old XIP if it exists
cd $TINBOOT
if [  -f xip/rhod ]; then
    rm xip/rhod
    echo Deleting old XIP
fi

# make XIP folder if it does not exist
if [ ! -d "$TINBOOT/xip" ] ; then
mkdir $TINBOOT/xip
fi

# compile tinboot XIP
echo "Start compiling tinboot/xip for rhod....."
$TOOLCHAIN_PATH-as  tinboot/tinboot2.S -o tinboot.o --defsym rhod=1 --defsym MTYPE=2292
$TOOLCHAIN_PATH-objcopy tinboot.o -O binary tinbootxip
mv tinbootxip xip/rhod

# cleanup tinboot
rm tinboot.o

# make sure XIP build was successful
if [ ! -f xip/rhod ] ; then
    fail "XIP build failed. XIP file was not found."
fi

#-----start build NBH-----
# clean up previous log file
if [ -e "tools/log" ]; then
rm tools/log
fi

# compile tinboot
cp tools/rhod_payload2 os.nb.payload

echo "Inserting tinboot into payload"
wine tools/osnbtool -c os.nb.payload 1 xip/rhod >> tools/log
mv os.nb.payload.NEW os.nb.payload >> tools/log

echo "Inserting blank imgfs into payload"
wine tools/ImgfsToNb.exe  tools/imgfs.bin os.nb.payload os-new.nb.payload >> tools/log

echo "Creating os.nb portion of nbh"
tools/nbmerge < os-new.nb.payload > os-new.nb

echo "Creating NBH"
wine tools/yang.exe -F RHODIMG.NBH -f os-new.nb -t 0x400 -s 64 -d RHOD****0 -c 11111111 -v Tinboot -l WWE >> tools/log

# clean up payloads
mv RHODIMG.NBH $ANDROID/RHODIMG.NBH
rm os.nb.payload
rm os-new.nb.payload
rm os-new.nb

# clean up tinboot directory
rm -rf xip
--
Best regard!
Uoc Nguyen
Reply With Quote
  #130 (permalink)  
Old 03-20-2011, 03:45 PM
natemcnutty's Avatar
VIP Member
Offline
Pocket PC: VZW Touch Pro 2
Carrier: Verizon Wireless
Threadstarter
 
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: How To Compile Your Own Kernels, Modules, Tinboot (NAND boot), and More for Begin

Quote:
Originally Posted by tiger2wander View Post
Hey, natemcnutty

Need modify fullbuild.sh to fix this:
Code:
./fullbuild.sh: 38: Syntax error: "fi" unexpected (expecting "then")
from
Code:
 36 if [ ! -d $ANDROID/androidupdate/data/modules
 37      mkdir -p $ANDROID/androidupdate/data/modules
 38 fi
to
Code:
 36 if [ ! -d $ANDROID/androidupdate/data/modules ]; then
 37      mkdir -p $ANDROID/androidupdate/data/modules
 38 fi
previous snippets is missing ']; then' in 'if' clause, also we need to create system dir in androidupdate:
Code:
  39 if [ ! -d $ANDROID/androidupdate/system ]; then
  40      mkdir -p $ANDROID/androidupdate/system
  41 fi
Here is my modified script, tested and build successfully:
Code:
#!/bin/sh
#-------------------------------------------------------------------------
# Build Script for linux-msm-rhod-nand (Android on HTC) kernel, modules, XIP, and NBH
#-------------------------------------------------------------------------
#
# Set the following variables
# ANDROID -- Root director for Android files
ANDROID=~/android
# TINBOOT -- tinboot directory
TINBOOT=$ANDROID/tinboot-linux-msm
# KERNEL_PATH -- directory containing the linux-msm kernel source
KERNEL_PATH=$ANDROID/linux-msm-rhod-nand
# 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 for modules
MODULES_PATH=$TINBOOT/modules
#-------------------------------------------------------------------------

# do some cleanup before building if zImage already exists
echo "Removing previous zImage"
if [ -f $TINBOOT/kernel/zImage ] ; then
     rm $TINBOOT/kernel/zImage
fi

# build kernel and modules
#export ARCH=arm
cd $KERNEL_PATH
make clean
make ARCH=arm htc_msm_nand_defconfig
make ARCH=arm CROSS_COMPILE=$TOOLCHAIN_PATH- INSTALL_MOD_PATH=$MODULES_PATH zImage modules modules_install
[ $? -eq 0 ] || fail "Kernel compilation failure"

# copy all drivers to single level directory for compression
cd $MODULES_PATH
KERNMODS=$(find -name "*.ko")
if [ ! -d $ANDROID/androidupdate/data/modules ]; then
     mkdir -p $ANDROID/androidupdate/data/modules
fi
if [ ! -d $ANDROID/androidupdate/system ]; then
     mkdir -p $ANDROID/androidupdate/system
fi
for i in $KERNMODS ; do
     cp $i $ANDROID/androidupdate/data/modules
done

# compress modules to a tar.gz and move to output
echo "Outputting modules to Desktop"
cd $ANDROID/androidupdate
tar cvzf $ANDROID/androidupdate.tgz data system
rm -rf $ANDROID/androidupdate/data/modules
mkdir $ANDROID/androidupdate/data/modules

# clean up modules
rm -Rf $MODULES_PATH
mkdir $MODULES_PATH
rm -Rf $KERNEL_PATH/lib/modules

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

#-----start build XIP-----
# remove old XIP if it exists
cd $TINBOOT
if [  -f xip/rhod ]; then
    rm xip/rhod
    echo Deleting old XIP
fi

# make XIP folder if it does not exist
if [ ! -d "$TINBOOT/xip" ] ; then
mkdir $TINBOOT/xip
fi

# compile tinboot XIP
echo "Start compiling tinboot/xip for rhod....."
$TOOLCHAIN_PATH-as  tinboot/tinboot2.S -o tinboot.o --defsym rhod=1 --defsym MTYPE=2292
$TOOLCHAIN_PATH-objcopy tinboot.o -O binary tinbootxip
mv tinbootxip xip/rhod

# cleanup tinboot
rm tinboot.o

# make sure XIP build was successful
if [ ! -f xip/rhod ] ; then
    fail "XIP build failed. XIP file was not found."
fi

#-----start build NBH-----
# clean up previous log file
if [ -e "tools/log" ]; then
rm tools/log
fi

# compile tinboot
cp tools/rhod_payload2 os.nb.payload

echo "Inserting tinboot into payload"
wine tools/osnbtool -c os.nb.payload 1 xip/rhod >> tools/log
mv os.nb.payload.NEW os.nb.payload >> tools/log

echo "Inserting blank imgfs into payload"
wine tools/ImgfsToNb.exe  tools/imgfs.bin os.nb.payload os-new.nb.payload >> tools/log

echo "Creating os.nb portion of nbh"
tools/nbmerge < os-new.nb.payload > os-new.nb

echo "Creating NBH"
wine tools/yang.exe -F RHODIMG.NBH -f os-new.nb -t 0x400 -s 64 -d RHOD****0 -c 11111111 -v Tinboot -l WWE >> tools/log

# clean up payloads
mv RHODIMG.NBH $ANDROID/RHODIMG.NBH
rm os.nb.payload
rm os-new.nb.payload
rm os-new.nb

# clean up tinboot directory
rm -rf xip
--
Best regard!
Uoc Nguyen
Thanks, that was a last minute addition to the script based on your previous input. I had to change a couple of things from my script to keep in line with what I had originally posted as well, so thanks for catching those. I'll update them right now
Reply With Quote
Reply

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Touch Pro 2 > Android On TP2


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 11:14 AM.


Powered by vBulletin® ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com