diff --git a/firmware.sh b/firmware.sh index fa10d30..241a54a 100644 --- a/firmware.sh +++ b/firmware.sh @@ -27,6 +27,8 @@ elif [ "$isBdwBook" = true ]; then seabios_file=$seabios_bdw_book elif [ "$isBaytrail" = true ]; then seabios_file=$seabios_baytrail +elif [ "$isBraswell" = true ]; then + seabios_file=$seabios_braswell else echo_red "Unknown or unsupported device (${device}); cannot update Legacy BIOS."; return 1 fi @@ -83,8 +85,8 @@ if [ "$useHeadless" = true ]; then fi fi fi -#add emmc/sdcard controller addresses for Baytrail if known -if [[ "$isBaytrail" = true && "$emmcAddr" != "" ]]; then +#add emmc/sdcard controller addresses for Baytrail/Braswell if known +if [[ "$isBaytrail" = true || "$isBraswell" = true && "$emmcAddr" != "" ]]; then ${cbfstoolcmd} ${seabios_file} remove -n etc/sdcard0 > /dev/null 2>&1 ${cbfstoolcmd} ${seabios_file} remove -n etc/sdcard1 > /dev/null 2>&1 ${cbfstoolcmd} ${seabios_file} remove -n etc/sdcard2 > /dev/null 2>&1 @@ -590,9 +592,10 @@ read -p "Press [Enter] to return to the main menu." function set_hwid() { # set HWID using gbb_utility -# ensure hardware write protect disabled -if [[ "$isChromeOS" = true && "$(crossystem wpsw_cur)" != *"0"* ]]; then - exit_red "\nWrite-protect enabled, non-stock firmware installed, or not running ChromeOS; cannot set HWID."; return 1 + +# ensure hardware write protect disabled if in ChromeOS +if [[ "$isChromeOS" = true && ( "$(crossystem wpsw_cur)" == "1" || "$(crossystem wpsw_boot)" == "1" ) ]]; then + exit_red "\nHardware write-protect enabled, cannot set HWID."; return 1 fi echo_green "Set Hardware ID (HWID) using gbb_utility" diff --git a/functions.sh b/functions.sh index 4036856..786de17 100644 --- a/functions.sh +++ b/functions.sh @@ -391,8 +391,8 @@ case "${_hwid}" in CELES*) _x='BSW|Samsung Chromebook 3||' ;; CHELL*) _x='SKL|HP Chromebook 13 G1||' ;; CLAPPER*) _x='BYT|Lenovo N20/N20P Chromebook||' ;; - CYAN*) _x='BSW|OriginsT / Acer Chromebook R11 (C738T)||' ;; - EDGAR*) _x='BSW|Acer Chromebook 14 (CB3-431)||' ;; + CYAN*) _x='BSW|Acer Chromebook R11 (C738T)|0xd131d000|0xd131f000' ;; + EDGAR*) _x='BSW|Acer Chromebook 14 (CB3-431)|0xd131d000|0xd131f000' ;; ENGUARDE_???-???-??A*) _x='BYT|CTL N6 Education Chromebook||' ;; ENGUARDE_???-???-??B*) _x='BYT|M&A Chromebook||' ;; ENGUARDE_???-???-??C*) _x='BYT|Senkatel C1101 Chromebook||' ;; diff --git a/kodi.sh b/kodi.sh index 6939d35..d27de9c 100644 --- a/kodi.sh +++ b/kodi.sh @@ -214,7 +214,7 @@ echo_yellow "\nPartitions formatted and mounted" echo_yellow "Updating bootloader" #get/extract syslinux -tar_file="${util_source}syslinux-5.10-md.tar.bz2" +tar_file="${util_source}${syslinux_version}.tar.bz2" curl -s -L -o /tmp/Storage/syslinux.tar.bz2 $tar_file if [ $? -ne 0 ]; then LE_install_error "Failed to download syslinux; check your Internet connection and try again" @@ -226,7 +226,7 @@ if [ $? -ne 0 ]; then fi #install extlinux on LibreELEC kernel partition -cd /tmp/Storage/syslinux-5.10/extlinux/ +cd /tmp/Storage/${syslinux_version}/extlinux/ ./extlinux -i /tmp/System/ > /dev/null 2>&1 if [ $? -ne 0 ]; then LE_install_error "Failed to install extlinux; reboot and try again" @@ -260,12 +260,12 @@ rm -f /tmp/boot/syslinux/* 2>/dev/null echo -e "DEFAULT LibreELEC\nPROMPT 0\nLABEL LibreELEC\nCOM32 chain.c32\nAPPEND label=KERN-C" > /tmp/boot/syslinux/syslinux.cfg #copy chain loader files -cp /tmp/Storage/syslinux-5.10/com32/chain/chain.c32 /tmp/boot/syslinux/chain.c32 -cp /tmp/Storage/syslinux-5.10/com32/lib/libcom32.c32 /tmp/boot/syslinux/libcom32.c32 -cp /tmp/Storage/syslinux-5.10/com32/libutil/libutil.c32 /tmp/boot/syslinux/libutil.c32 +cp /tmp/Storage/${syslinux_version}/com32/chain/chain.c32 /tmp/boot/syslinux/chain.c32 +cp /tmp/Storage/${syslinux_version}/com32/lib/libcom32.c32 /tmp/boot/syslinux/libcom32.c32 +cp /tmp/Storage/${syslinux_version}/com32/libutil/libutil.c32 /tmp/boot/syslinux/libutil.c32 #install/update syslinux -cd /tmp/Storage/syslinux-5.10/linux/ +cd /tmp/Storage/${syslinux_version}/linux/ rm -f /tmp/boot/ldlinux.* 1>/dev/null 2>&1 ./syslinux -i -f $boot_partition -d syslinux if [ $? -ne 0 ]; then @@ -508,7 +508,7 @@ fi echo_yellow "Partitions formatted and mounted; installing bootloader" #get/extract syslinux -tar_file="${util_source}syslinux-5.10-md.tar.bz2" +tar_file="${util_source}${syslinux_version}.tar.bz2" curl -s -L -o /tmp/Storage/syslinux.tar.bz2 $tar_file > /dev/null 2>&1 if [ $? -ne 0 ]; then LE_install_error "Failed to download syslinux; check your Internet connection and try again" @@ -520,11 +520,11 @@ if [ $? -ne 0 ]; then fi #write MBR -cd /tmp/Storage/syslinux-5.10/mbr/ +cd /tmp/Storage/${syslinux_version}/mbr/ dd if=./mbr.bin of=${target_disk} bs=440 count=1 > /dev/null 2>&1 #install extlinux on LibreELEC System partition -cd /tmp/Storage/syslinux-5.10/extlinux/ +cd /tmp/Storage/${syslinux_version}/extlinux/ ./extlinux -i /tmp/System/ > /dev/null 2>&1 if [ $? -ne 0 ]; then LE_install_error "Failed to install extlinux; reboot and try again" diff --git a/sources.sh b/sources.sh index 7ac2d27..6d3c604 100644 --- a/sources.sh +++ b/sources.sh @@ -3,7 +3,7 @@ #define these here for easy updating -script_date="[2016-07-24]" +script_date="[2016-07-30]" #where the stuff is util_source="https://www.mrchromebox.tech/files/util/" @@ -16,7 +16,6 @@ cbfs_source="https://www.mrchromebox.tech/files/firmware/cbfs/" #LE sources LE_url_official="http://releases.libreelec.tv/" -#OE_url_EGL="https://dl.dropboxusercontent.com/u/98309225/" LE_url=${LE_url_official} chrx_url="https://chrx.org/go" @@ -25,6 +24,9 @@ LE_version_base="LibreELEC-Generic.x86_64" LE_version_stable="7.0.2" LE_version_latest="7.90.003" +#syslinux version +syslinux_version="syslinux-6.04-pre1" + #SBIB full ROMs coreboot_stumpy="coreboot-seabios-stumpy-mrchromebox-20160724.rom" @@ -56,13 +58,14 @@ coreboot_swanky="coreboot-seabios-swanky-mrchromebox-20160724.rom" #RW_LEGACY payloads -seabios_hswbdw_box="seabios-hswbdw-box-mrchromebox-20160719.bin" -seabios_hsw_book="seabios-hsw-book-mrchromebox-20160719.bin" -seabios_bdw_book="seabios-bdw-book-mrchromebox-20160719.bin" -seabios_baytrail="seabios-byt-mrchromebox-20160719.bin" +seabios_hswbdw_box="seabios-hswbdw-box-mrchromebox-20160730.bin" +seabios_hsw_book="seabios-hsw-book-mrchromebox-20160730.bin" +seabios_bdw_book="seabios-bdw-book-mrchromebox-20160730.bin" +seabios_baytrail="seabios-byt-mrchromebox-20160730.bin" +seabios_braswell="seabios-bsw-mrchromebox-20160730.bin" #BOOT_STUB payload -bootstub_payload_baytrail="seabios-byt-bootstub-mrchromebox-20160719.bin" +bootstub_payload_baytrail="seabios-byt-bootstub-mrchromebox-20160730.bin" #hsw/bdw headless VBIOS hswbdw_headless_vbios="hswbdw_vgabios_1040_cbox_headless.dat"