Commit a717ed8b authored by Joanne Hugé's avatar Joanne Hugé

Add u-boot binary and include core option in compile-kernel

parent 243742a5
custom-kernels
boot-ressources/rootfs.tar.bz2
boot-ressources/u-boot-sunxi-with-spl.bin
#!/bin/bash
usage() {
echo "Usage: $0 [-hgdkm] [-l LINUX_PATH] [-o OUTPUT_STR | -O OUTPUT_NAME] (-p | -u CONFIG_PATH | -c CONFIG_PATH | -n OLD_CONFIG_PATH NEW_CONFIG_PATH)"
echo "Usage: $0 [-hgdkm] [-j N_CORES] [-l LINUX_PATH] [-o OUTPUT_STR | -O OUTPUT_NAME] (-p | -u CONFIG_PATH | -c CONFIG_PATH | -n OLD_CONFIG_PATH NEW_CONFIG_PATH)"
exit 1;
}
linux_path=$HOME/linux
output_str=""
nb_cores=4
while getopts "hgdkmpsu:c:nl:o:O:" opt; do
while getopts "hgdkmpsu:c:nl:o:O:j:" opt; do
case "${opt}" in
h )
usage
......@@ -55,6 +56,9 @@ while getopts "hgdkmpsu:c:nl:o:O:" opt; do
O )
output_name="${OPTARG}"
;;
j )
nb_cores="${OPTARG}"
;;
* )
usage
;;
......@@ -120,15 +124,15 @@ fi
if [ -n "${compile_kernel}" ]; then
echo "Compiling kernel...";
make -j20 LOADADDR=0x48000000 uImage;
make -j$nb_cores LOADADDR=0x48000000 uImage;
echo "Kernel compilation done";
fi
if [ -n "${compile_modules}" ]; then
echo "Compiling modules...";
make -j20 modules;
make -j$nb_cores modules;
rm -rf output
make -j20 INSTALL_MOD_PATH=output modules modules_install;
make -j$nb_cores INSTALL_MOD_PATH=output modules modules_install;
echo "Modules compilation done";
fi
......@@ -169,7 +173,7 @@ fi
echo "Compressing archive...";
cd ../$output_name;
tar cf - * | pigz -9 -p 20 > ../$output_name.tar.gz;
tar cf - * | pigz -9 -p $nb_cores > ../$output_name.tar.gz;
cd ..;
echo "Removing output folder...";
......
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