tjmnmk / gadget_cdrom

gadget_cdrom converts your Raspberry Pi to virtual usb cdrom
Other
94 stars 25 forks source link

Ideas #4

Open Openanonwriter opened 3 years ago

Openanonwriter commented 3 years ago

Ideas for a future release to the creator.

Documentation

Edit documentation to show how to enable g_acm_ms, g_storage , this is the part I got hung up on with my first issue. Show how to make RPI faster and boot in seconds, by stopping B.T., Wifi, DHCP, Keyboard and other unneeded services.

Software

An icon showing disk is currently being written to or read... Do not remove Icon in HDD mode and USB mode Support for VHD, VMKD and virtual floppy Create dialog in USB mode to create usb.img and maybe delete old one. (Button 1) with it asking size and file disk format. Left D-Pad = Unmount/ Shutdown so SD card corruption does not happen, and Start up Left D-Pad is the only one on wire 3 for the oled hat. Wire 3 can control start up and shut down, no other pins can be used.

DPAD CLICK = Mount and unmount

Overall Create a pre-compiled Image for people do download and just use.

I am happy to help with documentation if you want and I love this project.

tjmnmk commented 3 years ago

Hello,

Firstly I want to thank you for your ideas. As you can see, over the last few days I've created modified raspbian image, implemented shutdown, and changed systemd service to boot sooner.

Could you please explain to me the problem with g_acm_ms / g_storage? There is modprobe g_mass_storage... in the insert_iso.sh and mode.sh scripts. And everything seems to be working in that sd-card image I just created and there is only dwc2 in /etc/modules (just like in documentation). Do I something missing?

Openanonwriter commented 3 years ago

Hello and thank you for getting back. I will try the new version this week. I have also implemented a shutdown and soft boot Proof of Concept by shorting pins and my config.txt. I had to set up /boot/config.txt and /boot/cmdline.txt manually, which took a little while to figure out and some confusion since this is my first time using a raspberry pi. Once I try your version I may scrap the current one I have. I was able to get my pi to boot up in 32 seconds by overclocking and disabling a lot including wifi, dhcp, and other stuff. The rpi with forceturbo=1 in the helps a lot, and overclocking my SD card dtparam=sd_overclock=100 - currently disabled due to using a lower class of sd card at the moment. I soon will be creating a battery pack alleviate the boot up times. I will be able to power on the device and allow it to boot before I plug it in to a system.

I have used this to boot in to Operating Systems. So far I have tried it with Windows 10, Fedora 33, Memtest, and a couple others. The windows 10 runs off the usb side where as Fedora runs off the CD side. I was having issues with a 8gb cd device earlier and just found that a usb image would work just as well.

When overclocked and wifi off I know it was 5.10V and 0.20A at start up and large file transfers the average was 5.08V and 0.16A well with in USB 2.0 spec.

My cmdline.txt

console=serial0,115200 console=tty1 root=PARTUUID=73397bf3-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait modules-load=dwc2,g_mass_storage quiet

My config.txt

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
#dtoverlay=vc4-fkms-v3d
dtoverlay=dwc2,dr_mode=peripheral
dtoverlay=pi3-disable-bt
dtoverlay=pi3-disable-wifi
disable_splash=1
dtoverlay=gpio-shutdown,gpio_pin=13,active_low=1,gpio_pull=up
boot_delay=0
force_turbo=1

My goals at this moment.

Create Battery to power up sooner, so I can boot in to OS before computer boots under $6-10 in parts. Create Documentation. Run and upload multiple speed tests.

I am currently waiting on parts for the battery aspect.

If you need me to try anything let me know. I'm having a lot of fun.

lordbink commented 3 years ago

Here is an example script I started based on some of your suggestions. It is a rough draft but should provide at least a few examples of commands to streamline setup.

https://github.com/lordbink/gadget_cdrom/blob/master/initial_setup-example.sh

HWIIC1987 commented 2 years ago

Is there any way to add in another opition before or after the cd/usb/hdd for say network so it could be used as a WiFi adapter aswell just in case a pc you've just reinstalled has no drivers for network on get go. Many thanks adam

HWIIC1987 commented 1 year ago

Just another idea possible the ability to use on a rpi4 to get usb 3 speeds