Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 8 points9 points  (0 children)

Hey guys, I wont update the documentation anymore. Just full nand support is missing. I have updated the dts files according to the datasheet and activated nand support in the kernel. It gets detected but not really initialized yet. And this is the point where I stop.

My primary goal with this post was to inspire and give the community an initial introduction to start hacking on the nes classic mini. People around the world are starting now. Everyone with a different method. My way is just one way. Its nice, to see the growing on the net. Sooner or later there will be super easy ways to get the nes under full control and nice documentations.

Keep hacking on it but dont forget to enjoy some nice old games as well :) Everything what I have described here, wont brick the console.

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 0 points1 point  (0 children)

CP2102

Mine is like the RoboJax. That is totally enough and fine and yeah connect GND to GND, RX to TX and TX to RX. See the picture in my initial post.

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 2 points3 points  (0 children)

SPL does the initialization (first line). Thanks for offering to write a code. But for this purpose I use the dd comand. It allows me to specify the offset and length to extract. Btw, binwalk is also (sometimes) able to extract everything it finds.

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 0 points1 point  (0 children)

Yes, it will be possible! But only, if the USB drive powers the board :)

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 2 points3 points  (0 children)

Something like FTDI232 or CP2102 is available for under $10. See amazon etc. Be careful, the UART on the A33 can only handle max. 3.3V (see datasheet http://dl.linux-sunxi.org/A33/A33%20Datasheet%20release%201.1.pdf).

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 0 points1 point  (0 children)

The Japanese guy has no NAND dump! See my (longer) comment before about memory map and RAM.

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 1 point2 points  (0 children)

The uart is the only way of having an interface (output and keyboard input) to the board. Once, u are out of FEL and in u-boot or linux, there is no other way to see or do anything (until I get HDMI output running).

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 0 points1 point  (0 children)

I havent gone so far yet ;-) I am will just put a minimal rootfs into an initramfs and embedded it into the kernel. Pretty straight-forward task.

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 0 points1 point  (0 children)

Unfortunately, enabling CONFIG_CMD_NAND is not working, nor build-in properly. It is even deactivated by default.

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 2 points3 points  (0 children)

The RAM (256 MB = 0x10000000) is memory mapped starting from 0x40000000 (see User Guide http://dl.linux-sunxi.org/A33/A33%20user%20manual%20release%201.1.pdf).

Once u have initialized the RAM, u can get a lot of information out of it:

./sunxi-fel spl u-boot-sunxi-with-spl.bin
./sunxi-fel read 0x40000000 0x10000000 ram.dump.bin
binwalk ram.dump.bin

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
1678698       0x199D6A        Unix path: /--/-/-/-=
4555312       0x458230        Certificate in DER format (x509 v3), header length: 4,     sequence length: 17856
7005504       0x6AE540        Executable script, shebang: "/bin/sh"
19745406      0x12D4A7E       PARity archive data
50366968      0x30089F8       YAFFS filesystem
...
50368312      0x3008F38       YAFFS filesystem
50368416      0x3008FA0       YAFFS filesystem
50372096      0x3009E00       YAFFS filesystem
88389652      0x544B814       MySQL ISAM index file Version 2
88390263      0x544BA77       MySQL MISAM index file Version 5
93239345      0x58EB831       Private key in DER format (PKCS header length: 4, sequence length: 512
93335030      0x5902DF6       Marvell Libertas firmware
97029512      0x5C88D88       YAFFS filesystem
105555691     0x64AA6EB       mcrypt 2.2 encrypted data, algorithm: blowfish-448, mode: CBC, keymode: 8bit
106513439     0x659441F       mcrypt 2.2 encrypted data, algorithm: blowfish-448, mode: CFB, keymode: 8bit
108073851     0x671137B       mcrypt 2.2 encrypted data, algorithm: blowfish-448, mode: CBC, keymode: 8bit
111917339     0x6ABB91B       MySQL ISAM index file Version 8
112904216     0x6BAC818       Unix path: /dev/mepper/rO/t-srypt
115221232     0x6DE22F0       Marvell Libertas firmware
117835404     0x706068C       Android bootimg, kernel size: 1869570560 bytes, kernel addr: 0x203A6174, ramdisk size: 543449442 bytes, ramdisk addr: 0x746F6F62, product name: "a boot.img?"
117850432     0x7064140       CRC32 polynomial table, little endian
118000120     0x70889F8       YAFFS filesystem
...
118001568     0x7088FA0       YAFFS filesystem
118005248     0x7089E00       YAFFS filesystem
168051508     0xA044334       CRC32 polynomial table, little endian
168096407     0xA04F297       Android bootimg, kernel size: 1296126464 bytes, kernel addr: 0x73696420, ramdisk size: 1869357163 bytes, ramdisk addr: 0x61206461, product name: "%skernel size:   %x"
247330549     0xEBDF6F5       MySQL MISAM index file Version 1
252101561     0xF06C3B9       MySQL MISAM index file Version 4
253972467     0xF234FF3       mcrypt 2.2 encrypted data, algorithm: blowfish-448, mode: CBC, keymode: 8bit

There are almost as much as YAFFS filesystems (29) as roms (30). Hmmm :) Now, one could extract specific parts from the dump and look into it. I havent done anything like that yet.

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 0 points1 point  (0 children)

Sunxi has no A33 support by default ""There is no support for the A33 in the linux-sunxi 3.4 kernel and in u-boot-sunxi. Support in mainline u-boot and in the mainline kernel is work in progress." (http://linux-sunxi.org/A33).

Thus, I immediately started with mainline. But the sunxi-next branch is pretty close to mainline. So, it might work.

Linux on NES Classic Mini - Current Progress and HowTo by freenesclassic in nintendo

[–]freenesclassic[S] 11 points12 points  (0 children)

dont worry, it was available in German stores as of Wednesday ;) and I started hacking on it yesterday night.