Commit ad46fb9c authored by Stephen Boyd's avatar Stephen Boyd

skales: meta build scripts

Instead of using Makefiles and such, introduce a 'skales' branch as
a meta branch in the kernel repo. Usage should be simple enough

1) Source the source-me script to setup the PATH

2) init-branch <branch name> to get a branch under b/

3) cd b/<branch name>/kernel and hack away

4) compile with make-arm <insert build options>

5) package a boot.img with package-<arch>
Signed-off-by: 's avatarStephen Boyd <sboyd@codeaurora.org>
parents
#!/bin/sh
#
# Create a branch under b/
prog=$(basename $0)
die() {
echo >&2 "$@"
exit 1
}
USAGE="$prog <branch> [defconfig]"
if test -z $1
then
die $USAGE
fi
base=b/$1
defconfig=$2
# Make new directory for branch
git-new-workdir .git $base/kernel $1 &&
mkdir $base/kobj &&
# Copy optional defconfig to the kobj directory
test -f "$defconfig" &&
cp $defconfig $base/kobj/.config
ln -s $(readlink -f initrds) $base/initrds
#!/bin/sh
# ARM compiler wrapper
make ARCH=arm O=../kobj CROSS_COMPILE=arm-eabi- $@
#!/bin/sh
prog=$(basename $0)
die() {
echo >&2 "$@"
exit 1
}
determine_arch() {
if test -n "$1"
then
echo $1
else
# Allow hardlinks of $prog-<ARCH>
a=$(echo $prog | sed -e 's/.*-//')
echo $a
fi
}
image=zImage
initrd=initrd.gz
pagesize=2048
cmdline=
base=
arch=$(determine_arch $@)
case "$arch" in
g1 | 7201 | 7201a)
cmdline="console=ttyMSM2,115200,n8"
base=0x10000000
;;
7x30 | 7630 | 7230)
cmdline="console=ttyMSM1,115200,n8"
base=0x200000
pagesize=4096
;;
8660 | 8x60)
cmdline="console=hvc0"
base=0x40200000
;;
8960)
cmdline="console=hvc0"
base=0x80200000
;;
*)
die "Unknown architecture $arch"
;;
esac
image=arch/arm/boot/$image
test -f ../kobj/$image || die "Can't find $image. Build a kernel?"
test -f ../initrds/$initrd || die "Can't find $initrd. Any initrds?"
mkbootimg --kernel ../kobj/$image \
--ramdisk ../initrds/$initrd \
--cmdline "$cmdline" \
--base $base \
--pagesize $pagesize \
--output ../boot.img &&
echo "Packaged $(readlink -f ../boot.img)"
package
\ No newline at end of file
package
\ No newline at end of file
package
\ No newline at end of file
package
\ No newline at end of file
#!/bin/sh
export PATH=$PATH:$PWD
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment