Skip to content

Download_Build_Run_OTO

zhouyijie1992 edited this page Mar 9, 2017 · 1 revision

Downloading the OPENTHOS Source

git clone https://github.com/openthos/OTO.git 
cd OTO
export PATH=$PATH:$PWD

目前工作的分支是multiwindow,请优先下载multiwindow分支.
mkdir WORK_DIR
cd WORK_DIR
repo init -u https://github.com/openthos/OTO.git -b $branch
eg: repo init -u https://github.com/openthos/OTO.git -b multiwindow
repo sync

We have created different branches based on lollipop-x86 (required openjdk7), Where $branch is any branch name described in the list below.

lollipop-x86     : base version from android-x86
multiwin-english : multiwindows english version
multiwindow      : multiwindows chinese version

Building openthos

cd WORK_DIR
source build/envsetup.sh
lunch $target_build
eg: lunch android_x86_64-eng
make iso_img -j$ProcessorNum     //for BIOS (legacy)
make iso_img -j$ProcessorNum     //if you build first time, plase build it again

OR

make efi_img -j$ProcessorNum     //for UEFI
make efi_img -j$ProcessorNum     //if you build first time, plase build it again

out directory: out/target/product/

NOTICE: If you download it first time, please make it twice for the correcting img.

Run the system

install/run in QEMU-KVM

${QEMU_PATH}/qemu-system-x86_64 \-enable-kvm \-m 1024 \-serial stdio \-cdrom  ${ANDROID_IMAGE_PATH}/android_x86_64.iso

USB install/run in real machine

You may create a bootable USB disk by


sudo umount your_usb_device(with partition number e.g. /dev/sdc1)
sudo dd if=android_x86_64.img of=your_usb_device(no partition number e.g. /dev/sdc)

Booting your USB disk in UEFI

  1. Enter your PC's setup,change boot tab to open uefi mode and reboot.
  2. Enter your PC's boot menu and select your USB disk to boot into UEFI grub.

Using installer

After entered UEFI grub, you will see 4 selections:run system live, run system live(DEBUG Mode), installer and boot into windows.Select installer to start installation.

Create partition(if you have a partiton to install, please go to 4)

  1. Select create/modify partitions.
  2. Select a disk to create new partition.
  3. Use arrow keys select usable space and select "new".
  4. Input the partition information to set a new partition.
  5. Use arrow keys select "write" to save your changes.

Install

  1. Select the partition you want to install the system into.
  2. Format the partition you selected to EXT4 fs.
  3. Select yes to install a read/write system dir.
  4. Wait for installation complete and reboot.

Boot system

Boot with rEFInd:If you have a rEFInd in your efi parition, the installer will add a menuentry for Android-x86 and you can boot with it.We suggest to use rEFInd as your bootmanager. For more information please read rEFInd's home page Boot with grub2:Enter your PC's setup and set all boot selection to disable. After you do that and reboot, you will enter grub2 and you can select a menuentry(openthos,openthos debug,windows) to boot the system you want.

Reports of successes or failures on other distributions are welcome.

about change kernel & kernel module

# edit kernel files

source build/envsetup.sh
lunch $target_build
cd out/target/product/x86_64/obj/kernel
make menuconfig
make          #for kernel
make modules  #for kernel modules

cd  oto_dir
# for kernel
rm $OUT/target/product/x86_64/kernel
# for kernel module
rm -rf $OUT/target/product/x86_64/system/lib/modules
rm -rf $OUT/target/product/x86_64/system.img
rm -rf $OUT/target/product/x86_64/system.sfs

make iso_img -j8

sudo dd if=$OUT/target/product/x86_64/android_x86_64.iso of=/dev/sdd