FORUMS
Remove All Ads from XDA

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

389 posts
Thanks Meter: 84
 
By yahoo2016, Senior Member on 19th December 2015, 08:47 PM
Post Reply Email Thread
20th December 2015, 06:33 PM |#11  
Senior Member
Thanks Meter: 395
 
More
Quote:
Originally Posted by yahoo2016

I like my Tegra K1 based Chromebook CB5, it's truly double boot (Ctl U for external Ubuntu and Ctl D for stock ChromeOs). I'll not even consider an overpriced Pixel C which does not have SD slot or USB 3 port or HDMI port. Shield TV is much better than Pixel C for hacking. I'll look into multiRom for shield, I got impression it failed to build for arm64.

uhms, i meant, that now that the pixel c is out, more people will develop for it and we can use their work/cooperate
 
 
20th December 2015, 06:43 PM |#12  
OP Senior Member
Thanks Meter: 84
 
More
Quote:
Originally Posted by crnkoj

uhms, i meant, that now that the pixel c is out, more people will develop for it and we can use their work/cooperate

I also keep tracking of Jetson TX1 board, people are trying to install Android for TX1s (they did for TK1). I'm trying to understand how boot loaders were installed to new Tegra devices. I flashed boot loader to my Jetson Tk1 using nvidia flash script many times.
20th December 2015, 06:49 PM |#13  
Senior Member
Thanks Meter: 395
 
More
Quote:
Originally Posted by yahoo2016

I also keep tracking of Jetson TX1 board, people are trying to install Android for TX1s (they did for TK1). I'm trying to understand how boot loaders were installed to new Tegra devices. I flashed boot loader to my Jetson Tk1 using nvidia flash script many times.

yeah cuz TK1 is a developer board and its open, the shield is a consumer devie and if you wish to use nvflash you need the SBK key - securebootkey, which nvidia wont give out, thats a given
The Following User Says Thank You to crnkoj For This Useful Post: [ View ] Gift crnkoj Ad-Free
20th December 2015, 09:23 PM |#14  
OP Senior Member
Thanks Meter: 84
 
More
Quote:
Originally Posted by crnkoj

yeah cuz TK1 is a developer board and its open, the shield is a consumer devie and if you wish to use nvflash you need the SBK key - securebootkey, which nvidia wont give out, thats a given

That's what I read from other thread that Nvidia broke their boot loader through OTA update, has not fixed the issue and won't give out the SBK - securebootkey.

I have to read more about SBK. I found the following from Nvidia are interesting:

http://http.download.nvidia.com/tegr...boot-flow.html

http://http.download.nvidia.com/tegr...-overview.html
The Following User Says Thank You to yahoo2016 For This Useful Post: [ View ] Gift yahoo2016 Ad-Free
20th December 2015, 10:56 PM |#15  
Junior Member
Thanks Meter: 0
 
More
Quote:

The kernel built should be able to boot L4T or archLinux rootfs. The following are steps to download and configure L4T rootfs for Shield TV:
************************************************** ********************************

2. Untar the files and assemble the rootfs:

sudo tar xpf Tegra210_Linux_R23.1.1_armhf.tbz2
cd Linux_for_Tegra/rootfs/
sudo tar xpf ../../Tegra_Linux_Sample-Root-Filesystem_R23.1.1_armhf.tbz2
cd ../
sudo ./apply_binaries.sh
************************************************** *************

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!
20th December 2015, 11:16 PM |#16  
OP Senior Member
Thanks Meter: 84
 
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!

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.
The Following User Says Thank You to yahoo2016 For This Useful Post: [ View ] Gift yahoo2016 Ad-Free
21st December 2015, 06:03 AM |#17  
Senior Member
Thanks Meter: 395
 
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 reserved. 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.

Actually it's faster with rsync
Let's say sdcard is mounted to /mnt
1. cd to /mnt
2. rsync -av /path/to/rootfs/* .
And done
The Following User Says Thank You to crnkoj For This Useful Post: [ View ] Gift crnkoj Ad-Free
21st December 2015, 11:44 AM |#18  
OP Senior Member
Thanks Meter: 84
 
More
Quote:
Originally Posted by crnkoj

Actually it's faster with rsync
Let's say sdcard is mounted to /mnt
1. cd to /mnt
2. rsync -av /path/to/rootfs/* .
And done

Thanks for the easier way to sync rootfs between development PC and target SD card. I did the other way to keep a copy of "rootfs.tar "on network drive so I can access it from other locations.
I'll include your way to the first post.
The Following User Says Thank You to yahoo2016 For This Useful Post: [ View ] Gift yahoo2016 Ad-Free
22nd December 2015, 06:30 AM |#19  
Senior Member
Thanks Meter: 395
 
More
Quote:
Originally Posted by yahoo2016

Thanks for the easier way to sync rootfs between development PC and target SD card. I did the other way to keep a copy of "rootfs.tar "on network drive so I can access it from other locations.
I'll include your way to the first post.

You could do the same on a network drive, just unpack the rootfs into a directory, than
rsync -av 192.168.1.2:/rootfs/* /desiredmountpoint
Or rsync -av /hdd_mountpoint/rootfs/* /sd_mountpoint
clearly it is a bigger mess on the hdd as its not one archive but a whole rootfs, though in its own directory, but you can edit the rootfs directly on the hdd.
The Following User Says Thank You to crnkoj For This Useful Post: [ View ] Gift crnkoj Ad-Free
22nd December 2015, 01:07 PM |#20  
OP Senior Member
Thanks Meter: 84
 
More
Quote:
Originally Posted by crnkoj

You could do the same on a network drive, just unpack the rootfs into a directory, than
rsync -av 192.168.1.2:/rootfs/* /desiredmountpoint
Or rsync -av /hdd_mountpoint/rootfs/* /sd_mountpoint
clearly it is a bigger mess on the hdd as its not one archive but a whole rootfs, though in its own directory, but you can edit the rootfs directly on the hdd.

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).
The Following User Says Thank You to yahoo2016 For This Useful Post: [ View ] Gift yahoo2016 Ad-Free
22nd December 2015, 05:54 PM |#21  
Senior Member
Thanks Meter: 395
 
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
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