L4T Ubuntu - A fully featured linux on your switch

switchroot.png

L4T Ubuntu
Intro
L4T Ubuntu is a version of Linux based on nvidia's linux for tegra project. It uses a different kernel compared to previous releases which allows it to use features not yet in mainline. Such as audio, docking support and vulkan.

Join our discord: https://discord.gg/53mtKYt

We have a wiki !
To facilitate our work we will only update our wiki from now on in order to avoid multiple outdated references, please refer to the following link instead of this page

https://wiki.switchroot.org/en/Linux/Ubuntu-Install-Guide

Credits

Bylaws,
Langerhans,
Ave,
Natinusala,
CTCaer(most of the hard stuff),
Gavin_Darkglider,
DanielOgorchock(Joycon drivers/joycond),
stary2001 (reboot2payload),
NVIDIA,
Azkali
Everyone else in switchroot - more info on that in the future.
 
Last edited by azkali,

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
Probably arch or something with less overhead, Ubuntu is full of bloat

Even if I wanted to replace it with android, that isnt possible, as android uses framebuffer graphics, not X11, where the Nvidia drivers are loaded. I am working on building gentoo, from nothing, so everything is optimized specifically for the tegra210. This should also give me a decent video player with hardware acceleration(kodi). If I can find 32bit video card libraries, I can get netflix to work there as well, as I have had working netflix in kodi 18 on the switch for 8 months now, using a 32bit gentoo build. Unfortunatly, I dont think that will be possible using l4t, as I dont think nvidia has released modern 32bit xorg drivers. Mesa will compile the tegra drivers in 32bit, but those dont work with l4t. That being said, if I can get everything to work correctly, I will release my build. I also have some other fun stuff, such as bashbunny patches for the RNDIS and ECM ethernet gadgets, that spoof speed to give highest metric. As a computer security person, I cant think of a better platform for social engineering, as most people will trust a nintendo. ;) That being said, I have reimplemented *most* of the bashbunny framework, with a custom Attackmode script that uses libcomposite gadgets, instead of prebuilt composite gadgets, which will allow more configuration. I also have a working MTP responder, which makes copying music, roms, movies, etc to the sd card as simple as copying them to an android phone. So, when all is said and done, this build should be interesting. That being said, I take no responsibility for anything people may do with said scripts, and patches. lol.
 
Last edited by Gavin_Darkglider,

dotmick

Member
Newcomer
Joined
Oct 7, 2018
Messages
23
Trophies
0
Age
40
XP
138
Country
United Kingdom
Well, if you wanted to repair that switch, you know where to look, assuming the issue wasnt also a nand issue. As for the USB stuff, that seems weird, as I have used l4t-ubuntu as a device, as it is pre setup as a device. You just cant plug it in to the dock/power supply, after it switches modes, it doesnt switch back correctly. This is easily fixed with a new kernel, using modules for gadgets, and xudc, as I tested this in my gentoo build as well. Not sure what the problem is there, but that seemed to fix it there.... Then again, that is using the switchroot 5.0 kernel, and I havnt tested a modified config with the l4t kernel yet.


Power delivery doesnt charge the batteries, that is handled by the charger circut, which linux defaults the charge rate to 500ma. You can up this to 2000ma by typing this into a root terminal:
echo 2000000 > /sys/class/power_supply/bq24190-charger/input_current_limit

you might even be able to do: echo 2500000 > /sys/class/power_supply/bq24190-charger/input_current_limit


binfmt_misc is a kernel feature that isnt generally used unless needed, so the devs didnt include it in their kernel build. It is fairly simple to add, but you will need to roll your own kernel, using the sources on gitlab. I wrote a nice script for getting/preparing the source, but you need to do the rest. Google is your friend, and gentoo has a nice guide on cross development that explains how to configure the kernel with this feature.

Thanks @Gavin_Darkglider

So I've followed your instructions and this is what I've got:

dotmick@dotmick-VirtualBox:~/kernel$ ./l4t_kernel_prep.sh aarch64-linux-gnu-

[...]

Preparing Source and Creating Defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
scripts/kconfig/Makefile:37: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:562: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
SYSTBL arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h
SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_x32.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.
***
*** Can't find default configuration "arch/x86/configs/t210_switch_defconfig"!
***
scripts/kconfig/Makefile:113: recipe for target 't210_switch_defconfig' failed
make[1]: *** [t210_switch_defconfig] Error 1
Makefile:562: recipe for target 't210_switch_defconfig' failed
make: *** [t210_switch_defconfig] Error 2
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
scripts/kconfig/Makefile:37: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:562: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
scripts/kconfig/Makefile:37: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:562: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'modules_prepare'. Stop.
Done
Finished

dotmick@dotmick-VirtualBox:~/kernel$ cd kernel/kernel-4.9/
dotmick@dotmick-VirtualBox:~/kernel/kernel/kernel-4.9$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make menuconfig
HOSTCC scripts/kconfig/mconf.o
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTLD scripts/kconfig/mconf
scripts/kconfig/mconf Kconfig
#
# using defaults found in /boot/config-4.18.0-20-generic
#
/boot/config-4.18.0-20-generic:1972:warning: symbol value 'm' invalid for REGMAP_SPMI
/boot/config-4.18.0-20-generic:4286:warning: symbol value 'm' invalid for GPIO_MB86S7X
/boot/config-4.18.0-20-generic:5334:warning: symbol value 'm' invalid for RADIO_SI470X
/boot/config-4.18.0-20-generic:7281:warning: symbol value 'm' invalid for DMA_VIRTUAL_CHANNELS
/boot/config-4.18.0-20-generic:9541:warning: symbol value 'm' invalid for KVM


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

dotmick@dotmick-VirtualBox:~/kernel/kernel/kernel-4.9$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make prepare
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
UPD include/config/kernel.release
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/clkdev.h
WRAP arch/arm64/include/generated/asm/cputime.h
WRAP arch/arm64/include/generated/asm/current.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/dma-contiguous.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/errno.h
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/ioctl.h
WRAP arch/arm64/include/generated/asm/ioctls.h
WRAP arch/arm64/include/generated/asm/ipcbuf.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
WRAP arch/arm64/include/generated/asm/kmap_types.h
WRAP arch/arm64/include/generated/asm/kvm_para.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
WRAP arch/arm64/include/generated/asm/mm-arch-hooks.h
WRAP arch/arm64/include/generated/asm/mman.h
WRAP arch/arm64/include/generated/asm/msgbuf.h
WRAP arch/arm64/include/generated/asm/msi.h
WRAP arch/arm64/include/generated/asm/mutex.h
WRAP arch/arm64/include/generated/asm/poll.h
WRAP arch/arm64/include/generated/asm/preempt.h
WRAP arch/arm64/include/generated/asm/resource.h
WRAP arch/arm64/include/generated/asm/rwsem.h
WRAP arch/arm64/include/generated/asm/segment.h
WRAP arch/arm64/include/generated/asm/sembuf.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/shmbuf.h
WRAP arch/arm64/include/generated/asm/simd.h
WRAP arch/arm64/include/generated/asm/sizes.h
WRAP arch/arm64/include/generated/asm/socket.h
WRAP arch/arm64/include/generated/asm/sockios.h
WRAP arch/arm64/include/generated/asm/swab.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/termbits.h
WRAP arch/arm64/include/generated/asm/termios.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/types.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/vga.h
WRAP arch/arm64/include/generated/asm/xor.h
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
HOSTCC scripts/basic/bin2c
CHK include/generated/timeconst.h
UPD include/generated/timeconst.h
CC kernel/bounds.s
CHK include/generated/bounds.h
UPD include/generated/bounds.h
GEN scripts/gdb/linux/constants.py
CC arch/arm64/kernel/asm-offsets.s
CHK include/generated/asm-offsets.h
UPD include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
LDS arch/arm64/kernel/vdso/vdso.lds
VDSOA arch/arm64/kernel/vdso/gettimeofday.o
VDSOA arch/arm64/kernel/vdso/note.o
VDSOA arch/arm64/kernel/vdso/sigreturn.o
VDSOL arch/arm64/kernel/vdso/vdso.so.dbg
VDSOSYM include/generated/vdso-offsets.h
dotmick@dotmick-VirtualBox:~/kernel/kernel/kernel-4.9$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make modules_prepare
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
SHIPPED scripts/dtc/dtc-lexer.lex.c
SHIPPED scripts/dtc/dtc-parser.tab.h
HOSTCC scripts/dtc/dtc-lexer.lex.o
SHIPPED scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/modpost.o
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
HOSTCC scripts/recordmcount
HOSTCC scripts/sortextable
HOSTCC scripts/asn1_compiler
HOSTCC scripts/sign-file
HOSTCC scripts/extract-cert
HOSTCC scripts/insert-sys-cert
dotmick@dotmick-VirtualBox:~/kernel/kernel/kernel-4.9$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j5 tegra-dtstree="../hardware/nvidia/"
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
cp -u arch/arm64/boot/dts/
cp: missing destination file operand after 'arch/arm64/boot/dts/'
Try 'cp --help' for more information.
arch/arm64/boot/dts/Makefile:129: recipe for target 'dtbs' failed
make[1]: *** [dtbs] Error 1
arch/arm64/Makefile:124: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2
make: *** Waiting for unfinished jobs....


Any idea about why it's not working?
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
Thanks @Gavin_Darkglider

So I've followed your instructions and this is what I've got:

dotmick@dotmick-VirtualBox:~/kernel$ ./l4t_kernel_prep.sh aarch64-linux-gnu-

[...]

Preparing Source and Creating Defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
scripts/kconfig/Makefile:37: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:562: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
SYSTBL arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h
SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_x32.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.
***
*** Can't find default configuration "arch/x86/configs/t210_switch_defconfig"!
***
scripts/kconfig/Makefile:113: recipe for target 't210_switch_defconfig' failed
make[1]: *** [t210_switch_defconfig] Error 1
Makefile:562: recipe for target 't210_switch_defconfig' failed
make: *** [t210_switch_defconfig] Error 2
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
scripts/kconfig/Makefile:37: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:562: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.
scripts/kconfig/conf --silentoldconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
scripts/kconfig/Makefile:37: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
Makefile:562: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'modules_prepare'. Stop.
Done
Finished

dotmick@dotmick-VirtualBox:~/kernel$ cd kernel/kernel-4.9/
dotmick@dotmick-VirtualBox:~/kernel/kernel/kernel-4.9$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make menuconfig
HOSTCC scripts/kconfig/mconf.o
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTLD scripts/kconfig/mconf
scripts/kconfig/mconf Kconfig
#
# using defaults found in /boot/config-4.18.0-20-generic
#
/boot/config-4.18.0-20-generic:1972:warning: symbol value 'm' invalid for REGMAP_SPMI
/boot/config-4.18.0-20-generic:4286:warning: symbol value 'm' invalid for GPIO_MB86S7X
/boot/config-4.18.0-20-generic:5334:warning: symbol value 'm' invalid for RADIO_SI470X
/boot/config-4.18.0-20-generic:7281:warning: symbol value 'm' invalid for DMA_VIRTUAL_CHANNELS
/boot/config-4.18.0-20-generic:9541:warning: symbol value 'm' invalid for KVM


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

dotmick@dotmick-VirtualBox:~/kernel/kernel/kernel-4.9$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make prepare
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
UPD include/config/kernel.release
WRAP arch/arm64/include/generated/asm/bugs.h
WRAP arch/arm64/include/generated/asm/clkdev.h
WRAP arch/arm64/include/generated/asm/cputime.h
WRAP arch/arm64/include/generated/asm/current.h
WRAP arch/arm64/include/generated/asm/delay.h
WRAP arch/arm64/include/generated/asm/div64.h
WRAP arch/arm64/include/generated/asm/dma.h
WRAP arch/arm64/include/generated/asm/dma-contiguous.h
WRAP arch/arm64/include/generated/asm/early_ioremap.h
WRAP arch/arm64/include/generated/asm/emergency-restart.h
WRAP arch/arm64/include/generated/asm/errno.h
WRAP arch/arm64/include/generated/asm/hw_irq.h
WRAP arch/arm64/include/generated/asm/ioctl.h
WRAP arch/arm64/include/generated/asm/ioctls.h
WRAP arch/arm64/include/generated/asm/ipcbuf.h
WRAP arch/arm64/include/generated/asm/irq_regs.h
WRAP arch/arm64/include/generated/asm/kdebug.h
WRAP arch/arm64/include/generated/asm/kmap_types.h
WRAP arch/arm64/include/generated/asm/kvm_para.h
WRAP arch/arm64/include/generated/asm/local.h
WRAP arch/arm64/include/generated/asm/local64.h
WRAP arch/arm64/include/generated/asm/mcs_spinlock.h
WRAP arch/arm64/include/generated/asm/mm-arch-hooks.h
WRAP arch/arm64/include/generated/asm/mman.h
WRAP arch/arm64/include/generated/asm/msgbuf.h
WRAP arch/arm64/include/generated/asm/msi.h
WRAP arch/arm64/include/generated/asm/mutex.h
WRAP arch/arm64/include/generated/asm/poll.h
WRAP arch/arm64/include/generated/asm/preempt.h
WRAP arch/arm64/include/generated/asm/resource.h
WRAP arch/arm64/include/generated/asm/rwsem.h
WRAP arch/arm64/include/generated/asm/segment.h
WRAP arch/arm64/include/generated/asm/sembuf.h
WRAP arch/arm64/include/generated/asm/serial.h
WRAP arch/arm64/include/generated/asm/shmbuf.h
WRAP arch/arm64/include/generated/asm/simd.h
WRAP arch/arm64/include/generated/asm/sizes.h
WRAP arch/arm64/include/generated/asm/socket.h
WRAP arch/arm64/include/generated/asm/sockios.h
WRAP arch/arm64/include/generated/asm/swab.h
WRAP arch/arm64/include/generated/asm/switch_to.h
WRAP arch/arm64/include/generated/asm/termbits.h
WRAP arch/arm64/include/generated/asm/termios.h
WRAP arch/arm64/include/generated/asm/trace_clock.h
WRAP arch/arm64/include/generated/asm/types.h
WRAP arch/arm64/include/generated/asm/unaligned.h
WRAP arch/arm64/include/generated/asm/user.h
WRAP arch/arm64/include/generated/asm/vga.h
WRAP arch/arm64/include/generated/asm/xor.h
WRAP arch/arm64/include/generated/uapi/asm/kvm_para.h
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
HOSTCC scripts/basic/bin2c
CHK include/generated/timeconst.h
UPD include/generated/timeconst.h
CC kernel/bounds.s
CHK include/generated/bounds.h
UPD include/generated/bounds.h
GEN scripts/gdb/linux/constants.py
CC arch/arm64/kernel/asm-offsets.s
CHK include/generated/asm-offsets.h
UPD include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
LDS arch/arm64/kernel/vdso/vdso.lds
VDSOA arch/arm64/kernel/vdso/gettimeofday.o
VDSOA arch/arm64/kernel/vdso/note.o
VDSOA arch/arm64/kernel/vdso/sigreturn.o
VDSOL arch/arm64/kernel/vdso/vdso.so.dbg
VDSOSYM include/generated/vdso-offsets.h
dotmick@dotmick-VirtualBox:~/kernel/kernel/kernel-4.9$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make modules_prepare
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
SHIPPED scripts/dtc/dtc-lexer.lex.c
SHIPPED scripts/dtc/dtc-parser.tab.h
HOSTCC scripts/dtc/dtc-lexer.lex.o
SHIPPED scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
CC scripts/mod/empty.o
HOSTCC scripts/mod/mk_elfconfig
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/modpost.o
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/kallsyms
HOSTCC scripts/conmakehash
HOSTCC scripts/recordmcount
HOSTCC scripts/sortextable
HOSTCC scripts/asn1_compiler
HOSTCC scripts/sign-file
HOSTCC scripts/extract-cert
HOSTCC scripts/insert-sys-cert
dotmick@dotmick-VirtualBox:~/kernel/kernel/kernel-4.9$ ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j5 tegra-dtstree="../hardware/nvidia/"
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
cp -u arch/arm64/boot/dts/
cp: missing destination file operand after 'arch/arm64/boot/dts/'
Try 'cp --help' for more information.
arch/arm64/boot/dts/Makefile:129: recipe for target 'dtbs' failed
make[1]: *** [dtbs] Error 1
arch/arm64/Makefile:124: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2
make: *** Waiting for unfinished jobs....


Any idea about why it's not working?

You are using the version of the script I created for people who wanted to build it on their l4t install, so it is not setting up the ARCH, or CROSS_COMPILE options properly. use this version: https://gitlab.com/switchroot/switc...31b56145d48f7f354b75fb6a4/l4t_kernel_prep.txt

I removed the cross compile bits from the script I made to run on the switch, so the you have no defconfig, as that is specific to arm64 builds only.
 

ZachyCatGames

Well-Known Member
Member
Joined
Jun 19, 2018
Messages
3,398
Trophies
1
Location
Hell
XP
4,209
Country
United States
You are using the version of the script I created for people who wanted to build it on their l4t install, so it is not setting up the ARCH, or CROSS_COMPILE options properly. use this version: https://gitlab.com/switchroot/switc...31b56145d48f7f354b75fb6a4/l4t_kernel_prep.txt

I removed the cross compile bits from the script I made to run on the switch, so the you have no defconfig, as that is specific to arm64 builds only.
When I build L4T using either of your scripts, it builds successfully, but doesn’t boot (black screen with backlight, then sometimes it reboots to RCM)
 
Last edited by ZachyCatGames,

Deathscreton

Well-Known Member
Member
Joined
Oct 1, 2009
Messages
826
Trophies
0
XP
1,092
Country
United States
I'm having issues enabling bridge-utils support in the kernel. Does anyone have any tips on how to do this? I need to be able to bridge a wifi adapter to a virtual tap device.
 

dotmick

Member
Newcomer
Joined
Oct 7, 2018
Messages
23
Trophies
0
Age
40
XP
138
Country
United Kingdom
You are using the version of the script I created for people who wanted to build it on their l4t install, so it is not setting up the ARCH, or CROSS_COMPILE options properly. use this version: link

I removed the cross compile bits from the script I made to run on the switch, so the you have no defconfig, as that is specific to arm64 builds only.

Thanks! Trying it now.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
It is with the netfilter/iptables stuff in the kernel. In fact, the defconfig has been updated on git lab to include this already. The only feature that hasnt been included up there that has been asked about is binfmt_misc, which is for running different arch emulation with qemu. Needed for things like xbox emulation, I would assume.

This should give you an idea of where to look in the kernel config. https://wiki.gentoo.org/wiki/Home_router#Kernel_setup_.28know_thyself_first.29 That being said, that is for setting up NAT mainly, but the bridge options should be in the same area. NAT comes in handy, if you want to use your switch as a mini router, which I have found handy, as my switch has a much better wifi card then my laptop, so it will pick up networks my computer wont. A little NAT, and dns/dhcp setup and I have a wired connection. I will release all of this prebuilt, once I get basic hardware support working on my gentoo build. What I release is going to be about as minimal as possible but usable also. So, for those who know gentoo, a basic stage 4, with lxde, and stuff to set up hardware. from there, you will have to build your own apps. I am doing it this way, so people can run what they want without having to strip the system down, and fight with apt and their crappy arm64 repositories.
 
  • Like
Reactions: Watermelonz

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
I'm having issues enabling bridge-utils support in the kernel. Does anyone have any tips on how to do this? I need to be able to bridge a wifi adapter to a virtual tap device.

I just worked it out far enough to get it to compile, which it does. As for why it isnt booting, that I havnt looked into, as I am not far enough in my build to try to boot it yet. I havnt tested the kernel, though it might be because it builds a sleightly older version of 4.9, than what is being used on the l4t build already. Bylaws would be the person to ask. Or, maybe if you could post the kernel log, we could debug the issue. I can say that there are no modules in the initramfs, as I did check that, it is mainly just a wrapper to load ubuntu init, so there should be no need to mess with that. If the backlight is coming on, then the system is booting, but it is hanging before X11 starts, or it doesnt like the version of the video card driver. Either that, or you might need to compile it with the GCC 4.x compiler that nvidia released as the toolchain for the kernel. I dont see why that would be needed though, as lakka-switch uses the 6.2.x(i believe) linaro toolchain for this, and my script is based off of the work that was done there.

@bylaws, if you want to chime in on why this isnt working for people, that would be nice, since it compiles, and tries to boot, it seems strange to me. I also dont get why the kernel versions are different, if we are all using the same sources.
 

Deathscreton

Well-Known Member
Member
Joined
Oct 1, 2009
Messages
826
Trophies
0
XP
1,092
Country
United States
I just worked it out far enough to get it to compile, which it does. As for why it isnt booting, that I havnt looked into, as I am not far enough in my build to try to boot it yet. I havnt tested the kernel, though it might be because it builds a sleightly older version of 4.9, than what is being used on the l4t build already. Bylaws would be the person to ask. Or, maybe if you could post the kernel log, we could debug the issue. I can say that there are no modules in the initramfs, as I did check that, it is mainly just a wrapper to load ubuntu init, so there should be no need to mess with that. If the backlight is coming on, then the system is booting, but it is hanging before X11 starts, or it doesnt like the version of the video card driver. Either that, or you might need to compile it with the GCC 4.x compiler that nvidia released as the toolchain for the kernel. I dont see why that would be needed though, as lakka-switch uses the 6.2.x(i believe) linaro toolchain for this, and my script is based off of the work that was done there.

@bylaws, if you want to chime in on why this isnt working for people, that would be nice, since it compiles, and tries to boot, it seems strange to me. I also dont get why the kernel versions are different, if we are all using the same sources.
That's part of the problem. The kernel script you gave us doesn't boot, and the build @bylaws gave us doesn't have the bridge.ko module installed. I tried injecting the module, but modprobe doesn't work properly either. Unfortunately, I'm not very experienced in linux kernels enough to know how to fix this myself.
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
boot the kernel you created, then plug the sdcard into a computer, and mount the root partition, and send me a copy of /var/log/messages, which is the kernel log, and I will look into it. Do not boot the working kernel, as it will overwrite the log.
 

bylaws

Well-Known Member
OP
Member
Joined
Dec 11, 2018
Messages
129
Trophies
0
XP
1,655
Country
United Kingdom
I bet you had this since the beginning on your Ubuntu switch. What other goodies you hiding on your switch im interested to find out lol.

By the way was wondering if you had any future plans to support snapd. I have been given scripts and stuff but honestly would be nice to get some form of patch which did it all. I really have no clue what linux is about.

Also, i found that that main video player which is default is super buggy and randomly closes videos. So i found an alternative called mpv media player on the ubuntu software store which is really stable. But i noticed the battery depletes really fast. Does any media player you install have hardware acceleration? Is there any way i can activate it for any media player i install?

I found this info browsing on the internet:
If you’re looking for a GPU accelerated video player for Ubuntu mpv player is a worthy contender. It offers hardware acceleration via FFmpeg, with support for VDPAU and VAAPI.
Im guessing it is?



Thanks again
Nope, you need something thats gstreamer based or supports 'openmax'
That's part of the problem. The kernel script you gave us doesn't boot, and the build @bylaws gave us doesn't have the bridge.ko module installed. I tried injecting the module, but modprobe doesn't work properly either. Unfortunately, I'm not very experienced in linux kernels enough to know how to fix this myself.
next ver will have it
 

Deathscreton

Well-Known Member
Member
Joined
Oct 1, 2009
Messages
826
Trophies
0
XP
1,092
Country
United States
next ver will have it

1.3 is out NOW. Adds sleep support - just press the power button.

You're a damn magician. Thank you!

EDIT: "Sped up sdcards, broken ones still wont work though."

Are we going to see visible improvements in general activity? ie. less lag/hangups, programs opening quicker, etc.
 
Last edited by Deathscreton,

MrSaturn

Member
Newcomer
Joined
May 29, 2019
Messages
11
Trophies
0
Age
30
XP
66
Country
United States
I'm having problems with this step:
"Boot hekate and select L4T from the configs menu."

I can boot my Switch to RCM because I used to use ReInx on the Switch. I did that, with the imaged SD card inserted, and used Rekado on my phone to send the Hekate payload that I downloaded from their github releases. I get a menu out of it, but selecting "Launch" results in an error (something about a Fat32 partition?). There's no "configs menu" that I can see, and nothing in the menu tree reads "L4T". I'm unfamiliar with Hekate, so I might be doing something wrong. I'm familiar with linux, dd, programming etc. I flashed the SD card from a Mac, and idk if maybe that messed some things up?
 

Gavin_Darkglider

Well-Known Member
Member
Joined
May 20, 2019
Messages
232
Trophies
0
Age
34
XP
581
Country
United States
I'm having problems with this step:
"Boot hekate and select L4T from the configs menu."

I can boot my Switch to RCM because I used to use ReInx on the Switch. I did that, with the imaged SD card inserted, and used Rekado on my phone to send the Hekate payload that I downloaded from their github releases. I get a menu out of it, but selecting "Launch" results in an error (something about a Fat32 partition?). There's no "configs menu" that I can see, and nothing in the menu tree reads "L4T". I'm unfamiliar with Hekate, so I might be doing something wrong. I'm familiar with linux, dd, programming etc. I flashed the SD card from a Mac, and idk if maybe that messed some things up?

Download the latest version of hekate from here:https://github.com/CTCaer/hekate/releases, then the configs menu will show up.
 

bedbug1226

Well-Known Member
Newcomer
Joined
Dec 1, 2014
Messages
83
Trophies
0
Age
30
XP
484
Country
United States
I'm having problems with this step:
"Boot hekate and select L4T from the configs menu."

I ended up having to put the hekate_ipl.ini in the bootloader before it would let me select anything.
Use the file below and change .txt to .ini
 

Attachments

  • hekate_ipl.txt
    120 bytes · Views: 98

MrSaturn

Member
Newcomer
Joined
May 29, 2019
Messages
11
Trophies
0
Age
30
XP
66
Country
United States
As it turns out, something went wrong when I flashed the image. I tried to do fancy things with gdd progress bars and probably messed it up. When I got home I used 7zip and win32diskimager and it worked.

This thread is very helpful and friendly, thanks for the replies.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    realtimesave @ realtimesave: I have it in my hands