linux-3ds / linux Goto Github PK
View Code? Open in Web Editor NEWThis project forked from torvalds/linux
Linux kernel source tree
License: Other
This project forked from torvalds/linux
Linux kernel source tree
License: Other
Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. The formatted documentation can also be read online at: https://www.kernel.org/doc/html/latest/ There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation. Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.
Hello,
I was making my own rootfs with a small x server included and it was getting to a size of around 50 mb. I thought that that is a bit much to build into a kernel and also its a bit annoying to rebuild the kernel for every small change I did to my x configuration. At first, I tried to find a way to pass a kernel argument (root=/dev/vda2) but I could not find one. Then, I had the idea to use a chroot to test it but that did not work as planned because it had problems accessing the frame buffer and therefore was not a viable testing solution. Thats why I want to ask, if there is any way to pass a kernel argument with the root fs or mod the launcher or kernel to use /dev/vda2 as default. Or in the worst case, make the chroot access the frame buffer if none of the above can be implemented easly.
Similarly to #1, the new3DS supports two extra cores and they need a special initialization routine.
open_agb_firm already has a sample implementation, this should be done in the bootloader.
https://github.com/profi200/open_agb_firm/blob/1fcf024520571c9e8732a5aaaf1bbd7661cba423/source/arm11/hardware/pdn.c#L76
open_agb_firm uses this reference, and I had noticed this as well from ifixit's teardown.
https://guide-images.cdn.ifixit.com/igi/OMYYisieWXRA2dBL.huge
I tought it was weird that we needed to build the dtb files explicitly; this is usually wired up in that makefile. One less invocation of make to build everything.
should have
dtb-$(CONFIG_CTR) += nintendo3ds_ctr.dtb nintendo3ds_ktr.dtb
This is more of an enhancement and could be a longshot, but will there be support for sudo and maybe apt commands? I'm somewhat new to Linux and am definitely not fluent with the more technical aspects of it so I apologize if this makes no sense.
sincw LGR has 2 operating modes (PDN_LGR_SOCMODE), a cpufreq driver would help save battery life.
i cant see what im typing into the password field when i first open the .firm shit, also what password does it need? my nintendoID password and shit?
Some more needed packages for building are flex, libssl-dev, and bison
sudo apt install gcc-arm-linux-gnueabi binutils-arm-linux-gnu flex bison libssl-dev
I haven't checked to see if there's simply a config that accidentally got disabled or what, but the first time booting this fork I noticed the bottom screen was uninitialized (all different colored pixels) and the virtual keyboard didn't exist, so I had no means of input. Was this intentionally disabled @Wolfvak ?
The SD bus is based on an old Toshiba design and is basically the same as the one in the DSi, except with a ~67MHz clock rather than ~33MHz. It's well documented in gbatek and is a piece necessary to get WiFi working.
It could be based off the preexisting toshsd or tmio drivers with a few modifications, since our version of the chip has the separate 32bit FIFO.
[x] base driver
[] 32bit transfers
[x?] full SDIO support
linux/arch/arm/configs/nintendo3ds_defconfig
Line 150 in 43af8e2
Sorry for writing in the wrong issue.
Mounting either vda or vda1 throws the same error, there's no other partition
I've come back to the buildroot side of things and managed to get a working test config put together. I've noticed that, with either DTB, the memory limit seems to be restricted to Old model 3DS RAM amounts. With the config linked above, only ~256KB of RAM is left open for use by programs on my RED-001. Is the expanded RAM usable yet, or is that still in the works?
The current development tree is based on v5.11 and Linux is about to release v6, we should probably rebase on a newer LTS release like v5.15.72 (released a few days ago).
According to #80 it shouldn't be too hard.
they're disabled and I can't enable them.
Per how master...torvalds:linux:master states that This branch is 171768 commits behind torvalds:master., why are upstream commits from https://github.com/torvalds/linux.git not being merged? The more time that this continues, the less chance that these devices have of being mainlined, right?
Hello, I can't connect with user:root pass:root.
Or I am dumb and miss keys for pass, or it changed.
Can someone help me ?
Ps: I use an EU new 3ds xl
I can't find where the SD card is.
@kleo can you change it so the CI will always generate the kernel image with the always-latest rootfs found here https://github.com/linux-3ds/buildroot/releases ?
this is related to #52, and other issues I've found with the existing sc16is750 driver (gpio is added before initializing its data)
I think the title says it all.
Would be nice if it existed but if you aren't experienced with using discord, i could help you out. my ID is mueller_minki#0993 so feel free to dm me about it.
I have read the wiki, and I can't seem to understand how to compile this.
it first says to install dependencies, but the gives a command for Linux
in this case it is: $ sudo apt install git build-essential flex bison gcc-arm-linux-gnueabi libssl-dev bc gcc-arm-none-eabi
I have a windows machine, how would I build this? or do you run these commands on the 3ds?
I am trying to change the distro of Linux, how could I do that? I want to install bionicpup on the system.
I've been following progress on Linux 3DS since I dropped it, and I was wondering what your procedure for compiling is, as I'm willing to test commits on my N3DSXL.
I use a New 3DS XL, and I find the keyboard too tiny for me to type in. I constantly make typos. Is it possible to space out the keys more? There is a ton of empty space.
for the purposes of upstreaming, all new files need the spdx license header comment. Then we should add the copyright of the previous authors to each header (ie. @xerpi).
Via: https://github.com/linux-3ds/firm_linux_loader/pull/4/files#r606730803
I think we need this diff: #17 (comment) to avoid that warning.
NR_CPUS controls lots of things, in particular how much memory to allocate/reserve for kernel percpu data. So to have 1 kernel image for 2 cpu (CTR) and 4 cpu (KTR) devices, we need to reserve enough for 4, though we might not use them at runtime due to only having 2 cores. I think this is preferable as the benefits of have one defconfig and thus one kernel image for both devices outweighs the cost IMO. We might even still be able to merge #17 if DT is smart enough to notice that NR_CPUS != # of cpus in the DTB, which I'd bet it is.
after i put the command in, it stops on a line that says "event0 - Nintendo 3DS input: device removedoved.I", and then it cuts off.
$ ./scripts/dtc/dtc -O dts arch/arm/boot/dts/nintendo3ds_ctr.dtb
<stdout>: Warning (simple_bus_reg): /soc/refclk134mhz: missing or empty reg/ranges property
<stdout>: Warning (simple_bus_reg): /soc/twd-timer@17E00600: simple-bus unit address format error, expected "17e00600"
<stdout>: Warning (simple_bus_reg): /soc/twd-watchdog@17E00620: simple-bus unit address format error, expected "17e00620"
<stdout>: Warning (simple_bus_reg): /soc/interrupt-controller@17E01000: simple-bus unit address format error, expected "17e01000"
<stdout>: Warning (simple_bus_reg): /soc/scu@17E00000: simple-bus unit address format error, expected "17e00000"
<stdout>: Warning (avoid_unnecessary_addr_size): /soc/i2c@10144000/mcu@25: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
<stdout>: Warning (interrupt_provider): /soc/gpio-intc@10147024: Missing #address-cells in interrupt provider
<stdout>: Warning (interrupt_provider): /soc/i2c@10144000/mcu@25/mcu-intc: Missing #address-cells in interrupt provider
...
The new3DS and new2DS systems have an extra 128 megabytes of FCRAM over the original model, starting at linear address 0x28000000
.
Register twiddling is needed to access this memory, this could be relegated to a bootloader or be a part of the init.
For reference, this is how it's done in GM9 https://github.com/d0k3/GodMode9/blob/ce50bd63a8c1fd1ede2e35d3a2a89085bcc22bde/arm11/source/system/sys.c#L55
not sure what to say, it just doesnt work
--- FIRM Linux loader by xerpi ---
Initializing SD card... success
Loading linux/zImage...
File linux/zImage loaded:
size: 4389904 B
Loading linux/nintendo3ds_ktr.dtb...
File linux/nintendo3ds_ktr.dtb loaded:
size: 8119 B
Loading linux/arm9linuxfw.bin...
File linux/arm9linuxfw.bin loaded:
size: 6992 B
Then nothing happens anymore.
SD Card is clean, all checksums match the original.
I found the default credentials for the provided zImage nowhere.
After some trying, I figured it out to be root:toor
no matter which sdcard or micro sdcard i use, i am unable to mount any sdcard partitions as rw.
in my boot logs i see a lot of IO errors, but i cant track down the problem.
ive been troubleshooting this for a while and just cant fix it, if anyone could provide help, it would be greatly appriciated.
I do like this project, however, I have some ideas to make it better:
Saving files, I'm pretty sure that if you make a file it's not saved if you turn off the system. Maybe to combat potential bloating you can make a /root/save directory where all files there aren't purged upon shutting off the system kind of like TailsOS?
I'd also like some internet connectivity -- The program comes with wget but I don't think there's any way to connect to the internet (If there is but I didn't notice, don't tell me how, just tell me it exists - I'd like to find out myself).
There needs to be a DRM driver for the panels to store their timings, resolution data and other specs.
Initialization is non-trivial as they also talk via I2C, and proper initialization of the panels calls for some register twiddling besides the regulator management.
We'll probably need a secondary way to debug the system, too.
running reboot complains first about not being able to unmount, then complains about not being able to stop secondary cpus and says system halted without shutting down.
The GPIO blocks are fairly simple devices: some have a direction register and IRQ triggers.
Currently it uses a simple "gpio-mmio" driver that works well enough for bidirectional and unidirectional blocks, but it has absolutely zero IRQ support. Even if this driver supported "traditional" IRQs it'd still not be worth it because of how IRQs are hooked up to the system: some lines are not even connected to the distributor, and those that are have each their own IRQ (like here
linux/arch/arm/boot/dts/ctr.dts
Line 136 in b3995dd
Right now it's been hacked together by having a different driver handle the interrupt side of things, but what would be better: keep down this path of having a separate controller that takes over the GPIO or writing a brand new GPIO driver?
im currently having a issue with the branch that enables read/write support for sd cards.
when ever i try executing something on the sd card it will randomly segfault or illegal instruction. but when the binary is built in the initrd it works just fine.
i checked the checksum of the files to see if the file got changed some how
i do noticed after i executed the file and try again it will sometimes executes but most of the time it causes a soft kernel panic
[ 535.068000] 8<--- cut here ---
[ 535.076000] Unhandled fault: page domain fault (0x81b) at 0xb6d60000
[ 535.092000] pgd = cbda9092
[ 535.104000] [b6d60000] *pgd=27ab3831, *pte=222d955f, *ppte=222d9c7e
[ 535.124000] Internal error: : 81b [#1] SMP ARM
[ 535.132000] CPU: 1 PID: 252 Comm: grep Not tainted 5.11.0-rc1-g601f87f61c77-dirty #11
[ 535.152000] Hardware name: Nintendo 3DS/CTR (Device Tree)
[ 535.172000] PC is at v6_coherent_kern_range+0x4/0x2c
[ 535.192000] LR is at arm_syscall+0x160/0x2f0
[ 535.200000] pc : [<c0113bf0>] lr : [<c010a774>] psr: 40000013
[ 535.224000] sp : c7adff90 ip : 00c5787d fp : 00000000
[ 535.244000] r10: 00000000 r9 : c7ade000 r8 : c0100244
[ 535.264000] r7 : c7ade000 r6 : b6d60134 r5 : b6d60134 r4 : 00000002
[ 535.284000] r3 : 00000000 r2 : c11345c0 r1 : b6d60134 r0 : b6d60000
[ 535.308000] Flags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 535.328000] Control: 00c5787d Table: 27a6800a DAC: 00000051
[ 535.348000] Process grep (pid: 252, stack limit = 0x6d49077e)
[ 535.372000] Stack: (0xc7adff90 to 0xc7ae0000)
[ 535.380000] ff80: b6d60008 ea000000 b6d60134 000f0002
[ 535.404000] ffa0: c0100244 c0100060 b6d60008 ea000000 b6d60008 b6d60134 00000000 0000012c
[ 535.424000] ffc0: b6d60008 ea000000 b6d60134 000f0002 0167e098 be971350 00000000 00000000
[ 535.444000] ffe0: 000003ff be97131c b6f361dc b6f5ea0c 60000010 b6d60008 00000000 00000000
[ 535.468000] [<c0113bf0>] (v6_coherent_kern_range) from [<c010a774>] (arm_syscall+0x160/0x2f0)
[ 535.488000] [<c010a774>] (arm_syscall) from [<c0100060>] (ret_fast_syscall+0x0/0x58)
[ 535.508000] Exception stack(0xc7adffa8 to 0xc7adfff0)
[ 535.532000] ffa0: b6d60008 ea000000 b6d60008 b6d60134 00000000 0000012c
[ 535.552000] ffc0: b6d60008 ea000000 b6d60134 000f0002 0167e098 be971350 00000000 00000000
[ 535.576000] ffe0: 000003ff be97131c b6f361dc b6f5ea0c
[ 535.596000] Code: ee070f15 e12fff1e e12fff1e e3c0001f (ee070f3a)
[ 535.616000] ---[ end trace d309443f54c30c13 ]---
i have tried multiple different filesystems and formatting without change.
i switched back to the master branch of the linux and arm9linuxfw and i had no issues executing the file but didnt have write support
there is a current workaround that uses loopback devices to get around this issue
losetup /dev/loop0 /dev/dev/mmcblk0pX
mount /dev/loop0 /mnt
Hello, I'm trying to boot the linux but my New 3DS always boots to the nintendo OS, I've followed all of the instructions and copied the files to the SD card in their respective folders.
Currently there's a single "codec" device connected via the SPI bus and it controls touchscreen and circlepad stuff. In reality this driver also controls other registers responsible for sound (https://problemkaputt.de/gbatek.htm#3dstscregistersummary) and works similarly to the MCU or any other mfd, so it needs to be split off. However, the codec driver is also the one responsible for managing the swkbd which is pretty essential.
We need something like wifi or infrared to have proper communications with the system while debugging it (there are no UART ports exposed) before we can even think about ripping out swkbd and splitting the codec driver.
Marking as blocked by #6
I noticed two drivers have copyright from Paul LaMendola which I assume is @paulguy. @paulguy, do you accept the Linux kernel's Certificate of Origin so that we may upstream your changes for which you hold copyright?
running 3807cdc, I see:
irq: no irq domain found for mcu-intc !
printed 3 times. also
gpio-keys mcu_buttons: Found button without gpio or irq
gpi-keys: probe of mcu_buttons failed with error -22
Version/Release: Universal Updater linux_3ds Sergi Granell (2020/12/19) [5.10.0+]
Device: Nintendo 3DS (2011) [Europe]
Pressing the "Select" button doesn't switch to keyboard input mode.
The feature is shown in this video: https://www.youtube.com/watch?v=19lAZA8wrkI
not sure if this was intentionally changed from xerpi's port or what, but it looks like the dts file is now named:
https://github.com/linux-3ds/linux/blob/master/arch/arm/boot/dts/ctr.dts
but the bootloader expects /linux/nintendo3ds_ctr.dtb. I think it would be better to rename the dts back to nintendo3ds_ctr.dts, or at least fix firm_linux_loader to look for the new ctr.dtb. Sure, you can rename the file when placing it on the sd card, but...
When I get to the password nothing shows up when i type on the keyboard, but the username works well the whole time.
trying to benchmark my cpufreq driver, I noticed I can't use single quotes in the shell. This is noticeable moreso if you long press RShf then hit the double quotes, <
gets entered instead, which is the shifted version of comma.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.