diff --git a/releasetools/arm_sdimage.sh b/releasetools/arm_sdimage.sh index cee9cf5cf..c17d4d6dd 100755 --- a/releasetools/arm_sdimage.sh +++ b/releasetools/arm_sdimage.sh @@ -145,18 +145,30 @@ END_SFDISK # mkfs.vfat ${IMG_DIR}/fat.img +# +# Create a uEnv.txt file +# -n default to network boot +# -p add a prefix to the network booted files (e.g. xm/" ./releasetools/gen_uEnv.txt.sh > ${IMG_DIR}/uEnv.txt + +# +# +# options: +# -c set console e.g. tty02 or tty00 +# -v set verbosidy e.g. 0 to 3 +./releasetools/gen_cmdline.txt.sh > ${IMG_DIR}/cmdline.txt + echo "Copying configuration kernel and boot modules" mcopy -bsp -i ${IMG_DIR}/fat.img ${IMG_DIR}/$MLO ::MLO mcopy -bsp -i ${IMG_DIR}/fat.img ${IMG_DIR}/$UBOOT ::u-boot.img mcopy -bsp -i ${IMG_DIR}/fat.img ${IMG_DIR}/uEnv.txt ::uEnv.txt -mcopy -bsp -i ${IMG_DIR}/fat.img releasetools/cmdline.txt ::cmdline.txt +mcopy -bsp -i ${IMG_DIR}/fat.img ${IMG_DIR}/cmdline.txt ::cmdline.txt # # For tftp booting # cp ${IMG_DIR}/uEnv.txt ${OBJ}/ -cp releasetools/cmdline.txt ${OBJ}/ +cp ${IMG_DIR}/cmdline.txt ${OBJ}/ # # Do some last processing of the kernel and servers before also putting diff --git a/releasetools/cmdline.txt b/releasetools/cmdline.txt deleted file mode 100644 index eb6b0a177..000000000 --- a/releasetools/cmdline.txt +++ /dev/null @@ -1 +0,0 @@ -console=tty02 rootdevname=c0d0p1s0 verbose=3 diff --git a/releasetools/gen_cmdline.txt.sh b/releasetools/gen_cmdline.txt.sh new file mode 100755 index 000000000..f258c2411 --- /dev/null +++ b/releasetools/gen_cmdline.txt.sh @@ -0,0 +1,25 @@ +#!/bin/sh +#default for the beagleboard-xM +CONSOLE=tty02 +#verbosity +VERBOSE=3 +while getopts "c:v:?" c +do + case "$c" in + \?) + echo "Usage: $0 [-c consoletty] [-v level]" >&2 + exit 1 + ;; + c) + # genrate netbooting uEnv.txt + CONSOLE=$OPTARG + ;; + v) + # genrate netbooting uEnv.txt + VERBOSE=$OPTARG + ;; + esac +done + + +echo console=$CONSOLE rootdevname=c0d0p1s0 verbose=$VERBOSE