Post Reply

[DEVELOPMENT]TAB310.1-Run a Linux distro natively

OP r2d23cpo

21st January 2015, 03:29 AM   |  #1  
OP Senior Member
Thanks Meter: 144
 
201 posts
Join Date:Joined: Jan 2014
To research a way to "Run a Linux distro natively" on the Galaxy Tab3 10.1.



XDA:DevDB Information
Run a Linux distro natively, Tool/Utility for the Samsung Galaxy Tab 3 10.1

Contributors
r2d23cpo, CalcProgrammer1, moonbutt74, Angel_666

Version Information
Status: Testing

Created 2015-01-21
Last Updated 2015-02-08
Last edited by r2d23cpo; 21st January 2015 at 03:50 AM.
The Following 3 Users Say Thank You to r2d23cpo For This Useful Post: [ View ]
21st January 2015, 03:30 AM   |  #2  
OP Senior Member
Thanks Meter: 144
 
201 posts
Join Date:Joined: Jan 2014
reserved
21st January 2015, 04:39 AM   |  #3  
OP Senior Member
Thanks Meter: 144
 
201 posts
Join Date:Joined: Jan 2014
Wao I wrote a nice introduction and posted on first post and after I edited the project every is gone. So I will post down here something again.

For now I will research the possibility of adapting Kexecboot to our X86 device.
Quote:

Kexecboot is a program that implements a second-stage bootloader using a stripped-down Linux and the 'kexec' feature to boot into the final running Linux image.

Please do search in youtube for kexecboot there are a number of short videos.

h__p://kexecboot.org link not working today

Did some search for you and here are the top ones on XDA.
Kexecboot on the TF700t(TF700t-AKBI v2.6.5) by @workdowg
http://forum.xda-developers.com/show....php?t=2387133

[BOOT] Kexecboot / CM-Recovery by @threader
http://forum.xda-developers.com/show....php?t=2520663

[DEV/WIP] Kexecboot Bootloader for Galaxy Note 3 N900T - Boot Multiple Kernels by @CalcProgrammer1
http://forum.xda-developers.com/note...alaxy-t2864109

[BOOTLOADER]KexecBoot - A graphical kernel bootloader[Ver: 14Nov2014] by @apapousek
http://forum.xda-developers.com/icon...ernel-t2937006

Improve kexecboot
http://elinux.org/Improve_kexecboot

Now I had started to search and I think I found that Tasssadar/multirom is base in kexecboot. This could be even better, maybe we can convince @Tasssadar to help us create Multirom for the TAB3!
So here is a link to his thread

[MOD][JAN 15] MultiROM v30 by@Tasssadar
http://forum.xda-developers.com/show....php?t=2011403

Hopefully the see their mention here and give us a hand by pointing us out where to start.
Last edited by r2d23cpo; 21st January 2015 at 04:42 AM.
The Following User Says Thank You to r2d23cpo For This Useful Post: [ View ]
21st January 2015, 09:14 PM   |  #4  
Senior Member
Flag Kansas City
Thanks Meter: 766
 
649 posts
Join Date:Joined: Oct 2007
More
Step one is to get a kexec-capable kernel working. Kexecboot is just a frontend for kexec. There are two options - normal kexec and kexec-hardboot. I managed to make hardboot work with the Note 1 using some patches but haven't been successful with either on the Note 3. I don't know about this device but if it is x86 then hardboot is likely out as it has ARM-only patches. Then again, if it's x86 you may be able to use GRUB or something. Reading the GSMArena page for the Tab3 says Marvell ARM7 with PowerVR though. In that case you can forget GPU acceleration ever being an option as right now there is no X11/Mesa capable PowerVR driver nor is there a development effort for one.
The Following 2 Users Say Thank You to CalcProgrammer1 For This Useful Post: [ View ]
22nd January 2015, 08:59 AM   |  #5  
OP Senior Member
Thanks Meter: 144
 
201 posts
Join Date:Joined: Jan 2014
@CalcProgrammer1 and others

I do really appreciate your comments. Please forgive my ignorance in this area. I am about to say some stupiditty. jijijiji. I see you have point some concerned about " PowerVR" and "GPU acceleration". I just want to boot into Linux Distro as best at it can. Acceleration of any kind is not a priority. But if any driver limitation prevent us from displaying in a std mode then that can be a show stop.

I understood you say
Code:
Step one is to get a kexec-capable kernel working.  Kexecboot is just a frontend for kexec..
1-Our Samsung Tab3 10.1 "OS Open source" is incomplete, that is why CM11 has been to slow on release. Still guys at "[SIGNUP] [DEVELOPMENT] signup sheet for aosp build team" had work hard to produce a pre-alpha.
2-Good news is that Open Source for the Kernel works fine.

So can you pointing me in the right direction. How to build this " kexec-capable kernel". I had play with kernel build and even added some missing modules to have CIFS capability. SO compiling Kernel should not be hard for me.
Clearly adding "kexec" may not bee that easy. I am hoping to see an option in the building process.

Code:
kexec is a system call that enables you to load and boot into another kernel from the currently running kernel.
I had played some what with boot.img initramfs and hacked /init to do perform similar task.

Code:
!/sbin/busybox sh

# initramfs pre-boot init script

# Mount the /proc and /sys filesystems
/sbin/busybox mount -t proc none /proc
/sbin/busybox mount -t sysfs none /sys
/sbin/busybox mount -t tmpfs none /dev

# Something (what?) needs a few cycles here
/sbin/busybox sleep 1

# Populate /dev
/sbin/busybox mdev -s

# Mount the root filesystem, second partition on micro SDcard
/sbin/busybox mount -t ext4 -o noatime,nodiratime,errors=panic /dev/mmcblk1p2 /data/local/mnt/ubuntu

# Clean up
/sbin/busybox umount /proc
/sbin/busybox umount /sys
/sbin/busybox umount /dev

# Transfer root to SDcard
exec /sbin/busybox switch_root /data/local/mnt/ubuntu /etc/init.stage1]
This is a C& P from =>

As you see I take the second partition in External SDCARD "/dev/mmcblk1p2" and mounted in "/data/local/mnt/ubuntu" and transfer to a secondary init in Ubuntu with "exec switch root".
Code:
exec /sbin/busybox switch_root /data/local/mnt/ubuntu /etc/init.stage1
I guess this exec switch root is performing similar function as "kexec"

Can we work with this? -> Edited: I had already compile kexec in kernel.

Any help will be really really appreciated. Thanks.
Last edited by r2d23cpo; 22nd January 2015 at 04:50 PM.
The Following User Says Thank You to r2d23cpo For This Useful Post: [ View ]
22nd January 2015, 12:21 PM   |  #6  
OP Senior Member
Thanks Meter: 144
 
201 posts
Join Date:Joined: Jan 2014
@CalcProgrammer1
Ok
First step DONE!
I had compiled a new kernel with kexec. kexec stock from Kernel, just enabled. Do not know about hardboot but willing to see the patch!.
Listen Arm/mips/x86 should be the same kernel(clearly on same kernel number!). So, arm should not matter. Any way the code for kexec seems small enogth to compare with yours.

One thing I have to mention I am working with 4.2.2 since it is less molested by SELinux protection.

What is next step? Pleaseeeeeee.
Last edited by r2d23cpo; 22nd January 2015 at 12:37 PM.
22nd January 2015, 02:11 PM   |  #7  
workdowg's Avatar
Senior Member
Flag Seneca Falls
Thanks Meter: 476
 
1,101 posts
Join Date:Joined: Apr 2011
More
@JoinTheRealms @cogano @jcfunk any kexec help or advice for these guys?
The Following 2 Users Say Thank You to workdowg For This Useful Post: [ View ]
22nd January 2015, 04:48 PM   |  #8  
OP Senior Member
Thanks Meter: 144
 
201 posts
Join Date:Joined: Jan 2014
@workdowg @JoinTheRealms @cogano @jcfunk
Wao pretty nice string of mention jijiji. Do not feel obligated, but any help really appreciated.

Listen guys do not feel ignore but since @CalcProgrammer1 first approach me, I am trying to follow his work at [UTIL] Kexecboot Bootloader for Galaxy Note i717 - Boot Multiple Kernels. Still I you point me to another one I will gladly read on it.

So I build a kernel with kexec enabled! Will that maters or I need to compile one kexec from source?

Next I had downloaded your kernel_kexecboot_quincyatt_v2.zip and open the initramfs. Also compare it to your source. Looks similar. I see I need the following files:
Code:
ramdisk/bin/busybox need to veryfy my busybox compitibility but ok in general
ramdisk/bin/kexecboot
ramdisk/bin/lvm
ramdisk/bin/sh->busybox  should be ok

ramdisk/bin/tssrv
ramdisk/sbin/kexec
ramdisk/sbin/refresh

ramdisk/init -> it is a sh script  ok
So assuming my enabled kexec is ok for now, I also need to compiled kexecboot, lvm, tssrv, refresh but I have no source for lvm, tssrv, refresh.
Where can I get sources for: lvm, tssrv, refresh? I will check if lvm and tssrv may be part of any busybox, toolbox or recovery I have around.



Files from CalcProgrammer1 project "[UTIL] Kexecboot Bootloader for Galaxy Note i717 - Boot Multiple Kernels."
h__ps://github.com/CalcProgrammer1/kernel_quincyatt_kexec
h__ps://mega.co.nz/#F!0ct3EaTD!wHWnGo1M_2smyKdzGMIYmw
Last edited by r2d23cpo; 23rd January 2015 at 02:07 PM.
The Following User Says Thank You to r2d23cpo For This Useful Post: [ View ]
22nd January 2015, 05:50 PM   |  #9  
moonbutt74's Avatar
Senior Member
Thanks Meter: 574
 
1,140 posts
Join Date:Joined: May 2014
r2,

chroot to your distro and run in terminal

apt-get update
apt-get install gcc gcc-4.7

check /etc/apt/sources.list to see if you have source repositories entries, for example [in debian]
deb-src http://ftp.us.debian.org/debian/ wheezy main
your distro will vary, then

apt-cache search lvm <-----and so forth for every package you need from [src] and compile right on your tab natively
i've been doing this on arm, the end/native result should be similar. Be aware you may need to establish a repository locally for your
kernel source in case you need to generate headers for your toolchain

cd [kernel-source-$TOP]
make mrproper
make ARCH=x86 [correct_defconfig]
make ARCH=x86 headers_check
make ARCH=x86 [your toolchain's correct location for]/sysroot/usr headers_install

with your mount points correct for your ubuntu project you should be able to do all that via terminal.

m
The Following 2 Users Say Thank You to moonbutt74 For This Useful Post: [ View ]
22nd January 2015, 06:44 PM   |  #10  
Senior Member
Flag Kansas City
Thanks Meter: 766
 
649 posts
Join Date:Joined: Oct 2007
More
Quote:
Originally Posted by r2d23cpo

So assuming my enabled kexec is ok for now, I also need to compiled kexecboot, lvm, tssrv, refresh but I have no source for lvm, tssrv, refresh.
Where can I get sources for: lvm, tssrv, refresh? I will check if lvm and tssrv may be part of any busybox, toolbox or recovery I have around

You don't need them. My sloppy work is showing lol. I took most of that from another kexecboot from the HP TouchPad. Chances are your Tab3 doesn't use LVM, though the TouchPad did so that's where that came from. You can remove it.

The tssrv binary is the userspace HP TouchPad touchscreen driver. Most tablets and phones have a kernelspace touchscreen driver, so you can just remove this (plus kexecboot isn't touch driven anyways).

Refresh was something I was testing for my Note 3, as it uses a software-refreshed panel. If your Tab3 uses a video mode panel you won't need a software refresher but if it does, well, you may run into an issue that I don't know about as refreshing seems SoC-specific and I'm only used to Qualcomm chips. Remove it for now as well.

The Following User Says Thank You to CalcProgrammer1 For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes