GNU/Linux@N80XX

Search This thread

driekus33

Senior Member
Jun 6, 2012
87
5
Excellent job Exception13.

I just took a look at ubuntu for tablets. Do you think putting Ubuntu 13.10 (when it is released) and its tablet friendly interface will be possible on the Note 10.1?
 

malak2

Member
Feb 21, 2013
5
0
hi ! great project !!

exception13, x-stranger, when can we expect an howto guide or image ?

i suppose odroid-x mali drivers are some binary blobs. what other blobs are required for hardware support ?
 

jan rinze

Member
Feb 21, 2013
13
2
I have been reading this thread with much interest!

Can the recoveryimg be flashed without rooting the tablet?

Also, will we see a full howto to get the kernel and initrd build with the Mali drivers included?

great work!!

---------- Post added at 09:24 PM ---------- Previous post was at 09:01 PM ----------

I have been reading this thread with much interest!

Can the recoveryimg be flashed without rooting the tablet?

Also, will we see a full howto to get the kernel and initrd build with the Mali drivers included?

great work!!

would the process described for cyanogenmod titled "Install_CM_for_n8000" work for installing the kernel and initrd ?
 

jan rinze

Member
Feb 21, 2013
13
2
i would like to achieve the following:

flash the recovery.img with a tool and leaving the stock android untouched.
boot linux in recovery mode from the micro sdcard.

setting up the microsdcard won't be much of a problem, however flashing the recovery might.

any suggestions? (I'd like to keep the Android unrooted)
 

X-Stranger

Senior Member
Sep 2, 2008
164
204
i would like to achieve the following:

flash the recovery.img with a tool and leaving the stock android untouched.
boot linux in recovery mode from the micro sdcard.

setting up the microsdcard won't be much of a problem, however flashing the recovery might.

any suggestions? (I'd like to keep the Android unrooted)

Our tablet does not support booting from sdcard, so there is no way to keep tablet untouched, anyway you need to flash custom recovery image with Linux kernel and initrd. Currently I don't see possibility to flash custom recovery without rooting. However you can unroot it after.
 
  • Like
Reactions: damz37

darksabre_x

Senior Member
Nov 8, 2008
115
41
So I have a bit of a problem.

Whenever I flash the recovery image and reboot I can't boot back into android. Everything flashes fine and boots me into linux, but whenever i try to reboot, it only takes me back to linux and never to android. (this is without holding any buttons on boot). I have to flash a recovery like CWM or TWRP through Odin in order to get back to android.

I used dd in order to flash the recovery.img to /dev/block/mmcblk0p6


I'm using OmegaRom 2.0 which is based on Stock 4.1.2.


Any help would be appreciated.
 

exception13

Senior Member
Mar 11, 2008
76
142
41
Kazan
So I have a bit of a problem.

Whenever I flash the recovery image and reboot I can't boot back into android. Everything flashes fine and boots me into linux, but whenever i try to reboot, it only takes me back to linux and never to android. (this is without holding any buttons on boot). I have to flash a recovery like CWM or TWRP through Odin in order to get back to android.

I used dd in order to flash the recovery.img to /dev/block/mmcblk0p6


I'm using OmegaRom 2.0 which is based on Stock 4.1.2.


Any help would be appreciated.

you or OmegaRom make repartition? also run "partx -s /dev/mmcblk0" in linux and show result.
 
Last edited:
  • Like
Reactions: damz37

darksabre_x

Senior Member
Nov 8, 2008
115
41
you or OmegaRom make repartition?

I haven't partitioned anything. I used the terminal emulator within Android to run dd to flash the recovery image. I placed the linux.img in the root of the internal SD card.

I've actually tried this twice so far. The first time i used the Mobile Odin app to flash the recovery, the second time I used the terminal emulator.


Both times it runs Linux natively, but won't boot back to android until I flash an actual recovery back onto the device.

Both times I did select the reboot to recovery option when shutting down Android instead of just power off. Would that make a difference?

***edit***
Just noticed you added that command.
I don't have access to my PC to flash CWM back right now and that command doesn't do anything when I try within Android using Linux Deploy and connectbot to ssh in. I'll give the command a try later after reflashing the arch linux recovery.img and booting back into linux.
 
Last edited:

exception13

Senior Member
Mar 11, 2008
76
142
41
Kazan
Both times I did select the reboot to recovery option when shutting down Android instead of just power off. Would that make a difference?

"reboot to recovery" use scratchpad memory for pass some options to bootloader. android recovery may handle this and reset "reboot to recovery" flag in scratchpad memory but plain GNU/Linux can't. try with clean shutdown.
 
  • Like
Reactions: damz37

jan rinze

Member
Feb 21, 2013
13
2
I have managed to boot into linux with the supplied files recovery.img and linux.img.

On my Linux PC i have succesfully compiled the kernel with the patches supplied on page 3.

Are there more recent patches for the kernel of add-on's available? does it have kexec enabled?

The Distro is nice, I will try and see if i can setup Debian on the emmc.

Thanks!!

---------- Post added at 10:58 PM ---------- Previous post was at 10:43 PM ----------

strange:

when i do 'shutdown -h now' the system shutsdown nicely and i can reboot into Android. BUT when i try to boot linux again i get the Android system recovery!!

is it possible that the system resets the recovery image?
 

darksabre_x

Senior Member
Nov 8, 2008
115
41
when i do 'shutdown -h now' the system shutsdown nicely and i can reboot into Android. BUT when i try to boot linux again i get the Android system recovery!!

is it possible that the system resets the recovery image?

That's one of the issues of staying completely stock. The stock rom does indeed flash a stock recovery back upon boot. It's due to the recovery-from-boot.p in /system (You'll need to be rooted to rename or delete this)



try with clean shutdown.

You were right. I totally forgot about the reboot to recovery flag. After using dd to flash and then powering down the proper way, I now have access to both ArchLinux and my Android rom.
 

malak2

Member
Feb 21, 2013
5
0
thanks exception13

please could you post some instructions to get the mali drivers and hardware 3d acceleration working ?
 

jan rinze

Member
Feb 21, 2013
13
2
CC drivers/misc/tzic.o
/tmp/cccpbEfZ.s: Assembler messages:
/tmp/cccpbEfZ.s:56: Error: unknown pseudo-op: `.arch_extension'
/tmp/cccpbEfZ.s:182: Error: unknown pseudo-op: `.arch_extension'
/tmp/cccpbEfZ.s:192: Error: unknown pseudo-op: `.arch_extension'
make[2]: *** [drivers/misc/tzic.o] Error 1
make[1]: *** [drivers/misc] Error 2
make: *** [drivers] Error 2

do we really need the Linux Mobicore support configured in the kernel?
 

exception13

Senior Member
Mar 11, 2008
76
142
41
Kazan
CC drivers/misc/tzic.o
/tmp/cccpbEfZ.s: Assembler messages:
/tmp/cccpbEfZ.s:56: Error: unknown pseudo-op: `.arch_extension'
/tmp/cccpbEfZ.s:182: Error: unknown pseudo-op: `.arch_extension'
/tmp/cccpbEfZ.s:192: Error: unknown pseudo-op: `.arch_extension'
make[2]: *** [drivers/misc/tzic.o] Error 1
make[1]: *** [drivers/misc] Error 2
make: *** [drivers] Error 2

do we really need the Linux Mobicore support configured in the kernel?

which version of gcc and binutils?
 
  • Like
Reactions: Kondra007

jan rinze

Member
Feb 21, 2013
13
2
which version of gcc and binutils?

I have tried versions 4.4 , 4.5 , 4.6 and 4.7. all of them struggle with the code at various places.
I have tried to compile on the Panda board natively and on my Debian PC with a cross compiler.

Which version of gcc and binutils do you use?

---------- Post added at 10:56 AM ---------- Previous post was at 10:32 AM ----------

I have tried versions 4.4 , 4.5 , 4.6 and 4.7. all of them struggle with the code at various places.
I have tried to compile on the Panda board natively and on my Debian PC with a cross compiler.

Which version of gcc and binutils do you use?

Also i get these kind of errors which seem like the code is either incomplete or poorly written.

CC drivers/media/video/exynos/fimc-lite/fimc-lite-reg.o
In file included from drivers/media/video/exynos/fimc-lite/fimc-lite-reg.c:16:0:
drivers/media/video/exynos/fimc-lite/fimc-lite-reg.c: In function ‘flite_hw_set_source_format’:
drivers/media/video/exynos/fimc-lite/fimc-lite-core.h:298:32: error: inlining failed in call to always_inline ‘find_flite_format’: function body not available
drivers/media/video/exynos/fimc-lite/fimc-lite-reg.c:103:26: error: called from here
make[5]: *** [drivers/media/video/exynos/fimc-lite/fimc-lite-reg.o] Error 1
make[4]: *** [drivers/media/video/exynos/fimc-lite] Error 2
make[3]: *** [drivers/media/video/exynos] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
 

jan rinze

Member
Feb 21, 2013
13
2
On a side note, the provided linux.img and recovery.img seems to crash and after boot hangs with a fsck error.
when trying to fsck manually it crashes again and hangs.

Does the kernel have overclocking or other stuff enabled? it seems pretty unstable.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 24
    I'm successfull running Debian GNU/Linux on my SGN 10.1 with "dualboot" (my kernel and debian initrd in recovery partitions). It's very easy and nice to use.

    look at demo video

    currently don't work: GPU (hardkernel can release exynos Xorg drivers for Odroid project, DRI work in progress), MFC (hardware encoder/decoder), cameras (work in progress), gps (work in progress), modem (work in progress).

    and it's nice work with my laser printer via cups ;)

    ---

    Linux Kernel source code and other stuff http://code.google.com/p/opensgn
    11
    How To install Linux to N80XX

    Okay, below is my successfull story, which is still going on.

    So, as the prerequisite you need to have Samsung Galaxy Note 10.1 rooted. You can do this anyhow described on the forum, I've used "Exynos Abuse" utility for that purpose.


    The first step that I've done - got chrooted Linux distribution. The easyest wat is to install "Linux Deploy" program from Google Play, then select options you like. I've choosen the next:
    • distribution: ArchLinux (there are also Ubuntu, Debian, and a few more in the latest version)
    • version: latest
    • architecture: armv7h
    • mirror address: http://de.mirror.archlinuxarm.org
    • installation type: image file (this is important, because I wanted to later boot Linux using loopback device)
    • destination path: /sdcard/arch.img (internal emmc "sdcard")
    • image size: 4096 (in Mb, e.g. 4Gb - better this size, because later you might want to move it to your real sdcard)
    • filesystem: ext4
    • username: stranger
    • DNS-server: automatic detection
    • locale: en_US.UTF-8
    • desktop environment: LXDE (works fast when you don't have 3D acceleration or work via VNC)
    • install GUI: yes
    • SSH: yes
    • VNC: yes (no, if you don't want to work with your chrooted environment via VNC client)
    • other options: you might select as you like. Later I've added run of shell script, which was configuring a few things very useful for my chrooted Linux
    As soon as you done with settings, get back and press "Download" button, then wait until downloading, installing, configuring is done. Voila! Now you can press "Play" button and work with your favorite distribution right from Android, or connect to it remotely from desktop. Just use proper VNC/SSH client. I was using VNC Viewer for VNC and ConnectBot for SSH.


    All right, all this looks good, but how to get dualboot and run Linux natively? As you know, our device already has dual boot: regular Android and recovery. We'll just replace recovery with our Linux kernel (zImage) and initramfs (initrd.img), so they'll boot our Linux. For sure we can use the native Android kernel, but if you want to get for example CIFS filesystem support and working touchscreen - you need to compile your own kernel. For that purpose we need:
    I've unpacked all this to /opt folder:
    • /opt/linux - unpacked kernel sources
    • /opt/platform_prebuilt-master - prebuilt toolchain
    You'll also need my kernel config and patch based on the config/patch ((fix for touchscreen and power button) provided by exception13 - I've just tuned it and added a few fixes for successfull compilation. Please find both files attached to this message. The file config.txt must be renamed to .config and moved to /opt/linux, n8000.patch must be applied to kernel sources (something like "cd /opt/linux && patch -s -p1 ../n8000.patch"). My kernel config uses the next kernel parameters: "root=/dev/loop0 ro rootfstype=ext4 rootwait quiet". E.g. it suggests to boot from loopback device, but you can change it to /dev/mmcblkXX, if you have already re-partitioned EMMC and installed Linux on separate partition (I'm have done this later). Any change to kernel config can be done using "make menuconfig" inside kernel sources folder. After you done, run this:
    Code:
    export ARCH=arm
    export SUBARCH=armv7h
    export CROSS_COMPILE=/opt/platform_prebuilt-master/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
    cd /opt/linux
    make -j2
    make modules_install
    After compilation is done, you can find brend new shining kernel image as /opt/linux/arch/arm/boot/zImage file, and modules in /lib/modules/3.0.31 folder. I've copied those files to my chrooted Linux using SCP (zImage to /boot and modules folder to /lib/modules), and all other things was doing here: started LinuxDeploy, pressed Play, logged in to Linux using SSH.

    So, we have kernel, modules, but still need to built initrd.img and replace original recovery with ours. First we need to get original recovery image, because we'll just update it and write back. By the second, we want to keep copy in safe place, just in case:
    Code:
    dd if=/dev/block/mmcblk0p6 of=/boot/recovery.img
    cp /boot/recovery.img /boot/recovery.img_orig
    Preparing initrd.img depends on distribution you are working with. My ArchLinux has mkinitcpio utility, but as soon as I want it to boot from loopback device I did a few tricks based on the next HowTo: http://felixc.at/ArchLinux-loopback (I just needed /lib/initcpio/hooks/looproot file and /lib/initcpio/install/looproot, fixed /etc/mkinitcpio.conf by adding looproot to HOOKS, and properly changed /etc/fstab). Please note that internal sdcard is not ntfs or vfat, it is ext4, so the file looproot should be a bit different, and there is no need to include ntfs-3g or fuse into initrd. Also the path to arch.img file is /media/arch.img on /dev/mmcblk0p12 partition, so the looproot hook will look like this:
    Code:
    # vim:set ft=sh:
    run_hook ()
    {
            # Now mount the host filesystem
            mkdir /host
            mount -t ext4 /dev/mmcblk0p12 /host -o defaults,noatime,acl,barrier=1,data=ordered
    
            # And the loop filesystem
            losetup /dev/loop0 /host/media/arch.img
            mount -t ext4 /host/media/arch.img /new_root -o defaults,noatime,acl,barrier=1,data=ordered
            mount --bind /host /new_root/mnt/sdcard
    }
    Then I've run:
    Code:
    cd /boot
    mkinitcpio -k 3.0.31 -g initrd.img
    Okay, right now a few other tricks :) Install abootimg utilities package (ArchLinux users can find them in AUR if I remember correcly). Then run "abootimg-unpack-initrd" in "/boot" folder, this will create "/boot/ramdisk" directory, go into it and edit "init" file commenting out ""$mount_handler" /new_root" line. Then run "abootimg-pack-initrd" in the same path and get initrd.img finally ready. To update recovery.img with our files and write it back to the system run:
    Code:
    cd /boot
    abootimg -u recovery.img -k zImage -r initrd.img
    dd if=/boot/recovery.img of=/dev/block/mmcblk0p6
    Well done! Now, we are almost ready to reboot.


    The last things: install Xorg + fbvev video driver + evdev input driver + some login manager ("lightdm" for example) + some onscreen keyboard (I would recommend "florence"). Configure login manager to autologin. Make /etc/X11/xorg.conf looking like this:
    Code:
    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

    if all is okay, we can logout our chrooted system, press "pause" button in LinuxDeploy program and try to poweroff tablet. Press buttons "Volume-Up" and "Power", wait until Linux booting messages appear, and release buttons. If you've done all correctly, graphics should be started and LXDE too. Touchscreen must be working as touchscreen :), S-Pen as mouse, when tablet is idle for a long time and screen becomes dark - just press "Power" button.

    If something is wrong - you can reboot your tablet to Android, login to chroot via LinuxDeploy and fix anything you need.

    The next things we will do are: configure WiFi, Bluetooth, sound. And also will repartition emmc and move Linux to the internal native partition (optional). See my next messages...
    10
    ArchLinux

    For the interested people, below are the links to the updated recovery and rootfs images with ArchLinux:
    - recovery: http://dfiles.ru/files/r6y96x5oo
    - rootfs: http://dfiles.ru/files/dcolx02nj

    Changelog:
    - rootfs image size increased up to 3Gb
    - Samsung Kernel Update 5 + our patches + working Mali/UMP support merged
    - LXDM/XFCE stuff removed
    - ArchLinux updates installed
    - GDM/Gnome3 + extra packages installed
    - wpa_supplicant disabled, NetworkManager activated instead
    - Mali video driver and all dependencies installed and configured, so Gnome UI acceleration should work

    How to install on to device with stock firmware:
    - root your device and make sure you have "dd" utility
    - backup your stock recovery partition just in case (dd if=/dev/block/mmcblk0p6 of=recovery.img_orig)
    - burn recovery image to recovery partition (dd if=recovery.img of=/dev/block/mmcblk0p6)
    - put rootfs file to the "internal" sdcard
    - reboot to recovery and see Linux booting
    - see GDM, select "android" user, enable onscreen keyboard if needed (in the accessibility menu, top right corner), type "changeme" password and press enter

    P.S. ADB interface still works in case something is wrong and you need to login to Linux "from the backdoor"

    P.P.S. The images are posted "As Is", feel free to change anything you think works incorrectly or you can do better
    7
    i create http://code.google.com/p/opensgn. current in this repo my linux kernel for n8000 and some stuff
    6
    I have got a few advices and help from exception13, and has successfully compiled kernel, replaced recovery and now have ArchLinux working natively on my N8000. However it is in loop-filesystem placed on emmc, instead of repartitioning. But this might be more useful for most of users. So, I'm going to post a small HowTo and probably something pre-ready for you very soon.

    P.S. Attached is the picture of "Home PC" based on N8000 + Apple Wireless Keyboard + bluetooth mouse :)