Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Add skip-kernel-rebuild option to BUILDME.sh to skip doing a full
Browse files Browse the repository at this point in the history
rebuild of both kernels each time the script is run
  • Loading branch information
lurch committed Feb 7, 2015
1 parent b1a209f commit b3a3aaf
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions BUILDME.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ if [ -e "$BUILD_DIR" ]; then
rm -rf "$BUILD_DIR/recovery-$(get_package_version recovery)" || true
fi

SKIP_KERNEL_REBUILD=0

for i in $*; do
# Update raspberrypi/firmware master HEAD version in package/rpi-firmware/rpi-firmware.mk to latest
if [ $i = "update-firmware" ]; then
Expand All @@ -123,6 +125,11 @@ for i in $*; do
update_github_kernel_version raspberrypi/linux rpi-3.18.y
fi

# Option to build just recovery without completely rebuilding both kernels
if [ $i = "skip-kernel-rebuild" ]; then
SKIP_KERNEL_REBUILD=1
fi

# Early-exit (in case we want to just update config files without doing a build)
if [ $i = "nobuild" ]; then
exit
Expand All @@ -138,17 +145,21 @@ mkdir -p "$FINAL_OUTPUT_DIR"
mkdir -p "$FINAL_OUTPUT_DIR/os"
cp -r ../sdcontent/* "$FINAL_OUTPUT_DIR"

# Rebuild kernel for ARMv7
select_kernelconfig armv7
make linux-reconfigure
# copy ARMv7 kernel
cp "$IMAGES_DIR/zImage" "$FINAL_OUTPUT_DIR/recovery7.img"

# Rebuild kernel for ARMv6
select_kernelconfig armv6
make linux-reconfigure
# copy ARMv6 kernel
cp "$IMAGES_DIR/zImage" "$FINAL_OUTPUT_DIR/recovery.img"
if [ $SKIP_KERNEL_REBUILD -ne 1 ]; then
# Rebuild kernel for ARMv7
select_kernelconfig armv7
make linux-reconfigure
# copy ARMv7 kernel
cp "$IMAGES_DIR/zImage" "$FINAL_OUTPUT_DIR/recovery7.img"

# Rebuild kernel for ARMv6
select_kernelconfig armv6
make linux-reconfigure
# copy ARMv6 kernel
cp "$IMAGES_DIR/zImage" "$FINAL_OUTPUT_DIR/recovery.img"
else
echo "Warning: kernels in '$NOOBS_OUTPUT_DIR' directory haven't been updated"
fi

# copy rootfs
cp "$IMAGES_DIR/rootfs.cpio.lzo" "$FINAL_OUTPUT_DIR/recovery.rfs"
Expand Down

0 comments on commit b3a3aaf

Please sign in to comment.