Related
THIS IS NOW OUTDATED!!
It uses the old sqsh method WITH a rootfs. So if you're using the NoMoRootfs method, this won't work. Please use the already complete builds in the Kaiser/Vogue threads as they are working the best at this moment.
DISCLAIMER:
I take no responsibility for anything that may happen to your phone/computer. Use at your own risk.
PURPOSE:
This is for informational/testing purposes. And for people to stop asking, "can somebody port X rom!!! PLZ!!!"
PREFACE:
I made this as a quick tool to port ROMs from the Dream/Sapphire forums to work with our phones. It's a very quick and dirty script I threw together using bash, so there's probably some problems with it. This tool is simply designed to make a copy of the Dream/Sapphire ROM. Once you get the setup, it's really easy and you'll be porting like crazy.
I did this all on Ubuntu 9.10 so things might not work properly if you're using another distro.
THANKS:
All credit goes to the people that made this possible, in no particular order...
dzo, vilord, mssmison, zen, enatefox, pmos, jamezelle, craig0r, cyanogen, and so many more. If I forgot you, I'm sorry, but you know if you helped in some way.
THE SETUP:
1) Download this file
2) Extract the folder to your desktop. Then copy and paste the following code into the terminal:
Code:
sudo mv -f $HOME/Desktop/Android/genext2fs /bin/genext2fs; sudo chmod 755 /bin/genext2fs; sudo dpkg -P squashfs-tools; sudo dpkg -i $HOME/Desktop/Android/squashfs-tools_3.3-7_i386.deb; sudo rm -r $HOME/Desktop/Android/squashfs-tools_3.3-7_i386.deb; sudo chmod 777 $HOME/Desktop/Android/*.build.script
3) Now go into synaptic package manager, search for squashfs-tools, select it and under Package, check Lock Version so that way it won't try to update.
4) Now cruise over to the Dream android development forum or the Sapphire android development forum and download the ROM you would like to port. Place the zip file in the Android folder. (no need to rename)
5) Place any .apk's you would like built into the system in the Apps folder.
ADVANCED SETUP:
If you would like to tweak the system before building, open the script in a text editor and you'll find a line to uncomment that will halt the script until you are ready.
HOW TO RUN:
Either run the script from a terminal
Code:
./$HOME/Desktop/Android/HERO.build.script
or
./$HOME/Desktop/Android/Donut.Build.script
Or double click and Run in Terminal
You will get a prompt for your password to use the sudo command. THIS IS NOT SAVED ANYWHERE OR MAGICALLY SENT TO ME. It is just to get the system.sqsh setup for you to use.
You will now see a Donut/Hero folder inside the Android folder. Inside that will be a nice little system.sqsh with the date ready to boot!
*Rename to system.sqsh when you put on your SD card*
Grab the latest basefiles from vogue-android and you're good to go.
~~~~~~ To get an output of what's happening run in a terminal as described above but add " > build.txt" and you'll see a txt file in the Android folder. ~~~~~~~
CHANGING SYSTEMS:
If you want to port a new rom, replace the .zip.
UPDATES:
1) Download the updates from HERE
2) Extract to the Android folder overwriting if necessary.
3) Copy and paste the following code into a terminal:
Code:
sudo chmod 777 $HOME/Desktop/Android/*.script
CLEANUP:
If you follow the advanced setup and/or accidentally closed the terminal before the build finishes, run the cleanup script. This will unmount everything that might be mounted and delete all folders that are made during the process.
DOWNLOADS:
If you're too lazy or just want a quick link:
Main "Android porting" folder
Updates
Input, testers, bugs, and tweaks to the scripts are appreciated!
FAQ:
Why does my system.sqsh not work?
Most likely cause is that you're not using the correct version of squashfs-tools. You'll have to find version 3.X for the distro you're using. Version 4.X will NOT work!!!
When I try to boot a system.sqsh I just made I keep getting something about android power wake locks. WTF?
You're probably trying to port an eclair or cyan ROM. These don't work at the current state. Hopefully soon I'll get these working.
Will update more when they arise.
CHANGELOG:
11-27-09:
-Created a cleanup script in case the terminal is closed during the build process.
-Bug fixes in Donut and Hero scripts
11-24-09:
-Added an Apps folder for apk's you want built into the system.
-Bug fixes in scripts
11-22-09:
-Combined everything needed into a zip file
-WAY easier to setup
11-20-09:
-Added feedback to make more user friendly
-Append time to system.sqsh
loserskater said:
Input, testers, bugs, and tweaks to the scripts are appreciated!
Click to expand...
Click to collapse
Will try today... Downloading
Tried and working. Had to change the script for it work with ubuntu version that i use. Thanks this is really great
garynsa said:
Will try today... Downloading
Tried and working. Had to change the script for it work with ubuntu version that i use. Thanks this is really great
Click to expand...
Click to collapse
What did you change?
Glad to see it's working.
loserskater said:
What did you change?
Glad to see it's working.
Click to expand...
Click to collapse
hI
For some reason I cannot use -a in the genext2fs command. Had to remove that..
One of the Donut is working. Couldnt get the Cyanogen build working . Struggling with hero build also.
Will try again in the next couple of days and post results.
Thanks
garynsa said:
hI
For some reason I cannot use -a in the genext2fs command. Had to remove that..
One of the Donut is working. Couldnt get the Cyanogen build working . Struggling with hero build also.
Will try again in the next couple of days and post results.
Thanks
Click to expand...
Click to collapse
Make sure you use the genext2fs that I referenced.
That one works with -a and might take care of some issues. try that and see if it works.
Updated script to now move system to a Hero or Donut folder.
Working on the cyanogen build now...
EDIT: Here's a cyanogen script that gets it to boot, but sits at a black screen. I haven't had much time to test it so it might boot further than that if you leave it. If somebody wants to test this out or tweak it in some way go for it.
It uses the donut.sqsh in the Android folder so you shouldn't have to do anything with it except make it executable.
EDIT 2: Still working on cyan builds... that script didn't work.
great job i like to see stuff like this to motivate people!!! also note this will work with any donut or hero build from the sapphire forum
jamezelle said:
great job i like to see stuff like this to motivate people!!! also note this will work with any donut or hero build from the sapphire forum
Click to expand...
Click to collapse
Good point, forgot to mention that. Updated first post.
I'm hoping it will help people start to learn to tweak system's. But I have a slight feeling wer're going to start seeing a lot of "MLIGN/DWANG/etc's Android Rom" threads from random people.
Hi
Was able to port the DWANGs build using your script. Thanks a lot for making life this simple. Howev3er, hero build is still not working. Tried your genesxt2fs. Is it possible to get the links to correct base hero version to use? I tried magic and normal version. It keeps giving me black screen and doesnt completely boot. I think the base hero version is not the right one i am using
Thanks
OK, I think I figured out the problem. The apps folders weren't copying over from the data folder to the system folder correctly. Testing now, and will update first post with new scripts.
EDIT: Finally got the Hero builds working correctly. You should still be able to use any hero.sqsh.
loserskater said:
OK, I think I figured out the problem. The apps folders weren't copying over from the data folder to the system folder correctly. Testing now, and will update first post with new scripts.
EDIT: Finally got the Hero builds working correctly. You should still be able to use any hero.sqsh.
Click to expand...
Click to collapse
Hi
The new script is great.. I was able to get the hero to boot I still have 2 check a few thing willl post later in the night with more
Thanks a lot
garynsa said:
Hi
The new script is great.. I was able to get the hero to boot I still have 2 check a few thing willl post later in the night with more
Thanks a lot
Click to expand...
Click to collapse
Glad to see its working. Thanks for the feedback!
Most things working
Hi
was able to get the hero ported and a few things worked
1. Calls
2. SMS
3. Wifi (getting ips)
4. Working with partition rootfs (speed quite great with this)
Not working
1. Camera
2. GPS
I am using he ION build to build the hero roms (based on the inputs of Zen). May be I need to use another hero rom for the camera to work? I recommend that the links to the recommended build to be used as template (donut, hero...) be updated on the first thread to make it easy for others to have a single starting platform
garynsa said:
Hi
was able to get the hero ported and a few things worked
1. Calls
2. SMS
3. Wifi (getting ips)
4. Working with partition rootfs (speed quite great with this)
using u
Not working
1. Camera
2. GPS
I am using he ION build to build the hero roms (based on the inputs of Zen). May be I need to use another hero rom for the camera to work? I recommend that the links to the recommended build to be used as template (donut, hero...) be updated on the first thread to make it easy for others to have a single starting platform
Click to expand...
Click to collapse
If using a hero.sqsh doesnt fix the problem it sounds like it might be the rootfs (probably not copying over correctly). Ill take a look at it when I get home and update the first post with hero/donut.sqsh's.
Im also thinking about combing the 2 into just one script and youll be able to just type which build you want when you run it. What do you think? Or is the 2 seperate scripts more convenient?
loserskater said:
If using a hero.sqsh doesnt fix the problem it sounds like it might be the rootfs (probably not copying over correctly). Ill take a look at it when I get home and update the first post with hero/donut.sqsh's.
Im also thinking about combing the 2 into just one script and youll be able to just type which build you want when you run it. What do you think? Or is the 2 seperate scripts more convenient?
Click to expand...
Click to collapse
Personally i prefer the separate scripts mainly because each requires a different base templates. However if you prefer to combine them may be have sub-folders within the main so that the work happen for each port within the sub-folder.
Few suggestions if you like (please ignore if not correct.. being a non-programmer of linux I can be a bit off )
1. Let the folder names be requested at start and use them
2. If possible to put in a log of the run to check if there were issue or not (because i use double-click to run the script sometimes there is a problem that i face if i dont watch the window. for now i have put some waits to check the errors. Had this issue while testing to port one)
If I can help (except on coding as I dont know it.. generally change the script just enough to work... )
Queries/questions
1. Is there a way to test the build on the comp itslef rather than to keep booting on the phone (takes a lot of time and the phone is not usable all that time...)
Thanks for all the work
garynsa said:
Personally i prefer the separate scripts mainly because each requires a different base templates. However if you prefer to combine them may be have sub-folders within the main so that the work happen for each port within the sub-folder.
Few suggestions if you like (please ignore if not correct.. being a non-programmer of linux I can be a bit off )
1. Let the folder names be requested at start and use them
2. If possible to put in a log of the run to check if there were issue or not (because i use double-click to run the script sometimes there is a problem that i face if i dont watch the window. for now i have put some waits to check the errors. Had this issue while testing to port one)
If I can help (except on coding as I dont know it.. generally change the script just enough to work... )
Queries/questions
1. Is there a way to test the build on the comp itslef rather than to keep booting on the phone (takes a lot of time and the phone is not usable all that time...)
Thanks for all the work
Click to expand...
Click to collapse
I'll try to make the script more user friendly with prompts if something doesn't happen correctly. And also work on naming folders.
But first I want to figure out the camera/gps issues...
There isn't a way to boot it on the comp that I know of. I'll upload blank data.img's for each build so that they'll boot faster but other than that I think moving to SD Card and booting is the only way. But once all these bugs get sorted out, you won't have to do it as often!
EDIT: Which folders would you like to name? Just where the system.sqsh gets stored?
loserskater said:
I'll try to make the script more user friendly with prompts if something doesn't happen correctly. And also work on naming folders.
But first I want to figure out the camera/gps issues...
There isn't a way to boot it on the comp that I know of. I'll upload blank data.img's for each build so that they'll boot faster but other than that I think moving to SD Card and booting is the only way. But once all these bugs get sorted out, you won't have to do it as often!
EDIT: Which folders would you like to name? Just where the system.sqsh gets stored?
Click to expand...
Click to collapse
Hi
Thanks for the answers. For me it should be both (but the starting folder is main. Other can be a sub-folder like u have now to be renamed as choice)
garynsa said:
Hi
Thanks for the answers. For me it should be both (but the starting folder is main. Other can be a sub-folder like u have now to be renamed as choice)
Click to expand...
Click to collapse
Are you referring to the Android folder? Or just a folder where everything is kept when it runs?
loserskater said:
Are you referring to the Android folder? Or just a folder where everything is kept when it runs?
Click to expand...
Click to collapse
Android folder... but its not a big deal as one can easily change it while startign the script
I have tried both AdAway and AdFree Android on my Nexus and while both seem to work okay on wi-fi, as soon as I use a mobile data connection the ads show as usual.
Has anybody else noticed this?
(I'm rooted etc. btw)
all I can tell is that I've the same experience.
Probably because they both use the hosts file to block ads, which is pretty silly and not very reliable.
Solution: use iptables instead. Get a script like this: http://pgl.yoyo.org/as/iplist.php?ipformat=iptables and put it in your userinit.d. Might have to change the location of the iptables executable for Android.
Thanks, but excuse the amateurish question, but where can I find the userinit.d?
I've extracted a ROM and tried searching for it but with no success.
cmonthegas said:
Thanks, but excuse the amateurish question, but where can I find the userinit.d?
I've extracted a ROM and tried searching for it but with no success.
Click to expand...
Click to collapse
Unfortunately I don't have a Galaxy Nexus yet so I don't know where they put userinit.d and iptables in the new version. I hope to put detailed instructions once I get my GN, but that could be a while....
Haven't checked yet but normally init.d folder is located in...
/etc/init.d
dunno if thats the same as userinit.d though???
right, I've checked in the /etc/init.d folder and there's three files
87calibration
93zipalign
99complete
I doubt it's any of them?
cmonthegas said:
right, I've checked in the /etc/init.d folder and there's three files
87calibration
93zipalign
99complete
I doubt it's any of them?
Click to expand...
Click to collapse
Actually since you are rooted you can just put it in that directory. Doesn't look like it comes with userinit but that's not a big deal, the point of using userinit is so that it lives on /data and not /system so you don't have to replace it everytime you flash /system. Just put the script in there, name it "95firewall", replace the location of the iptables binary in the script (you can find out where iptables lives by typing "which iptables" in the terminal) and chmod and chown it to be the same as the rest of the files in the directory.
Oh yeah and take out "-o eth0" from every line in the script, I don't think Android uses that interface name.
adaway adblocking works fine for me regardless of being on wifi or 3g. I don't really understand why there would be a difference, does it reference a separate host file per interface or something?
bleomycin said:
adaway adblocking works fine for me regardless of being on wifi or 3g. I don't really understand why there would be a difference, does it reference a separate host file per interface or something?
Click to expand...
Click to collapse
I think it may have something to do with proxies. With some SIM cards, Internet access through the cell radio is automatically configured to use a proxy. I've seen this with desktop operating systems: with proxies set up a certain way, domain name resolution bypasses the hosts file completely. Since on Android, this layer is just Linux, it wouldn't surprise me if this is what's happening as well.
Thanks for the input! I'll give it a try after lunch and see what happens.
I tried briefly last night using a custom script in Droidwall, but I couldn't get it to work properly. That would probably be the ideal method as the rules can just be turned on/off easily from within the app, but I'll give this a try first.
I'll update when I've had a go at it.
Cheers!
Ha, well it would appear I can't try it as I'm running a stock rom which doesn't support init.d
I was so used to running a custom rom, I forgot all about that.
I'll probably try installing another rom today or tomorrow - I haven't got time to be reinstalling everything atm
Shodney said:
Ha, well it would appear I can't try it as I'm running a stock rom which doesn't support init.d
I was so used to running a custom rom, I forgot all about that.
I'll probably try installing another rom today or tomorrow - I haven't got time to be reinstalling everything atm
Click to expand...
Click to collapse
Haha, same here...I didn't realize the stock ROM doesn't support it. Darn that sucks.
Okay i've (finally) had chance to have a play with this after installing Revolution rom with init.d support.
I changed the tables and dropped them into init.d, but they aren't being applied and ads are still coming through.
example of what I changed the entries to:
/system/bin/iptables -A OUTPUT -d 1100i.com -j DROP
Click to expand...
Click to collapse
If I try to apply a rule manually using ADB, I get the following error:
FIX ME! implement getgrnam() bionic/libc/bionic/stubs.c:416
Click to expand...
Click to collapse
So I'm stuck
Any ideas?
Hi,
i 'm an archos user since not so long Thanks to the community I managed to install sde and root my device.
I have been lately searching for a tutorial or guide on how to cook a custom firmware, but I couldn't find such info.
Can someone write one for us newbies of Android and archos?
What I'm looking for is how to create the archos. ext4. update file from. aos and how to install busybox root etc..
thanks
adonix said:
Hi,
i 'm an archos user since not so long Thanks to the community I managed to install sde and root my device.
I have been lately searching for a tutorial or guide on how to cook a custom firmware, but I couldn't find such info.
Can someone write one for us newbies of Android and archos?
What I'm looking for is how to create the archos. ext4. update file from. aos and how to install busybox root etc..
thanks
Click to expand...
Click to collapse
Hi There,
Like most things on XDA, we've already covered it and the search is very much you're friend , However heres some links which sould help you on your way [HOWTO] Unpack and repack stock firmware, works also for gen8 and [HOW TO] Root, Install Busybox and SuperCharge your G9 These guides are on pages 4-5 of this section you might to work on that "searching" technique
Hi trevd and thanks for your reply.
I did find these links before i posted my request.
The first one provides tools for Gen8 and supposedly compatible with Gen9. But as i read through the thread, it seems to be dealing with a squashfs partition and not ext4 like the one we're using. So it confused me.
The second one shows how to install busybox. But how is it possible to do the same thing directly on the mounted ext4 partition?
Thanks
You can also use my update/modify script as base:
http://forum.xda-developers.com/showthread.php?t=1735790&highlight=script
Quallenauge said:
You can also use my update/modify script as base:
http://forum.xda-developers.com/showthread.php?t=1735790&highlight=script
Click to expand...
Click to collapse
Thank you Quallenauge for your help.
i've tried the script, but it's not working properly at step 4. It seems that it's unable to mount the file to the loop. I'm using ubuntu x64. any idea?
Code:
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Thanks
Quallenauge said:
You can also use my update/modify script as base:
http://forum.xda-developers.com/showthread.php?t=1735790&highlight=script
Click to expand...
Click to collapse
Which version of linux did you use? letama's unpackAOS doesn't work on Lubuntu 12.10 even when I install correct version of libcrypto. So I tried Xubuntu 12.04 and your script works fine. Thank you for the script.
stevemp said:
Which version of linux did you use? letama's unpackAOS doesn't work on Lubuntu 12.10 even when I install correct version of libcrypto. So I tried Xubuntu 12.04 and your script works fine. Thank you for the script.
Click to expand...
Click to collapse
I use ubuntu 12.04 x64. Any idea?
root
adonix said:
I use ubuntu 12.04 x64. Any idea?
Click to expand...
Click to collapse
Unpack ExtractAOS.tar.bz2
cd ExtractAOS
copy firmware_archos_it4.aos to dl directory
I use terminal as root.
Type sudo -i in terminal then your password.
Then ./unpackAOS Do step 1 to 5 options, check archos_update_folder to see if firmware unpacked. Make your mods now, do the rest of steps.
1) clean
2) downloadPackages
3) setupBuildDir
4) createExt4Image
5) unpackAOS
6) copyAOSData
7) addSuperuser addBusyBox
8) finish
Thanks for the reply stevemp.
i'm doing the exact same steps but it fails at 4 while trying to mount the ext4 image.
I tried the same steps in OpenSuse and it seems to be working. I'm not sure if everything is getting extracted, but i'll check that.
Since the created update file is 512MB, is there a way to trim the unused space prior to flashing?
Thanks.
change image size
adonix said:
Thanks for the reply stevemp.
i'm doing the exact same steps but it fails at 4 while trying to mount the ext4 image.
I tried the same steps in OpenSuse and it seems to be working. I'm not sure if everything is getting extracted, but i'll check that.
Since the created update file is 512MB, is there a way to trim the unused space prior to flashing?
Thanks.
Click to expand...
Click to collapse
Just change the size in unpackAOS script.
# Image size in MByte
EXT4_IMAGE_SIZE=512
Hello . every one :laugh:. May i ask support for running linux natively on tab 3 7.0.?
Currently i could run Kali ,Ubuntu and Debian in my tablet,,, but only in chroot method , another is i am also able to install the image file (kali.img) in the 2nd partition of my ext sdcard to give it more space,,,, .
The only method that i couldnt make is to run it natively on this tab,,,, I hope there is solution to this ,,,,
How did you get the chroot method to work? I can't get it to
Sent from my 831C using XDA Free mobile app
reinaldistic said:
How did you get the chroot method to work? I can't get it to
Sent from my 831C using XDA Free mobile app
Click to expand...
Click to collapse
just download the complete linux installer ,allow superuser permission
then go to /data/data/com.zpwebsites.linuxonandroid/files
you will see a bootscript.sh file .Edit it using a text editor you prefered and find this line
"mount -t ext2 /dev/block/loop255 /data/local/mnt"
and edit it as
"mount -t ext4 /dev/block/loop255 /data/local/mnt"
save the file. and boot linux now via complete linux installer.
You must have terminal emulator and vnc (if you want to see the GUI).
:good:
stuff to DO
anvil_10 said:
Hello . every one :laugh:. May i ask support for running linux natively on tab 3 7.0.?
Currently i could run Kali ,Ubuntu and Debian in my tablet,,, but only in chroot method , another is i am also able to install the image file (kali.img) in the 2nd partition of my ext sdcard to give it more space,,,, .
The only method that i couldnt make is to run it natively on this tab,,,, I hope there is solution to this ,,,,
Click to expand...
Click to collapse
anvil,
working on p5210 towards this end.
you need
1 an arm-linux distro set to /boot /root and/or /system and /home on seperate partitions and then an .img of those partitions
to correspond to the limitations of your devices mmcblk setup.
2 rebuild your kernel to work with the above - mountpoints dev etc.
3 put up with android for a while because figuring out the above is going to take a WHILE.
if i figure out anything i will post.
m
an afterthought- most of it's already here in a lesser form i think it's mostly
unhooking from one userspace setup into another.
moonbutt74 said:
anvil,
working on p5210 towards this end.
you need
1 an arm-linux distro set to /boot /root and/or /system and /home on seperate partitions and then an .img of those partitions
to correspond to the limitations of your devices mmcblk setup.
2 rebuild your kernel to work with the above - mountpoints dev etc.
3 put up with android for a while because figuring out the above is going to take a WHILE.
if i figure out anything i will post.
m
an afterthought- most of it's already here in a lesser form i think it's mostly
unhooking from one userspace setup into another.
Click to expand...
Click to collapse
yeah i saw many post on other forum your procedure, but unfortunately i dont have any idea how to do it, like making the custom kernel to boot the linux distro instead of android,
init process and initramfs
anvil,
i was reading on another site that the linux kernel since 2.6 [i think] has a default behaviour of searching
for an init process in alternate locations when it can't find the first one, there's also an option
during configuration that allows you to specify an specific location of/for the ramdisk.
meaning if i understand it correctly, the kernel itself is bound to your boot/kernel mmcblk
by the bootloader BUT you could locate your init/ramdisk "off-world" by setting a different / location in kernel cmdline
you can also specify support for different compression methods for initramfs/initrd but i'm not sure if that actually builds in
or if you need a module [*.ko].
m
kali linux
How to get kali linux on tab 3 7.0?? Plz tell me . Tell what all things needed and how to??
I present to you instructions on how to get Arch Linux working natively on your shield TV dual booted with your Android rom. This is all thanks to the amazing people in this thread for getting Ubuntu on the shield and would not be possible without them.
http://forum.xda-developers.com/shield-tv/general/ubuntu-utopic-nvidia-shield-tv-t3150352
This install will put arch Linux on a micro SD card, and does not modify your shield at all if you so choose. First download these 2 files.
Archlinux Stage 3 install
http://archlinuxarm.org/os/ArchLinuxARM-aarch64-generic-latest.tar.gz
Kernel (Credits to jagger11 from his thread) You only need nvidia_boot.img
https://drive.google.com/folderview...ZSS1VxUVBJZmFqSXNFYUhpN2lHcklhVzZtX0Z5OENxdU0
To intstall
1. Unlock your shield TV
2. Format your SD card to EXT4
3. Mount the SD card
4. As the root user on your linux distro (not sudo) run this command (From the same directory that you downloaded that file to, and replacing mountpoint to where you mounted the SD to)
bsdtar -xpf ArchLinuxARM-aarch64-generic-latest.tar.gz -C mountpoint
5. Unmount the drive, then run the command "sync". When that finishes, pull the SD card from the computer.
6. Put the SD in the shield
7. Reboot to bootloader (adb reboot fastboot) with your preferred method
8. Boot Linux
To boot it once run this
a) fastboot boot nvidia_boot.img
To save to recovery run this (Reboot android to recovery to boot arch after)
b) fastboot flash recovery nvidia_boot.img
Default users and passwords are
root:root
alarm:alarm
For more information, check this page.
http://archlinuxarm.org/platforms/armv8/generic
Tested Working
*Ethernet
*USB
*TTY Terminals
*Framebuffer (Install X11 as usual and xf86-video-fbdev)
Untested
*WIFI (Should work)
*Bluetooth (Probably doesn't work)
Broken
*3D acceleration (Will work on this in the future)
*You tell me
*Sometimes does not boot after a few working boots (I think it's a problem with my SD, or my android install messing with it. Working that out now, but please report if you have this issue only after it boots fine at least once)
My request to you. I am not a kernel dev any more. I once was, but things have unfortunately changed, and I don't have the time or resources to learn it all again. If anyone wants to develop a kernel for this, please do and I'll add it in the OP. Unless something changes, and Ubuntu kernel from the Utopic thread will work fine here)
I'll format this a bit better later, but hopefully this is a good start. I have some good tips and tricks to add if people are interested in this, and was able to watch quite a lot of my videos in vlc even on framebuffer. Please give me some feedback on what you want to see, and ask any questions. I'll be glad to help!
kdb424 said:
I present to you instructions on how to get Arch Linux working natively on your shield TV dual booted with your Android rom. This is all thanks to the amazing people in this thread for getting Ubuntu on the shield and would not be possible without them.
http://forum.xda-developers.com/shield-tv/general/ubuntu-utopic-nvidia-shield-tv-t3150352
This install will put arch Linux on a micro SD card, and does not modify your shield at all if you so choose. First download these 2 files.
Archlinux Stage 3 install
http://archlinuxarm.org/os/ArchLinuxARM-aarch64-generic-latest.tar.gz
Kernel (Credits to jagger11 from his thread) You only need nvidia_boot.img
https://drive.google.com/folderview...ZSS1VxUVBJZmFqSXNFYUhpN2lHcklhVzZtX0Z5OENxdU0
To intstall
1. Unlock your shield TV
2. Format your SD card to EXT4
3. Mount the SD card
4. As the root user on your linux distro (not sudo) run this command (From the same directory that you downloaded that file to, and replacing mountpoint to where you mounted the SD to)
bsdtar -xpf ArchLinuxARM-aarch64-generic-latest.tar.gz -C mountpoint
5. Unmount the drive, then run the command "sync". When that finishes, pull the SD card from the computer.
6. Put the SD in the shield
7. Reboot to bootloader (adb reboot fastboot) with your preferred method
8. Boot Linux
To boot it once run this
a) fastboot boot nvidia_boot.img
To save to recovery run this (Reboot android to recovery to boot arch after)
b) fastboot flash recovery nvidia_boot.img
Default users and passwords are
root:root
alarm:alarm
For more information, check this page.
http://archlinuxarm.org/platforms/armv8/generic
Tested Working
*Ethernet
*USB
*TTY Terminals
*Framebuffer (Install X11 as usual and xf86-video-fbdev)
Untested
*WIFI (Should work)
*Bluetooth (Probably doesn't work)
Broken
*3D acceleration (Will work on this in the future)
*You tell me
*Sometimes does not boot after a few working boots (I think it's a problem with my SD, or my android install messing with it. Working that out now, but please report if you have this issue only after it boots fine at least once)
My request to you. I am not a kernel dev any more. I once was, but things have unfortunately changed, and I don't have the time or resources to learn it all again. If anyone wants to develop a kernel for this, please do and I'll add it in the OP. Unless something changes, and Ubuntu kernel from the Utopic thread will work fine here)
I'll format this a bit better later, but hopefully this is a good start. I have some good tips and tricks to add if people are interested in this, and was able to watch quite a lot of my videos in vlc even on framebuffer. Please give me some feedback on what you want to see, and ask any questions. I'll be glad to help!
Click to expand...
Click to collapse
Thanks for the new thread. You are correct that the "nvidia_boot.img" from jagger11 can boot to archLinux but the kernel I built can't.
I have always been using Ubuntu with desktop enabled by default. How did you install X11 under archLinux?
yahoo2016 said:
Thanks for the new thread. You are correct that the "nvidia_boot.img" from jagger11 can boot to archLinux but the kernel I built can't.
I have always been using Ubuntu with desktop enabled by default. How did you install X11 under archLinux?
Click to expand...
Click to collapse
Following the standard guide on their wiki.
I installed
xorg-server
xorg-server-utils
xorg-init
xf86-video-fb
And then just the standard startx after setting my xinitrc to the usual. In my case I used awesome WM, though you can use any, and exec that in your .xinitrc file
kdb424 said:
Following the standard guide on their wiki.
I installed
xorg-server
xorg-server-utils
xorg-init
xf86-video-fb
And then just the standard startx after setting my xinitrc to the usual. In my case I used awesome WM, though you can use any, and exec that in your .xinitrc file
Click to expand...
Click to collapse
I have to admit I was spoiled by Ubuntu which installs everything by default. I have to read archLinux wiki and try them tomorrow morning.
yahoo2016 said:
I have to admit I was spoiled by Ubuntu which installs everything by default. I have to read archLinux wiki and try them tomorrow morning.
Click to expand...
Click to collapse
Those packages will do you other than desktop manager, but I have to say, I'm pretty minimalist, and arch is by default, so don' feel too bad. I've just been using arch for the last few years, and was using Gentoo before that, which is all even more manual and source built.
https://wiki.archlinux.org/index.php/Xorg
That page will go through it all. Once you know what desktop manager you want (I recommend XFCE if you don't know what, or LXDE which is even lighter), check the pages out on there for them. It covers haw to do absolutely everything. I honestly use arch linux for the wiki. It's by far the best source of linux information on the net I'd be willing to bet.
kdb424 said:
Those packages will do you other than desktop manager, but I have to say, I'm pretty minimalist, and arch is by default, so don' feel too bad. I've just been using arch for the last few years, and was using Gentoo before that, which is all even more manual and source built.
https://wiki.archlinux.org/index.php/Xorg
That page will go through it all. Once you know what desktop manager you want (I recommend XFCE if you don't know what, or LXDE which is even lighter), check the pages out on there for them. It covers haw to do absolutely everything. I honestly use arch linux for the wiki. It's by far the best source of linux information on the net I'd be willing to bet.
Click to expand...
Click to collapse
What display driver should I install?
The wiki starts with
lspci | grep -e VGA -e 3D
But lspci does not work for shield TV.
yahoo2016 said:
What display driver should I install?
The wiki starts with
lspci | grep -e VGA -e 3D
But lspci does not work for shield TV.
Click to expand...
Click to collapse
xf86-video-fbdev works for me. Since we don't have access to the GPU directly, we are using the framebuffer at the moment.
kdb424 said:
xf86-video-fbdev works for me. Since we don't have access to the GPU directly, we are using the framebuffer at the moment.
Click to expand...
Click to collapse
That confused me since I thought xf86 meant x86 but Shield has Arm CPUs.
yahoo2016 said:
That confused me since I thought xf86 meant x86 but Shield has Arm CPUs.
Click to expand...
Click to collapse
Yeah, it's actually got nothing to do with architecture. Not quite sure why they are named as such. Also, xf86-video-fbdev isn't listed there as it's a last resort kinda thing, but it works well on the shield for the moment. Once I figure out why my system stops booting linux from time to time, I'll work on GPU drivers. Hard to know what broke it if I don't fix that first.
kdb424 said:
Yeah, it's actually got nothing to do with architecture. Not quite sure why they are named as such. Also, xf86-video-fbdev isn't listed there as it's a last resort kinda thing, but it works well on the shield for the moment. Once I figure out why my system stops booting linux from time to time, I'll work on GPU drivers. Hard to know what broke it if I don't fix that first.
Click to expand...
Click to collapse
You may want to have a look at this: https://github.com/NVIDIA/tegra-nouveau-rootfs
Arch Linux is the target rootfs and the Jetson TX1 is supported. Now the questions is how to get a mainline kernel running on shield tv. I guess one issue is the device tree which will not be provided by uboot like on normal arm systems. In the kernel configuration you can define that the device tree is appended to the kernel image (e.g. by "cat Image foster.dtb > newImage"). Maybe this is a solution.
Thanks_Meter said:
You may want to have a look at this: https://github.com/NVIDIA/tegra-nouveau-rootfs
Arch Linux is the target rootfs and the Jetson TX1 is supported. Now the questions is how to get a mainline kernel running on shield tv. I guess one issue is the device tree which will not be provided by uboot like on normal arm systems. In the kernel configuration you can define that the device tree is appended to the kernel image (e.g. by "cat Image foster.dtb > newImage"). Maybe this is a solution.
Click to expand...
Click to collapse
Thanks for the info. I'm going to have the next 2 days off work, so I'll definately get to work. I'm going to need assistance in getting a working kernel as I don't have an x86 machine around currently. Crazy, I know, but I don't. I'll see if I can get the drivers installed if someone works on a kernel. If not, I'll contact some of my linux friends and see what they come up with.
kdb424 said:
Thanks for the info. I'm going to have the next 2 days off work, so I'll definately get to work. I'm going to need assistance in getting a working kernel as I don't have an x86 machine around currently. Crazy, I know, but I don't. I'll see if I can get the drivers installed if someone works on a kernel. If not, I'll contact some of my linux friends and see what they come up with.
Click to expand...
Click to collapse
That link mentioned:
"The first prerequisite is that you must use an up-to-date U-Boot as bootloader"
Jetson TK1 and TX1 uses U-boot, Shield TV however uses fastboot not U-boot and the kernel is not Linux but Android.
I'd really like someone can have u-boot ported to Shield TV as 2nd or 3rd stage boot loader.
Damn! I just found out that this CONFIG_ARM_APPENDED_DTB trick only works with zImage but not with Image as needed for abootimg. Currently I don't have an idea how to get a mainline kernel running on the shield tv. I guess uboot makes no sense since we don't have an uart.
Thanks_Meter said:
Damn! I just found out that this CONFIG_ARM_APPENDED_DTB trick only works with zImage but not with Image as needed for abootimg. Currently I don't have an idea how to get a mainline kernel running on the shield tv. I guess uboot makes no sense since we don't have an uart.
Click to expand...
Click to collapse
u-boot could use netconsole:
http://forum.doozan.com/read.php?3,14,14
---------- Post added at 10:33 PM ---------- Previous post was at 10:28 PM ----------
My kernel can boot to command line archLinux now, I updated the procedure:
http://forum.xda-developers.com/showpost.php?p=64330336&postcount=147
I'll try that kernel when get home with the gui running on framebuffer. Should work.
kdb424 said:
I'll try that kernel when get home with the gui running on framebuffer. Should work.
Click to expand...
Click to collapse
I uploaded my latest kernel tested with command line archLinux:
https://drive.google.com/file/d/0Bz5kaPQJx_AgUklNekxGeWFuNW8/view
yahoo2016 said:
I uploaded my latest kernel tested with command line archLinux:
https://drive.google.com/file/d/0Bz5kaPQJx_AgUklNekxGeWFuNW8/view
Click to expand...
Click to collapse
Any chance you can maybe try to patch in the Nouveau kernel driver from here?
With a kernel running that I can get 3D acceleration work started. Till I get that sorted out I can only guess if my changes are working or not.
I'll also be trying to get the closed source binaries running on this. I have decided to pay a decent sum of money for a VPS to get a compile machine. Hopefully we can get this project rolling.
kdb424 said:
Any chance you can maybe try to patch in the Nouveau kernel driver from here?
With a kernel running that I can get 3D acceleration work started. Till I get that sorted out I can only guess if my changes are working or not.
I'll also be trying to get the closed source binaries running on this. I have decided to pay a decent sum of money for a VPS to get a compile machine. Hopefully we can get this project rolling.
Click to expand...
Click to collapse
I did not expect it'd take me so long just to have gui running for archLinux. As I mentioned before this thread started, I'd like to try Cuda 7.0 on ArchLinux. I main goal is to have Cuda working so I can use Gpgpu of Tegra for image processing and other applications.
A script or procedure for post installation to quickly install gui is what I was interested. To install archlinux rootfs without gui was very simple and I did it the first day when I received my Shield TV to troubleshoot Utopic rootfs. I could read the wiki to have gui working for archLinux, but I have to spend my time on other things, e.g., without hope to have u-boot or multirom working for Shield TV, I have to learn Android kernel (I'm in the process of clone Android kernel source tree).
I'll write a script for you once I get home. Thanks for the input. Any requests for a desktop environment or window manager? If not I'll just pick a light one like lxde.
kdb424 said:
I'll write a script for you once I get home. Thanks for the input. Any requests for a desktop environment or window manager? If not I'll just pick a light one like lxde.
Click to expand...
Click to collapse
Any desktop is fine. I'd like to push Cuda 7.0 from my build PC to archLinux like I did for L4T. Network connection and any desktop are what I need. If it works, we can see performance differences between 32 bits and 64 bits
Thanks.