mk_mmc.sh: use bootpart

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/37/head
Robert Nelson 10 years ago
parent 19508e8135
commit fc13959689

@ -290,6 +290,13 @@ boot_uenv_txt_template () {
mmcroot=FINAL_PART ro
mmcrootfstype=FINAL_FSTYPE rootwait fixrtc
bootpart=\${mmcdev}:\${mmcpart}
loadkernel=${conf_fileload} mmc \${bootpart} ${conf_loadaddr} \${kernel_file}
loadinitrd=${conf_fileload} mmc \${bootpart} ${conf_initrdaddr} \${initrd_file}; setenv initrd_size \${filesize}
loadfdt=${conf_fileload} mmc \${bootpart} ${conf_fdtaddr} /dtbs/\${fdtfile}
__EOF__
cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__
@ -307,6 +314,13 @@ boot_uenv_txt_template () {
mmcroot=/dev/ram0 rw
bootpart=\${mmcdev}:\${mmcpart}
loadkernel=${conf_fileload} mmc \${bootpart} ${conf_loadaddr} \${kernel_file}
loadinitrd=${conf_fileload} mmc \${bootpart} ${conf_initrdaddr} \${initrd_file}; setenv initrd_size \${filesize}
loadfdt=${conf_fileload} mmc \${bootpart} ${conf_fdtaddr} /dtbs/\${fdtfile}
__EOF__
if [ ! "${uboot_fdt_auto_detection}" ] ; then
@ -317,44 +331,11 @@ boot_uenv_txt_template () {
sed -i -e 's:#kms_force_mode:kms_force_mode:g' ${TEMPDIR}/bootscripts/*.cmd
fi
if [ ${conf_uboot_use_bootpart} ] ; then
cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__
loadkernel=${conf_fileload} mmc \${bootpart} ${conf_loadaddr} \${kernel_file}
loadinitrd=${conf_fileload} mmc \${bootpart} ${conf_initrdaddr} \${initrd_file}; setenv initrd_size \${filesize}
loadfdt=${conf_fileload} mmc \${bootpart} ${conf_fdtaddr} /dtbs/\${fdtfile}
__EOF__
else
cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__
loadkernel=${conf_fileload} mmc \${mmcdev}:\${mmcpart} ${conf_loadaddr} \${kernel_file}
loadinitrd=${conf_fileload} mmc \${mmcdev}:\${mmcpart} ${conf_initrdaddr} \${initrd_file}; setenv initrd_size \${filesize}
loadfdt=${conf_fileload} mmc \${mmcdev}:\${mmcpart} ${conf_fdtaddr} /dtbs/\${fdtfile}
__EOF__
fi
cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__
boot_fdt=run loadkernel; run loadinitrd; run loadfdt
__EOF__
if [ ${conf_uboot_use_bootpart} ] ; then
cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__
loadkernel=${conf_fileload} mmc \${bootpart} ${conf_loadaddr} \${kernel_file}
loadinitrd=${conf_fileload} mmc \${bootpart} ${conf_initrdaddr} \${initrd_file}; setenv initrd_size \${filesize}
loadfdt=${conf_fileload} mmc \${bootpart} ${conf_fdtaddr} /dtbs/\${fdtfile}
__EOF__
else
cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__
loadkernel=${conf_fileload} mmc \${mmcdev}:\${mmcpart} ${conf_loadaddr} \${kernel_file}
loadinitrd=${conf_fileload} mmc \${mmcdev}:\${mmcpart} ${conf_initrdaddr} \${initrd_file}; setenv initrd_size \${filesize}
loadfdt=${conf_fileload} mmc \${mmcdev}:\${mmcpart} ${conf_fdtaddr} /dtbs/\${fdtfile}
__EOF__
fi
if [ "${uboot_fdt_variable_name}" ] ; then
sed -i -e 's:fdtfile:'$uboot_fdt_variable_name':g' ${TEMPDIR}/bootscripts/normal.cmd
sed -i -e 's:fdtfile:'$uboot_fdt_variable_name':g' ${TEMPDIR}/bootscripts/netinstall.cmd

Loading…
Cancel
Save