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