-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb4ab0f
commit 00d984d
Showing
7 changed files
with
117 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
source $(dirname $0)/color | ||
cd $(dirname $0)/.. | ||
|
||
DEF_CONFIG=${DEFCONFIG:="bcmrpi3_defconfig"} | ||
MAKE_CMD="make -j $(nproc) ARCH=$KERNEL_ARCH" | ||
|
||
echo "`yellow [START]` build kernel and modules..." | ||
pushd ${DOWNLOADS}/kernel | ||
# add kernel branding for rancheros | ||
sed -i 's/^EXTRAVERSION =.*/EXTRAVERSION = -rancheros/g' Makefile | ||
export LOCALVERSION="" | ||
|
||
# configure the kernel | ||
$MAKE_CMD $DEF_CONFIG | ||
|
||
# copy .config to the /source/build/kernel directory | ||
KERNEL_RELEASE=$($MAKE_CMD kernelrelease | grep "^4") | ||
cp .config /source/build/kernel/$KERNEL_RELEASE.config | ||
|
||
# build kernel and modules | ||
$MAKE_CMD | ||
$MAKE_CMD modules | ||
|
||
# install kernel modules | ||
INSTALL_DIR=${DOWNLOADS}/kernel/$KERNEL_RELEASE | ||
if [[ -d $INSTALL_DIR ]]; then | ||
rm -rf $INSTALL_DIR | ||
mkdir -p $INSTALL_DIR | ||
fi | ||
$MAKE_CMD INSTALL_MOD_PATH=$INSTALL_DIR modules_install | ||
rm $INSTALL_DIR/lib/modules/$KERNEL_RELEASE/{build,source} | ||
|
||
# build kernel modules' dependencies | ||
depmod -a -b $INSTALL_DIR $KERNEL_RELEASE | ||
|
||
# install kernel, dtb and overlays | ||
mkdir -p $INSTALL_DIR/boot/overlays | ||
cp arch/arm64/boot/Image $INSTALL_DIR/boot/kernel8.img | ||
cp arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b.dtb $INSTALL_DIR/boot/ | ||
cp arch/arm64/boot/dts/broadcom/bcm2710-rpi-3-b-plus.dtb $INSTALL_DIR/boot/ | ||
cp arch/arm64/boot/dts/overlays/*.dtbo $INSTALL_DIR/boot/overlays/ | ||
popd | ||
echo "`green [FINISHED]` build kernel and modules..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
source $(dirname $0)/version | ||
cd $(dirname $0)/.. | ||
|
||
./scripts/download | ||
./scripts/download | ||
./scripts/build | ||
./scripts/package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
source $(dirname $0)/version | ||
source $(dirname $0)/color | ||
cd $(dirname $0)/.. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
source $(dirname $0)/color | ||
cd $(dirname $0)/.. | ||
|
||
: ${PACKAGE_KERNEL_DIR:=/source/dist/kernel} | ||
: ${PACKAGE_FIRMWARE_DIR:=/source/dist/firmware} | ||
: ${INSTALL_DIR:=$KERNEL_VERSION-rancheros-v8} | ||
: ${KERNEL_CONFIG:=$KERNEL_VERSION-rancheros-v8.config} | ||
|
||
echo "`yellow [STARTING]` prepare package directories..." | ||
mkdir -p $PACKAGE_KERNEL_DIR | ||
mkdir -p $PACKAGE_FIRMWARE_DIR | ||
echo "`green [FINISHED]` prepare package directories..." | ||
|
||
echo "`yellow [STARTING]` package kernel files..." | ||
pushd ${DOWNLOADS}/kernel | ||
tar -cvzf $KERNEL_VERSION-rancheros-v8.tar.gz -C $INSTALL_DIR . | ||
sha256sum $KERNEL_VERSION-rancheros-v8.tar.gz > $KERNEL_VERSION-rancheros-v8.tar.gz.sha256 | ||
popd | ||
echo "`green [FINISHED]` package kernel files..." | ||
|
||
echo "`yellow [STARTING]` package boot files..." | ||
pushd ${DOWNLOADS}/kernel | ||
tar -cvzf bootfiles.tar.gz -C $INSTALL_DIR/boot . | ||
sha256sum bootfiles.tar.gz > bootfiles.tar.gz.sha256 | ||
popd | ||
echo "`green [FINISHED]` package boot files..." | ||
|
||
echo "`yellow [START]` package firmware files..." | ||
pushd ${DOWNLOADS}/firmware | ||
FILE_LIST=" | ||
boot/LICENCE.* | ||
boot/bootcode.bin | ||
boot/fixup*.dat | ||
boot/start*.elf | ||
" | ||
tar -cvzf rpi-bootloader.tar.gz $FILE_LIST | ||
sha256sum rpi-bootloader.tar.gz > rpi-bootloader.tar.gz.sha256 | ||
popd | ||
echo "`green [FINISHED]` build firmware files..." | ||
|
||
echo "`yellow [STARTING]` copy necessary files to the dest..." | ||
pushd ${DOWNLOADS}/kernel | ||
cp $KERNEL_VERSION-rancheros-v8.tar.gz* $PACKAGE_KERNEL_DIR | ||
cp bootfiles.tar.gz* $PACKAGE_KERNEL_DIR | ||
cp /source/build/kernel/$KERNEL_CONFIG $PACKAGE_KERNEL_DIR | ||
popd | ||
pushd ${DOWNLOADS}/firmware | ||
cp rpi-bootloader.tar.gz* $PACKAGE_FIRMWARE_DIR | ||
popd | ||
echo "v$KERNEL_VERSION-rancher" > /source/dist/version | ||
echo "`green [FINISHED]` copy necessary files to the dest..." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
VERSION=$(cat dist/version) | ||
|
||
for file in $(ls dist/kernel); do | ||
github-release upload --user Jason-ZW --repo os-raspberrypi --tag ${VERSION} --file ./dist/kernel/${file} --name ${file} | ||
done | ||
|
||
for file in $(ls dist/firmware); do | ||
github-release upload --user Jason-ZW --repo os-raspberrypi --tag ${VERSION} --file ./dist/firmware/${file} --name ${file} | ||
done |
This file was deleted.
Oops, something went wrong.