Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement L4T Ubuntu #8

Open
evil2k2 opened this issue Jan 22, 2020 · 5 comments
Open

enhancement L4T Ubuntu #8

evil2k2 opened this issue Jan 22, 2020 · 5 comments

Comments

@evil2k2
Copy link

evil2k2 commented Jan 22, 2020

Is it Possible to add L4T Ubuntu to your scipt ?
https://gbatemp.net/threads/l4t-ubuntu-a-fully-featured-linux-on-your-switch.537301/
https://gitlab.com/switchroot
That would be great.

@raulvasquez
Copy link

Agreed. Especially now that L4T 2.0 is released now.

@Gabri3lZ
Copy link
Owner

I did not look into it yet. It should theoretically be possible though. But I don't tink it will be possible to run Android and L4T Ubuntu on the same SD card.
Do you know how many partitions are needed for L4T Ubuntu?

@evil2k2
Copy link
Author

evil2k2 commented Jan 27, 2020

L4T need one ext4 partition and the fat32 partition from hekate. To boot we must change the boot.scr from L4t
I found this post on gba
https://gbatemp.net/threads/setup-guide-setting-up-android-with-emummc-bigger-fat32-partition.544981/#post-8740835
On post #13 the same user add the boot.scr for l4t ver 2.0 on Partition number 9.
Release 2.0 https://gbatemp.net/threads/l4t-ubuntu-a-fully-featured-linux-on-your-switch.537301/page-106
Post #2103
I think a swap partition from 2gb for l4t additionally where great.
So work's Dolphin better.

@jreichert
Copy link

I can confirm that the above works. I am running sysMMC/emuMMC/lakka/Android/l4t all from the same 512Gb sd card. I used the post referenced above (among other things) to get it set up myself. Honestly getting emunand and Android running on the same SD card is the hard part - adding l4t on top of that was pretty straightforward. You just add one more partition of 16gb, flash it with ONLY the linux image from the l4t package (that's the 2nd partition in the zip), copy all of the files from the 1st partition in the zip to HOS_DATA, copy the new boot.scr to HOS_DATA, and then go through the steps again to create the hybrid MBR (nothing new is needed for l4t since it can be started from GPT - you just need to rebuild the exact same hybrid MBR as you did earlier to dual boot emuMMC/Android). After that you inject Hekate and Linux is available as an option for boot.

Optional (but strongly recommended) is to use the Disks app in Ubuntu to have Linux recover the rest of your free space (if any) to grow your ext4 partition, and then to create a swapfile (see comment below about swapfile vs partition).

You do need the updated boot.scr in order to make this work. The one that ships with l4t expects linux to be on partition 2, but if you use the partition scheme from the gbatemp thread above then you simply need to change boot.scr to point to partition 9 instead of partition 2 (since partition 9 is where linux lives). Note that the downloadable version of boot.scr from that thread is updated and rebuilt with each new l4t release, so that's an extra step of maintenance for your script.

I did create a separate swap partition, but honestly if I had it to do over again I'd simply create a single l4t partition with a 2Gb swapfile instead. Given that it's all being written to the same SD card anyway and we're not using magnetic drives, I don't think a swap partition is providing much tangible improvement over a swap file (and the setup is easier that way).

@evil2k2
Copy link
Author

evil2k2 commented Jan 30, 2020

I found this https://github.com/lulle2007200/SwitchSDSetup/blob/master/README.md
It's a script that write Android pie l4t and emummc on the sd card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants