From Fedora Project Wiki
No edit summary
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Draft}}
{{Draft}}
=How to install Fedora on TrimSlice PRO=
=How to install Fedora on TrimSlice PRO=
he TrimSlice PRO developer kid comes delivered with a 32GB SSD containing anoter Linux distribution, but can boot from pretty much any media (SD. USB, MicroSD, SSD) and you are free to experiment without voiding warranty.
The TrimSlice PRO developer kit comes delivered with a 32GB SSD containing another Linux distribution, but can boot from pretty much any media (SD. USB, MicroSD, SSD) and you are free to experiment without voiding warranty.


U-Boot is factory preprogrammed in internal flash. There is no need to reflash U-Boot as the default U-Boot version is very open and friendly configured. But you may do so if you wish, following instructions from TrimSlice. One very nice thing is that the device allows easy recovery using the SD slot if the boot flash gets corrupted, eleminating the need for JTAG in such cases.
U-Boot is factory preprogrammed in internal flash. There is no need to reflash U-Boot as the default U-Boot version is very open and friendly configured. But you may do so if you wish, following instructions from TrimSlice. One very nice thing is that the device allows easy recovery using the SD slot if the boot flash gets corrupted, eleminating the need for JTAG in such cases.
== Kernel & Initrd ==
The kernel & initrd needs to be converted to U-Boot images. This is done by running
<code>mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 2.6.40.3-0.fc15.armv7hl -d ../boot/vmlinuz-2.6.40.3-0.fc15.armv7hl.tegra uImage</code>
<code>mkimage -A arm -O linux -T ramdisk -C none -n 2.6.40.3-0.fc15.armv7hl -d ../boot/initramfs-2.6.40.3-0.fc15.armv7hl.tegra.img uInitrd</code>


== U-Boot behavior ==
== U-Boot behavior ==
Line 26: Line 34:
echo starting Fedora boot.scr
echo starting Fedora boot.scr


if test -z "${rootpart}" && test -z "${rootuuid}"; then
printenv
rootpart=4
 
#rootuuid=3e6be9de-8139-11d1-9106-a43f08d823a6
if test -z "${fs}" -o -z "${interface}" -o -z "${device}"; then
echo Missing system parameters
exit 1
fi
 
if ${fs}load ${interface} ${device}${bootpart} ${loadaddr} kernel.scr; then
source ${loadaddr}
fi
fi


#if test -z "${kernel}" && test -z "${kernelver}"; then
if test -z "${rootpart}" -a -z "${rootuuid}" -a 1 = 1 ; then
# kernelver=2.6.40.3-0.fc15.armv7hl.tegra
echo Using default rootpart 4
setenv rootpart 4
#setenv rootuuid 3e6be9de-8139-11d1-9106-a43f08d823a6
fi
 
#if test -z "${kernel}" -a -z "${kernelver}"; then
# setenv kernelver 2.6.40.3-0.fc15.armv7hl.tegra
#fi
#fi
if test -z "${kernel}"; then
if test -z "${kernel}" -a 1 = 1 ; then
kernel=uImage
echo "Using default image names"
initrd=uInitrd
setenv kernel uImage
if test -n "${kernelver}"; then
setenv initrd uInitrd
kernel=${kernel}-${kernelver}
fi
initrd=${kernel}-${kernelver}
if test -n "${kernelver}"; then
fi
setenv kernel ${kernel}-${kernelver}
setenv initrd ${initrd}-${kernelver}
fi
fi


if test -z "${console}"; then
if test -z "${console}" -a 1 = 1 ; then
console="console=ttyS0,115200n8"
setenv console ttyS0,115200n8
fi
fi


setenv initrdaddr 1600000
setenv initrdaddr 1600000
echo Parameters set
printenv


if test -n "${rootuuid}"; then
if test -n "${rootuuid}"; then
echo booting with UUID selected root
echo booting with UUID selected root
rootfs="ro root=UUID=${rootuuid}"
setenv rootfs ro root=UUID=${rootuuid}
elif test "${interface}" = "mmc" && test "${bus}" = "1"; then
elif test "${interface}" = "mmc" && test "${bus}" = "1"; then
echo booting from internal microSD
echo booting from internal microSD
echo booting from internal microSD
setenv rootfs ro root=/dev/mmcblk0p${rootpart}
rootfs="ro root=/dev/mmcblk0p${rootpart}"
elif test "${interface}" = "mmc" && test "${bus}" = "0"; then
elif test "${interface}" = "mmc" && test "${bus}" = "0"; then
echo booting from external SD
echo booting from external SD
if mmc init 1; then
if mmc init 1; then
rootfs="ro root=/dev/mmcblk1p${rootpart}"
setenv rootfs ro root=/dev/mmcblk1p${rootpart}
else
else
rootfs="ro root=/dev/mmcblk0p${rootpart}"
setenv rootfs ro root=/dev/mmcblk0p${rootpart}
fi
fi
mmc init 0
mmc init 0
Line 67: Line 91:
elif test "${interface}" = "usb" && test "${bus}" = "1"; then
elif test "${interface}" = "usb" && test "${bus}" = "1"; then
echo booting from internal SSD
echo booting from internal SSD
rootfs="ro root=/dev/sda${rootpart} nohdparm rootwait"
setenv rootfs ro root=/dev/sda${rootpart} nohdparm rootwait
else
else
echo booting from external USB
echo booting from external USB
rootfs="ro root=/dev/sdb${rootpart} rootwait"
setenv rootfs ro root=/dev/sdb${rootpart} rootwait
fi
fi


setenv bootargs ${console} ${rootfs}
setenv bootargs console=${console} ${rootfs}
setenv load_kernel ${fs}load ${interface} ${device}${bootpart} ${loadaddr} ${prefix}${kernel}
setenv load_initrd ${fs}load ${interface} ${device}${bootpart} ${initrdaddr} ${prefix}${initrd}
setenv bootcmd bootm ${loadaddr} ${initrdaddr}


echo bootargs ${bootargs}
echo bootargs ${bootargs}
echo kernel ${fs}load ${interface} ${device} ${loadaddr} ${prefix}uImage${kernelver}
echo kernel ${load_kernel}
echo initrd ${fs}load ${interface} ${device} ${loadaddr} ${prefix}uImage${kernelver}
echo initrd ${load_initrd}
 
echo ${bootcmd}
${fs}load ${interface} ${device} ${loadaddr} ${prefix}uImage${kernelver}
${fs}load ${interface} ${device} ${initrdaddr} ${prefix}uInitrd${kernelver}


bootm ${loadaddr} ${initrdaddr}
run load_kernel
</pre>
run load_initrd
run bootcmd</pre>
==[[Talk:Architectures/ARM/TrimSlicePRO|Testing Results]]==
*Boot from a SanDisk Ultra 64 GB SDXC Card

Latest revision as of 11:44, 14 June 2012

This page is a draft only
It is still under construction and content may change. Do not rely on the information on this page.

How to install Fedora on TrimSlice PRO

The TrimSlice PRO developer kit comes delivered with a 32GB SSD containing another Linux distribution, but can boot from pretty much any media (SD. USB, MicroSD, SSD) and you are free to experiment without voiding warranty.

U-Boot is factory preprogrammed in internal flash. There is no need to reflash U-Boot as the default U-Boot version is very open and friendly configured. But you may do so if you wish, following instructions from TrimSlice. One very nice thing is that the device allows easy recovery using the SD slot if the boot flash gets corrupted, eleminating the need for JTAG in such cases.

Kernel & Initrd

The kernel & initrd needs to be converted to U-Boot images. This is done by running

mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 2.6.40.3-0.fc15.armv7hl -d ../boot/vmlinuz-2.6.40.3-0.fc15.armv7hl.tegra uImage

mkimage -A arm -O linux -T ramdisk -C none -n 2.6.40.3-0.fc15.armv7hl -d ../boot/initramfs-2.6.40.3-0.fc15.armv7hl.tegra.img uInitrd

U-Boot behavior

The TrimSlice U-Boot automatically tries to boot from the first partition of any of the above boot sources and expects a boot.scr u-boot script file in / or /boot on the boot device.

When starting boot.scr the following variables are set for convenience

 fs         filesystem type (ext2 or fat)
 interface  u-boot interface type (mmc or usb)
 bus        bus number of the interface
 prefix     boot prefix (/ or /boot)

enabling a generic boot.scr script to be used to boot from any of the possible boot devices. (see below)

Fedora boot script

Save this as boot.cmd in /boot and convert it to a uboot image by using

mkimage -A arm -O linux -T script -C none -d boot.cmd boot.scr

echo starting Fedora boot.scr

printenv

if test -z "${fs}" -o -z "${interface}" -o -z "${device}"; then
	echo Missing system parameters
	exit 1
fi

if ${fs}load ${interface} ${device}${bootpart} ${loadaddr} kernel.scr; then
	source ${loadaddr}
fi

if test -z "${rootpart}" -a -z "${rootuuid}" -a 1 = 1 ; then
	echo Using default rootpart 4
	setenv rootpart 4
	#setenv rootuuid 3e6be9de-8139-11d1-9106-a43f08d823a6
fi

#if test -z "${kernel}" -a -z "${kernelver}"; then
#	setenv kernelver 2.6.40.3-0.fc15.armv7hl.tegra
#fi
if test -z "${kernel}" -a 1 = 1 ; then
	echo "Using default image names"
	setenv kernel uImage
	setenv initrd uInitrd
fi
if test -n "${kernelver}"; then
	setenv kernel ${kernel}-${kernelver}
	setenv initrd ${initrd}-${kernelver}
fi

if test -z "${console}" -a 1 = 1 ; then
	setenv console ttyS0,115200n8
fi

setenv initrdaddr 1600000

echo Parameters set

printenv

if test -n "${rootuuid}"; then
	echo booting with UUID selected root
	setenv rootfs ro root=UUID=${rootuuid}
elif test "${interface}" = "mmc" && test "${bus}" = "1"; then
	echo booting from internal microSD
	setenv rootfs ro root=/dev/mmcblk0p${rootpart}
elif test "${interface}" = "mmc" && test "${bus}" = "0"; then
	echo booting from external SD
	if mmc init 1; then
		setenv rootfs ro root=/dev/mmcblk1p${rootpart}
	else		
		setenv rootfs ro root=/dev/mmcblk0p${rootpart}
	fi
	mmc init 0

elif test "${interface}" = "usb" && test "${bus}" = "1"; then
	echo booting from internal SSD
	setenv rootfs ro root=/dev/sda${rootpart} nohdparm rootwait
else
	echo booting from external USB
	setenv rootfs ro root=/dev/sdb${rootpart} rootwait
fi

setenv bootargs console=${console} ${rootfs}
setenv load_kernel ${fs}load ${interface} ${device}${bootpart} ${loadaddr} ${prefix}${kernel}
setenv load_initrd ${fs}load ${interface} ${device}${bootpart} ${initrdaddr} ${prefix}${initrd}
setenv bootcmd bootm ${loadaddr} ${initrdaddr}

echo bootargs ${bootargs}
echo kernel ${load_kernel}
echo initrd ${load_initrd}
echo ${bootcmd}

run load_kernel
run load_initrd
run bootcmd

Testing Results

  • Boot from a SanDisk Ultra 64 GB SDXC Card