FORUMS
Remove All Ads from XDA

Build kernel from source and boot to Ubuntu using L4T (Linux for Tegra) rootfs

377 posts
Thanks Meter: 83
 
By yahoo2016, Senior Member on 19th December 2015, 08:47 PM
Post Reply Email Thread
22nd December 2015, 05:54 PM |#21  
Senior Member
Thanks Meter: 389
 
More
Quote:
Originally Posted by yahoo2016

I edited the first post to include your even simpler one command to sync rootfs.

I found "sudo tar -cpf" did not compression rootfs (2GB), I should use "sudo tar -cjpf" to generate compressed rootfs (700 MB).

That is true, can use uncompressed, or bz2, xz, gz compressed. Btw I was thinking, it might even be possible to netboot it, have kernel and initramfs that brings up Ethernet in booting, than boot your shield from the network, possibly even boot several shields from same.
The Following User Says Thank You to crnkoj For This Useful Post: [ View ] Gift crnkoj Ad-Free
 
 
22nd December 2015, 06:48 PM |#22  
OP Senior Member
Thanks Meter: 83
 
More
Quote:
Originally Posted by crnkoj

That is true, can use uncompressed, or bz2, xz, gz compressed. Btw I was thinking, it might even be possible to netboot it, have kernel and initramfs that brings up Ethernet in booting, than boot your shield from the network, possibly even boot several shields from same.

I found rootfs on SD cards could be problematic. The kernel/ramdisk are very stable as long as the "boot.img" was built right, I had many issues with SD cards, e.g., the Kingston U3s haven't worked for me, SD cards flashed with older HP 6910 always worked but the same rootfs flashed with newer HP Z-book failed to work (although "rsync" worked 10 times faster on Z-Book).

Many other people also had SD card issues due to wide range of makers and grades.

I'm tempting to shrink one of the large user partitions ( 8GB?) of internal emmc and put 2GB rootfs there.
23rd December 2015, 06:11 AM |#23  
Junior Member
Thanks Meter: 1
 
More
Is having the rootfs on USB an option? Would sure as heck be faster than SD.
23rd December 2015, 11:19 AM |#24  
OP Senior Member
Thanks Meter: 83
 
More
Quote:
Originally Posted by Helios747

Is having the rootfs on USB an option? Would sure as heck be faster than SD.

I have not tried, but I believe the "Image" would be the save, only "init.c" in "initrs" directory needs to be changed from:
mount("/dev/mmcblk1p1", "/dest", "ext4", 0, NULL);
to, e.g.
mount("/dev/sda1", "/dest", "ext4", 0, NULL);
The device name "/dev/sda1" might change.
USB3 drives could be faster than SD card (I could not have Kingston 32 GB U3 SD cards working).
23rd December 2015, 05:39 PM |#25  
Senior Member
Thanks Meter: 389
 
More
Quote:
Originally Posted by serige

First time trying to build an rootfs image here, I probably did it wrong since the screen went dark right after booting and never go anywhere.
I followed OP's steps to build L4T rootfs. Then under Linux_for_Tegra/rootfs, I did
find ./ | cpio -H newc -o > ../rootfs.img
Then I dumped the image to my sd card:
dd if=../rootfs.img of=/dev/mmcblk0 bs=4194304 oflag=sync

Can anyone point out the correct way of making a L4T image? Many Thanks!

Quote:
Originally Posted by yahoo2016

I should finish the post with ways to flash rootfs. The contents of Linux_for_Tegra/rootfs should be copied to sd card with permissions preserved. The way I do it is.

(1). cd to Linux_for_Tegra/rootfs.
(2). "sudo tar -cpf ../rootfs.tar *
(3). format SD card ("sudo mkfs.ext4 /dev/mmvblk0p1")
(4). Mount SD card "sudo mount /dev/mmcblk0p1 /mnt".
(5). "cd /mnt"
(6). sudo tar -xpf [path to rootfs.tar]

I updated first post for steps of copying rootfs to SD card.

Quote:
Originally Posted by yahoo2016

I have not tried, but I believe the "Image" would be the save, only "init.c" in "initrs" directory needs to be changed from:
mount("/dev/mmcblk1p1", "/dest", "ext4", 0, NULL);
to, e.g.
mount("/dev/sda1", "/dest", "ext4", 0, NULL);
The device name "/dev/sda1" might change.
USB3 drives could be faster than SD card (I could not have Kingston 32 GB U3 SD cards working).

I might have some time to try it out...
On a second note,
I just received this email from nvidia:
Code:
CodeWorks for ANDROID
NVIDIA CodeWorks for Android 1R4 with full tools, SDK, libraries, samples support for the latest Android M (Marshmallow) is now available for download.

CodeWorks for Android is a professional grade solution providing a comprehensive set of GPU and CPU tools with debugging, profiling and system trace capabilities and accompanying SDKs and libraries for Android development - not only on Tegra powered devices.

Install all software tools required to develop for Android with CodeWorks for Android to reduce the complex process of configuring an Android development system

Release Highlights

Updated suite of Android NDK, SDK, Build/Platform Tools to latest available version. (Refer to Developer Zone for more details.) 
Nsight Tegra 3.3, Visual Studio Edition
Support for Android-M
Support for API 23
Improved SIGSEGV signal handling
Support watch window comma operator
Various performance improvements and bug fixes.
Tegra Graphics Debugger 2.1
Support for Android-M
Various performance improvements and bug fixes.
Tegra System Profiler 2.5
Support for Android-M
Support for automatic process launch.
Timeline tooltips update to show the thread blocked state call-stack.
NVTX (NVIDIA Tools Extensions) are now supported on 64-bit processes.
Various performance and backtrace quality improvements, bug fixes, and performance improvements.
PerfKit 4.5 support for Android-M.
IncrediBuild 7.1 for Visual Studio with full Microsoft Visual Studio 2015 integration.
NVIDIA GameWorks OpenGL Samples 2.11 a with Android-M support.
CUDA 7.0 on NVIDIA SHIELD Android TV
Available on Ubuntu Linux x64 host with Android cross compile support for select devices only. See documentation for details.
CUDA 6.5 on NVIDIA Tegra K1 devices
Available on Ubuntu Linux x64 host with Android cross compile support for select devices only. See documentation for details.
The included tools, APIs and SDKs provide developers support to build, debug, analyze and profile for Java, native C/C++, CUDA 6.5/7.0, OpenGL ES 2.0, OpenGL ES 3.0, OpenGL ES 3.1, OpenGL ES 3.1 Android Extension Pack, and OpenGL 4.x on ARM based SOCs.

A complete list of features can be found at CodeWorks for Android and are available for download under the NVIDIA GameWorks Download Center.

Download CodeWorks for Android 1R4 now!

To download CodeWorks for Android, you must be a member of the NVIDIA GameWorks Registered Developer Program and signed into your account.  To join, simply create a new account (it's free and easy) and then view the available CodeWorks for Android downloads here.

Enjoy!

The NVIDIA Developer Tools Team

 

 

Manage My Preferences | Unsubscribe
© 2015 NVIDIA Corporation. All rights reserved.
NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050.
Cuda 7.0 with android cross compile support. Apparently it supports cuda on Android??? On the shield tv? What the he'll? Is there a new Android m release for the shield TV?
Btw my test finished. It appears the shield TV is 5 times slower at cuda dynamics compared to an i7 2600k and a 960 gtx. Which would actually fit from the shader amounts and the gpu speed.
23rd December 2015, 05:49 PM |#26  
OP Senior Member
Thanks Meter: 83
 
More
Quote:
Originally Posted by crnkoj

I might have some time to try it out...
On a second note,
I just received this email from nvidia:

Code:
CodeWorks for ANDROID
NVIDIA CodeWorks for Android 1R4 with full tools, SDK, libraries, samples support for the latest Android M (Marshmallow) is now available for download.

CodeWorks for Android is a professional grade solution providing a comprehensive set of GPU and CPU tools with debugging, profiling and system trace capabilities and accompanying SDKs and libraries for Android development - not only on Tegra powered devices.

Install all software tools required to develop for Android with CodeWorks for Android to reduce the complex process of configuring an Android development system

Release Highlights

Updated suite of Android NDK, SDK, Build/Platform Tools to latest available version. (Refer to Developer Zone for more details.) 
Nsight Tegra 3.3, Visual Studio Edition
Support for Android-M
Support for API 23
Improved SIGSEGV signal handling
Support watch window comma operator
Various performance improvements and bug fixes.
Tegra Graphics Debugger 2.1
Support for Android-M
Various performance improvements and bug fixes.
Tegra System Profiler 2.5
Support for Android-M
Support for automatic process launch.
Timeline tooltips update to show the thread blocked state call-stack.
NVTX (NVIDIA Tools Extensions) are now supported on 64-bit processes.
Various performance and backtrace quality improvements, bug fixes, and performance improvements.
PerfKit 4.5 support for Android-M.
IncrediBuild 7.1 for Visual Studio with full Microsoft Visual Studio 2015 integration.
NVIDIA GameWorks OpenGL Samples 2.11 a with Android-M support.
CUDA 7.0 on NVIDIA SHIELD Android TV
Available on Ubuntu Linux x64 host with Android cross compile support for select devices only. See documentation for details.
CUDA 6.5 on NVIDIA Tegra K1 devices
Available on Ubuntu Linux x64 host with Android cross compile support for select devices only. See documentation for details.
The included tools, APIs and SDKs provide developers support to build, debug, analyze and profile for Java, native C/C++, CUDA 6.5/7.0, OpenGL ES 2.0, OpenGL ES 3.0, OpenGL ES 3.1, OpenGL ES 3.1 Android Extension Pack, and OpenGL 4.x on ARM based SOCs.

A complete list of features can be found at CodeWorks for Android and are available for download under the NVIDIA GameWorks Download Center.

Download CodeWorks for Android 1R4 now!

To download CodeWorks for Android, you must be a member of the NVIDIA GameWorks Registered Developer Program and signed into your account.  To join, simply create a new account (it's free and easy) and then view the available CodeWorks for Android downloads here.

Enjoy!

The NVIDIA Developer Tools Team

 

 

Manage My Preferences | Unsubscribe
© 2015 NVIDIA Corporation. All rights reserved.
NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050.
Cuda 7.0 with android cross compile support. Apparently it supports cuda on Android??? On the shield tv? What the he'll? Is there a new Android m release for the shield TV?
Btw my test finished. It appears the shield TV is 5 times slower at cuda dynamics compared to an i7 2600k and a 960 gtx. Which would actually fit from the shader amounts and the gpu speed.

I installed Cuda 7.0 for Android on my Shield TV a week ago but did not have a chance to test it. Linux development on Shield TV is my main objective.

My Shield TV was bricked yesterday right after I installed Nivdia official rooted ROM 2.1 (I had some issues with 1.3). I'm still waiting for RMA.

BTW, I tried to put L4T rootfs on internal emmc "userdata" partition (/dev/mmcblk0p29) and changed "init.c" to load L4T rootfs from "/dev/mmcblk0p29" and it worked, but I could not create 1 more partition for L4T rootfs because the maximum number of primary partitions is 29. I don't understand why Shield Android TV created 29 partitions with only less than 10 meaningful.

Android won't start when "userdata" is overwritten.
23rd December 2015, 06:14 PM |#27  
Junior Member
Thanks Meter: 1
 
More
Quote:
Originally Posted by yahoo2016

My Shield TV was bricked yesterday right after I installed Nivdia official rooted ROM 2.1 (I had some issues with 1.3). I'm still waiting for RMA.

I had the EXACT same thing happen rooting that version.

They RMA'd mine without issue. I just got it from FedEx today.

I think I'll just root my shield tv the old fashioned way with TWRP. I don't know what they did with their image that caused that to happen.
25th December 2015, 08:39 AM |#28  
Senior Member
Thanks Meter: 389
 
More
Quote:
Originally Posted by yahoo2016

I installed Cuda 7.0 for Android on my Shield TV a week ago but did not have a chance to test it. Linux development on Shield TV is my main objective.

My Shield TV was bricked yesterday right after I installed Nivdia official rooted ROM 2.1 (I had some issues with 1.3). I'm still waiting for RMA.

BTW, I tried to put L4T rootfs on internal emmc "userdata" partition (/dev/mmcblk0p29) and changed "init.c" to load L4T rootfs from "/dev/mmcblk0p29" and it worked, but I could not create 1 more partition for L4T rootfs because the maximum number of primary partitions is 29. I don't understand why Shield Android TV created 29 partitions with only less than 10 meaningful.

Android won't start when "userdata" is overwritten.

Quote:
Originally Posted by Helios747

I had the EXACT same thing happen rooting that version.

They RMA'd mine without issue. I just got it from FedEx today.

I think I'll just root my shield tv the old fashioned way with TWRP. I don't know what they did with their image that caused that to happen.

weird, i did the same with the first one and it all worked fine. BTW where did you RMA it to (where you bought or nvidia directly)?
about creating the boot.img, mind writing the process for that ?
25th December 2015, 11:38 AM |#29  
OP Senior Member
Thanks Meter: 83
 
More
Quote:
Originally Posted by crnkoj

weird, i did the same with the first one and it all worked fine. BTW where did you RMA it to (where you bought or nvidia directly)?
about creating the boot.img, mind writing the process for that ?

Many members of this forum and other forums have reported the same issue for Shield TV:
https://forums.geforce.com/default/t...sues/?offset=5
http://forum.xda-developers.com/show...&postcount=178
http://forum.xda-developers.com/show...5&postcount=26
http://forum.xda-developers.com/show...5&postcount=27
https://forums.geforce.com/default/t...-brick-device/
https://www.reddit.com/r/ShieldAndro...k_pro_devices/
and more for Shield Tablet:
http://forum.xda-developers.com/shie...black-t3074446
http://www.ez-pg.com/q-shield-tablet...ootloader.html
https://devtalk.nvidia.com/default/t...blet-bricked-/

My shield TV was bought by company for research, I'm not in hurry to have it repaired during holidays. It was not purchased from Nvidia, I though I could get technical support from Nvidia and bring attention to them for the issue. I did receive RMA from Nvidia and should get replacement in a week.

Do you mean generating "boot.img" from "Image"? From the first post, you can download my "initrd", make changed to "init.c" and run "make".
The Following User Says Thank You to yahoo2016 For This Useful Post: [ View ] Gift yahoo2016 Ad-Free
25th December 2015, 11:40 AM |#30  
Senior Member
Thanks Meter: 389
 
More
Quote:
Originally Posted by yahoo2016

At least 4 members of this forum have reported the same issue. My shield TV was bought by company for research, I'm not in hurry to have it repaired during holidays. It was not purchased from Nvidia, I though I could get technical support from Nvidia and bring attention to them for the issue, but they are not helpful and have not issued RMA. If I do not get RMA from Nvidia after the holidays, I'll ask our buyer to handle RMA and return the Shield TV. If it was for personal use, I'd buy from local store and get replacement in the same day.

Do you mean generating "boot.img" from "Image"? From the first post, you can download my "initrd", make changed to "init.c" and run "make".

I see. Is it not necessary to use this abootimg tool/program to package the initrd and the zimage together?
25th December 2015, 11:42 AM |#31  
OP Senior Member
Thanks Meter: 83
 
More
Quote:
Originally Posted by crnkoj

I see. Is it not necessary to use this abootimg tool/program to package the initrd and the zimage together?

"abootimg" is in the last line of "Makefile".
The Following User Says Thank You to yahoo2016 For This Useful Post: [ View ] Gift yahoo2016 Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes