IRC #olimex 2023-01-18

[07:18:22] <kreyren> Tsvetan, the armbian image for teres one has saved passwords to your wifi hotspots "OlimexTenda 1" and "Olimex Tenda", hint '5ource' ... you probably want to change the PWs or like remove those from the image xD
[07:18:42] <kreyren> nedko, ye seems to O.o
[07:19:35] <kreyren> also OlimexAP and OlimexTenda 2 is there but without password
[09:39:29] <Tsvetan> kreyren you are welcome to come and use our WiFi :)))
[09:40:00] <kreyren> Tsvetan, hihihi oke~
[09:43:18] <Tsvetan> if we had CAD files for the plastics they would be on Github, we use off the shelf plastic from laptop vendor who would never share them
[09:43:30] <kreyren> Tsvetan, fair
[09:43:37] <kreyren> Tsvetan, CH32V003 when?
[09:44:05] <kreyren> https://invidious.nerdvpn.de/watch?v=L9Wrv7nW-S8
[09:44:13] <Tsvetan> not when, why? :)
[09:44:24] <kreyren> 10 cent risc-v microprocessor :p
[09:46:40] <kreyren> ehh microcontroller
[09:46:40] <kreyren> @_@
[09:46:49] <kreyren> wait wa
[09:48:31] <kreyren> oh inndustrial-grade general-purpose microcontroller according to the datasheet http://www.wch-ic.com/products/CH32V003.html
[09:48:55] <kreyren> using the QingKe RISC-V2A core and RV32EC instruction set
[10:06:52] <Tsvetan> there are probably hundreds of different processors and architectures in this price range, what makes one processor useful is what firmware and libraries are available so you do not re-invent the wheel. Arduino, RP2040-PICO, ESP32 are popular because there are tons of libraries and examples and you can proof of concent in hours
[10:07:32] <kreyren> the video says to be using a fork of Eclipse (GNU Version) and GNU riscv cross compiler O.o
[10:07:59] <kreyren> seems to be the same base arduino IDE is using
[10:08:20] <Tsvetan> may Chinese venrods think I will release new processor with low cost and this will take the market, usually this doesn't happen - look Realtek competition for ESP32, they released lower cost probably better specs WiFi modules, but no one is useing them
[10:08:37] <kreyren> hmm true
[10:09:13] <Tsvetan> kreyren - ok, download the compiler and make small code which talk to I2C temperature sensor and display the result on LCD screen
[10:09:34] <Tsvetan> if they use same Arduino base it should be pretty simple right ;)
[10:09:38] <BlagovestPetrov4> Tsvetan: [offtopic] https://news.ycombinator.com/item?id=34350877 :)
[10:11:13] <Tsvetan> BlagovestPetrov4 :)
[10:12:17] <kreyren> ACTION added that on his todo
[11:56:51] <kreyren> oh there are up to date images of armbian for teres-1 on their website at the bottom of the page
[11:56:52] <kreyren> @_@
[13:18:02] <kreyren> Tsvetan, mby add this https://www.armbian.com/olimex-teres-a64/ as unofficial armbian images to the teres-1 product page? Would save me a lot of headache if i knew baout it @_@
[15:08:08] <clarity> BlagovestPetrov4: Do you comment on hn?
[15:11:25] <BlagovestPetrov4> I'm eniac111 there :)
[15:15:25] <clarity> Damn
[15:15:31] <clarity> I was hoping you'd post a response to eniac111
[15:15:46] <BlagovestPetrov4> :D
[15:16:05] <clarity> FAQ for the olimexino 85 kit explains why it's USB-B https://www.olimex.com/Products/Soldering-Kits/OLIMEXINO-85-KIT/open-source-hardware
[15:16:10] <clarity> (It's meant to be easy to solder)
[15:16:42] <BlagovestPetrov4> :) usb-b is ok
[15:16:52] <BlagovestPetrov4> I just don't need it in the case
[15:16:54] <clarity> I find it oddly satisfying to solder these kits.. I got a few of them, and I haven't done anything except solder them :)
[15:17:17] <clarity> Maybe I'll find a use some day
[15:25:31] <kreyren> ACTION USBCMasterRace shaven wooden stick included
[15:38:44] <clarity> I found C to be tricky to solder
[15:38:50] <clarity> And, well
[15:39:24] <clarity> Maybe soldering it wasn't *that* bad but I think ended up with flux somehow seeping into the connector
[15:39:30] <clarity> As if by capillary action or something, idk
[15:39:53] <clarity> Consequence was that the connector would work fine right after wetting the joints
[15:40:11] <clarity> But a bit later would start breaking contact due to dried flux
[15:40:23] <clarity> And it's not easy to clean inside the connector
[15:42:23] <kreyren> i always put solder paste on the pcb, then coat one pin in tin and solder that with iron to the pcb to keep it in place and then finish with hot air
[15:42:37] <kreyren> ACTION was making fun of USB-C's issue with copressed dust at the bottom of the connector btw
[15:43:46] <clarity> Yea I realized that
[15:44:00] <clarity> Toothpicks didn't work for cleaning my contacts :P
[15:44:03] <clarity> Of flux
[15:44:06] <kreyren> it annoys me so much you can't even imagine xD
[15:44:06] <clarity> I used something metallic
[15:44:13] <kreyren> self-cleaning flux and hair drier then?
[15:44:32] <clarity> Idk what self-cleaning is
[15:44:45] <kreyren> flux that if you heat up it will evaporate
[15:44:50] <kreyren> olimex sells one last time i checked :p
[15:45:03] <clarity> Ok, never seen such a thing. Maybe next time I shop at olimex..
[15:45:19] <kreyren> you should be able to get these locally too they ar elike everywhere
[15:45:39] <kreyren> https://www.olimex.com/Products/Components/Soldering/SOLDER-PASTE-SAC305-CLASS4/
[15:47:01] <clarity> I have paste
[15:47:03] <kreyren> when i get flux in a connector i usually just use a hair drier bcs hot air is too hot even when set on lowest temp
[15:47:11] <kreyren> eh?
[15:47:25] <clarity> But I was soldering with wire + flux
[15:47:37] <kreyren> i though u had issue with flux inside the connector?
[15:47:40] <clarity> Yes
[15:47:52] <kreyren> -> self-cleaning/No clean paste evaporates if you heat it up after longer time
[15:48:12] <kreyren> -> clean connector :p
[15:49:42] <kreyren> hmm the minimal armbian sid image has broken wireless
[16:55:27] <kreyren> umm what does teres-1 need for audio?
[16:59:51] <kreyren> i have pulseaudio but it just shows dummy output
[16:59:52] <kreyren> hmmm
[16:59:53] <kreyren> mby also
[16:59:55] <kreyren> *alsa
[17:03:14] <kreyren> ACTION is even more confused
[17:12:32] <kreyren> aAAAaaaaaaaa
[17:40:31] <kreyren> ACTION 's RFID watch he got from olimex broke after 2 days u.u
[18:23:43] <kreyren> ACTION read through allwinner docs and is still confused about how to get his audio to work
[18:29:42] <kreyren> ACTION figured out the needed packages from https://wiki.debian.org/ALSA#Packages
[18:31:33] <kreyren> stil ldoesn't work ;-;
[18:50:55] <kreyren> it's gonna be something like user not in the audio usergroup and i will be mad
[19:30:18] <kreyren> imma gonna get cursed by ubuntu i can already see it
[19:30:19] <kreyren> the pain
[19:31:11] <kreyren> the gnome in debian is slow af too ;-;
[19:31:24] <mps> kreyren: maybe this better fit your needs https://arvanta.net/alpine/alpine-on-olimex/
[19:32:16] <kreyren> > /bin/sh, uses bash syntaxes
[19:32:17] <kreyren> the heresy
[19:32:39] <mps> though I didn't tested big DEs (gnome, kde ...) and only used awesome wm
[19:32:43] <kreyren> mps, not bad i will refactor the whole thing though
[19:33:23] <mps> yes, it is somewhat outdated
[19:33:52] <kreyren> rather the writing mistakes like 'mount -t proc none $TMPDIR/proc' etc.. xD
[19:33:58] <mps> and this reminds me that I have to upgrade kernel and u-boot
[19:34:25] <kreyren> does it work withon issue though? if so it will help a ton when i go developing a guix image
[19:34:56] <kreyren> > grub-install --target=arm64-efi --efi-directory=/boot/efi --removable
[19:34:58] <kreyren> ehww efi
[19:35:17] <kreyren> also lacks license ;-;
[19:35:19] <mps> and this is already fixed "note: current u-boot stable release for TERES-I have a bug that the keyboard doesn't work in u-boot prompt and as result in grub s ....' have to remove this comment
[19:35:59] <mps> license, what is that ;-)
[19:36:25] <kreyren> mps, thing that if it's lacking it's legally treated as proprietary :p
[19:36:35] <kreyren> Expat it? u.u
[19:36:48] <mps> IANAL
[19:37:05] <mps> maybe ad 'no license'
[19:37:17] <kreyren> no license = proprietary :p
[19:37:18] <mps> add*
[19:37:57] <mps> seriously I don't have idea which license will be good for such small things
[19:38:07] <kreyren> Expat/MIT
[19:39:36] <mps> about grub, yes I don't like it but nowadays it is everywhere, mostly
[19:39:45] <kreyren> can it work without EFI?
[19:40:02] <mps> yes, simple extlinux.conf works fine
[19:40:09] <kreyren> yay
[19:41:17] <mps> here is how I created image for riscv64 visionfive v1 with u-boot only and extlinux.conf https://arvanta.net/alpine/alpine-on-visionfivev1/
[19:41:28] <mps> nearly same script
[19:44:25] <kreyren> ACTION is reading and writing things
[20:21:07] <kreyren> mps, can you explain to me the reasoning for the parted comments in 'echo "Paritioning disk"' step?
[20:21:15] <kreyren> mktable msdos > /dev/null?
[20:21:36] <kreyren> then making an ext4 filesystem starting at 8192 and ending at 1056767
[20:21:57] <kreyren> and then another ext4 filesystem at 1056768 and ending at 17833983
[20:21:59] <kreyren> and why esp?
[20:22:21] <kreyren> and there is a comment for 'fat32 512' for ?
[20:23:11] <kreyren> ACTION kinda refactored the whole thing into a 300 line wide script with lots of comments and stuff~
[20:25:07] <mps> kreyren: echo is just to follow what happens in script
[20:25:27] <mps> ESP is needed for grub
[20:25:44] <kreyren> mps, i know i am using the echo to orient what part of the code i don't understand so that i can document it the script https://i.imgur.com/1zsppft.png
[20:26:01] <kreyren> > <mps> ESP is needed for grub | Why?
[20:26:25] <mps> I don't give much importance to echo, just like to see progress
[20:26:51] <kreyren> i know what echo does xD I am trying to understand the reasoning for the parted commands
[20:27:17] <mps> because grub installs bootaa64.efi on esp
[20:27:33] <kreyren> so only needed for UEFI?
[20:28:02] <mps> arm64 architecture should use UEFI, everyone says
[20:28:16] <kreyren> why
[20:28:20] <mps> ESP is Efi System Partition
[20:29:17] <mps> I forgot exact document, but I remember that for ARM64 EFI is preffered
[20:29:30] <mps> unification probably
[20:30:55] <mps> I read somewhere that ESP could be ext4 nowadays but I didn't tested that
[20:32:42] <kreyren> why is there a 0~8192 sectors wide unformatted partition on arm64 boards? for bootloader?
[20:34:07] <mps> I think it is by design of SoC but better answer could give people from olimex than me
[20:34:20] <kreyren> CC Tsvetan
[20:34:47] <mps> iirc 0-4096 doesn't work
[20:35:56] <mps> first sectors contains GPT table data and maybe something more
[20:36:21] <mps> oh, u-boot
[20:36:30] <mps> uhm
[20:36:36] <kreyren> How much mb is 0-4096 sectors?
[20:36:36] <mps> and u-boot
[20:37:11] <mps> 4096/512
[20:37:30] <kreyren> 8mb?
[20:37:48] <mps> i think so
[20:38:55] <mps> number of sectors / sector size
[20:41:58] <kreyren> mps, http://ix.io/4lBC please review the in-code docs for partitioning
[20:42:19] <kreyren> oh you are doing more things in hte 'Creating dirs andmounting'
[20:42:20] <kreyren> ehhh
[20:42:42] <kreyren> so the boot partition (2048 MB) is supposed to be FAT32?
[20:43:23] <kreyren> hmm olimex images have 50MB of fat16 for u-boot
[20:43:37] <kreyren> lets' do 150MB FAT16?
[20:43:45] <mps> hehe
[20:43:52] <kreyren> also flagged as 'lba'
[20:44:26] <mps> ime fat could be small, 32MB but I add some extra space
[20:45:02] <kreyren> i had issues with 50MB as the built-in updater on official image doesn't have enough space so lets do 150MB ^-^
[20:45:10] <kreyren> fat16 is fine then right? and why lba flag?
[20:45:22] <mps> fat/ESP contains only bootaa64.efi
[20:45:53] <mps> there are issues with fat16, because that I forced fat32
[20:46:34] <kreyren> o.o
[20:46:51] <mps> what is default with olimex debian?
[20:47:27] <kreyren> official image is using ubuntu xenial, the partition is 50MB fat16 with lba flag
[20:47:39] <mps> I tried official olimex debian image just once and that was more than a year ago
[20:47:54] <kreyren> i am using it as fallback atm xD
[20:48:09] <kreyren> bcs armbian sid built for teres is trash
[20:48:18] <kreyren> and armbian ubuntu +- works
[20:49:04] <mps> idk, I bought teres just to test A64 SoC, not for real use
[20:49:41] <kreyren> ACTION will do FAT16 150MB and blame Tsvetan if it doesn't work then~
[20:49:53] <mps> :)
[20:52:03] <kreyren> sectors seems to be 2048 per 1 MB
[20:52:08] <kreyren> well 2047.95
[20:53:24] <mps> MiB or MB
[20:53:32] <kreyren> MiB
[20:54:02] <mps> I hate these new 'scheme' for size
[20:54:19] <kreyren> oh its 40960/2048=20 MiB
[20:55:28] <kreyren> MiB is same as MB right
[20:55:31] <kreyren> MegaBytes?
[20:55:54] <mps> no
[20:56:01] <kreyren> MiB = MegaBits?
[20:56:11] <kreyren> *That's stupid*
[20:56:38] <mps> 1 MiB is 1000000 (million bytes)
[20:57:01] <kreyren> ehw
[20:57:22] <mps> 1 KiB is 1000 bytes
[20:57:37] <mps> 1 KB is 1024 bytes
[20:57:47] <mps> or vice versa nowadays
[20:58:38] <mps> I never can remember what is what
[21:00:30] <mps> RAM vendors and disk vendors use these differently
[21:00:54] <mps> sounds confusing and it is
[21:01:45] <kreyren> rather sounds stupid to me considering that computers work in octets
[21:02:27] <kreyren> https://i.imgur.com/AzO5xgF.png u sure u r calculating it correctly?
[21:03:43] <kreyren> ehhhh
[21:04:06] <mps> no, I'm not sure tbh :)
[21:04:18] <kreyren> ACTION is confused how to calculate sectors with 20MiB, 140 MiB and the roofts
[21:04:20] <kreyren> rootfs
[21:04:44] <kreyren> Sector size of 512 = 512 sectors = 1 MB or MiB right
[21:04:56] <mps> but calculation is correct with these stupid MB
[21:05:18] <mps> I think it is MiB
[21:05:25] <kreyren> ACTION is just going to open fdisk and figure it out from that 4Head
[21:05:54] <kreyren> sacrificed for science must be made corrupt the OS on the sdcard!
[21:06:58] <mps> so, 20480 is 10MiB
[21:08:26] <mps> depends how fdisk intrepret it
[21:09:10] <mps> I have to go out now, see you later
[21:10:18] <kreyren> 0~40959; 40960~327679 (286720 sectors - 140MiB); 327680~17104859 (16777216 sectors - 8 GiB)
[21:12:04] <kreyren> mps, oke good night~ <3
[22:04:24] <mps> kreyren: I'm stupid. number of sectors * sector size = number of bytes
[22:05:01] <mps> number of sectors * sector size / 1024 = kilobytes
[22:05:25] <kreyren> mps, docs updated, thanks
[22:05:27] <mps> number of sectors * sector size / 1024 /1024 = megabytes
[22:06:36] <mps> but sgdisk could be used instead of parted. with it is possible to specify sizes in different units
[22:12:19] <clarity> thinking in powers of two makes those calculations much easier imo
[22:13:11] <clarity> 1<<10 is KiB, 1<<20 is MiB, 1<<30 is GiB, 1<<40 is TiB. If you have 512 byte sectors, subtract 9 from the exponent to get the size in sectors
[22:13:36] <clarity> 1<<1, 1<<11, 1<<21, 1<<31 sectors for the above sizes
[22:14:37] <clarity> So you can take some arbitrary number like 123 megabytes and say that's 123<<11 sectors
[22:30:05] <kreyren> mps, ye using sfdisk now with methods to change the implementation on demand
[22:30:23] <kreyren> kinda trying to figure out how to check that the partition is there now
[22:31:04] <mps> why check?
[22:31:27] <kreyren> best practice of check || action
[22:34:55] <kreyren> `sfdisk -l /dev/sda | grep -A20 -P "Device\s+Start\s+End\s+Sectors\s+Size\s+Type"` seems to be reliable
[22:39:13] <kreyren> Hmm this is really pain i will make it do img files instead