Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

bootable-newinstaller: Commit

bootable/newinstaller


Commit MetaInfo

Revision76543b37207bcbe0df692bfe1406beae38eb2abc (tree)
Time2018-02-14 16:09:46
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Allow to show the specified OS title

Change Summary

Incremental Difference

--- a/Android.mk
+++ b/Android.mk
@@ -59,6 +59,7 @@ $(INITRD_RAMDISK): $(initrd_bin) $(systemimg) $(TARGET_INITRD_SCRIPTS) | $(ACP)
5959 $(if $(TARGET_INITRD_SCRIPTS),$(ACP) -p $(TARGET_INITRD_SCRIPTS) $(TARGET_INITRD_OUT)/scripts)
6060 ln -s /bin/ld-linux.so.2 $(TARGET_INITRD_OUT)/lib
6161 echo "VER=$(VER)" > $(TARGET_INITRD_OUT)/scripts/00-ver
62+ $(if $(RELEASE_OS_TITLE),echo "OS_TITLE=$(RELEASE_OS_TITLE)" >> $(TARGET_INITRD_OUT)/scripts/00-ver)
6263 $(if $(INSTALL_PREFIX),echo "INSTALL_PREFIX=$(INSTALL_PREFIX)" >> $(TARGET_INITRD_OUT)/scripts/00-ver)
6364 $(if $(PREV_VERS),echo "PREV_VERS=\"$(PREV_VERS)\"" >> $(TARGET_INITRD_OUT)/scripts/00-ver)
6465 $(MKBOOTFS) $(<D) $(TARGET_INITRD_OUT) | gzip -9 > $@
@@ -83,6 +84,7 @@ $(ISO_IMAGE): $(boot_dir) $(BUILT_IMG)
8384 @echo ----- Making iso image ------
8485 $(hide) sed -i "s|\(Installation CD\)\(.*\)|\1 $(VER)|; s|CMDLINE|$(BOARD_KERNEL_CMDLINE)|" $</isolinux/isolinux.cfg
8586 $(hide) sed -i "s|VER|$(VER)|; s|CMDLINE|$(BOARD_KERNEL_CMDLINE)|" $</efi/boot/android.cfg
87+ sed -i "s|OS_TITLE|$(if $(RELEASE_OS_TITLE),$(RELEASE_OS_TITLE),Android-x86)|" $</isolinux/isolinux.cfg $</efi/boot/android.cfg
8688 genisoimage -vJURT -b isolinux/isolinux.bin -c isolinux/boot.cat \
8789 -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \
8890 -input-charset utf-8 -V "Android-x86 LiveCD" -o $@ $^
--- a/boot/isolinux/isolinux.cfg
+++ b/boot/isolinux/isolinux.cfg
@@ -2,7 +2,7 @@ default vesamenu.c32
22 timeout 600
33
44 menu background android-x86.png
5-menu title Android-x86 Live & Installation CD VER
5+menu title OS_TITLE Live & Installation CD VER
66 menu color border 0 #ffffffff #00000000
77 menu color sel 7 #ffffff00 #ff000000
88 menu color title 0 #ffffffff #00000000
@@ -12,7 +12,7 @@ menu color hotsel 0 #ffffff00 #ff000000
1212 menu color hotkey 7 #ffffff00 #00000000
1313
1414 label livem
15- menu label Live CD - ^Run Android-x86 without installation
15+ menu label Live CD - ^Run OS_TITLE without installation
1616 kernel /kernel
1717 append initrd=/initrd.img CMDLINE quiet SRC= DATA=
1818
@@ -22,7 +22,7 @@ label debug
2222 append initrd=/initrd.img CMDLINE DEBUG=2 SRC= DATA=
2323
2424 label install
25- menu label ^Installation - Install Android-x86 to harddisk
25+ menu label ^Installation - Install OS_TITLE to harddisk
2626 kernel /kernel
2727 append initrd=/initrd.img CMDLINE INSTALL=1 DEBUG=
2828
@@ -45,7 +45,7 @@ label auto_install
4545 append initrd=/initrd.img CMDLINE AUTO_INSTALL=0 DEBUG=
4646
4747 label auto_update
48- menu label Audo_^Update - Auto update Android-x86
48+ menu label Audo_^Update - Auto update OS_TITLE
4949 kernel /kernel
5050 append initrd=/initrd.img CMDLINE AUTO_INSTALL=update DEBUG=
5151
--- a/install/grub2/efi/boot/android.cfg
+++ b/install/grub2/efi/boot/android.cfg
@@ -1,7 +1,7 @@
11 # $1 Title
22 # $2... Kernel cmdline
33 function add_entry {
4- menuentry "Android-x86 VER $1" "$@" --class android-x86 {
4+ menuentry "OS_TITLE VER $1" "$@" --class android-x86 {
55 shift 2
66 savedefault
77 set root=$android
--- a/install/scripts/1-install
+++ b/install/scripts/1-install
@@ -1,6 +1,5 @@
11 #
22 # By Chih-Wei Huang <cwhuang@linux.org.tw>
3-# Last updated 2018/02/08
43 #
54 # License: GNU Public License
65 # We explicitely grant the right to use the scripts
@@ -11,6 +10,7 @@ tempfile=/tmp/temp-$$
1110 menufile=/tmp/menu-$$
1211
1312 CPIO=cpio
13+OS_TITLE=${OS_TITLE:-Android-x86}
1414
1515 rebooting()
1616 {
@@ -69,7 +69,7 @@ list_disks()
6969 auto_partition()
7070 {
7171 [ "$AUTO_INSTALL" = "force" ] || dialog --title " Auto Installer " --defaultno --yesno \
72- "\nYou have chosen the AUTO installation.\n\nThe installer will erase the whole /dev/$1 and install Android-x86 to it.\n\nThis is the last confirmation. Are you sure to do so?" 12 61
72+ "\nYou have chosen the AUTO installation.\n\nThe installer will erase the whole /dev/$1 and install $OS_TITLE to it.\n\nThis is the last confirmation. Are you sure to do so?" 12 61
7373 [ $? -ne 0 ] && rebooting
7474
7575 if [ -z "$efi" ]; then
@@ -181,7 +181,7 @@ select_dev()
181181 } END {
182182 printf("\"\" \"\"\n\"Create/Modify partitions\" \"\"\n\"Detect devices\" \"\"")
183183 }' > $menufile
184- choose "Choose Partition" "Please select a partition to install Android-x86:\n\nRecommended minimum free space - 4GB | Optimum free space >= 8GB\n\nPartition | Filesystem | Label | Size | Drive name/model"
184+ choose "Choose Partition" "Please select a partition to install $OS_TITLE:\n\nRecommended minimum free space - 4GB | Optimum free space >= 8GB\n\nPartition | Filesystem | Label | Size | Drive name/model"
185185 return $retval
186186 }
187187
@@ -250,10 +250,10 @@ create_menulst()
250250 [ -n "$VESA" ] && vga=" vga=788 modeset=0"
251251 echo -e "${GRUB_OPTIONS:-default=0\ntimeout=6\nsplashimage=/grub/android-x86.xpm.gz\n}root (hd0,$1)\n" > $menulst
252252
253- create_entry "Android-x86 $VER" quiet $cmdline
254- create_entry "Android-x86 $VER (Debug mode)" $cmdline DEBUG=2
255- create_entry "Android-x86 $VER (Debug nomodeset)" nomodeset $cmdline DEBUG=2
256- create_entry "Android-x86 $VER (Debug video=LVDS-1:d)" video=LVDS-1:d $cmdline DEBUG=2
253+ create_entry "$OS_TITLE $VER" quiet $cmdline
254+ create_entry "$OS_TITLE $VER (Debug mode)" $cmdline DEBUG=2
255+ create_entry "$OS_TITLE $VER (Debug nomodeset)" nomodeset $cmdline DEBUG=2
256+ create_entry "$OS_TITLE $VER (Debug video=LVDS-1:d)" video=LVDS-1:d $cmdline DEBUG=2
257257 }
258258
259259 create_winitem()
@@ -440,7 +440,7 @@ install_to()
440440 fi
441441 mkdir -p `dirname $grubcfg` efi$efidir
442442 cp -af grub2/efi/boot/* efi$efidir
443- sed -i "s|VER|$VER|; s|CMDLINE|$cmdline|" efi$efidir/android.cfg
443+ sed -i "s|VER|$VER|; s|CMDLINE|$cmdline|; s|OS_TITLE|$OS_TITLE|" efi$efidir/android.cfg
444444 [ -s efi/boot/grub/grubenv ] || ( printf %-1024s "# GRUB Environment Block%" | sed 's/k%/k\n/; s/ /###/g' > efi/boot/grub/grubenv )
445445
446446 echo -e 'set timeout=5\nset debug_mode="(DEBUG mode)"' > $grubcfg
@@ -495,7 +495,7 @@ install_to()
495495 cd hd/$asrc
496496 rm -rf system*
497497 ( ( cd /; find $files | $CPIO -H newc -o ) | pv -ns ${size}k | ( $CPIO -iud > /dev/null; echo $? > /tmp/result )) 2>&1 \
498- | progress_bar "Installing Android-x86 to $1" "Expect to write $size KB..."
498+ | progress_bar "Installing $OS_TITLE to $1" "Expect to write $size KB..."
499499 result=$((`cat /tmp/result`*255))
500500
501501 if [ $result -eq 0 ]; then
@@ -565,14 +565,14 @@ do_install()
565565 until install_hd; do
566566 if [ $retval -eq 255 ]; then
567567 dialog --title ' Error! ' --yes-label Retry --no-label Reboot \
568- --yesno '\nInstallation failed! Please check if you have enough free disk space to install Android-x86.' 8 51
568+ --yesno '\nInstallation failed! Please check if you have enough free disk space to install $OS_TITLE.' 8 51
569569 [ $? -eq 1 ] && rebooting
570570 fi
571571 done
572572
573- [ -n "$VESA" ] || runit="Run Android-x86"
573+ [ -n "$VESA" ] || runit="Run $OS_TITLE"
574574 dialog --clear --title ' Congratulations! ' \
575- --menu "\n Android-x86 is installed successfully.\n " 11 51 13 \
575+ --menu "\n $OS_TITLE is installed successfully.\n " 11 51 13 \
576576 "$runit" "" "Reboot" "" 2> $tempfile
577577 case "`cat $tempfile`" in
578578 Run*)
Show on old repository browser