Difference between revisions of "Uboot installation"

From Toshiba AC100 wiki
Jump to: navigation, search
(Отмена правки 1177, сделанной участником Stuw (обс.))
(Отмена правки 1176, сделанной участником Stuw (обс.))
Line 1: Line 1:
<translate>
 
 
==Warnings==  
 
==Warnings==  
 
Ubuntu's 3.1 kernel have issue with usb while booting with u-boot. This will case wi-fi not to work.
 
Ubuntu's 3.1 kernel have issue with usb while booting with u-boot. This will case wi-fi not to work.
Line 296: Line 295:
  
 
9) Power on. Choose "Ubuntu" in boot menu. Installation will continue.
 
9) Power on. Choose "Ubuntu" in boot menu. Installation will continue.
</translate>
 

Revision as of 08:53, 23 December 2016

Warnings

Ubuntu's 3.1 kernel have issue with usb while booting with u-boot. This will case wi-fi not to work.

Be accurate.

Don't insert SD card too early (to avoid device enumeration issues). Folow this guide step by step.


Added by an Ac100 user . I have never modified a wiki before...

Some errors are about where/when you have to use mmcblk1 which is the external sd-card of the AC100 and about where/when you have to use mmcblk0 which is internal sd-card of the AC100. Then it would help to understand if this guide want to install both Android and Ubuntu on internal or external sd-card. I have been unable to install Ubuntu neither Android, so I'll not make corrections to this guide, I'll just point attention to some places where it was impossible to go on without change something respect to the guide, or where I have had doubts.To install android as said in this guide and pointing to http://code.google.com/p/cm-paz00/wiki/InstallGuide?wl=en we have a problem about re-partitioning, here in ac100.wikispaces guide we have partioned mmcblk0 (internal sd-card) , while in the install guide of google.com we are installing in mmcblk1(external sd-card). an example from code.google.com guide: Mount external SD card mount /dev/mmcblk0p1 /tmp/sd while mmcblk0p1 is referred to the internal sd-card

To install ubuntu I can point attention about phase 1 ,just adding that it works and it simply goes in loop ,is this error in the errors mentioned ?? About Phase 2 it's impossible to mount /dev/mmcblk1p7 cause it's the external sd-card and in the external sd-card we have only a primary partition with fat filesystem. an example mount /dev/mmcblk1p7 /mnt/root Where are we installing ubuntu, in internal or external sd-card ??? ----------------------------------------------------------------------------------------------------------------------------------------------------------------- finishing this little adds about errors,I hope someone is able to correct them better then me.


Intro

Main idea is to get SOS partition (64 MB) with boot script and few auxiliary kernels/initrds. Boot script will contain boot menu.

Steps:

1) Start SOS uboot linux

On this step you will run SOS linux from ram. No modifications is made on AC100

2) u-boot installation

On this step you will install u-boot and convert current linux/android installation for u-boot support. In most cases system is bootable after bootloader switch.

3) Repartitioning

This step is needed for next reasons:

  • simplify boot process
  • fit new android version
  • allow dualboot

4) Install android and Install ubuntu

Seems obvious.


Prepare

1) Download sos-uboot

sos-uboot-r5-2013-11-10.bin

2) Download helpers

ac100-u-boot-helpers.zip

3) Download u-boot-tools

u-boot-tools_2013.01.01-4_armhf.deb

4) Download Ubuntu:

DEV NOTE boot_ubuntu.zip contains kernel and initrd from .bootimg file and boot script.

  • 13.04 installer and packages (old links are outdated, new links point to ftp.ubuntu-tw.org)

boot_ubuntu-13.04-preinstalled-desktop-armhf+ac100.zip

lubuntu-13.04-preinstalled-desktop-armhf+ac100.tar.gz

  • 13.10 installer and packages (old links are outdated, new links point to ftp.ubuntu-tw.org)

boot_ubuntu-saucy-desktop-armhf+ac100-2013-06-19.zip

saucy-preinstalled-desktop-armhf+ac100.tar.gz

  • 14.04 installer and packages from 05-Feb-2014

boot_ubuntu-trusty-desktop-armhf+ac100-2014-02-05.zip

trusty-preinstalled-desktop-armhf+ac100.tar.gz

Start SOS uboot linux

On PC:

1) Start AC100 in recovery mode ( ctrl + esc + power )

a) using nvflash

sudo nvflash --bl sos-uboot-r5-2013-11-10.bin --go

a) using tegrapart

tegrarcm --bct=your.bct --bootloader=sos-uboot-r5-2013-11-10.bin --loadaddr=0x108000

AC100 will automatically boot to command prompt


u-boot installation

On this step you change ac100 bootloader to u-boot. Installation script will keep kernel/initrd from 6-th partition (LNX).

On AC100:

1) Start SOS uboot linux

2) Run installation script and follow instructions

./switch-to-uboot


Repartitioning

On this step you will form partition scheme for android and ubuntu dual boot.

On PC:

1) Format first partition on SD cart to fat

2) Unpack ac100-u-boot-helpers.zip to SD card

3) Safely remove SD card from PC

DO NOT INSERT SD CARD IN AC100 BEFORE THIS STEP

4) Start SOS uboot linux

On AC100:

1) Insert SD card

2) Mount SD card

mkdir /mnt/sd
mount /dev/mmcblk1p1 /mnt/sd

3) Run repartition

/mnt/sd/apply_partitions_config.sh /mnt/sd/ac100_partitions.cfg /dev/mmcblk0


Setup boot configuration

On this step you will get bootmenu for sos/android/ubuntu, but only sos option will be usable.

On PC:

DO NOT INSERT SD CARD IN AC100 BEFORE THIS STEP

1) Start SOS uboot linux

On AC100:

1) Insert SD card

2) Mount SD card

mkdir /mnt/sd
mount /dev/mmcblk1p1 /mnt/sd

3) Mount SOS partition

mkdir /mnt/sos
mount /dev/mmcblk0p1 /mnt/sos

4) Copy boot files

cp -r /mnt/sd/boot /mnt/sos

5) Unmount

umount /mnt/sd
umount /mnt/sos

6) Power off AC100 (press power button for 8 seconds)

7) Remove SD card from AC100

8) Power on AC100. If you done all right, you will get boot menu


Install android

After this step "Android Recovery" in boot menu became usable.

On AC100:

1) Use Install CWM recovery for CM-10.1 section from http://code.google.com/p/cm-paz00/wiki/InstallGuide?wl=en with following changes:
Don't copy all content of recovery-10.1.img. Copy only kernel and ramdisk:

mkdir /tmp/upacked
unzip /tmp/sd/recovery-10.1.img -d /tmp/upacked
cp /tmp/upacked/zImage* /tmp/p1/boot/zImage
cp /tmp/upacked/initrd*.gz /tmp/p1/boot/initrd.gz

2) Unmount all
3) Powero off
3) Power on. To run recovery select Android Recovery in boot menu
Important: use this command to copy files

cp /tmp/upacked/zImage* /tmp/p1/boot/zImage
cp /tmp/upacked/initrd*.gz /tmp/p1/boot/initrd.gz

otherwise file names will not match boot script and recovery will not boot.

Install ubuntu

Phase 1: rootfs installation

On PC:

1) Format first partition on SD card to fat

2) Copy to SD card

http://cdimage.ubuntu.com/lubuntu/daily-preinstalled/20131016.1/saucy-preinstalled-desktop-armhf+ac100.tar.gz

3) Unpack to SD card

https://dl.dropboxusercontent.com/u/40761340/Test/boot_ubuntu.zip

4) Safely remove SD card


On AC100:

1) Insert SD card

2) Power on

3) Select installation from SD (fat), follow instructions, don't pay much attantion to errors ;)

Phase 2: prepare for u-boot

On PC:

1) Format first partition on SD card to fat

2) Copy to SD card

https://launchpadlibrarian.net/139556634/u-boot-tools_2013.01.01-4_armhf.deb

3) Unpack to SD card

https://dl.dropboxusercontent.com/u/40761340/Test/ac100-u-boot-helpers.zip

4) Safely remove SD card from PC

On AC100:

1) Start SOS uboot linux

2) Insert SD card

3) Mount SD card

mkdir /mnt/sd
mount /dev/mmcblk1p1 /mnt/sd

4) Mount target partition (p7 a.k.a UDB)

mkdir /mnt/root
mount /dev/mmcblk1p7 /mnt/root

5) Copy fixed database for flash-kernel

cp /mnt/sd/all.db.fixed /mnt/root/usr/share/flash-kernel/db/all.db

6) Install u-boot tools and update initramfs

cp /mnt/sd/u-boot-tools_2013.01.01-4_armhf.deb /mnt/root/tmp
/mnt/sd/help.sh mount_vfs
chroot /mnt/root
export PATH=/sbin:/usr/sbin:/bin:/usr/bin
dpkg -i /tmp/u-boot-tools_2013.01.01-4_armhf.deb
update-initramfs -u
exit
/mnt/sd/help.sh umount_vfs

7) Unmount all

umount /mnt/sd
umount /mnt/root

8) Power off

9) Power on. Choose "Ubuntu" in boot menu. Installation will continue.