#!/bin/sh

rm -f ./confkernel_root_user_UC7408P

### Write to ./confkernel_root_user_UC7408P
echo "# eg: output target-2.0.frm" >> ./confkernel_root_user_UC7408P
echo "# eg: input source-file-name filename versionname version mtdno" >> ./confkernel_root_user_UC7408P

if [ "$OEM" -eq 0 ]; then
  echo "output FWR_"$PLATFORM"_kernel_root_user_V"$MAJOR"."$MINOR"_Build_"$BUILDTIME >> ./confkernel_root_user_UC7408P
else
  echo "output FWR_"$PLATFORM"_kernel_root_user_V"$MAJOR"."$MINOR"."$OEM"_Build_"$BUILDTIME >> ./confkernel_root_user_UC7408P
fi

echo "apid 0xE0027408" >> ./confkernel_root_user_UC7408P

if [ $BOEM -eq 0 ]; then
  echo "input /tftpboot/"$BOOTLOADER"_"$BMAJOR"."$BMINOR".bos redboot bios_ver "$BMAJOR"."$BMINOR"."$BOEM"."$BTESTING" 0" >> ./confkernel_root_user_UC7408P
elif [ $BTESTING -eq 0 ]; then
  echo "input /tftpboot/"$BOOTLOADER"_"$BMAJOR"."$BMINOR"."$BOEM".bos redboot bios_ver "$BMAJOR"."$BMINOR"."$BOEM"."$BTESTING" 0" >> ./confkernel_root_user_UC7408P
else
  echo "input /tftpboot/"$BOOTLOADER"_"$BMAJOR"."$BMINOR"."$BOEM"."$TESTING".bos redboot bios_ver "$BMAJOR"."$BMINOR"."$BOEM"."$BTESTING" 0" >> ./confkernel_root_user_UC7408P
fi

echo "input /tftpboot/noaddversion/$KERNEL-$MAJOR.$MINOR.$OEM.$TESTING kernel kernel_ver $MAJOR.$MINOR.$OEM.$TESTING 1" >> ./confkernel_root_user_UC7408P

echo "input /tftpboot/noaddversion/$ROOTDISK-$MAJOR.$MINOR.$OEM.$TESTING root-file-system rootdisk_ver $MAJOR.$MINOR.$OEM.$TESTING 2" >> ./confkernel_root_user_UC7408P

echo "input /tftpboot/noaddversion/$USRDISK-$MAJOR.$MINOR.$OEM.$TESTING user-file-system usrdisk_ver $MAJOR.$MINOR.$OEM.$TESTING 3" >> ./confkernel_root_user_UC7408P


echo "# You must fix to use 'configuration' file name" >> ./confkernel_root_user_UC7408P
echo "# input ../mkrom/rfis directory dir_ver $MAJOR.$MINOR.$OEM.$TESTING 5" >> ./confkernel_root_user_UC7408P
