Kali on the Chuwi Hi10 Pro

Kali on the Chuwi Hi10 Pro

This is a short tutorial on dual booting windows and Kali on the Chuwi Hi10 Pro. I seriously wouldn’t recommend Kali on the Chuwi Hi10 Pro as an every-day system (kali support for the bay-trail / cherry trail SoC isn’t there yet – it will change in the future, but right now its terrible!)

1) Create the boot media:
I used etcher
Etcher works on osx, windows and linux, so its a good choice, though you could use unetbootin or rufus
kali doesn’t have an efi boot option, so you need to patch your boot media with some files, available here: https://kaliuefi.blogspot.co.uk

etcher.png

 

2) Boot your chuwi from the usb device (apparently you cant do it form the on-board SD card reader)
To get to the boot menu on the chuwi hi10 pro, you need to press F7 on boot. that brings up the menu to select the boot device
(You’ll notice that all of this is with the screen on its side :| )

3) Partition / resize
This is a little in-depth for this post, but I followed the instructions here and here.
I removed everything before the windows (C) partition, except the very first partition and the two locked efi partitions (this gave 15gb for kali + swap)

4) Boot into windows to check it still works (it was fine)

5) Install
Once the partition changes are applied, reboot and boot from the kali usb and select install
– follow the install instructions and use the partition space freed in the above steps

6) Booting
To boot kali you’ll need to press f7 and select kali from the uefi boot options (the chuwi bootloader will still show android and windows)

7) Boot into windows to check it still works (it was fine)

8) Fixes
– Rotate your X display: settings > displays > select the display > click the rotate icon > click keep changes
Rotate your framebuffer

You can rotate your virtual framebuffers using fbcon. 0 through 3 to represent the various rotations:

  • 0 – Normal rotation
  • < strong >1 – Rotate clockwise
  • < strong >2 – Rotate upside down
  • < strong >3 – Rotate counter-clockwise

These can be set from the command line by putting a value into the correct system file. Rotate the current framebuffer:


echo 1 | sudo tee /sys/class/graphics/fbcon/rotate

Rotate all virtual framebuffers:


echo 1 | sudo tee /sys/class/graphics/fbcon/rotate_all

If you want this to happen automatically when you start your system, you need to modify your boot loader configuration to give it the correct options. In /etc/default/grub add fbcon=rotate:1 to the GRUB_CMDLINE_LINUX line:


GRUB_CMDLINE_LINUX="video=efifb fbcon=rotate:1"

(Don’t forget to run sudo update-grub after changing this file.)

After I ran the above command, windows stopped booting, so I had to boot back to the kali usb drive and use gparted to make the kali drive bootable, this seemed to fix the windows booting issue (not sure how though)

Here is what I did (this should probably be a separate blog post in itself!):


mount /dev/mmcblk0p3 /mnt (/dev/mmcblk0p3 was the root device)
mount /dev/mmcblk0p5 /mnt/boot/efi (this was the boot device)
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
chroot /mnt
grub-install --target=x86_64-efi --efi-directory=/boot/efi
update-grub

I then restarted to windows to make sure again and restarted to kali

Kali on the Chuwi Hi10 Pro – What doesnt work:

Touchscreen

There is a driver available at github.com/onitake/gslx680-acpi
Firmware for the touchscreen is at github.com/onitake/gsl-firmware

clone both repos, run ‘make’ in the gslx-acpi directory to build the driver and copy the file gsl-firmware/firmware/chuwi/hi10_pro/silead_ts.fw to /lib/firmware

insmod the new kernel driver from the gslx680-acpi directory


insmod ./gslx680_ts_acpi.ko

Check dmesg and touch the screen. It should work, though it will need calibrated. xinput_calibrator will help you here

Once the config is generated, save it to /use/X11/xorg.conf.d/99-calibration.conf

The touchscreen works, but its not accurate (and it seemed to be the wrong orientation / axes were mixed in my setup – I will post a followup once I can get it working)

wifi

I have a usb wifi dongle that works, so its not that bad – I’ll post a followup on getting the onboard wifi to work

sources:
http://www.udoo.org/tutorial/creating-a-bootable-micro-sd-card-with-mac-os-x-from-image/
https://forums.kali.org/showthread.php?271-How-to-EFI-install-Kali-Linux
https://kaliuefi.blogspot.co.uk
http://askubuntu.com/questions/237963/how-do-i-rotate-my-display-when-not-using-an-x-server
Rotate Screen, not running X windows
Rotate console on startup (Debian)