introduce: conf_config_distro_defaults

Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
pull/37/head
Robert Nelson 11 years ago
parent aabea6c8bf
commit e4fb87354e

@ -304,6 +304,62 @@ boot_uenv_txt_template () {
xyz_message="echo; echo Installer for [${DISTARCH}] is using the Video Interface; echo Use [--serial-mode] to force Installing over the Serial Interface; echo;" xyz_message="echo; echo Installer for [${DISTARCH}] is using the Video Interface; echo Use [--serial-mode] to force Installing over the Serial Interface; echo;"
fi fi
if [ "x${conf_config_distro_defaults}" = "xenable" ] ; then
cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__
fdtfile=${dtb}
##Video: [ls /sys/class/drm/]
##Docs: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/fb/modedb.txt
##Uncomment to override:
#kms_force_mode=video=${drm_device_identifier}:1024x768@60e
console=SERIAL_CONSOLE
mmcroot=FINAL_PART ro
mmcrootfstype=FINAL_FSTYPE rootwait fixrtc
loadximage=load \${devtype} \${devnum}:\${bootpart} \${kernel_addr_r} ${kernel}
loadxfdt=load \${devtype} \${devnum}:\${bootpart} \${fdt_addr_r} /boot/dtbs/current/\${fdtfile}
loadxrd=load \${devtype} \${devnum}:\${bootpart} \${ramdisk_addr_r} ${initrd}; setenv initrd_size \${filesize}
loadall=run loadximage; run loadxfdt; run loadxrd;
optargs=VIDEO_CONSOLE
mmcargs=setenv bootargs console=\${console} \${optargs} \${kms_force_mode} root=\${mmcroot} rootfstype=\${mmcrootfstype}
uenvcmd=run loadall; run mmcargs; bootz \${kernel_addr_r} \${ramdisk_addr_r}:\${initrd_size} \${fdt_addr_r}
__EOF__
cat >> ${TEMPDIR}/bootscripts/netinstall.cmd <<-__EOF__
fdtfile=${dtb}
##Video: [ls /sys/class/drm/]
##Docs: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/fb/modedb.txt
##Uncomment to override:
#kms_force_mode=video=${drm_device_identifier}:1024x768@60e
console=DICONSOLE
mmcroot=/dev/ram0 rw
loadximage=load \${devtype} \${devnum}:\${bootpart} \${kernel_addr_r} ${kernel}
loadxfdt=load \${devtype} \${devnum}:\${bootpart} \${fdt_addr_r} /boot/dtbs/current/\${fdtfile}
loadxrd=load \${devtype} \${devnum}:\${bootpart} \${ramdisk_addr_r} ${initrd}; setenv initrd_size \${filesize}
loadall=run loadximage; run loadxfdt; run loadxrd;
xyz_message=${xyz_message}
optargs=${conf_optargs}
mmcargs=setenv bootargs console=\${console} \${optargs} \${kms_force_mode} root=\${mmcroot}
uenvcmd=run xyz_message; run loadall; run mmcargs; bootz \${kernel_addr_r} \${ramdisk_addr_r}:\${initrd_size} \${fdt_addr_r}
__EOF__
else
cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__ cat >> ${TEMPDIR}/bootscripts/normal.cmd <<-__EOF__
#fdtfile=${dtb} #fdtfile=${dtb}
@ -363,6 +419,7 @@ boot_uenv_txt_template () {
if [ "${uboot_fdt_variable_name}" ] ; then if [ "${uboot_fdt_variable_name}" ] ; then
sed -i -e 's:fdtfile:'$uboot_fdt_variable_name':g' ${TEMPDIR}/bootscripts/*.cmd sed -i -e 's:fdtfile:'$uboot_fdt_variable_name':g' ${TEMPDIR}/bootscripts/*.cmd
fi fi
fi
if [ "x${drm_read_edid_broken}" = "xenable" ] ; then if [ "x${drm_read_edid_broken}" = "xenable" ] ; then
sed -i -e 's:#kms_force_mode:kms_force_mode:g' ${TEMPDIR}/bootscripts/*.cmd sed -i -e 's:#kms_force_mode:kms_force_mode:g' ${TEMPDIR}/bootscripts/*.cmd
@ -965,11 +1022,13 @@ populate_boot () {
echo "Copying Kernel images:" echo "Copying Kernel images:"
cp -v ${TEMPDIR}/kernel/boot/vmlinuz-* ${TEMPDIR}/disk/boot/vmlinuz-current cp -v ${TEMPDIR}/kernel/boot/vmlinuz-* ${TEMPDIR}/disk/boot/vmlinuz-current
if [ ! "x${conf_config_distro_defaults}" = "xenable" ] ; then
if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then
if [ ! "x${uboot_CONFIG_CMD_BOOTZ}" = "xenable" ] ; then if [ ! "x${uboot_CONFIG_CMD_BOOTZ}" = "xenable" ] ; then
mkimage -A arm -O linux -T kernel -C none -a ${conf_zreladdr} -e ${conf_zreladdr} -n ${LINUX_VER} -d ${TEMPDIR}/kernel/boot/vmlinuz-* ${TEMPDIR}/disk/uImage.net mkimage -A arm -O linux -T kernel -C none -a ${conf_zreladdr} -e ${conf_zreladdr} -n ${LINUX_VER} -d ${TEMPDIR}/kernel/boot/vmlinuz-* ${TEMPDIR}/disk/uImage.net
fi fi
fi fi
fi
echo "-----------------------------" echo "-----------------------------"
fi fi
@ -979,11 +1038,13 @@ populate_boot () {
echo "Copying Kernel initrds:" echo "Copying Kernel initrds:"
cp -v ${TEMPDIR}/initrd.mod.gz ${TEMPDIR}/disk/boot/initrd.img-current cp -v ${TEMPDIR}/initrd.mod.gz ${TEMPDIR}/disk/boot/initrd.img-current
if [ ! "x${conf_config_distro_defaults}" = "xenable" ] ; then
if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then if [ ! "x${conf_smart_uboot}" = "xenable" ] ; then
if [ ! "x${uboot_CONFIG_SUPPORT_RAW_INITRD}" = "xenable" ] ; then if [ ! "x${uboot_CONFIG_SUPPORT_RAW_INITRD}" = "xenable" ] ; then
mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ${TEMPDIR}/initrd.mod.gz ${TEMPDIR}/disk/uInitrd.net mkimage -A arm -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ${TEMPDIR}/initrd.mod.gz ${TEMPDIR}/disk/uInitrd.net
fi fi
fi fi
fi
echo "-----------------------------" echo "-----------------------------"
fi fi
@ -994,6 +1055,16 @@ populate_boot () {
cp ${TEMPDIR}/kernel/boot/dtbs/${LINUX_VER}/*.dtb ${TEMPDIR}/disk/boot/dtbs/current/ cp ${TEMPDIR}/kernel/boot/dtbs/${LINUX_VER}/*.dtb ${TEMPDIR}/disk/boot/dtbs/current/
fi fi
if [ "x${conf_config_distro_defaults}" = "xenable" ] ; then
cat > ${TEMPDIR}/bootscripts/loader.cmd <<-__EOF__
echo "boot.scr -> uEnv.txt wrapper..."
load \${devtype} \${devnum}:\${bootpart} \${scriptaddr} /boot/uEnv.txt
env import -t \${scriptaddr} \${filesize}
run uenvcmd
__EOF__
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "uEnv.txt" -d ${TEMPDIR}/bootscripts/loader.cmd ${TEMPDIR}/disk/boot/boot.scr
fi
if [ "${conf_uboot_bootscript}" ] ; then if [ "${conf_uboot_bootscript}" ] ; then
case "${dtb}" in case "${dtb}" in
imx6q-nitrogen6x.dtb|imx6q-sabrelite.dtb) imx6q-nitrogen6x.dtb|imx6q-sabrelite.dtb)
@ -1060,7 +1131,11 @@ populate_boot () {
else else
echo "Net Install Boot Script:" echo "Net Install Boot Script:"
if [ "x${conf_config_distro_defaults}" = "xenable" ] ; then
cp -v ${TEMPDIR}/bootscripts/netinstall.cmd ${TEMPDIR}/disk/boot/uEnv.txt
else
cp -v ${TEMPDIR}/bootscripts/netinstall.cmd ${TEMPDIR}/disk/uEnv.txt cp -v ${TEMPDIR}/bootscripts/netinstall.cmd ${TEMPDIR}/disk/uEnv.txt
fi
echo "-----------------------------" echo "-----------------------------"
cat ${TEMPDIR}/bootscripts/netinstall.cmd cat ${TEMPDIR}/bootscripts/netinstall.cmd
rm -rf ${TEMPDIR}/bootscripts/netinstall.cmd || true rm -rf ${TEMPDIR}/bootscripts/netinstall.cmd || true
@ -1216,6 +1291,7 @@ process_dtb_conf () {
esac esac
fi fi
if [ ! "x${conf_config_distro_defaults}" = "xenable" ] ; then
if [ ! "x${uboot_CONFIG_CMD_BOOTZ}" = "xenable" ] ; then if [ ! "x${uboot_CONFIG_CMD_BOOTZ}" = "xenable" ] ; then
conf_bootcmd="bootm" conf_bootcmd="bootm"
kernel=/boot/uImage kernel=/boot/uImage
@ -1234,6 +1310,7 @@ process_dtb_conf () {
conf_fileload="ext2load" conf_fileload="ext2load"
fi fi
fi fi
fi
} }
check_dtb_board () { check_dtb_board () {

Loading…
Cancel
Save