|
|
|
@ -415,26 +415,26 @@ esac
|
|
|
|
|
function boot_files_template {
|
|
|
|
|
|
|
|
|
|
cat > ${TEMPDIR}/bootscripts/netinstall.cmd <<netinstall_boot_cmd
|
|
|
|
|
setenv defaultdisplay VIDEO_OMAPFB_MODE
|
|
|
|
|
setenv dvimode VIDEO_TIMING
|
|
|
|
|
setenv vram 12MB
|
|
|
|
|
SCR_FB
|
|
|
|
|
SCR_TIMING
|
|
|
|
|
SCR_VRAM
|
|
|
|
|
setenv console DICONSOLE
|
|
|
|
|
setenv mmcroot /dev/ram0 rw
|
|
|
|
|
setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage.net; fatload mmc 0:1 UINITRD_ADDR uInitrd.net; bootm UIMAGE_ADDR UINITRD_ADDR'
|
|
|
|
|
setenv bootargs console=\${console} root=\${mmcroot} VIDEO_RAM omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay}
|
|
|
|
|
setenv bootargs console=\${console} root=\${mmcroot} VIDEO_DISPLAY
|
|
|
|
|
boot
|
|
|
|
|
netinstall_boot_cmd
|
|
|
|
|
|
|
|
|
|
cat > ${TEMPDIR}/bootscripts/normal.cmd <<normal_boot_cmd
|
|
|
|
|
setenv defaultdisplay VIDEO_OMAPFB_MODE
|
|
|
|
|
setenv dvimode VIDEO_TIMING
|
|
|
|
|
setenv vram 12MB
|
|
|
|
|
SCR_FB
|
|
|
|
|
SCR_TIMING
|
|
|
|
|
SCR_VRAM
|
|
|
|
|
setenv console SERIAL_CONSOLE
|
|
|
|
|
setenv optargs VIDEO_CONSOLE
|
|
|
|
|
setenv mmcroot FINAL_PART ro
|
|
|
|
|
setenv mmcrootfstype FINAL_FSTYPE rootwait fixrtc
|
|
|
|
|
setenv bootcmd 'fatload mmc 0:1 UIMAGE_ADDR uImage; fatload mmc 0:1 UINITRD_ADDR uInitrd; bootm UIMAGE_ADDR UINITRD_ADDR'
|
|
|
|
|
setenv bootargs console=\${console} \${optargs} root=\${mmcroot} rootfstype=\${mmcrootfstype} VIDEO_RAM omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay}
|
|
|
|
|
setenv bootargs console=\${console} \${optargs} root=\${mmcroot} rootfstype=\${mmcrootfstype} VIDEO_DISPLAY
|
|
|
|
|
boot
|
|
|
|
|
normal_boot_cmd
|
|
|
|
|
|
|
|
|
@ -459,10 +459,12 @@ bootinitrd=uInitrd.net
|
|
|
|
|
address_uimage=UIMAGE_ADDR
|
|
|
|
|
address_uinitrd=UINITRD_ADDR
|
|
|
|
|
|
|
|
|
|
UENV_VRAM
|
|
|
|
|
|
|
|
|
|
console=DICONSOLE
|
|
|
|
|
|
|
|
|
|
defaultdisplay=VIDEO_OMAPFB_MODE
|
|
|
|
|
dvimode=VIDEO_TIMING
|
|
|
|
|
UENV_FB
|
|
|
|
|
UENV_TIMING
|
|
|
|
|
|
|
|
|
|
mmcroot=/dev/ram0 rw
|
|
|
|
|
|
|
|
|
@ -476,10 +478,12 @@ bootinitrd=uInitrd
|
|
|
|
|
address_uimage=UIMAGE_ADDR
|
|
|
|
|
address_uinitrd=UINITRD_ADDR
|
|
|
|
|
|
|
|
|
|
UENV_VRAM
|
|
|
|
|
|
|
|
|
|
console=SERIAL_CONSOLE
|
|
|
|
|
|
|
|
|
|
defaultdisplay=VIDEO_OMAPFB_MODE
|
|
|
|
|
dvimode=VIDEO_TIMING
|
|
|
|
|
UENV_FB
|
|
|
|
|
UENV_TIMING
|
|
|
|
|
|
|
|
|
|
mmcroot=FINAL_PART ro
|
|
|
|
|
mmcrootfstype=FINAL_FSTYPE rootwait fixrtc
|
|
|
|
@ -493,7 +497,7 @@ case "$SYSTEM" in
|
|
|
|
|
cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<uenv_netinstall_cmd
|
|
|
|
|
mmc_load_uimage=fatload mmc 0:1 \${address_uimage} \${bootfile}
|
|
|
|
|
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} mpurate=\${mpurate} buddy=\${buddy} VIDEO_RAM omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay} root=\${mmcroot} musb_hdrc.fifo_mode=5
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} mpurate=\${mpurate} buddy=\${buddy} VIDEO_DISPLAY root=\${mmcroot} musb_hdrc.fifo_mode=5
|
|
|
|
|
|
|
|
|
|
loaduimage=printenv; run mmc_load_uimage; run mmc_load_uinitrd; echo Booting from mmc ...; run mmcargs; bootm \${address_uimage} \${address_uinitrd}
|
|
|
|
|
uenv_netinstall_cmd
|
|
|
|
@ -503,7 +507,7 @@ optargs=VIDEO_CONSOLE
|
|
|
|
|
|
|
|
|
|
mmc_load_uimage=fatload mmc 0:1 \${address_uimage} \${bootfile}
|
|
|
|
|
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} \${optargs} mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} VIDEO_RAM omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay} root=\${mmcroot} rootfstype=\${mmcrootfstype} musb_hdrc.fifo_mode=5
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} \${optargs} mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} VIDEO_DISPLAY root=\${mmcroot} rootfstype=\${mmcrootfstype} musb_hdrc.fifo_mode=5
|
|
|
|
|
|
|
|
|
|
loaduimage=printenv; run mmc_load_uimage; run mmc_load_uinitrd; echo Booting from mmc ...; run mmcargs; bootm \${address_uimage} \${address_uinitrd}
|
|
|
|
|
uenv_normalboot_cmd
|
|
|
|
@ -513,7 +517,7 @@ uenv_normalboot_cmd
|
|
|
|
|
cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<uenv_netinstall_cmd
|
|
|
|
|
mmc_load_uimage=fatload mmc 0:1 \${address_uimage} \${bootfile}
|
|
|
|
|
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} camera=\${camera}VIDEO_RAM omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay} root=\${mmcroot}
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} camera=\${camera} VIDEO_DISPLAY root=\${mmcroot}
|
|
|
|
|
|
|
|
|
|
loaduimage=printenv; run mmc_load_uimage; run mmc_load_uinitrd; echo Booting from mmc ...; run mmcargs; bootm \${address_uimage} \${address_uinitrd}
|
|
|
|
|
uenv_netinstall_cmd
|
|
|
|
@ -523,7 +527,7 @@ optargs=VIDEO_CONSOLE
|
|
|
|
|
|
|
|
|
|
mmc_load_uimage=fatload mmc 0:1 \${address_uimage} \${bootfile}
|
|
|
|
|
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} \${optargs} mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} camera=\${camera} VIDEO_RAM omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay} root=\${mmcroot} rootfstype=\${mmcrootfstype}
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} \${optargs} mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} camera=\${camera} VIDEO_DISPLAY root=\${mmcroot} rootfstype=\${mmcrootfstype}
|
|
|
|
|
|
|
|
|
|
loaduimage=printenv; run mmc_load_uimage; run mmc_load_uinitrd; echo Booting from mmc ...; run mmcargs; bootm \${address_uimage} \${address_uinitrd}
|
|
|
|
|
uenv_normalboot_cmd
|
|
|
|
@ -533,7 +537,7 @@ uenv_normalboot_cmd
|
|
|
|
|
cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<uenv_netinstall_cmd
|
|
|
|
|
mmc_load_uimage=fatload mmc 0:1 \${address_uimage} \${bootfile}
|
|
|
|
|
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} camera=\${camera} VIDEO_RAM omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay} root=\${mmcroot}
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} camera=\${camera} VIDEO_DISPLAY root=\${mmcroot}
|
|
|
|
|
|
|
|
|
|
loaduimage=printenv; run mmc_load_uimage; run mmc_load_uinitrd; echo Booting from mmc ...; run mmcargs; bootm \${address_uimage} \${address_uinitrd}
|
|
|
|
|
uenv_netinstall_cmd
|
|
|
|
@ -543,7 +547,7 @@ optargs=VIDEO_CONSOLE
|
|
|
|
|
|
|
|
|
|
mmc_load_uimage=fatload mmc 0:1 \${address_uimage} \${bootfile}
|
|
|
|
|
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} \${optargs} mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} camera=\${camera} VIDEO_RAM omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay} root=\${mmcroot} rootfstype=\${mmcrootfstype}
|
|
|
|
|
mmcargs=setenv bootargs console=\${console} \${optargs} mpurate=\${mpurate} buddy=\${buddy} buddy2=\${buddy2} camera=\${camera} VIDEO_DISPLAY root=\${mmcroot} rootfstype=\${mmcrootfstype}
|
|
|
|
|
|
|
|
|
|
loaduimage=printenv; run mmc_load_uimage; run mmc_load_uinitrd; echo Booting from mmc ...; run mmcargs; bootm \${address_uimage} \${address_uinitrd}
|
|
|
|
|
uenv_normalboot_cmd
|
|
|
|
@ -571,8 +575,10 @@ esac
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function tweak_boot_scripts {
|
|
|
|
|
# echo "Adding Device Specific info to bootscripts"
|
|
|
|
|
#debug -|-
|
|
|
|
|
# echo "NetInstall Boot Script: Generic"
|
|
|
|
|
# echo "-----------------------------"
|
|
|
|
|
# cat ${TEMPDIR}/bootscripts/netinstall.cmd
|
|
|
|
|
|
|
|
|
|
if test "-$ADDON-" = "-pico-"
|
|
|
|
|
then
|
|
|
|
@ -603,59 +609,70 @@ function tweak_boot_scripts {
|
|
|
|
|
#Set the Serial Console
|
|
|
|
|
sed -i -e 's:SERIAL_CONSOLE:'$SERIAL_CONSOLE':g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
|
|
|
|
|
#NetInstall only:
|
|
|
|
|
FILE="netinstall.cmd"
|
|
|
|
|
if [ "$SERIAL_MODE" ];then
|
|
|
|
|
#console=CONSOLE
|
|
|
|
|
#Set the Serial Console
|
|
|
|
|
sed -i -e 's:DICONSOLE:'$SERIAL_CONSOLE':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
|
|
|
|
|
#omap3/4: In serial mode, NetInstall needs all traces of VIDEO removed..
|
|
|
|
|
#VIDEO_RAM
|
|
|
|
|
sed -i -e 's:VIDEO_RAM ::g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
#omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay}
|
|
|
|
|
sed -i -e 's:'\${defaultdisplay}'::g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:'\${dvimode}'::g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
#omapfb.mode=: omapdss.def_disp=
|
|
|
|
|
sed -i -e "s/omapfb.mode=: //g" ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:omapdss.def_disp=::g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
#Set the Video Console
|
|
|
|
|
sed -i -e 's:DICONSOLE:tty0:g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:VIDEO_CONSOLE:console=tty0:g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
|
|
|
|
|
#omap3/4 DSS:
|
|
|
|
|
#VIDEO_RAM
|
|
|
|
|
sed -i -e 's:VIDEO_RAM:'vram=\${vram}':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
#set OMAP video: omapfb.mode=VIDEO_OMAPFB_MODE
|
|
|
|
|
#defaultdisplay=VIDEO_OMAPFB_MODE
|
|
|
|
|
#dvimode=VIDEO_TIMING
|
|
|
|
|
sed -i -e 's:VIDEO_OMAPFB_MODE:'$VIDEO_OMAPFB_MODE':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:VIDEO_TIMING:'$VIDEO_TIMING':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
FILE="normal.cmd"
|
|
|
|
|
|
|
|
|
|
#Set the Video Console
|
|
|
|
|
sed -i -e 's:DICONSOLE:tty0:g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:VIDEO_CONSOLE:console=tty0:g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
if [ "${IS_OMAP}" ] ; then
|
|
|
|
|
#setenv defaultdisplay VIDEO_OMAPFB_MODE
|
|
|
|
|
#setenv dvimode VIDEO_TIMING
|
|
|
|
|
#setenv vram 12MB
|
|
|
|
|
sed -i -e 's:SCR_VRAM:setenv vram 12MB:g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
sed -i -e 's:SCR_FB:setenv defaultdisplay VIDEO_OMAPFB_MODE:g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
sed -i -e 's:SCR_TIMING:setenv dvimode VIDEO_TIMING:g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
|
|
|
|
|
#defaultdisplay=VIDEO_OMAPFB_MODE
|
|
|
|
|
#dvimode=VIDEO_TIMING
|
|
|
|
|
#vram=12MB
|
|
|
|
|
sed -i -e 's:UENV_VRAM:vram=12MB:g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
sed -i -e 's:UENV_FB:defaultdisplay=VIDEO_OMAPFB_MODE:g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
sed -i -e 's:UENV_TIMING:dvimode=VIDEO_TIMING:g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
|
|
|
|
|
#vram=\${vram} omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay}
|
|
|
|
|
sed -i -e 's:VIDEO_DISPLAY:TMP_VRAM TMP_OMAPFB TMP_OMAPDSS:g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
sed -i -e 's:TMP_VRAM:'vram=\${vram}':g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
sed -i -e 's/TMP_OMAPFB/'omapfb.mode=\${defaultdisplay}:\${dvimode}'/g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
sed -i -e 's:TMP_OMAPDSS:'omapdss.def_disp=\${defaultdisplay}':g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
|
|
|
|
|
FILE="netinstall.cmd"
|
|
|
|
|
if [ "$SERIAL_MODE" ];then
|
|
|
|
|
#Set the Serial Console: console=CONSOLE
|
|
|
|
|
sed -i -e 's:DICONSOLE:'$SERIAL_CONSOLE':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
|
|
|
|
|
#omap3/4: In serial mode, NetInstall needs all traces of VIDEO removed..
|
|
|
|
|
#drop: vram=\${vram}
|
|
|
|
|
sed -i -e 's:'vram=\${vram}' ::g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
|
|
|
|
|
#omapfb.mode=\${defaultdisplay}:\${dvimode} omapdss.def_disp=\${defaultdisplay}
|
|
|
|
|
sed -i -e 's:'\${defaultdisplay}'::g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:'\${dvimode}'::g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
#omapfb.mode=: omapdss.def_disp=
|
|
|
|
|
sed -i -e "s/omapfb.mode=: //g" ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
#uenv seems to have an extra space (beagle_xm)
|
|
|
|
|
sed -i -e 's:omapdss.def_disp= ::g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:omapdss.def_disp=::g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
else
|
|
|
|
|
#Set the Video Console
|
|
|
|
|
sed -i -e 's:DICONSOLE:tty0:g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:VIDEO_CONSOLE:console=tty0:g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
|
|
|
|
|
sed -i -e 's:VIDEO_OMAPFB_MODE:'$VIDEO_OMAPFB_MODE':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:VIDEO_TIMING:'$VIDEO_TIMING':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#omap3/4 DSS:
|
|
|
|
|
#VIDEO_RAM
|
|
|
|
|
sed -i -e 's:VIDEO_RAM:'vram=\${vram}':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
#set OMAP video: omapfb.mode=VIDEO_OMAPFB_MODE
|
|
|
|
|
#defaultdisplay=VIDEO_OMAPFB_MODE
|
|
|
|
|
#dvimode=VIDEO_TIMING
|
|
|
|
|
sed -i -e 's:VIDEO_OMAPFB_MODE:'$VIDEO_OMAPFB_MODE':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:VIDEO_TIMING:'$VIDEO_TIMING':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
FILE="normal.cmd"
|
|
|
|
|
#Video mode is always available after final install
|
|
|
|
|
sed -i -e 's:DICONSOLE:tty0:g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:VIDEO_CONSOLE:console=tty0:g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
|
|
|
|
|
#fixme: broke mx51/53 and reenable VIDEO on final boot..
|
|
|
|
|
sed -i -e 's:VIDEO_OMAPFB_MODE:'$VIDEO_OMAPFB_MODE':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
sed -i -e 's:VIDEO_TIMING:'$VIDEO_TIMING':g' ${TEMPDIR}/bootscripts/${FILE}
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ "$PRINTK" ];then
|
|
|
|
|
sed -i 's/bootargs/bootargs earlyprintk/g' ${TEMPDIR}/bootscripts/*.cmd
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
#debug^
|
|
|
|
|
# echo "NetInstall Boot Script: Modified For Device"
|
|
|
|
|
# echo "-----------------------------"
|
|
|
|
|
# cat ${TEMPDIR}/bootscripts/netinstall.cmd
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setup_bootscripts {
|
|
|
|
@ -1262,6 +1279,7 @@ function check_mmc {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function is_omap {
|
|
|
|
|
IS_OMAP=1
|
|
|
|
|
SPL_BOOT=1
|
|
|
|
|
UIMAGE_ADDR="0x80300000"
|
|
|
|
|
UINITRD_ADDR="0x81600000"
|
|
|
|
|