--- /dev/null
+setenv console 'tty0'
+setenv vram '32M'
+setenv dvimode '1920x1080MR-16@24 mem=99M@0x80000000 mem=384M@0x88000000 omapfb.vram=0:20M,1:8M,2:4M'
+run loaduimage
+run mmcboot
--- /dev/null
+setenv vram '16M'
+setenv dvimode '1280x1024MR-24@60 mem=99M@0x80000000 mem=384M@0x88000000 omapfb.vram=0:8M,1:4M,2:4M'
+run loaduimage
+run mmcboot
--- /dev/null
+setenv console tty0
+setenv vram '24M'
+setenv dvimode 'hd720 mem=99M@0x80000000 mem=384M@0x88000000 omapfb.vram=0:12M,1:8M,2:4M'
+run loaduimage
+run mmcboot
--- /dev/null
+setenv console ttyO2,115200n8
+setenv vram '16M'
+setenv dvimode 'hd720 mem=99M@0x80000000 mem=384M@0x88000000 omapfb.vram=0:8M,1:4M,2:4M'
+run loaduimage
+run mmcboot
--- /dev/null
+setenv console ttyO2,115200n8
+setenv vram '16M'
+setenv dvimode 'hd720 omapfb.vram=0:8M,1:4M,2:4M'
+run loaduimage
+run mmcboot
--- /dev/null
+
+mw.l 480bc050 0x0210
+mw.l 480bc040 0x00200300
+
+setenv vram '24M'
+setenv dvimode 'hd720-16 mem=99M@0x80000000 mem=384M@0x88000000 omapfb.vram=0:12M,1:8M,2:4M'
+run loaduimage
+run mmcboot
--- /dev/null
+setenv vram '24M'
+setenv dvimode 'hd720 mem=99M@0x80000000 mem=384M@0x88000000 omapfb.vram=0:12M,1:8M,2:4M nohz=off'
+run loaduimage
+run mmcboot
--- /dev/null
+echo Erasing NAND
+
+nand erase
+
+mtdparts default
+
+mmc init
+
+echo Programming x-loader
+fatload mmc 0 0x82000000 MLO
+nandecc hw
+nand erase 0 80000
+nand write 82000000 0 20000
+nand write 82000000 20000 20000
+nand write 82000000 40000 20000
+nand write 82000000 60000 20000
+
+echo Programming u-boot
+fatload mmc 0 0x82000000 u-boot.bin
+nandecc sw
+nand erase 80000 160000
+nand write 0x82000000 80000 160000
+
+echo Programming Linux
+fatload mmc 0 0x82000000 uImage
+nand erase 0x00280000 0x00400000
+nand write 0x82000000 0x00280000 0x00400000
+
+echo Programming rootfs
+fatload mmc 0 0x82000000 rootfs.ubi
+nand write.e 0x82000000 0x00680000 ${filesize}
+
+echo Programming u-boot environment
+setenv nandroot 'ubi0:beagleboard-rootfs ubi.mtd=4'
+setenv nandrootfstype ubifs
+saveenv
+
+echo Please remove SD card and reboot
--- /dev/null
+nand erase 260000 20000
+mmcinit
+mmc init
+fatload mmc 0 82000000 MLO
+nand unlock
+nand ecc hw
+nandecc hw
+nand erase 0 80000
+nand write 82000000 0 20000
+nand write 82000000 20000 20000
+nand write 82000000 40000 20000
+nand write 82000000 60000 20000
+fatload mmc 0 0x80200000 u-boot.bin
+nand unlock
+nand ecc sw
+nandecc sw
+nand erase 80000 160000
+nand write 0x80200000 80000 160000
--- /dev/null
+setenv vram '24M'
+setenv dvimode '1024x768MR-24@60 mem=99M@0x80000000 mem=384M@0x88000000 omapfb.vram=0:12M,1:8M,2:4M'
+run loaduimage
+run mmcboot
--- /dev/null
+#setenv usbtty 'cdc_acm'
+#setenv mpurate '500'
+#setenv buddy 'none'
+
+#setenv vram '12M'
+#setenv defaultdisplay 'dvi'
+#setenv dvimode '640x480MR-16@60'
+
+setenv setbase 'setenv baseargs ${memmap} console=${console} mpurate=${mpurate} buddy=${buddy} vram=${vram} musb_hdrc.fifomode=${musbfifomode} omapfb.mode=${defaultdisplay}:${dvimode} omapdss.def_disp=${defaultdisplay}'
+
+setenv nandroot 'root=/dev/mtdblock4 rw rootfstype=jffs2'
+setenv nandargs 'run setbase; setenv bootargs ${baseargs} ${nandroot}'
+setenv nandloaduimage 'nand read ${loadaddr} 280000 400000'
+setenv nandboot 'run nandloadimage; bootm ${loadaddr}'
+
+setenv mmcroot 'root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait'
+setenv mmcargs 'run setbase; setenv bootargs ${baseargs} ${mmcroot}'
+setenv mmcloaduimage 'fatload mmc 0 ${loadaddr} uImage'
+setenv mmcboot 'run mmcloaduimage; bootm ${loadaddr}'
+
+echo Setting Specific Environment from MMC boot.scr
+
+# set musb to only use 8k for fifo memory - not necesary on xm, but safe anyway
+setenv musbfifomode '5'
+
+# mpurate is read from omap registers on omap3530 (which x-load has set to 600mhz?), on xm, uboot sets this to 1GHz
+#setenv mpurate '720'
+setenv memmap 'mem=80M mem=384M@0x88000000'
+if "${beaglerev}" = "AxBx"; then
+ setenv memmap 'mem=80M'
+fi
+if "${beaglerev}" = "Cx"; then
+ setenv memmap 'mem=80M mem=128M@0x88000000'
+fi
+setenv vram '16M omapfb.vram=0:8M,1:4M,2:4M'
+setenv defaultdisplay 'dvi'
+setenv dvimode '1024x768M-32@60'
+
+run mmcargs
+printenv
+run mmcboot
+
--- /dev/null
+#setenv usbtty 'cdc_acm'
+#setenv mpurate '500'
+#setenv buddy 'none'
+
+#setenv vram '12M'
+#setenv defaultdisplay 'dvi'
+#setenv dvimode '640x480MR-16@60'
+
+setenv setbase 'setenv baseargs ${memmap} console=${console} mpurate=${mpurate} buddy=${buddy} vram=${vram} musb_hdrc.fifomode=${musbfifomode} omapfb.mode=${defaultdisplay}:${dvimode} omapdss.def_disp=${defaultdisplay}'
+
+setenv nandroot 'root=/dev/mtdblock4 rw rootfstype=jffs2'
+setenv nandargs 'run setbase; setenv bootargs ${baseargs} ${nandroot}'
+setenv nandloaduimage 'nand read ${loadaddr} 280000 400000'
+setenv nandboot 'run nandloadimage; bootm ${loadaddr}'
+
+setenv mmcroot 'root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait'
+setenv mmcargs 'run setbase; setenv bootargs ${baseargs} ${mmcroot}'
+setenv mmcloaduimage 'fatload mmc 0 ${loadaddr} uImage'
+setenv mmcboot 'run mmcloaduimage; bootm ${loadaddr}'
+
+echo Setting Specific Environment from MMC boot.scr
+
+# set musb to only use 8k for fifo memory - not necesary on xm, but safe anyway
+setenv musbfifomode '5'
+
+# mpurate is read from omap registers on omap3530 (which x-load has set to 600mhz?), on xm, uboot sets this to 1GHz
+#setenv mpurate '720'
+setenv memmap 'mem=80M mem=384M@0x88000000'
+if "${beaglerev}" = "AxBx"; then
+ setenv memmap 'mem=80M'
+fi
+if "${beaglerev}" = "Cx"; then
+ setenv memmap 'mem=80M mem=128M@0x88000000'
+fi
+setenv vram '16M omapfb.vram=0:8M,1:4M,2:4M'
+setenv defaultdisplay 'dvi'
+setenv dvimode '1024x768MR-32@60'
+
+run mmcargs
+printenv
+run mmcboot
+
--- /dev/null
+setenv memhole 'mem=453M@0x80000000 mem=512M@0xa0000000'
+setenv dvimode 'omapfb.mode=dvi:1600x1200MR-24@60'
+setenv hdmimode 'omapdss.hdmimode=0'
+setenv fbvram 'omapfb.vram=0:16M,1:16M'
+setenv vram 64M ${memhole} ${dvimode} ${fbvram}
+run loaduimage
+run mmcboot
--- /dev/null
+setenv console 'ttyO2,115200n8'
+setenv vram '16M mem=99M@0x80000000 mem=384M@0x88000000'
+setenv dvimode '1024x768MR-24@60 omapfb.vram=0:8M,1:4M,2:4M'
+run loaduimage
+run mmcboot
--- /dev/null
+setenv console 'ttyO2,115200n8'
+setenv vram '16M'
+setenv dvimode '1024x768MR-24@60 omapfb.vram=0:8M,1:4M,2:4M'
+run loaduimage
+run mmcboot
--- /dev/null
+setenv vram '12M'
+setenv dvimode '640x480MR-24@60 omapfb.vram=0:6M,1:4M,2:2M'
+run loaduimage
+run mmcboot
--- /dev/null
+setenv vram '12M'
+setenv dvimode '1024x768MR-16@60 omapfb.vram=0:6M,1:4M,2:2M'
+run loaduimage
+run mmcboot