Welcome to OpenSGN-easy.

Perhaps, you are searching for instructions. Here they are!

Authors and Contributors

Original project was created by exception13 (opensgn), some modifications added by @X-Stranger (N8000) and this very easy instruction is being written by @thermatk.

Support or Contact

Having trouble? Visit the topic on XDA-Developers or 4PDA!

Current state

What is currently known to work which means it's achievable if anyone helps to get the guide through initial booting!

Working:

CPU, screen, touchscreen, S-pen( + button is right click and hovering!), GPU framebuffer, GPU with OpenGL ES, internalSD, externalSD, WiFi, Bluetooth, ?

WIP:

modem(exception13 shared some success), cameras, gps, better GPU driver, MHL this guide :)

Instruction

Prerequisites

  • Samsung Galaxy Note 10.1 with root, BusyBox, terminal emulator app and some free space
  • A real or virtual PC with your favorite GNU/Linux distro and some free space
  • Some free time
  • A good internet connection

Easy way - using prepared binaries

Warning! Section is not ready yet.
Ubuntu Debian Arch
recovery booting mmcblk1p1 SHOULD BE HERE SHOULD BE HERE SHOULD BE HERE
recovery booting linux.img from internal sdcard SHOULD BE HERE SHOULD BE HERE http://d-h.st/iXo
linux.img SHOULD BE HERE SHOULD BE HERE http://d-h.st/jUV
  1. Download recovery.img and linux.img
  2. Unpack the files from archives and place them to root of your internal sdcard. Go to your preffered terminal emulator app and type:
    su
    dd if=recovery.img of=/dev/block/mmcblk0p6
  3. If you want to boot from a partition, prepared a partition and downloaded a passing recovery in the same app type: help needed, resize2fs is not included in BusyBox and after dd ext4 is not knowing about free space
    dd if=linux.img of=/dev/block/mmcblk1p1

Now you can turn off your tablet and boot up GNU/Linux by holding Volume Up and Power buttons.

Harder way - how to prepare binaries

Compile kernel

  1. Boot up your GNU/Linux PC
  2. Install packages necessary for building:
    You have to do this step only once on a PC
    Nothing to show! Choose the distro of PC where you work on the navigation bar.
    sudo apt-get install git build-essential libncurses5-dev
    sudo pacman -Sy ncurses base-devel git
  3. Now create a folder and clone the repository with kernel sources there:
    Currently using X-Stranger's repo.
    mkdir compileopensgn
    cd compileopensgn/
    git clone https://github.com/X-Stranger/N8000.git -b arch
  4. Clone the prebuilt toolchain to the same folder and move it to /opt:
    You have to do this step only once on a PC
    git clone https://android.googlesource.com/platform/prebuilt
    sudo mv prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/ /opt/
    rm -r prebuilt
  5. Now go to the downloaded kernel and configure it:
    cd N8000
    make mrproper
    export CROSS_COMPILE=/opt/arm-eabi-4.4.3/bin/arm-eabi-
    export ARCH=arm
    export SUBARCH=armv7h
    make n8000_linux_mali_defconfig
  6. Configure kernel to make it bootable:
    Nothing to show! Choose the installation place on the navigation bar.
    Warning! Section about linux.img file is not ready yet. Choose installation to a separate partition :)
    help needed
    Warning! Section not ready yet? Or ready? Why X-Stranger and exception13 hardcoded it?
    make menuconfig
    Go to "Boot options" and change kernel commandline to look like help needed
    root=/dev/mmcblkXpY rw rootfstype=ext4 rootwait quiet vmalloc=144M
    where X is the number of the block device (0 - internal sdcard, 1 - external sdcard) and Y is the number of partition. In case you don't know how to create a separate partition
  7. Compile kernel:
    You can write a higher number after "-j" on the second line to make it faster: rule is number of CPU cores + 1
    export INSTALL_MOD_PATH=$(pwd)/compiledmodules
    make -j2 # CPU cores + 1 here
    make modules_install
    rm compiledmodules/lib/modules/3.0.31*/source
    rm compiledmodules/lib/modules/3.0.31*/build
  8. Copy compiled kernel and modules to a folder:
    cd ..
    mkdir results
    mkdir results/boot/
    cp N8000/arch/arm/boot/zImage results/boot/zImage
    cp N8000/System.map results/boot/System.map
    cp N8000/.config results/boot/config-`ls N8000/compiledmodules/lib/modules/`
    cp -r N8000/compiledmodules/lib/ results/
    rm -r N8000/compiledmodules
  9. Get firmware files for wifi and bluetooth and copy to the same folder:
    git clone https://github.com/thermatk/opensgn-easy.git -b commonfiles
    mkdir results/opt
    cp -r opensgn-easy/firmware/wifi results/opt/
    cp -r opensgn-easy/firmware/bluez results/opt/
  10. Transfer the "results" folder to the root of your internal sdcard with any instrument you like.

Create rootfs

  1. Get LinuxDeploy and apply these settings:
    Nothing to show! Choose a distro you want to have on your SGN on the navigation bar.
    Parameter Value
    Distribution Debian or Ubuntu
    Distribution suite wheezy for Debian and quantal for Ubuntu
    Architecture armhf
    Installation type
    Nothing to show! Choose the installation place on the navigation bar.
    Image file
    Disk partition
    Installation path
    Nothing to show! Choose the installation place on the navigation bar.
    path to linux.img. For example,
    /mnt/sdcard/linux.img
    /dev/block/mmcblkXpY
    where X is the number of the block device (0 - internal sdcard, 1 - external sdcard) and Y is the number of partition.
    Warning! Known to be somehow different in CyanogenMod. Needs explanation.
    File system ext4
    Install GUI no
    SSH yes
    VNC no
    Custom mount /mnt/sdcard
    Parameter Value
    Distribution ArchLinux
    Architecture armv7h
    Installation type
    Nothing to show! Choose the installation place on the navigation bar.
    Image file
    Disk partition
    Installation path
    Nothing to show! Choose the installation place on the navigation bar.
    path to linux.img. For example,
    /mnt/sdcard/linux.img
    /dev/block/mmcblkXpY
    where X is the number of the block device (0 - internal sdcard, 1 - external sdcard) and Y is the number of partition.
    Warning! Known to be somehow different in CyanogenMod. Needs explanation.
    File system ext4
    Install GUI no
    SSH yes
    VNC no
    Custom mount /mnt/sdcard
  2. Install and start GNU/Linux in LinuxDeploy
  3. Copy the files prepared on previous step from internal sdcard to the chrooted Linux. In your terminal emulator app type:
    /data/local/linux/bin/linuxdeploy shell
    cp -r /mnt/sdcard/results/boot /
    cp -r /mnt/sdcard/results/lib/modules /lib/
    cp -r /mnt/sdcard/results/opt /
    
  4. Create bootable recovery and flash it:
    Nothing to show! Choose a distro you want to have on your SGN on the navigation bar.
    Warning! Section is not ready yet.
    apt-get update
    apt-get install abootimg
    cd /boot
    Nothing to show! Choose the installation place on the navigation bar.
    mkinitramfs help needed
    abootimg --create recovery.img -k zImage -r initrd.img help needed
    dd if=/boot/recovery.img of=/dev/block/mmcblk0p6
    mkinitramfs help needed
    abootimg --create recovery.img -k zImage -r initrd.img -c "cmdline = root=/dev/mmcblk1p1" help needed
    dd if=/boot/recovery.img of=/dev/block/mmcblk0p6
    pacman -S mkinitcpio cpio libsigsegv base-devel packer git
    ln -s /proc/self/fd /dev/fd
    packer -S abootimg-git
    cd /boot
    Nothing to show! Choose the installation place on the navigation bar.
    Warning! Section is not ready yet.
    mkinitcpio help needed
    abootimg --create recovery.img -k zImage -r initrd.img help needed
    dd if=/boot/recovery.img of=/dev/block/mmcblk0p6
    mkinitcpio -k `ls /lib/modules/` -g initrd.img
    abootimg --create recovery.img -k zImage -r initrd.img
    dd if=/boot/recovery.img of=/dev/block/mmcblk0p6
  5. Install basic device drivers, settings and desktop environments:
    cat >/etc/X11/xorg.conf <<EOL
    Section "ServerLayout"
        Identifier  "Layout0"
        Screen      "Screen0"
        InputDevice "Mouse0" "CorePointer"
        InputDevice "Keyboard0" "CoreKeyboard"
        InputDevice "Touchscreen0" "SendCoreEvents"
    EndSection
    
    Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "evdev"
        Option      "Device"        "/dev/input/event0"
    EndSection
    
    Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "evdev"
        Option      "Device"        "/dev/input/event6"
        Option      "ButtonMapping" "1 3 0"
    EndSection
    
    Section "InputDevice"
        Identifier  "Touchscreen0"
        Driver      "evdev"
        Option      "Device"        "/dev/input/event1"
        Option      "Calibration"   "0 4096 0 4096"
    EndSection
    
    Section "Device"
        Identifier  "Card0"
        Driver      "fbdev"
        Option      "fbdev"            "/dev/fb0"
        VendorName  "Unknown"
        BoardName   "Unknown"
    EndSection
    
    Section "Screen"
        Identifier  "Screen0"
        Device      "Card0"
        DefaultDepth        24
    EndSection
    
    Section "DRI"
        Mode 0666
    EndSection
    EOL
    
    echo "options dhd op_mode=0 nvram_path=/opt/wifi/nvram_net.txt_murata firmware_path=/opt/wifi/bcmdhd_sta.bin" >> /etc/modprobe.d/dhd.conf
    Nothing to show! Choose a distro you want to have on your SGN on the navigation bar.
    Warning! Section is not ready yet.
    apt-get install xserver-xorg-video-fbdev xserver-xorg-input-evdev help needed
    Nothing to show! Choose a desktop environment you want to have on your SGN on the navigation bar.
    apt-get install help needed
    Warning! Section is not ready yet.
    apt-get install help needed
    pacman -S xf86-video-fbdev xf86-input-evdev xorg-server xorg-xinit xorg-utils xorg-server-utils wpa_supplicant wicd bluez python2-dbus python2-gobject
    systemctl disable net-auto-wireless.service
    systemctl enable wicd.service
    gpasswd -a android users
    echo "dhd" >> /etc/modules-load.d/dhd.conf
    Nothing to show! Choose a desktop environment you want to have on your SGN on the navigation bar.
    pacman -S lxde wicd-gtk
    systemctl enable lxdm.service
    If you want to be able to type the "changeme" password without attaching USB-OTG keyboard everytime you reboot execute:
    pacman -S xvkbd
    echo "sh /usr/local/bin/my_xvkbd.sh &" >> /etc/lxdm/LoginReady
    chmod +x /etc/lxdm/LoginReady
    cat >/usr/local/bin/my_xvkbd.sh <<EOL
    #!/bin/sh
    pkill -9 xvkbd 2>/dev/null
    if [ "\$1" != stop ]
    then
      sleep 2
      /usr/bin/xvkbd -g "1000x300+0+0"
    fi
    EOL
    
    cat /usr/local/bin/my_xvkbd.sh
    chmod +x /usr/local/bin/my_xvkbd.sh
    echo "sh /usr/local/bin/my_xvkbd.sh stop &" >> /etc/lxdm/PreLogin
    chmod +x /etc/lxdm/PreLogin
    Warning! In XFCE you can't touch window borders(means move or close windows) with fingers but you can with S-pen. it's a known bug of bad multitouch handling. Also until osk patch will be applied to lightdm-gtk-greeter you will have to make it autologin if you don't want to attach your USB-OTG keyboard everytime you reboot.
    pacman -S xfce4 lightdm lightdm-gtk3-greeter wicd-gtk
    systemctl enable lightdm.service
    To enable autologin to XFCE:
    /usr/lib/lightdm/lightdm/lightdm-set-defaults --autologin=android
    groupadd autologin
    gpasswd -a android autologin
  6. Now you can turn off your tablet and boot up GNU/Linux by holding Volume Up and Power buttons!

Post-installation tweaks

Warning! Section is not ready yet.

X.Org driver for Mali

Florence with haptic feedback

ALSA

Android recovery as an app inside native linux

Notes

Partitioning

Warning! Section is not ready yet.
To create a partition on your internal sdcard you should: help needed At the same time, it's easy to make a partition for linux on external sdcard - just put it into your PC through card-reader and make one as many partitions as you want including one for GNU/Linux. Do not forget the number of the partition you created! In case you forgot and your prepared sdcard is already in tablet open Terminal Emulator and type:
su
fdisk -l /dev/block/mmcblk1