This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Bug in create-sdcard.sh?

When running the script. it asks for 3 diff areas to get custom files from when NOT using pre-built images.

1) boot files (where it wants MLO and uboot.img) to put into the fat32 file system

2) kernel and the dtb files

3) rootfs

In the section of the script where it is about to copy the kernel and dtb files, the below code attempts to get the kernel filename by doing an 'ls' of the user supplied directory for the bootfiles...  But that directory doesn't necessarily contain the kernel since its just a user area that the script asked for to find MLO and uimage.bin..  It then uses that name to copy the kernel from the kernel_dtb user area...  I didnt see anywhere in the custom branch of the script that expects/wants the kernel in the user boot area.

I changed the line to : CLEANKERNELNAME=`ls "$KERNELUSERFILEPATH/$KERNELIMAGE" | grep -o [uz]Image` and it works instead of spouting an error.

if [ "$KERNELFILESOPTION" == "2" ]
then

mkdir -p $PATH_TO_SDROOTFS/boot

if [ "$KERNELIMAGE" != "" ] ; then

CLEANKERNELNAME=`ls "$BOOTFILEPATH/$KERNELIMAGE" | grep -o [uz]Image`
cp -f $KERNELUSERFILEPATH/$KERNELIMAGE $PATH_TO_SDROOTFS/boot/$CLEANKERNELNAME
echo "Kernel image copied"
else
echo "$KERNELIMAGE file not found"
fi