Published by goodspeed on March 5, 2024.
=> Neofetch 截图
Why English? Because there isn't much Chinese user base on this device. I accidentally destroyed the Windows partition on the internal storage. So I was left no choice but installing a GNU/Linux distro on it. Because the MS Windows shit don't even have an installation media.
What's working:
What's not:
Tho its support is far from the great but it's really working. I already decided to daily drive this laptop and I found the most annoying thing is actually the backlight lol Despite of that, It's far more better than MS Windows. On the WIndows 10, once you booted up, Windows would take around 3G of the RAM, which is terrible. With Debian & Sway, it only uses around 800M, not to mention the fact that I'm running firefox to write this article at the same time.
As you already read above, this could make you get rid of Windows. But, meanwhile, it will be pretty difficult to install it back. Okay, with your curiosity (or maybe the hate of MS Windows), let's get in to it.
Firstly, you need to backup the firmware you have on Windows.
=> required firmware (documentation)
Okay, now you've backed up your firmware. You can proceed to get a GNU/Linux running.
Download the image on Github: https://github.com/hexdump0815/imagebuilder/releases/tag/240107-01
Extract the gzipped image:
$ gunzip snapdragon_7c_woa-aarch64-bookworm.img.gz
Copy it to your usb drive:
# dd if=snapdragon_7c_woa-aarch64-bookworm.img of=/dev/sdX oflag=direct bs=16M status=progress
Then, reboot to BIOS by pressing F2. In BIOS, turn off secure boot. And then reboot while pressing F10, and boot to your USB drive. In the sysetm, you may follow the steps mentioned in 'required-firmware.md'. One way to verify that you got it right that is to see if you get WiFi.
Don't forget to get hostname, tzdata, locales, passwd and fstab ready!
These packages are also required: qrtr-tools protection-domain-mapper rmtfs tqftpserv.
You should also enable the services they provided (It seemed that apt already enabled them).
In my first installation, I need to copy the kernel from that image. (Obviously, you can do that as well) But after that, I built a debian package of the patched kernel which will make it a little easier.
Download the prebuilt linux kernel package: https://cloud.disroot.org/s/3oiApzMEKpy4FMa
# cp /path/to/the/packages /mnt/root #chroot /mnt # dpkg -i /mnt/root/*.deb
Also unfornately, the device trees are not included in the package. You need to manually extract them to /mnt/boot.
You also need to copy your firmwares to the target:
$ cp /lib/firmware/* /mnt/lib/firmware/
Install initramfs-tools. And create the file:
/etc/initramfs-tools/hooks/firmware --- #!/bin/sh set -e PREREQ="" prereqs() { echo "${PREREQ}" } case "${1}" in prereqs) prereqs exit 0 ;; esac . /usr/share/initramfs-tools/hook-functions mkdir -p ${DESTDIR}/lib/firmware/qcom cp -a /lib/firmware/qcom/sc7180 ${DESTDIR}/lib/firmware/qcom
Install grub-efi-arm64. Add this on top of the file /etc/grub.d/10_linux.
GRUB_DEVICETREE="sc7180-samsung-galaxy-book-go"
And at around L194, you will see it loads the linux kernel, right after that, add the code below:
if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then message="$(gettext_printf "Loading Devicetree %s ..." ${GRUB_DEVICETREE})" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' EOF fi sed "s/^/$submenu_indentation/" << EOF devicetree ${rel_dirname}/dtb-${version}/${GRUB_DEVICETREE}.dtb EOF It will eventually looks like this: if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then message="$(gettext_printf "Loading Linux %s ..." ${version})" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' EOF fi if test -d /sys/firmware/efi && test -e "${linux}.efi.signed"; then sed "s/^/$submenu_indentation/" << EOF linux ${rel_dirname}/${basename}.efi.signed root=${linux_root_device_thisversion} ro ${args} EOF else sed "s/^/$submenu_indentation/" << EOF linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args} EOF fi if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then message="$(gettext_printf "Loading Devicetree %s ..." ${GRUB_DEVICETREE})" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' EOF fi sed "s/^/$submenu_indentation/" << EOF devicetree ${rel_dirname}/dtb-${version}/${GRUB_DEVICETREE}.dtb EOF if test -n "${initrd}" ; then # TRANSLATORS: ramdisk isn't identifier. Should be translated. if [ x"$quiet_boot" = x0 ] || [ x"$type" != xsimple ]; then message="$(gettext_printf "Loading initial ramdisk ...")" sed "s/^/$submenu_indentation/" << EOF echo '$(echo "$message" | grub_quote)' EOF fi initrd_path=
Tweak the file `/etc/default/grub' a little, part of the file like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX="efi=novamap,noruntime clk_ignore_unused pd_ignore_unused console=tty0 noresume deferred_probe_timeout=30"
And finally, you can install GruB:
# update-initramfs -c # grub-install /dev/sda
Since there is no efibootmgr, we need to manually replace the boot file.
(chroot) # cp /boot/efi/EFI/debian/grubaa64.efi /boot/efi/EFI/Boot/bootaa64.efi
Should be working now!
Reboot and pressing F2 to enter BIOS, and make it boot to `UEFI: Hard Drive' by default. Save and reset.
Now, your Debian on Galaxy Book Go should be working.
UPDATE 2024-10-07: After some trial-and-errors, I've enabled modem, lid detection and backlight. However, the patch hasn't merged into imagebuilder for now. You can check out the device tree below.
=> sc7180-samsung-galaxy-book-go.dts
=> Gist: arch/arm64/boot/dts/qcom/sc7180-samsung-galaxy-book-go.dtb backlight changes, loading ipa_fw and with mpss modem, enabling lid switch, power button This content has been proxied by September (ba2dc).Proxy Information
text/gemini;lang=zh-CN