├── default.xml └── README.md /default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 18 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GRUB4Android 2 | 3 | ## Getting Started 4 | 5 | To get started with GRUB4Android, you'll need to get 6 | familiar with [Git and Repo](http://source.android.com/source/using-repo.html). 7 | 8 | To initialize your local repository using the GRUB4Android trees, use a command like this: 9 | 10 | repo init -u git://github.com/grub4android/manifest.git -b master 11 | 12 | Then to sync up: 13 | 14 | repo sync 15 | 16 | 17 | ## Initializing a Build Environment 18 | 19 | ### Installing required packages (Ubuntu 14.04) 64-bit 20 | $ sudo apt-get install git-core gnupg flex bison gperf build-essential \ 21 | zip curl zlib1g-dev libc6-dev lib32ncurses5-dev \ 22 | x11proto-core-dev libx11-dev lib32z-dev \ 23 | libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ 24 | libxml2-utils xsltproc autoconf grub-common qemu-user cmake vim-common \ 25 | realpath 26 | 27 | ### Installing required packages (Ubuntu 12.04) 32-bit 28 | $ sudo apt-get install git gnupg flex bison gperf build-essential \ 29 | zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ 30 | libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ 31 | libgl1-mesa-dev g++-multilib mingw32 tofrodos \ 32 | python-markdown libxml2-utils xsltproc zlib1g-dev:i386 \ 33 | autoconf grub-common qemu-user cmake vim-common realpath 34 | $ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so 35 | 36 | 37 | ## Building 38 | Build everything with make. GNU make can handle parallel tasks with a -jN argument, and it's common to use a number of tasks N that's between 1 and 2 times the number of hardware threads on the computer being used for the build. E.g. on a dual-E5520 machine (2 CPUs, 4 cores per CPU, 2 threads per core), the fastest builds are made with commands between make -j16 and make -j3 39 | 40 | $ make -j4 DEVICENAME 41 | 42 | check the [build repository](https://github.com/grub4android/build/tree/master/devices) for a list of supported devices. 43 | 44 | ## Installation 45 | ### LK: Xiaomi Mi2(s)(c) 'aries' and Xiaomi Redmi 1s 'armani' 46 | The file "out/DEVICENAME/lk/build-*/emmc_appsboot.mbn" needs to be flashed to the aboot partition 47 | 48 | $ fastboot flash aboot emmc_appsboot.mbn 49 | 50 | Please note that a faulty LK softbricks the device. You shouldn't flash it if you don't know how to recover it. 51 | 52 | ### LK: all other devices 53 | The resulting file "out/DEVICENAME/lkboot.img" needs to be flashed on the boot or recovery partition of the device. 54 | 55 | $ fastboot flash boot lkboot.img 56 | 57 | ### GRUB 58 | The GRUB filesystem "out/DEVICENAME/grub/grub_rootfs"needs to be installed on the device defined in the device's makefile. 59 | Usually this is /data/media/boot or /sdcard/boot. 60 | Afterwards you need to change the permissions of the files for security reasons. 61 | 62 | $ chmod -R 0644 ../boot 63 | 64 | ## Debugging 65 | LK support several commands. Just type "fastboot oem help" to get a list. 66 | Also you can build a sideload image of GRUB which boots GRUB with fastboot enabled. 67 | 68 | $ make DEVICENAME grub_sideload_image 69 | $ fastboot boot out/DEVICENAME/grub/grub_sideload.img 70 | --------------------------------------------------------------------------------