Wirelessly posted (Opera/9.80 (Android; Opera Mini/6.0.24212/24.743; U; en) Presto/2.5.25 Version/10.54)
Quote:
Originally Posted by [ACL
]
Quote:
Originally Posted by natemcnutty
My tinboot2.S is the same as git. All I did was name it recovery.tgz, put it in /bootenv/initrd, and then built initrd.gz. Then I copied that into /tinboot-linux-msm/kernel, and built the rest. Here is my build script:
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=~/Desktop/android
# TINBOOT -- tinboot directory
TINBOOT=$ANDROID/tinboot-linux-msm
# TOOLCHAIN_PATH -- directory containing the arm toolchain
TOOLCHAIN_PATH=$ANDROID/toolchain/arm-2010.09/bin/arm-none-eabi
#-------------------------------------------------------------------------
#build initrd and copy to Tinboot
cd $ANDROID/bootenv
sh buildInitrd
cp -f initrd.gz $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
rm os.nb.payload
rm os-new.nb.payload
rm os-new.nb
# clean up tinboot directory
rm -rf xip
mv -f RHODIMG.NBH ~/Desktop
I know this works because I had arrrghhh and others flash the 5MB one that had full busybox in recovery without any issues. Do you think it could be a toolchain difference, or is it possible I'm compiling the NBH differently?
|
ahh i see the differences. The payload is diff plus you are using osnbtool.
I lost track of all the payloads we had. Is your rhod_payload2 different that the rhod_payload we use for git? remember autobuild uses exactly wahts on git.
|
Ahh yes. The payload 2 is really important. That's the one I fixed the partition table! In the other payload, fatfs partition overwrites tinboot area on reboot.
Also, using nbtools fixes the partition tables based on size of tinboot's XIP.