The Linux Thread - The Autist's OS of Choice

  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
welcome_to_linux.mp4
(Keeping this under spoiler to not visually shit up thread)

This is why I would love to build a new political party that is focused on consumer rights and bringing back what I would call "Old America." It doesn't have to kill off the technological advances we've made, but much of it needs to be reigned in since there are virtually no repercussions or regulations here for it. Ban on Data Brokers, Minimal data collection, forbid digital IDs, ban on bulk billing, data protection standards, forcing businesses to accept cash and check again (especially for paying rent), requiring opt ins instead of opt outs. Banning forced arbitration. The list goes on. I'll need to write this list down and post it somewhere and get others' thoughts.

Edit: Also, I cannot get yt-dlp to work anymore for getting mp3 files for my Rythmbox, is there an alternative?
make sure you have the dependency for it
 
Edit: Also, I cannot get yt-dlp to work anymore for getting mp3 files for my Rythmbox, is there an alternative?
Have NodeJS/Deno/Bun installed along with continually updating yt-dlp with sudo pacman -Syu yt-dlp sudo yay -S yt-dlp sudo apt install yt-dlp sudo yt-dlp -U (Last one recommended, it'll get it from the GitHub repo). I have to generally update it every week to month or so because YouTube SUCKS.
 
So eventually yeah.
Back...


And Ill get to the point

<5>cmdlinepart partition parsing not available
<5>Size block 0: 16384
<5>Searching BFFS parititon table

BFFS appears to a MTD CLONE that is almost exactly the same to MTD except I JUST CANT CREATE A "BFFS PARTITION TABLE"

I know that likely its almost exactly the same as when you apply mtdparts="" in the kernel command lines as reference to THIS string(It may not be however)
1767060233739.png

IVE TRIED and TRIED to create a flash device with 5 flash partitions with dummy squash partitions and then ONE with the real squashfs. However WITHOUT that "BFFS partition table"

Look Im decent at this... But honestly.. Ive hit a hard road, Without knowing HOW this works how to make a BFFS partition and with my limited reverse engineering information means that im stuck between a rock and a hard place. Im not giving up but I fear the road ahead is going to be a fucking nightmare.


Now here is the worst part. I HAVE THE NAND TO THE TV, but without knowing the STARTING bytes of the "bffs parition header" I do not know WHERE the hell to look, And no searching through all 68 megabytes manually is not a viable option, If I had better reverse engineering skills I could probally KNOW where the thing starts... But sadly I do not know... and because of that even though I have the answer RIGHT in front of me(Entire Nand dump) laughing at me.

In the meantime lets go over some intresting things. First off the NAND dump seems to have the full dump to the BOOTLOADER. and oh boy this bootloader is VERY intresting.

This bootloader appears to have its own version of BATCH that it loads. Where it loads in ".Bat" files and mounts a filesystem.
These bat files that the bootloader uses are very similar to get this. Microsoft BASIC.

Code:
 TODO :
# * in case of fast cold and hot reboot, do we need to verify the txt sections?
# * in case the run is failling, sby up gets 2 or more signals
# * is factory download (5:) required?
# * If in SR2 case an error occurs, we just generate a signal 101 ... what to do ? (a timeout will occur and set will reboot)
# * IF in SR2 signal fails : a timeout will occur and set will reboot
# Example batchfile
# maximum size of the batch file is ~16k characters
# ========================================
# >>    Signal values:                  <<
# ========================================
# 30: BatchEnd
# 31: FastCold
# 32: Hotboot
# 40: BatchBegin (Not supported by standby processor)
# 100: Unknown scratch reg value
# 101: Fatal error

# ========================================
# >> Batch file entries/scratch values: <<
# ========================================
# NB    NAME                                CALLER
# --------------------------------------------------
# 0     Considered as boot error            NA
# 1     Cold boot                           SBY
# 2     Goto Standby                        VPR
# 3     Warm boot (get out of standby)      SBY
# 4     SW upgrade application boot2        SBY
# 5     Factory default SW upgrade app      VPRBTCH ?
# 6     SW upgrade application boot1        VPRBTCH
# 7     Ethernet                            SBY
# 8     Goto SemiPowerOff                   VPR
# 10    Hotboot                             VPR
# 11    Start Fastcold procedure            VPR
# 12    FastCold boot                       SBY
# 13    GotoSelfRefresh                     VPR
# 40    Viper Infra Initialized             NONE(VPR)
# 60    Errorhandler for coldboot = retry   VPRBTCH
# 61    Errorhandler for warmboot = retry   VPRBTCH
# 70    Fatal error handler                 VPRBTCH
# 80    Signal fails                        VPRBTCH
# Default

# ========================================
# >> Files needed for correct operation:<<
# ========================================
# /bffs1/UsbDownload_dat.tdf
# /bffs1/UsbDownload_txt.tdf
#
# /bffs2/UsbDownload_dat.tdf
# /bffs2/UsbDownload_txt.tdf
#
# /bffs2/atvTm0App.tdf
# /bffs2/atvTm1App.tdf
# /bffs2/mips_txt.tdf
# /bffs2/mips_dat.tdf
#
# UNKNOWN : /bffs1/FacSwDlApp.txt (don't bother for now)
# /bffs2/EthertnetLoader.tdf




# BatchCommands
# commands are not case sensitive
# commands are seperated by a space
# definition of space characters are: space, carriage return, line feed, tab

#Batch entry point labels
# labels are mandatory followed by a ":"
# max number of labels is 255
# Bootloader converts label text to a decimal number
# Bootloader searches for the label which matches scratch 1 value set by a boot script.

#BatchCommand echo
# echo's a string to uart
# e.g: echo My string to show comes here\n
# echo prints on jaguar to UART2 @ 9600,8,n,1
# just hook up a hyperterm for debugging scripts or see batch progress

#BatchCommand OnErrGoto <label>
# redirect control to the specified label if a error occurs
# The last OnErrGoto is remembered side effect is that after a goto this still the last ref is used.
# Good practise is to start each label with an OnErrGoto even if that is a repetition of the OnErrGoto

#BatchCommand Goto <label>
# redirect control to the specified label

#BatchCommand TdfLoad <filepath>
# loads file "filepath" into sdram

#BatchCommand TdfVerify <filepath>
# verifies if "filepath" in sdram still matches flash file

#BatchCommand TdfRun <filepath>
# starts execution of file "filepath".
# start addresses and sequences are found in tdf header

#BatchCommand Signal <base10_number>
# Produces a IMultiNotify on the standby product with the default isvin RPC header.
# IMultiNotify:OnChange(int base10_number)

#BatchCommand DdrSelfRefresh
# puts DDR in self refresh and stops MIPS.

#BatchCommand Exit
# stops batch execution

#BatchCommand Default
# label jumped to if unknown label is referenced



#--------------------------------------------------------------------
# sample boot batch file
# numeric labels in this file are TBD
#--------------------------------------------------------------------


# catch unnitialized parameters - false boot...
0:  Goto default                                # 0 entry is considered a boot error

# REGULAR STUFF
# =============
1:  # >>>> Cold Boot <<<<
    # Signal 40
    echo SR1->Coldboot
    OnErrGoto 60                                # what to do in case of error - retry once more ?
    TdfLoad /bffs2/tmAuthapp
    AuthStart
    TdfrunTm 0x05000000 
    Xio_Freq 54                                 # Set XIO_CLK to 54MHz
#   TdfLoad /bffs2/cdDownloadTM0.tdf            # load files
#   TdfrunTm 0x04200000                         # what to do in case of error - retry once more ?
    TdfLoad /bffs2/atvTm0App.tdf                # load files
    TdfLoad /bffs2/AppKernel.tdf
    AuthStop
    MemFill 0x87fff000 0x1000 0xff              # Clear BIS
    Xio_Freq 33                                 # Set XIO_CLK to 33MHz
    Signal 30                                   # signal cold load finished
    cmdline ;console=ttyS0,38400n8;mem=35M;tm0size=18M;kgdb=ttyS1;root=/dev/mtdblock_auth5;lpj=1196032;init=/init;ip=none;jffs2_gc_delay=20;quiet
    TdfRun  /bffs2/AppKernel.tdf                   # batch end - cold start

2:  # >>>> Goto Standby <<<<
    # Signal 40
    echo SR2->GotoStby
    OnErrGoto 70                                # what to do in case of error
    Signal 101                                  # signal reload finished
    DdrSelfRefresh                              # batch end - MIPS stopped

3:  # >>>> Warm boot <<<<  (get out of standby)
    # Signal 40
    echo SR3->Warmboot
    OnErrGoto 61                                # what to do in case of error - try cold
    TdfVerify /bffs2/cdDownloadTM0.tdf          # verify files
    TdfVerify /bffs2/atvTm0App.tdf              # verify files
    TdfVerify /bffs2/AppKernel.tdf
    MemFill 0x87fff000 0x1000 0xff              # Clear BIS
    Signal 30                                   # signal warm boot end
    cmdline ;console=ttyS0,38400n8;mem=35M;tm0size=18M;kgdb=ttyS1;root=/dev/mtdblock_auth5;lpj=1196032;init=/init;ip=none;jffs2_gc_delay=20;quiet
    TdfRun  /bffs2/AppKernel.tdf                   # batch end - warm start

4:  # >>>> boot2 USB SW Upgrade app (USB download) <<<<
    # Signal 40
    echo SR4->USB SW DL boot2
    OnErrGoto 6                                 # try loading the EMERGENCY download application in boot 0
    TdfLoad /bffs1/Kernel.tdf               # load files
    TdfLoad /bffs1/RFSBoot1.tdf             # load files
    MemFill 0x87fff000 0x1000 0xff              # clear the bis
    Signal 30                                   # signal ....
    cmdline ;console=ttyS0,38400n8;mem=60M;tm0size=12M;kgdb=ttyS1;init=/init;ramdisk=5120;ip=none;root=/dev/ram;lpj=1196032;rd_start=0x80350000 rd_size=6815744
    TdfRun /bffs1/Kernel.tdf                # batch end - run app

5:  # >>>> Factory default sw upgrade app <<<<
    # Signal 40
    echo SR5->Fact SW download [DOESNT EXIST!!]
    OnErrGoto 70                                # no more options left
    TdfLoad /bffs1/FacSwDlApp.txt               # load file
    MemFill 0x87fff000 0x1000 0xff              # Clear BIS
    Signal 30                                   # signal ....
    TdfRun /bffs1/FacSwDlApp.txt                # batch end - run app

6:  # >>>> boot1 USB SW Upgrade <<<<
#    Signal 40
    echo boot1: SR6->USB SW DL boot1
    OnErrGoto 70                            # No way out!
    TdfLoad /bffs1/Kernel.tdf               # load files
    TdfLoad /bffs1/RFSBoot1.tdf             # load files
    Signal 30                               # signal ....
    cmdline ;console=ttyS0,38400n8;mem=60M;tm0size=12M;kgdb=ttyS1;init=/init;ramdisk=5120;ip=none;root=/dev/ram;lpj=1196032;rd_start=0x80350000 rd_size=6815744;sbywatchdogboost=200
    TdfRun /bffs1/Kernel.tdf                # batch end - run app


7:  # >>>> Ethernet <<<<
    # Signal 40
    echo SR6->Ethernet
    OnErrGoto 70                                # No way out!
    TdfLoad /bffs2/EthertnetLoader.tdf          # load files
    MemFill 0x87fff000 0x1000 0xff              # Clear BIS
    Signal 30                                   # signal ....
    TdfRun /bffs2/EthertnetLoader.tdf           # batch end - run app


8:  # >>>> Goto Semipoweroff <<<<
    # Signal 40
    echo SR8->GotoStby
    OnErrGoto 70                                # what to do in case of error
    Signal 101                                  # signal reload finished
    DdrSelfRefresh                              # batch end - MIPS stopped


# FORCED RESTARTS
# ===============

10: # >>>> Hot boot <<<<
    # Signal 40
    echo SR10->Hot boot
    OnErrGoto 70                                # What to do in case of error - try cold
    Signal 32                                   #
    TdfLoad /bffs2/AppKernel.tdf                   #
    Signal 30                                   # Batch end - mips reload finished
    cmdline ;console=ttyS0,38400n8;mem=35M;tm0size=18M;kgdb=ttyS1;root=/dev/mtdblock_auth5;lpj=1196032;init=/init;ip=none;jffs2_gc_delay=20;quiet
    TdfRun  /bffs2/AppKernel.tdf                   # Remark : NO CLEAR BIS !!

11: # >>>> Start fast cold boot <<<<
    # Signal 40
    echo SR11->Start Fast Cold Boot
    OnErrGoto 70                                # What to do in case of error - try cold
    Signal 31                                   # Signal fast cold start
    DdrSelfRefresh                              # Error reason is stored in mem (no clear section)

12: # >>>> Fast cold boot <<<<
    # Signal 40
    echo SR12->Finish Fast Cold Boot
    OnErrGoto 1                                 # what to do in case of error
    TdfLoad /bffs2/cdDownloadTM0.tdf            # load files
    TdfrunTm 0x4600000                             
    TdfLoad /bffs2/AppKernel.tdf                   # Check that it is really the mips_txt and that it is still valid
    TdfLoad /bffs2/atvTm0App.tdf
    MemFill 0x87fff000 0x1000 0xff              # Clear BIS
    Signal 30                                   # fast cold reload finished
    cmdline ;console=ttyS0,38400n8;mem=35M;tm0size=18M;kgdb=ttyS1;root=/dev/mtdblock_auth5;lpj=1196032;init=/init;ip=none;jffs2_gc_delay=20;quiet;earlytm=0x4600000
    TdfRun /bffs2/AppKernel.tdf                    # batch end - run app


# SECOND SPIN ADDITIONS
# =====================
13: # >>>> Goto self refresh <<<<
    Signal 30                                   #
    DdrSelfRefresh                              #


# OTHER SETBOOTMODE ARGUMENTS WHICH SHOULD !NOT! BE PASSED TO UBTM
# ================================================================
40: # >>>> Viper Infra Initialized <<<<
    echo SR40->Viper Infra Initialized
    Goto 70                                     # This is an invalid value.


# ERROR HANDLING
# ==============

60: # >>>> Retry For Coldboot <<<<
    echo SR60->Retry coldboot
    OnErrGoto 4                                 # what to do in case of error - try loading sw upgrade app
    TdfLoad /bffs2/cdDownloadTM0.tdf            # load files
    TdfrunTm 0x4600000
    TdfLoad /bffs2/atvTm0App.tdf                # load files
    TdfLoad /bffs2/AppKernel.tdf
    MemFill 0x87fff000 0x1000 0xff              # Clear BIS
    Signal 30                                   # signal cold load finished
    cmdline ;console=ttyS0,38400n8;mem=35M;tm0size=18M;kgdb=ttyS1;root=/dev/mtdblock_auth5;lpj=1196032;init=/init;ip=none;jffs2_gc_delay=20;quiet;earlytm=0x4600000
    TdfRun  /bffs2/AppKernel.tdf                   # batch end - cold start

61: # >>>> Retry loading images for warmboot <<<<
    echo SR61->Retry loading images for warmboot
    OnErrGoto 70                                 # what to do in case of error - try loading sw upgrade app
    TdfVerify /bffs2/cdDownloadTM0.tdf           # verify files
    TdfVerify /bffs2/atvTm0App.tdf              # verify files
    TdfVerify /bffs2/AppKernel.tdf
    MemFill 0x87fff000 0x1000 0xff              # Clear BIS
    Signal 30                                   # signal warm boot end
    cmdline ;console=ttyS0,38400n8;mem=35M;tm0size=18M;kgdb=ttyS1;root=/dev/mtdblock_auth5;lpj=1196032;init=/init;ip=none;jffs2_gc_delay=20;quiet
    TdfRun  /bffs2/AppKernel.tdf                   # batch end - warm start


70: # >>>> Fatal Error <<<<
    echo SR70->FATAL ERROR
    OnErrGoto 80
    Signal 101                                  # signal fatal error (cold restart by standby)
    Exit                                        # batch execution ends here

80: # >>>> Signal Fails <<<<
    echo boot2: SR80->EXIT, signal fails
    Exit


default:                                    # Unknown entry - batch error
    echo boot1: Default->Unknown entry        # Added as a workaround
    Goto 1
Yeah with commands like Goto, Echo, ETC. Yes this is stored in the NAND completely unrmeoved of all strings. And it appears that this bootloader is EXTREMELY advanced more than most embedded bootloaders like.... Well I don't spend my time looking at embedded bootloaders but id say in FOREVER.

Now lets go over what .TDF is.

TDF is a file that appears to be a file format that can store EVERYTHING.
  1. It can contain ENTIRE vmlinux images and have it loaded similarly to a ELF
  2. It can contain these batch scripts(The one I just showed was in this boot.TDF)
  3. It can contain Linux Binaries.
  4. It can contian Drivers and be directly loaded
  5. It can store whatever CDDOWNLOAD is
Pretty much TDF can do EVERYTHING. It contain shell scripts and be directly ran, It can be store vmlinuxes and be directly loaded like a .ELF file. It can even be a driver. Its a file format that is fucking insane. Like I have NEVER seen ANYTHING like this.

Todays spergpost will be less about me showing my progress as im stuck between a hard rock right now(Which if anyone wants to do some reverse engineering or try to get a NAND working properly in QEMU message me and ill not only make it worth your while but also give you EVERYTHING I have to get started with explinations for everything). But rather my discoverys exploring this thing.
Now admittly I have NO IDEA how this bootloader works, I don't know where it ENDS so I cant just byte cut it into ghirda and see how it works...

Well maybe I could... But I don't know...
 
>googling how to paste from system clipboard in neovim
>"p+ or some shit
>keep getting errors nothing in buffer
>give up
>randomly mention it on matrix
>someone says shift+insert
>think theyre full of it cause normal shortcuts dont work in vim
>try it anyways
mfw it works
 
>googling how to paste from system clipboard in neovim
>"p+ or some shit
>keep getting errors nothing in buffer
>give up
>randomly mention it on matrix
>someone says shift+insert
>think theyre full of it cause normal shortcuts dont work in vim
>try it anyways
mfw it works
meanwhile nano is like:
1767120597276.png
 
>googling how to paste from system clipboard in neovim
>"p+ or some shit
>keep getting errors nothing in buffer
>give up
>randomly mention it on matrix
>someone says shift+insert
>think theyre full of it cause normal shortcuts dont work in vim
>try it anyways
mfw it works
I recommend just setting this

Code:
vim.o.clipboard = "unnamedplus"

I lets you paste into neovim from the system clipboard, but it also uses the system clipboard as the normal clipboard instead on internal registers. There are some positives to not doing this, like if you are someone that actually uses neovims ability to have multiple registers to yank things into. But most people don't so I think this is the reasonable option to set.
 
I switched to mint after using windows my whole life recently, and I feel like I've just left an abusive relationship. :suffering:

How the fuck anyone is willing to live with literal ads infesting their OS is beyond me.

I'm slowly making the switch. I've been trying out different distros through VirtualBoxes. Problem with that is my main concern is touchpad gestures in the browser. Couldn't get them to work in virtual environments. But I read that's a thing that can happen because of how Windows passes the info to the virtual environment.

I tried out Mint on a 10 year old laptop I hadn't been using. Couldn't get the gestures to work. Tried Ubuntu and it works. I was amazed at how well everything just worked in Ubuntu without changing anything. Even the touchscreen on it works. Now I'm planning on making the switch to my main laptop.

Not even going double boot. Windows can fuck off. No more waking up to discover that my computer was forced to restart itself overnight and making god knows what changes to it.
 
>googling how to paste from system clipboard in neovim
>"p+ or some shit
>keep getting errors nothing in buffer
>give up
>randomly mention it on matrix
>someone says shift+insert
>think theyre full of it cause normal shortcuts dont work in vim
>try it anyways
mfw it works
an update to this is i had someone try it in st and he said shift+ins doesnt work
but for him his terminal has alt+v bound to paste so that did work
i also tried ctrl+ins to copy text from neovim and tried to paste it in my browser and that did work, too
so seems to be a terminal shortcut rather than a neovim specific thing a la wordperfect
 
Hmm, I reinstalled my system and now pressing middle mouse down scrolls up a bit and releasing it scrolls down a bit (only in librewolf, and it also complains about unavailable DRI despite glxinfo stating I have it). Never a boring day lol.
but for him his terminal has alt+v bound to paste so that did work
I had this when using larbs, it is indeed an st thing.
 
an update to this is i had someone try it in st and he said shift+ins doesnt work
but for him his terminal has alt+v bound to paste so that did work
i also tried ctrl+ins to copy text from neovim and tried to paste it in my browser and that did work, too
so seems to be a terminal shortcut rather than a neovim specific thing a-la wordperfect
Terminal programs exist in their own special bubble where they’re running on 1980s hardware and anything graphical may as well not exist. It’s up to the terminal emulator to interface between these programs and the rest of the system, including things like cut copy and paste.
There once was an OS where the terminal was just a scrollable (and editable) text buffer, unshackled from the moorings of 4 decade old hardware. It had special commands, in addition to copy and paste, to specifically interact with the shell, copying arguments directly into saved commands and running them with just a mouse click. But alas, it was too weird and ugly, and so the world turned its back. There once was a dream, a dream called Plan 9…
 
I was led a merry fuckin' chase this weekend because Ubuntu LTS decided the solution to the mongodb CVE was to upgrade everyone to 7 straight from 5 rather than other potential paths. Which of course you can't really do per se. And rather than bombing out it managed to do some kind of weird partial upgrade that took a nice little while to sort out.

Nothing terribly insightful, just less-fun-times.
 
I was led a merry fuckin' chase this weekend because Ubuntu LTS decided the solution to the mongodb CVE was to upgrade everyone to 7 straight from 5 rather than other potential paths. Which of course you can't really do per se. And rather than bombing out it managed to do some kind of weird partial upgrade that took a nice little while to sort out.

Nothing terribly insightful, just less-fun-times.
I'm not sure who this makes look worse:
  1. Ubuntu
  2. MongoDB (for having patches available, and in production for their cloud services, but NOT RELEASED TO ANYONE OUTSIDE THEIR CLOUD SERVICES for several days after they announced the CVE, and for not making an announcement of the 5.x patch even though they released one)
  3. Developers whose hobby projects leverage MongoDB instead of SQLite for some reason
  4. Mongos who don't just chose to use MongoDB but expose it to the open internet
  5. MongoDB defenders
I'm going to go with #5
 
Last edited:
Hmm, I reinstalled my system and now pressing middle mouse down scrolls up a bit and releasing it scrolls down a bit (only in librewolf, and it also complains about unavailable DRI despite glxinfo stating I have it). Never a boring day lol.

I had this when using larbs, it is indeed an st thing.
the only time I've ran into that was using freebsd. except it was my right and left mouse buttons. I think the left when up slightly and right went down slightly. that or the other way around. It made it unusable. In that case it wasn't just one application though, it was everything.

an update to this is i had someone try it in st and he said shift+ins doesnt work
but for him his terminal has alt+v bound to paste so that did work
i also tried ctrl+ins to copy text from neovim and tried to paste it in my browser and that did work, too
so seems to be a terminal shortcut rather than a neovim specific thing a la wordperfect
yeah. it just takes whatever normal terminal shortcut for pasting from the system clipboard. as far as neovim is concerned it's just texted getting entered into the buffer iirc with how it's handled. Although I do believe it still works file with things like visual block mode.

still, I think it's better to just go with the unnamedplus setting. that or find out which register your system clipboard is set to with how it's set up on your system. then you can use p without setting your system clipboard to be the register neovim copies and pastes from. but like I said in the post above, that only has a benefit if you plan to actually take advantage of how vim/neovim handles registers.
 
But as it is, installing the "hard" distros like arch or gentoo feels way more comfortable to me than trying to wrestle around with the windows installer to force it to do minimum of what I don't want it to do*, and the "easy" distros are literally just around five clicks and you have a working system.

*I have had to install windows 10 many times over the years, thankfully I haven't had the displeasure with 11 yet, and I don't remember a single instance where the installer didn't take me down a road I didn't want, where I didn't have to restart the install process because I "messed something up"
No offense but unless Microsoft drastically shat up the installer recently how do you fuck that one up?
I haven't daily driven Windows in years :neckbeard: but from what I remember it only asks basic questions like what drive partition you want it on, your name and password, etc, and then restarts into a clean slate. Hardly different than "easy" distros like Mint that use graphical installers
 
Back
Top Bottom