Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

Tinkering w Samsung ARM Chromebook XE303C12

By: dukzcry on Dec 7th, 2013  |  syntax: None  |  size: 4.93 KB  |  views: 945  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Mali-T604 acceleration
  2. ---------------------------------
  3. * Set the distro of choice. I've tested with Debian: https://wiki.debian.org/InstallingDebianOn/Samsung/ARMChromebook
  4. * Get the X server. The major version should match the one used in Chrome for letting armsoc work. If version in your distro is fresher, you need to downgrade the X package to the corresponding one and mark it as deprecated for update (for Debian: edit /etc/apt/sources.list and downgrade release in sources, aptitude update; aptitude install xserver-xorg; aptitude hold xserver-xorg-core)
  5. * Add mali-related lines to xorg.conf like written here: [malidev]
  6. * Do what written there: http://krblogs.com/post/65347946766/mali-drivers-on-chromebook so mali will work under non-root
  7.  
  8. Take latest from Chrome:
  9. * Write the current kernel blob. Explained there: https://forums.kali.org/showthread.php?4197-Installing-Kali-on-Samsung-Chromebook-Series-3-on-Internal-Memory&p=27229&viewfull=1#post27229 For Chrome kernel partitions, utmost priority number means highest priority. Copy kernel modules (/lib/modules)
  10. * Copy the armsoc driver (/usr/lib/xorg/modules/drivers/armsoc_drv.so)
  11. * Get usermode driver: /usr/lib/libmali.so* Create symlinks libEGL.so (libGLESv1_CM.so) libGLESv2.so for it. Put somewhere and point LD_LIBRARY_PATH to them, see [malidev] again. For Debian/Ubuntu you also may need this workaround: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/366728/comments/17 Notes: If you have mesa versions of these libs in your system, look at postfixes in their names and create symlinks with same names pointing to libmali.so in folder where you store it, so they will take preference over mesa ones
  12. * Set EGL-powered Chromium and Flash: https://bugs.launchpad.net/chromebook-arm/+bug/1085596/comments/28
  13.  
  14. Now run a es2_info (part of mesa-utils-extra in Debian). Should give you correct info: https://bugs.launchpad.net/chromebook-arm/+bug/1085596/comments/5
  15. You make sure that accel is really works by running two instances of es2gears. One with LD_LIBRARY_PATH set to mali libs, another with not. First will give your an upper fps rate
  16.  
  17. Games for Debian/Ubuntu: http://forum.odroid.com/viewforum.php?f=52
  18. Untested OpenGL wrappers/frameworks: http://boards.openpandora.org/index.php/topic/11506-opengl-implementation-tldr-more-games/ http://www.raspberrypi.org/phpBB3/viewtopic.php?f=68&t=30207 https://github.com/p3/regal
  19. Still no support in lima driver: http://limadriver.org/Hardware/
  20. HW video codec (unused?): /lib/firmware/s5p-mfc-v6.fw
  21.  
  22. Issues:
  23. * Slow 2D (with workaround): https://bugs.launchpad.net/chromebook-arm/+bug/1085596/comments/44 http://www.youtube.com/watch?v=Vzmckw3fAQo
  24. Usage of EGL-powered WMs may help. I've tested an Enlightenment. Debian's libevas1-engines-x still neeed to be rebuilt with --enable-gl-flavor-gles & --enable-gles-variety-sgx flags.
  25. In Ubuntu: kde-window-manager, compiz (gles support is in compiz-plugins-default). Debian's kde-window-manager and compiz (compiz-core?) are still built w/o gles support
  26. Chromium is still slow even if --use-gl=egl was passed
  27.  
  28. [malidev] http://malideveloper.arm.com/develop-for-mali/features/graphics-and-compute-development-on-samsung-chromebook
  29.  
  30. Useful ALARM packages
  31. ---------------------
  32. linux-chromebook
  33. linux-firmware (wifi & hw video codec firmwares)
  34. xf86-input-cmt (aur only)
  35. xf86-video-armsoc-chromium
  36. mali-udev (aur only, just a tiny udev config)
  37. libegl-mali (proposed)
  38. chromium-pepper-flash
  39.  
  40. Using KVM
  41. ---------
  42. git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git -b v<current_stable_version>
  43.  
  44. cp arch/arm/configs/exynos_defconfig .config
  45. make menuconfig
  46. CONFIG_MODULES=n
  47. CONFIG_CGROUPS=y
  48. CONFIG_ARM_EXYNOS_CPUFREQ=y
  49. CONFIG_CPU_FREQ_GOV_USERSPACE=y
  50. CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
  51. CONFIG_CFG80211=y
  52. CONFIG_MWIFIEX_SDIO=y
  53. CONFIG_ARM_LPAE=y
  54. CONFIG_KVM=y
  55. make uImage -j4
  56.  
  57. 1) connect to a wifi in chromeos-3.4 kernel
  58. 2) write uboot-simplefb
  59. 3) reboot to a new kernel w 'clk_ignore_unused' arg
  60. 4) enjoy wifi
  61. 5) repeat after poweroff
  62.  
  63. set libaio
  64. git clone git://git.qemu-project.org/qemu.git -b v<current_stable_version>
  65. ./configure --target-list=arm-softmmu --audio-drv-list="" --enable-fdt --enable-kvm --enable-sdl --prefix=$HOME/qemu
  66. make install -j4
  67.  
  68. cp arch/arm/configs/vexpress_defconfig .config
  69. CONFIG_MODULES=n
  70. CONFIG_ARM_LPAE=y
  71. CONFIG_KVM=y
  72. virtio drivers you want: http://linux-kvm.org/page/Virtio most are already here
  73. make zImage dtbs -j4
  74.  
  75. qemu run args
  76. qemu-system-arm -enable-kvm -m 512 -serial stdio -kernel $HOME/kvm/zImage \
  77. -dtb $HOME/kvm/vexpress-v2p-ca15-tc1.dtb -M vexpress-a15 -cpu cortex-a15 \
  78. -append "earlyprintk=ttyAMA0 console=ttyAMA0 mem=512M root=/dev/vda ip=dhcp" \
  79. -drive file=$HOME/kvm/image.img,id=blk,if=none -device virtio-blk-device,drive=blk \
  80. -device virtio-net-device,netdev=net1,mac="52:54:00:12:34:56" -netdev type=user,id=net1
  81.  
  82. other kernels
  83. http://wiki.netbsd.org/ports/evbarm/qemu_arm
  84. http://kernelnomicon.org/?p=229