honeylab's blog

各種ハードウェアの改造、主にファミコンミニなどをやってます(ました)

How to enable NESC's microUSB connector as Host

First, I have already explain why NESC don't work as USB host below.

honeylab.hatenablog.jp

 

So,I must use tweak to usb controller work only host mode.

I have test change linux kernel config as 'host only' , but it cause link error in modules.
Some driver file must need otg support configuration.

f:id:honeylab:20170218012644p:plain

So I had left this configuration "otg support".

 

While searching same hack,I found this contents.

USB OTG as an Extra USB Host in Allwinner A10, A20 etc | dmsherazi

so,I have edit script.fex (it has dumped from NESC boot image script.bin decompiled).
as USB controller work as only HOST.
And re-compile Linux kernel with some drivers.

It was succeeded,but currentry , It need some soldering for power line .
In near future , it will no need , I hope.

 

 The working bootlog and console is below.

https://bitbucket.org/!api/2.0/snippets/hiromitu/Ge8eB/700c9641d13bfa0e0548f170b83dd582323d36a1/files/nesc_usb%20boot%20log

 

There are some devices message recognized on my custom kernel.

  • a USB-PS Gamepad converter  will use with /dev/input/js0
  • USB-Serial Converter FT232R will make /dev/ttyUSB0
  • IO DATA USB Flash Driver 32GB has uses with fdisk
  • PCI GU-1000Air USB-Ethernet Converter will make eth0 and ping packet to 8.8.8.8 !!

 

And, more devices will work on NESC as a usual Linux.

 

My NESC development envrionment is boot from SD Card.
Linux kernel has re-compiled from Nintendo OSS resource with some re-configure.

This project goal is what new Linux kernel and some drivers will  written to flash area.
I will adjust and learn hard.

 

To write flash :

  • remake boot.img with linux kernel reconfigured and drivers.
  • overwrite script.bin on boot area

I think I will use hakchi custom for update kernel.

.. or Someone who not me , will make it soon.