OSDN Git Service

android-x86/bootable-newinstaller.git
2 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86 oreo-x86
Chih-Wei Huang [Thu, 28 Oct 2021 17:44:03 +0000 (01:44 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

2 years agoinit: support Xen hypervisor device nougat-x86
Doug [Thu, 28 Oct 2021 17:37:02 +0000 (01:37 +0800)]
init: support Xen hypervisor device

2 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86 android-x86-8.1-r6
Chih-Wei Huang [Tue, 22 Jun 2021 15:06:51 +0000 (23:06 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

2 years ago1-install: cancel auto update mode if no partition found
Chih-Wei Huang [Tue, 22 Jun 2021 15:06:06 +0000 (23:06 +0800)]
1-install: cancel auto update mode if no partition found

The auto update mode (AUTO_INSTALL=update) tries to find a partition
labelled as Android-x86 or an ext4 partition. If no such a partition
is found, the auto mode should be cancelled.

Fixes: 244e03f0 ("Add auto installation function")

3 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86 android-x86-8.1-r5
Chih-Wei Huang [Wed, 13 May 2020 05:25:11 +0000 (13:25 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

3 years ago1-install: update symlink if the linked dir is upgraded android-x86-7.1-r4 android-x86-7.1-r5
Chih-Wei Huang [Wed, 13 May 2020 05:24:32 +0000 (13:24 +0800)]
1-install: update symlink if the linked dir is upgraded

3 years agoinit: fall back to busybox's shell
Chih-Wei Huang [Tue, 12 May 2020 15:09:26 +0000 (23:09 +0800)]
init: fall back to busybox's shell

Run busybox's shell if AOSP's shell fails to run. This makes
debug shell more reliable.

3 years agoinit: do not keep initrd's busybox in debug mode
Chih-Wei Huang [Tue, 12 May 2020 14:55:22 +0000 (22:55 +0800)]
init: do not keep initrd's busybox in debug mode

Keeping initrd's busybox in debug mode is an old feature before we added
busybox porting to Android-x86. But it introduced some inconsistencies
between debug and normal modes. Moreover, it depends on AOSP's tool (ln)
to work properly. In case the tool fails to run, the system may not boot.

In short, the feature does more harm than good. Let's remove it from
debug mode. Only keep it if BUSYBOX=1 is set in cmdline.

3 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Wed, 6 May 2020 16:24:27 +0000 (00:24 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

3 years ago1-install: move try_upgrade to an earlier step
Chih-Wei Huang [Wed, 6 May 2020 16:10:18 +0000 (00:10 +0800)]
1-install: move try_upgrade to an earlier step

The try_upgrade should be run before checking whether system
was installed as the read-write mode.

3 years ago0-auto-detect: fix parsing error if aliases contain brackets
Chih-Wei Huang [Wed, 6 May 2020 15:36:49 +0000 (23:36 +0800)]
0-auto-detect: fix parsing error if aliases contain brackets

4 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86 android-x86-8.1-r4
Chih-Wei Huang [Fri, 13 Mar 2020 03:42:08 +0000 (11:42 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

4 years agoinit: avoid finding system dir too aggressive
Chih-Wei Huang [Fri, 13 Mar 2020 03:36:21 +0000 (11:36 +0800)]
init: avoid finding system dir too aggressive

Only use a system dir if it contains build.prop.

4 years agoUse isohybrid in AOSP's tree
Chih-Wei Huang [Thu, 12 Mar 2020 16:17:10 +0000 (00:17 +0800)]
Use isohybrid in AOSP's tree

This removes the dependency of an external host tool.

4 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Wed, 11 Dec 2019 06:43:08 +0000 (14:43 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

4 years ago1-install: fix inconsistent alignment
Chih-Wei Huang [Wed, 11 Dec 2019 06:37:24 +0000 (14:37 +0800)]
1-install: fix inconsistent alignment

4 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Tue, 3 Dec 2019 02:40:32 +0000 (10:40 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

4 years agoinit: set SRC=iso earlier
Chih-Wei Huang [Tue, 3 Dec 2019 02:33:38 +0000 (10:33 +0800)]
init: set SRC=iso earlier

If iso-scan/filename is set in cmdline, SRC should be set earlier to
avoid misuse of other partitions.

4 years agoinit: avoid finding system partition too aggressive
Chih-Wei Huang [Mon, 2 Dec 2019 10:48:00 +0000 (18:48 +0800)]
init: avoid finding system partition too aggressive

If SRC is specified, do not use a system-like partition. This avoids
misuse.

4 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Fri, 22 Nov 2019 09:44:22 +0000 (17:44 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

4 years agoAdd version and arch to volume ID of the iso
Chih-Wei Huang [Fri, 22 Nov 2019 09:42:35 +0000 (17:42 +0800)]
Add version and arch to volume ID of the iso

It's suggested by the maintainer of libosinfo.

To avoid the volume ID too long, remove 'LiveCD' suffix.

4 years ago1-install: avoid unnecessary errors from cp android-x86-8.1-r3
Chih-Wei Huang [Wed, 30 Oct 2019 04:19:51 +0000 (12:19 +0800)]
1-install: avoid unnecessary errors from cp

Since ESP is a vfat partition, we cannot preserve attributes from ext4.

4 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Fri, 19 Jul 2019 04:31:13 +0000 (12:31 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

4 years agolndir: set permission, owner, group of destination dir android-x86-7.1-r3
Chih-Wei Huang [Fri, 19 Jul 2019 04:25:57 +0000 (12:25 +0800)]
lndir: set permission, owner, group of destination dir

Set them to be the same as the source dir if runs by root.

4 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Fri, 28 Jun 2019 04:34:27 +0000 (12:34 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

4 years ago1-install: fix wpa_supplicant.conf created unexpectedly
Chih-Wei Huang [Fri, 28 Jun 2019 04:14:42 +0000 (12:14 +0800)]
1-install: fix wpa_supplicant.conf created unexpectedly

The busybox sed -i is buggy to create an empty file if that file
doesn't exist. That causes unexpected issue.

5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86 android-x86-8.1-r2
Chih-Wei Huang [Tue, 19 Mar 2019 08:33:13 +0000 (16:33 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

5 years agoqemu-android: update options
Chih-Wei Huang [Tue, 19 Mar 2019 08:31:42 +0000 (16:31 +0800)]
qemu-android: update options

According to QEMU document, the '-usbdevice' option is deprecated.
Use the new '-device usb-...' option instead.

5 years agoandroid.cfg: simplify code
Chih-Wei Huang [Tue, 19 Mar 2019 08:17:53 +0000 (16:17 +0800)]
android.cfg: simplify code

Not sure why I wrote it in that way.

5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Tue, 12 Mar 2019 07:15:36 +0000 (15:15 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

5 years ago1-install: change default answer of system rw mode
Chih-Wei Huang [Tue, 12 Mar 2019 07:11:04 +0000 (15:11 +0800)]
1-install: change default answer of system rw mode

Mauro suggested to keep system read-write mode on auto updating.
That's reasonable. So change the default answer for that.

5 years agoUpdate isolinux to 6.03
Chih-Wei Huang [Thu, 24 Jan 2019 10:03:03 +0000 (18:03 +0800)]
Update isolinux to 6.03

Use the binary files from AOSP source tree.

5 years agoAdd experimental Vulkan support android-x86-8.1-r1
Chih-Wei Huang [Tue, 15 Jan 2019 03:39:59 +0000 (11:39 +0800)]
Add experimental Vulkan support

To test it, boot via Advanced options -> Vulkan support (experimental).

5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Fri, 11 Jan 2019 17:05:27 +0000 (01:05 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

Conflicts:
install/scripts/1-install

5 years agoqemu-android: enable usb tablet device
Chih-Wei Huang [Fri, 11 Jan 2019 17:00:49 +0000 (01:00 +0800)]
qemu-android: enable usb tablet device

It sets the pointer device uses absolute coordinates like a touchscreen.
This means QEMU is able to report the mouse position without having to
grab the mouse.

5 years agoandroid.cfg: remove duplicate includes
Chih-Wei Huang [Fri, 4 Jan 2019 09:58:34 +0000 (17:58 +0800)]
android.cfg: remove duplicate includes

Seems config_directory is the same as cmdpath, though I don't
understand why.

5 years agoandroid.cfg: support custom boot entry
Chih-Wei Huang [Tue, 1 Jan 2019 15:31:16 +0000 (23:31 +0800)]
android.cfg: support custom boot entry

New entries could also be appended by the new add_boot_entry function
in custom.cfg like

add_boot_entry /android-7.1-r2 "Android-x86 7.1-r2" quiet

5 years ago1-install: allow to upgrade an arbitrary folder
Chih-Wei Huang [Fri, 28 Dec 2018 04:38:12 +0000 (12:38 +0800)]
1-install: allow to upgrade an arbitrary folder

Originally the installer only searches and upgrades known folders of
official releases. That causes the upgrade function is not so useful
for unofficial build. Besides, it's a burden to maintain the upgrade
list.

To improve that, search all folders containing android-x86 files.
If multiple folders are found, show a dialog to ask users which one
to upgrade.

5 years agoandroid.cfg: set proper prefix for loopback device
Chih-Wei Huang [Fri, 4 Jan 2019 10:06:00 +0000 (18:06 +0800)]
android.cfg: set proper prefix for loopback device

5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Wed, 17 Oct 2018 09:55:39 +0000 (17:55 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

5 years agoinit: load atkbd hid-apple modules anyway
Chih-Wei Huang [Wed, 17 Oct 2018 09:52:04 +0000 (17:52 +0800)]
init: load atkbd hid-apple modules anyway

Though auto_detect could load these modules, it may take several
seconds. The user experience is not good.

Load the modules anyway no matter it's detected or not.

5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Fri, 17 Aug 2018 11:35:46 +0000 (19:35 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

5 years agoisolinux.cfg: fix typos
Chih-Wei Huang [Fri, 17 Aug 2018 11:32:50 +0000 (19:32 +0800)]
isolinux.cfg: fix typos

5 years ago1-install: make the wording clearer
Chih-Wei Huang [Sun, 12 Aug 2018 12:07:46 +0000 (20:07 +0800)]
1-install: make the wording clearer

Suggested by Antony Stone <Antony.Stone@and-x86.open.source.it>.

5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Thu, 19 Jul 2018 02:53:48 +0000 (10:53 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

5 years agoFix NFS mounting
Chih-Wei Huang [Thu, 19 Jul 2018 02:46:47 +0000 (10:46 +0800)]
Fix NFS mounting

Commit d9dfce00 determined fs type by blkid, but it didn't consider
the NFS case. The patch handles the case directly.

Fixes: d9dfce00 ("init: try to mount according to filesystem type")

5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Mon, 25 Jun 2018 14:45:07 +0000 (22:45 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

5 years agoUse RELEASE_OS_TITLE in the volume ID of the ISO image
Michael Goffioul [Mon, 25 Jun 2018 14:41:26 +0000 (22:41 +0800)]
Use RELEASE_OS_TITLE in the volume ID of the ISO image

5 years ago1-install: add 8.1-rc1 to the upgrade list
Chih-Wei Huang [Fri, 22 Jun 2018 03:41:18 +0000 (11:41 +0800)]
1-install: add 8.1-rc1 to the upgrade list

5 years agorpm: detect a debian like distribution more effectively
Chih-Wei Huang [Fri, 22 Jun 2018 03:01:23 +0000 (11:01 +0800)]
rpm: detect a debian like distribution more effectively

5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Wed, 13 Jun 2018 08:29:54 +0000 (16:29 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

Conflicts:
install/grub2/efi/boot/android.cfg

5 years agoAdd support for more OSes
Chih-Wei Huang [Tue, 12 Jun 2018 07:34:49 +0000 (15:34 +0800)]
Add support for more OSes

5 years ago1-install: add grub theme support
Chih-Wei Huang [Wed, 23 May 2018 02:27:05 +0000 (10:27 +0800)]
1-install: add grub theme support

This is a modified Oxygen Grub 2 Theme from
https://www.gnome-look.org/p/1111859/.

5 years agoAdd a boot entry to skip Setup Wizard
Chih-Wei Huang [Mon, 11 Jun 2018 09:29:39 +0000 (17:29 +0800)]
Add a boot entry to skip Setup Wizard

5 years ago1-install: skip the whole disk on finding ESP
Chih-Wei Huang [Sun, 10 Jun 2018 08:12:31 +0000 (16:12 +0800)]
1-install: skip the whole disk on finding ESP

5 years agoqemu-android: find an available port to listen
Chih-Wei Huang [Sun, 10 Jun 2018 08:07:54 +0000 (16:07 +0800)]
qemu-android: find an available port to listen

The script may fail to launch because the port 5555 is bound, e.g.,
another instance is running. The change tries to find an available
port to avoid such an issue.

5 years ago1-install: generate a large file faster
Chih-Wei Huang [Thu, 17 May 2018 08:39:04 +0000 (16:39 +0800)]
1-install: generate a large file faster

Use seek option of dd to create the large file.

5 years ago1-install: always install system.img in read-write mode
Chih-Wei Huang [Fri, 11 May 2018 11:58:00 +0000 (19:58 +0800)]
1-install: always install system.img in read-write mode

Originally we install the whole system directory to ext4 in read-write
mode. However, oreo-x86 fails to boot since SELinux file contexts are
not defined.

To solve that, just install system.img in read-write mode no matter
what the destination filesystem is.

5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Fri, 11 May 2018 10:47:19 +0000 (18:47 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

5 years ago1-install: change default data.img size to 2048MB
Chih-Wei Huang [Wed, 9 May 2018 10:25:10 +0000 (18:25 +0800)]
1-install: change default data.img size to 2048MB

512MB is not large enough for oreo-x86.

5 years agoAllow to boot a loopback iso file
Chih-Wei Huang [Tue, 8 May 2018 08:09:20 +0000 (16:09 +0800)]
Allow to boot a loopback iso file

5 years agoUse xorriso to generate iso if possible
Chih-Wei Huang [Tue, 8 May 2018 03:13:44 +0000 (11:13 +0800)]
Use xorriso to generate iso if possible

On some Linux distributions (e.g. Debian 9) genisoimage does not
support -e option we need. Use xorriso to solve that.

5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Fri, 4 May 2018 05:07:12 +0000 (13:07 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

5 years ago1-install: add 7.1-r2 to the upgrade list
Chih-Wei Huang [Wed, 2 May 2018 09:47:30 +0000 (17:47 +0800)]
1-install: add 7.1-r2 to the upgrade list

5 years ago0-auto-detect: avoid loading hyperv modules android-x86-7.1-r2
Chih-Wei Huang [Wed, 2 May 2018 03:43:18 +0000 (11:43 +0800)]
0-auto-detect: avoid loading hyperv modules

5 years agoqemu-android: add QXL paravirtual graphic card
Chih-Wei Huang [Thu, 19 Apr 2018 06:51:58 +0000 (14:51 +0800)]
qemu-android: add QXL paravirtual graphic card

It is VGA compatible (including VESA 2.0 VBE support). Works best with
qxl guest drivers installed though.  Recommended choice when using the
spice protocol.

Tested-by: John Morris <jmorris42@gmail.com>
6 years agoGenerate efi.img on the fly
Chih-Wei Huang [Sun, 15 Apr 2018 08:35:31 +0000 (16:35 +0800)]
Generate efi.img on the fly

6 years agoUpdate 64-bit grub-efi binaries
Chih-Wei Huang [Sun, 15 Apr 2018 08:18:56 +0000 (16:18 +0800)]
Update 64-bit grub-efi binaries

Signed binaries from Ubuntu 18.04:

* BOOTx64.EFI: shimx64.efi.signed of shim-signed (1.33.1+13-0ubuntu2)
* grubx64.efi: gcdx64.efi.signed of grub-efi-amd64-signed (1.93+2.02-2ubuntu8)

6 years ago1-install: fix incorrect quote
Chih-Wei Huang [Fri, 13 Apr 2018 15:19:34 +0000 (23:19 +0800)]
1-install: fix incorrect quote

6 years ago1-install: create device node of ESP if not exists
Chih-Wei Huang [Fri, 13 Apr 2018 07:01:55 +0000 (15:01 +0800)]
1-install: create device node of ESP if not exists

Similar to commit 71810cea but for ESP.

6 years ago1-install: select proper partition tool if possible
Chih-Wei Huang [Fri, 13 Apr 2018 06:44:17 +0000 (14:44 +0800)]
1-install: select proper partition tool if possible

Try to determine the appropriate partition tool based on the partition
table type. Only ask users if no valid partition table is found.

6 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Thu, 22 Feb 2018 09:42:45 +0000 (17:42 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

6 years agoAllow to show the specified OS title
Chih-Wei Huang [Wed, 14 Feb 2018 07:09:46 +0000 (15:09 +0800)]
Allow to show the specified OS title

6 years ago1-install: allow to specify partition to update
Chih-Wei Huang [Fri, 9 Feb 2018 11:09:00 +0000 (19:09 +0800)]
1-install: allow to specify partition to update

You can specify the partition to be updated like AUTO_UPDATE=sdb2.

6 years agoTry to boot more OSes from other ESP
Chih-Wei Huang [Thu, 8 Feb 2018 10:22:02 +0000 (18:22 +0800)]
Try to boot more OSes from other ESP

Search more boot loaders including the default and fallback from
other possible EFI system partition.

6 years ago1-install: convert GPT to MBR for legacy GRUB
Chih-Wei Huang [Thu, 8 Feb 2018 07:30:49 +0000 (15:30 +0800)]
1-install: convert GPT to MBR for legacy GRUB

Installing legacy GRUB to GPT won't work. Try to convert GPT to MBR
if users agree.

6 years agoLet users specify the target disk to auto install
Chih-Wei Huang [Thu, 8 Feb 2018 04:59:07 +0000 (12:59 +0800)]
Let users specify the target disk to auto install

It's a little tricky to select ESP if auto install to non-first disk.
Instead of using the ESP from the first disk, we select the ESP on the
target disk. This is useful if auto install to a USB disk.

6 years ago1-install: fix possible wrong selection of auto update
Chih-Wei Huang [Wed, 7 Feb 2018 10:33:50 +0000 (18:33 +0800)]
1-install: fix possible wrong selection of auto update

The iso media must be excluded from the auto selection.

6 years ago1-install: install the default bootloader if not exists
Chih-Wei Huang [Wed, 7 Feb 2018 07:27:32 +0000 (15:27 +0800)]
1-install: install the default bootloader if not exists

If there is no default EFI bootloader, install ours as the default one.

6 years ago1-install: add 7.1-r1 to the upgrade list
Chih-Wei Huang [Wed, 7 Feb 2018 05:27:36 +0000 (13:27 +0800)]
1-install: add 7.1-r1 to the upgrade list

6 years agoSet rpm epoch android-x86-7.1-r1
Chih-Wei Huang [Tue, 6 Feb 2018 10:32:47 +0000 (18:32 +0800)]
Set rpm epoch

Set epoch to the major version for a non-rc (stable) release.
Otherwise, set epoch to the major version minus one.

6 years ago1-install: recommend to install EFI GRUB2
Chih-Wei Huang [Tue, 6 Feb 2018 03:16:31 +0000 (11:16 +0800)]
1-install: recommend to install EFI GRUB2

You should install it unless you know what you're doing.

6 years ago1-install: remove redundant redirection
Chih-Wei Huang [Tue, 6 Feb 2018 02:42:20 +0000 (10:42 +0800)]
1-install: remove redundant redirection

6 years agoAdd advanced options to boot menu
Chih-Wei Huang [Fri, 2 Feb 2018 08:09:40 +0000 (16:09 +0800)]
Add advanced options to boot menu

Provide more boot options in the advanced submenu.

6 years ago1-install: add startup.nsh if it doesn't exist
Chih-Wei Huang [Wed, 31 Jan 2018 09:34:06 +0000 (17:34 +0800)]
1-install: add startup.nsh if it doesn't exist

On some buggy UEFI firmware (e.g., VirtualBox), the boot entry created
by efibootmgr may disappear after poweroff. As a result it can't boot
to Android-x86 anymore.

Add startup.nsh to run our boot loader as a fallback.

6 years agoAdd auto installation function
Chih-Wei Huang [Fri, 26 Jan 2018 09:19:05 +0000 (17:19 +0800)]
Add auto installation function

A new variable AUTO_INSTALL is introduced to kernel cmdline:

* AUTO_INSTALL=n - auto install Android-x86 to the n-th disk or /dev/$n
                   if n is a device node name. If the specified disk
                   doesn't exist, the installer will ask you to select
                   the target disk.

* AUTO_INSTALL=force - auto install Android-x86 to the first disk
                   without any confirmation.

* AUTO_INSTALL=update - auto update Android-x86 to the first partition
                   with label Android-x86, or the first ext4 partition
                   and install boot loader.

6 years ago1-install: find EFI system partition smarter
Chih-Wei Huang [Fri, 26 Jan 2018 07:57:28 +0000 (15:57 +0800)]
1-install: find EFI system partition smarter

First, try to find the partition with type code EF00. If not found,
try to use the first vfat partition, or the first partition if no
vfat partition is found.

6 years ago1-install: create device node if not exists
Chih-Wei Huang [Thu, 25 Jan 2018 02:53:25 +0000 (10:53 +0800)]
1-install: create device node if not exists

After re-partition, sometimes the device node is not re-created
automatically. I'm not sure why.

Regenerate the uevent to force creating it.

6 years ago1-install: add savedefault function to grub-efi
Chih-Wei Huang [Fri, 19 Jan 2018 07:48:53 +0000 (15:48 +0800)]
1-install: add savedefault function to grub-efi

Remember the last chosen boot entry.

6 years ago1-install: mount ESP partition to /efi dir
Chih-Wei Huang [Wed, 17 Jan 2018 09:19:06 +0000 (17:19 +0800)]
1-install: mount ESP partition to /efi dir

It's easier for debugging.

6 years agoAdd a more flexible android.cfg of grub-efi
Chih-Wei Huang [Wed, 17 Jan 2018 08:40:42 +0000 (16:40 +0800)]
Add a more flexible android.cfg of grub-efi

The android.cfg is used in both installation media and the installed
system. So we don't need to replicate the code. More functions could
be added in the future.

If boot loaders of other OSes are found in ESP, add them to the boot
menu. Currently Fedora, Ubuntu and Windows are supported.

Also include custom.cfg if it exists.

6 years ago1-install: avoid overwriting /boot/grub/grub.cfg
Chih-Wei Huang [Wed, 17 Jan 2018 03:31:09 +0000 (11:31 +0800)]
1-install: avoid overwriting /boot/grub/grub.cfg

Originally we just write a new /boot/grub/grub.cfg to ESP.
It may destroy boot entries of other OSes (e.g. Ubuntu).
That's not good.

To avoid the issue, move our grub.cfg to a higher priority dir
/boot/grub/${grub_cpu}-efi/ which is usually not used.

6 years ago1-install: mount efivarfs earlier
Chih-Wei Huang [Wed, 17 Jan 2018 03:30:05 +0000 (11:30 +0800)]
1-install: mount efivarfs earlier

6 years ago1-install: provide more info on device selection
Chih-Wei Huang [Tue, 16 Jan 2018 04:11:17 +0000 (12:11 +0800)]
1-install: provide more info on device selection

Show partitions label and size in GB.

Skip installer source partition and too small size partitions.

Mostly suggested by Karol 'Vioner' Putra.

6 years agoinit: try to mount according to filesystem type
Chih-Wei Huang [Mon, 15 Jan 2018 08:06:24 +0000 (16:06 +0800)]
init: try to mount according to filesystem type

6 years ago1-install: fix boot failure from ntfs
Chih-Wei Huang [Fri, 12 Jan 2018 07:25:56 +0000 (15:25 +0800)]
1-install: fix boot failure from ntfs

Our grub-efi doesn't include ntfs module. Though we could load ntfs.mod
at runtime, it won't work if secure boot is enabled.

Simply copy the boot files to ESP to avoid the issue.

6 years ago1-install: create EFI boot item via efibootmgr
Chih-Wei Huang [Fri, 12 Jan 2018 07:21:51 +0000 (15:21 +0800)]
1-install: create EFI boot item via efibootmgr

Part of the patch was made by Karol 'Vioner' Putra.

6 years ago1-install: search bootmgfw.efi at runtime
Chih-Wei Huang [Wed, 10 Jan 2018 09:51:21 +0000 (17:51 +0800)]
1-install: search bootmgfw.efi at runtime

Originally we only create Windows boot item on installation. So
if bootmgfw.efi is installed afterward, it won't be shown in the
grub boot menu.

The patch searches bootmgfw.efi at runtime and shows it if it's
available.

6 years agoAndroid.mk: do not copy initrd files
Chih-Wei Huang [Wed, 10 Jan 2018 08:08:00 +0000 (16:08 +0800)]
Android.mk: do not copy initrd files

The mkbootfs can combine several dirs into one ramdisk so
no need to copy them.

I misused the installer dir for initrd.img for a long time.
Move the generated initrd files to another dir.

6 years agoDrop efi_img
Chih-Wei Huang [Wed, 13 Dec 2017 07:31:37 +0000 (15:31 +0800)]
Drop efi_img

We don't use efi_img anymore and the rules are possibly broken.
The iso_img has supported EFI booting for a long time.