OSDN Git Service
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.
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.
Chih-Wei Huang [Tue, 6 Feb 2018 02:42:20 +0000 (10:42 +0800)]
1-install: remove redundant redirection
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.
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.
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.
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.
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.
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.
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.
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.
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.
Chih-Wei Huang [Wed, 17 Jan 2018 03:30:05 +0000 (11:30 +0800)]
1-install: mount efivarfs earlier
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.
Chih-Wei Huang [Mon, 15 Jan 2018 08:06:24 +0000 (16:06 +0800)]
init: try to mount according to filesystem type
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.
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.
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.
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.
Chih-Wei Huang [Fri, 27 Oct 2017 06:25:53 +0000 (14:25 +0800)]
qemu-android: remove the redundant ethernet card
A new virtio-net-pci card is defined. The old e1000 should be removed.
Fixes:
dff4a2e ("qemu-android: try to run QEMU in several VGA modes")
Chih-Wei Huang [Mon, 9 Oct 2017 16:58:24 +0000 (00:58 +0800)]
qemu-android: try to run QEMU in several VGA modes
The script will try to launch QEMU with VGA modes in the order:
* virtio (virgl) and display video output via SDL with OpenGL context.
The virgl is a virtual 3D GPU for use inside the QEMU virtual machine
that allows the guest operating system to use the capabilities of the
host GPU to accelerate 3D rendering.
* std (bochsdrmfb) with display video output via SDL.
The 3D rendering is carried out by a software renderer.
* std with default display video output (usually gtk).
Chih-Wei Huang [Mon, 9 Oct 2017 16:39:44 +0000 (00:39 +0800)]
Build qemu-android script in debug mode
After building you can run the qemu-android script to test the images
in QEMU directly.
Chih-Wei Huang [Fri, 6 Oct 2017 10:04:20 +0000 (18:04 +0800)]
init: skip to mount unknown type partitions
Trying to mount an unknown type partition may cause kernel panic.
Chih-Wei Huang [Thu, 24 Aug 2017 10:42:17 +0000 (18:42 +0800)]
1-install: add 7.1-rc2 to the upgrade list
Chih-Wei Huang [Wed, 9 Aug 2017 10:21:51 +0000 (18:21 +0800)]
1-install: only format ESP if mount failed
People may accidentally format the ESP containing Windows bootloader.
This makes Windows not bootable and unrecoverable.
To avoid such an error, only ask to format ESP if mount it failed.
Chih-Wei Huang [Thu, 20 Jul 2017 07:22:48 +0000 (15:22 +0800)]
1-install: fix NVMe device nodes start index
It starts from 1 instead of 0.
Chih-Wei Huang [Mon, 17 Jul 2017 16:19:41 +0000 (00:19 +0800)]
1-install: support NVMe SSD device nodes
Chih-Wei Huang [Mon, 17 Jul 2017 08:22:18 +0000 (16:22 +0800)]
lndir: fix two issues
* check if src is a directory
* force to create symbolic links
Chih-Wei Huang [Mon, 17 Jul 2017 02:50:45 +0000 (10:50 +0800)]
initrd: support NVMe SSD device nodes
Extend the pattern to cover /dev/nvme*.
Chih-Wei Huang [Sat, 17 Jun 2017 11:52:49 +0000 (19:52 +0800)]
1-install: add 7.1-rc1 to the upgrade list
Chih-Wei Huang [Wed, 14 Jun 2017 02:28:04 +0000 (10:28 +0800)]
lndir: fix symbolic dir handling
Chih-Wei Huang [Thu, 1 Jun 2017 09:58:45 +0000 (17:58 +0800)]
1-install: add 6.0-r3 to the upgrade list
Chih-Wei Huang [Mon, 24 Apr 2017 02:57:16 +0000 (10:57 +0800)]
Add a script to run Android-x86 in QEMU
The qemu-android script is installed as a part of the rpm. Users
can run the script directly to launch Android-x86 in the QEMU
virtual machine.
The script could also be used on a build host to run the just
built images in the $OUT directory.
Chih-Wei Huang [Thu, 23 Mar 2017 18:58:15 +0000 (02:58 +0800)]
init: allow to disable SetupWizard
Now SetupWizard could be disabled by adding SETUPWIZARD=0 to cmdline.
In debug mode 2, SetupWizard is also disabled unless SETUPWIZARD=1.
Chih-Wei Huang [Tue, 17 Jan 2017 15:20:18 +0000 (23:20 +0800)]
Use BUILD_NAME_VARIANT as the rpm name
Chih-Wei Huang [Tue, 17 Jan 2017 05:11:33 +0000 (13:11 +0800)]
0-auto-detect: don't load all sound/core modules
To avoid possible misusing codec issues.
Chih-Wei Huang [Tue, 17 Jan 2017 04:54:25 +0000 (12:54 +0800)]
1-install: support user-defined PREV_VERS
This allows a variant build to define its previous versions
to be upgraded.
Chih-Wei Huang [Sat, 14 Jan 2017 18:08:46 +0000 (02:08 +0800)]
1-install: add 6.0-r2 to the upgrade list
Mauro Rossi [Sat, 14 Jan 2017 13:58:55 +0000 (14:58 +0100)]
Use shell-script $$(...) instead of $(shell ...)
kati doesn't support passing results of $(shell)
to other make constructs, as explained here:
https://github.com/google/kati/issues/71
Fixes the following building error in nougat-x86:
./bootable/newinstaller/Android.mk:82: kati doesn't support passing
results of $(shell) to other make constructs: date +"%F"
build/core/ninja.mk:163: recipe for target
'out/build-android_x86_64.ninja' failed
make: *** [out/build-android_x86_64.ninja] Error 1
Chih-Wei Huang [Tue, 10 Jan 2017 03:59:23 +0000 (11:59 +0800)]
initrd: load drivers in debug or installation modes
On some machines the input devices may not be activated because
their drivers are not loaded yet in debug or installation modes.
The change tries to fix it by calling the auto_detect function.
Skip the display (kms) modules to avoid some potential issues.
Chih-Wei Huang [Tue, 10 Jan 2017 02:04:54 +0000 (10:04 +0800)]
2-mount: allow to assign the data subdirectory
The change gives the users a method to specify the name of the data
subdirectory by the DATA variable in the kernel cmdline.
Chih-Wei Huang [Mon, 9 Jan 2017 09:18:20 +0000 (17:18 +0800)]
init: avoid error if mnt exists
Chih-Wei Huang [Fri, 25 Nov 2016 09:48:07 +0000 (17:48 +0800)]
initrd: allow to specify ramdisk path
Now the ramdisk.img could be specified by the RAMDISK variable
in the kernel cmdline.
Chih-Wei Huang [Wed, 26 Oct 2016 15:54:21 +0000 (23:54 +0800)]
Add rules to build an rpm package
The rpm could be installed to an rpm based linux distribution.
Boot entries for android-x86 will be added. After installation,
reboot the system to android-x86.
To build the rpm, you need to install 'rpm-build' on a Fedora
based system, or 'rpm' on a Debian/Ubuntu based system.
Then do it by 'make rpm'.
Just install the rpm as a normal package on a Fedora based system.
On Debian/Ubuntu, you can use the 'alien' to install it:
$ sudo apt install alien
$ sudo alien -c -i android-x86-6.0-r1.i686.rpm
Chih-Wei Huang [Fri, 30 Sep 2016 04:44:45 +0000 (12:44 +0800)]
1-install: support INSTALL_PREFIX
This allows a variant build to specify another install prefix.
Chih-Wei Huang [Fri, 30 Sep 2016 02:52:33 +0000 (10:52 +0800)]
1-install: making /system be read-write is not recommended
Making /system be read-write is only useful for debugging purposes.
Don't recommend it to the end users.
Chih-Wei Huang [Fri, 30 Sep 2016 02:50:19 +0000 (10:50 +0800)]
1-install: check which grub should be installed
Originally we ask whether to install both legacy grub and efi grub.
This may confuse the users.
The patch checks if the device is EFI enabled and ask to install
the appropriate grub only.
Chih-Wei Huang [Fri, 30 Sep 2016 02:09:10 +0000 (10:09 +0800)]
1-install: strip iso-scan/filename=* in cmdline
Chih-Wei Huang [Wed, 14 Sep 2016 06:20:55 +0000 (14:20 +0800)]
1-install: add 6.0-r1 to the upgrade list
Chih-Wei Huang [Fri, 9 Sep 2016 09:15:16 +0000 (17:15 +0800)]
isolinux.cfg: let the user choose VESA mode
The user should choose 1024x768 32-bit which is the best mode
for software rendering. However, it is non-standard so we are
unable to hardcode the mode number.
Chih-Wei Huang [Fri, 26 Aug 2016 14:25:09 +0000 (22:25 +0800)]
1-install: add 6.0-rc2 to the upgrade list
Chih-Wei Huang [Sun, 14 Aug 2016 05:00:46 +0000 (13:00 +0800)]
0-auto-detect: disable modules auto loading
Now we use ueventd to load modules. It more cleaner and reliable.
If you'd like to keep using the original modules auto loading,
add AUTO_LOAD=old to the kernel cmdline.
Chih-Wei Huang [Thu, 11 Aug 2016 11:31:14 +0000 (19:31 +0800)]
Add otion noatime to improve performance
This option avoids unnecessary writing on the file system.
It's suggested by Majian.
Chih-Wei Huang [Thu, 21 Jul 2016 16:00:29 +0000 (00:00 +0800)]
1-install: deprecate installing to a whole disk
If choose a whole disk to install, it causes problems to
install the bootloader.
Chih-Wei Huang [Thu, 21 Jul 2016 15:22:32 +0000 (23:22 +0800)]
0-auto-detect: keep module loading order as before
Commit
bdf2b690 uses 'sort -u' which changes module loading order.
It causes some issues. For example, on a device with two graphic
cards, the driver of the discrete graphic card may be loaded first
that causes black screen issue.
Use the simple awk script to remove duplicate items but keep the
order unchanged.
Chih-Wei Huang [Mon, 27 Jun 2016 09:12:02 +0000 (17:12 +0800)]
1-install: add 6.0-rc1 to the upgrade list
Ma Jian [Sun, 12 Jun 2016 07:25:43 +0000 (15:25 +0800)]
init: fix localtime_r not work in /init
There is no ANDROID_ROOT environment variable set in /init so that
localtime_r doesn't work because it cannot find the correct tzdata
file under /system.
NO_REF_TASK
Tested:
1) make sure persist.rtc_local_time is 1
2) make sure sysclktz 1 in init.rc
3) set local time in android and reboot to bios, bios should have
local time
4) reboot back to android, the system time should be correct in
local time (even network time sync is not available)
Change-Id: I762b8d9a8923e4a4bf58fcafe347b2708a1c8736
Chih-Wei Huang [Tue, 7 Jun 2016 04:56:56 +0000 (12:56 +0800)]
1-install: remove formatting to ext2/3
The ext2/3 filesystem causes issue on Android 6.0.
Do not support them now.
Chih-Wei Huang [Mon, 6 Jun 2016 16:47:16 +0000 (00:47 +0800)]
1-install: convert ext2/3 to ext4 by request
When upgrade from an older version using ext2/3 filesystem,
the installer will ask if the user wants to convert it to ext4.
Chih-Wei Huang [Thu, 2 Jun 2016 05:45:29 +0000 (13:45 +0800)]
isolinux.cfg: change VESA mode to be 32-bit
Chih-Wei Huang [Tue, 31 May 2016 03:37:59 +0000 (11:37 +0800)]
Android.mk: use AOSP's mksquashfs
Build mksquashfs from the source of AOSP.
Li Xin [Thu, 26 May 2016 11:11:53 +0000 (19:11 +0800)]
Add Mac keyboard driver for installer
Chih-Wei Huang [Fri, 6 May 2016 14:43:39 +0000 (22:43 +0800)]
isolinux.cfg: disable llvmpipe software renderer in VESA mode
Qin Shaohui [Thu, 3 Mar 2016 09:48:34 +0000 (17:48 +0800)]
0-auto-detect: use MODALIAS in uevent to detect modules
This method can detect more modules than before.
Chih-Wei Huang [Wed, 2 Mar 2016 13:49:31 +0000 (21:49 +0800)]
1-install: add more to the upgrade list
Chih-Wei Huang [Sat, 6 Feb 2016 06:04:34 +0000 (14:04 +0800)]
Merge remote-tracking branch 'x86/kitkat-x86' into marshmallow-x86
Conflicts:
initrd/scripts/0-auto-detect
Chih-Wei Huang [Fri, 5 Feb 2016 08:58:23 +0000 (16:58 +0800)]
Android.mk: refine the rules to build iso_img
The original rules may fail at some situations.
Reported-by: Jaroslav Penaska <j.penaska@gmail.com>
Luke [Tue, 19 Jan 2016 01:24:25 +0000 (14:24 +1300)]
check efi partition can mount before installing grub2
Luke [Tue, 19 Jan 2016 01:20:18 +0000 (14:20 +1300)]
Search for efi partition
Chih-Wei Huang [Wed, 27 Jan 2016 13:51:32 +0000 (21:51 +0800)]
1-install: add 4.4-r4 to the upgrade list
Chih-Wei Huang [Sat, 23 Jan 2016 15:01:36 +0000 (23:01 +0800)]
0-auto-detect: a hack to avoid loading brcmfmac
The driver brcmfmac usually doesn't work if loaded by the
auto_detect function. Skip the driver and let it be loaded
by Android ueventd.
Chih-Wei Huang [Sat, 23 Jan 2016 12:13:44 +0000 (20:13 +0800)]
Merge remote-tracking branch 'x86/kitkat-x86' into marshmallow-x86
Chih-Wei Huang [Sat, 23 Jan 2016 11:44:05 +0000 (19:44 +0800)]
Android.mk: fix an error to build efi_img
Chih-Wei Huang [Mon, 18 Jan 2016 17:08:54 +0000 (01:08 +0800)]
Merge remote-tracking branch 'x86/kitkat-x86' into marshmallow-x86
Chih-Wei Huang [Mon, 18 Jan 2016 17:03:00 +0000 (01:03 +0800)]
1-install: remove the 2047MB limitation of data.img
This is an old limitation that is not needed now.
Chih-Wei Huang [Sun, 17 Jan 2016 19:03:33 +0000 (03:03 +0800)]
Merge remote-tracking branch 'x86/kitkat-x86' into marshmallow-x86
Conflicts:
boot/boot/grub/grub.cfg
initrd/scripts/0-auto-detect
install/scripts/1-install
Chih-Wei Huang [Sun, 17 Jan 2016 18:57:01 +0000 (02:57 +0800)]
Android.mk: remove dead code
Chih-Wei Huang [Sun, 17 Jan 2016 18:56:01 +0000 (02:56 +0800)]
Android.mk: add missing dependencies
The EFI support introduced more files which should be added
to the dependencies of $(boot_dir).
Luke [Thu, 14 Jan 2016 14:12:37 +0000 (03:12 +1300)]
updated grub.cfg install location
Luke [Thu, 14 Jan 2016 09:56:00 +0000 (22:56 +1300)]
EFI support for ISO
Chih-Wei Huang [Sun, 17 Jan 2016 18:07:44 +0000 (02:07 +0800)]
init: remove find_network_dev_name
It is not used now.
Chih-Wei Huang [Thu, 29 Oct 2015 06:11:37 +0000 (14:11 +0800)]
efi: don't be in favor of Windows 8
Chih-Wei Huang [Wed, 21 Oct 2015 08:00:50 +0000 (16:00 +0800)]
0-auto-detect: do not load extra 3G modules
The modules are built-in or could be auto-loaded on demend.
No need to pre-load them anymore.
Chih-Wei Huang [Sun, 26 Jul 2015 11:29:53 +0000 (19:29 +0800)]
Add the lndir script
The script can make hard links of files in a directory
to another one.
Chih-Wei Huang [Sun, 26 Jul 2015 07:53:55 +0000 (15:53 +0800)]
1-install: add 4.4-r3 to the upgrade list
Chih-Wei Huang [Sun, 26 Jul 2015 07:52:31 +0000 (15:52 +0800)]
Revert "0-auto-detect: set correct permission for bluetooth nodes"
The related code was moved to init.sh.
This reverts commit
454d76b2b125e5a55fd38d58396866e37ea923a2.
Chih-Wei Huang [Thu, 29 Oct 2015 06:11:37 +0000 (14:11 +0800)]
efi: don't be in favor of Windows 8
Chih-Wei Huang [Fri, 23 Oct 2015 08:32:15 +0000 (16:32 +0800)]
init: avoid using init modprobe
The init modprobe should not be used before the porting is finished,
otherwise the system suddenly reboots.
Also remove the obsolete way to load modules.
Chih-Wei Huang [Wed, 21 Oct 2015 11:58:10 +0000 (19:58 +0800)]
init: re-hash the commands table
Chih-Wei Huang [Wed, 21 Oct 2015 08:00:50 +0000 (16:00 +0800)]
0-auto-detect: do not load extra 3G modules
The modules are built-in or could be auto-loaded on demend.
No need to pre-load them anymore.
Chih-Wei Huang [Tue, 20 Oct 2015 08:20:24 +0000 (16:20 +0800)]
initrd: remove v86d and load_uvesafb
Now v86d is built from source (thanks to pstglia to make it work)
and the function of load_uvesafb is moved to init.sh.
Chih-Wei Huang [Mon, 5 Oct 2015 15:50:34 +0000 (23:50 +0800)]
1-install: we support ext4 now
Chih-Wei Huang [Mon, 5 Oct 2015 14:15:24 +0000 (22:15 +0800)]
init: avoid using some busybox executables
It fixes the unable to format ext3 issue.
Chih-Wei Huang [Sat, 3 Oct 2015 16:17:20 +0000 (00:17 +0800)]
Use gfxterm for grub-efi
It fixes ASUS T100 garbled console mysteriously.
Chih-Wei Huang [Fri, 2 Oct 2015 05:33:47 +0000 (13:33 +0800)]
Merge remote-tracking branch 'x86/kitkat-x86-new-grub' into lollipop-x86
Chih-Wei Huang [Sun, 26 Jul 2015 18:21:15 +0000 (02:21 +0800)]
Use mksh in the DEBUG mode
Chih-Wei Huang [Sun, 26 Jul 2015 11:29:53 +0000 (19:29 +0800)]
Add the lndir script
The script can make hard links of files in a directory
to another one.
Chih-Wei Huang [Sun, 26 Jul 2015 07:53:55 +0000 (15:53 +0800)]
1-install: add 4.4-r3 to the upgrade list
Chih-Wei Huang [Sun, 26 Jul 2015 07:52:31 +0000 (15:52 +0800)]
Revert "0-auto-detect: set correct permission for bluetooth nodes"
The related code was moved to init.sh.
This reverts commit
454d76b2b125e5a55fd38d58396866e37ea923a2.
Chih-Wei Huang [Sun, 26 Jul 2015 07:43:50 +0000 (15:43 +0800)]
Merge remote-tracking branch 'x86/kitkat-x86' into lollipop-x86