00:11
bonda_000__ has joined ##raspberrypi-internals
00:12
bonda_000__ has quit [Client Quit]
00:14
bonda_000_ has quit [Ping timeout: 245 seconds]
01:13
jcea has quit [Ping timeout: 268 seconds]
06:45
KimK has quit [Read error: Connection reset by peer]
06:46
KimK has joined ##raspberrypi-internals
07:23
bonda_000 has joined ##raspberrypi-internals
07:45
bonda_000 has quit [Read error: Connection reset by peer]
11:01
A_Dragon has joined ##raspberrypi-internals
11:21
sys64738 has quit [Ping timeout: 255 seconds]
14:19
dolphinana has joined ##raspberrypi-internals
14:28
bonda_000 has joined ##raspberrypi-internals
14:28
<
bonda_000 >
clever u here?
14:28
<
clever >
bonda_000: just on my way to the shower, and getting groceries after that
14:28
<
bonda_000 >
I got the aarch64 linux going although windows is down lol
14:29
<
bonda_000 >
ready to work with lk-overlay
14:29
<
clever >
down with windows! :D
14:29
<
bonda_000 >
huh no I still need it for msp432
14:29
<
clever >
is the vc4 toolchain all built?
14:29
<
bonda_000 >
yes I just need to know what to "make"
14:29
<
bonda_000 >
for the OS
14:29
<
clever >
2024-04-28 15:07:51 < clever> `make PROJECT=rpi3-bootcode`
14:29
<
clever >
2024-04-28 15:28:39 < clever> [nix-shell:~/apps/rpi/lk-overlay]$ ls -lhs build-rpi3-bootcode/lk.bin
14:30
<
clever >
2024-04-28 15:28:39 < clever> 45K -rwxr-xr-x 1 clever users 53K Apr 28 15:28 build-rpi3-bootcode/lk.bin
14:30
<
clever >
when its done, you should have this file
14:30
<
bonda_000 >
oh yeah
14:31
<
bonda_000 >
the nix shell do I close it ?
14:31
<
clever >
its baiscally just the same as running bash
14:31
<
clever >
nix-shell just sets up $PATH so the vc4 gcc can be found
14:32
<
bonda_000 >
says its missing GPIO
14:33
<
clever >
bonda_000: what is the exact error message?
14:33
<
bonda_000 >
make[1]: vc4-elf-gcc: No such file or directory
14:33
<
bonda_000 >
make[1]:
*** [make/compile.mk:61: build-rpi3-bootcode/platform/bcm28xx/gpio.c.o] Error 127
14:33
<
bonda_000 >
make[1]: Leaving directory '/home/bimbom/Desktop/lk-overlay'
14:33
<
clever >
that says that your missing vc4-elf-gcc
14:34
<
bonda_000 >
I cloned it but apparently something was missing
14:34
<
bonda_000 >
in the deps
14:34
<
clever >
yeah, thats what nix automates, dealing with all of that for you, but i havent gotten that part working on aarch64
14:35
<
bonda_000 >
okay binutils are now compiling
14:35
<
clever >
i'll be in the shower while that builds
14:57
<
clever >
bonda_000: back
14:58
<
bonda_000 >
it's still compiling stuff but I think it
14:58
<
bonda_000 >
s almost done with binutils
14:59
<
bonda_000 >
so do I have to build gcc also when I get on the lk?
14:59
<
bonda_000 >
to build programs natively
14:59
<
bonda_000 >
that would speed up things so much I can't wait to get working on it
15:00
<
clever >
bonda_000: you need to build both binutils and gcc
15:00
<
clever >
once both are build, you can just compile normal c programs
15:01
<
clever >
lk itself lacks a compiler
15:01
<
clever >
i generally add code to lk, rebuild it, then reboot the pi
15:01
<
bonda_000 >
because what I've been doing is build a binary, put it on a spare SD card, reboot pi, switch cards again, destroyed a USB slot already this way on my PC
15:02
<
bonda_000 >
if we port gcc to lk thats heavenly
15:02
<
clever >
thats why i use network boot most of the time
15:02
<
clever >
ypu just drop bootcode.bin on a tftp server, and reset the pi3, with no sd card in it
15:02
<
clever >
it will load bootcode.bin over ethernet
15:03
<
bonda_000 >
I dont have that currently but I can handle writing it once to the SD card and then developing programs on it natively
15:03
<
clever >
porting gcc to lk would be a massive ordeal
15:03
<
clever >
it currently lacks a userland
15:03
<
bonda_000 >
so what would it take to have a compiler running there
15:04
<
clever >
imagine running gcc on an arduino :P
15:05
<
clever >
but i was looking at porting circuitpython and micropython earlier, and lua has been ported
15:05
<
bonda_000 >
I mean maybe not gcc but some sort of compiler
15:05
<
bonda_000 >
so that we can speed up hacking and testing all these undocumented peripherals with the code we slowly pull from Ghidra
15:06
<
clever >
just having the command prompt in lk helps a lot
15:06
<
clever >
youll see, once you have that example binary build
15:06
<
bonda_000 >
so you basically implemented all the OS stuff like tasks switching in round robin fashion correct?
15:07
<
bonda_000 >
CPU allocating it execution time etc right?
15:07
<
clever >
i got that for free, little-kernel already had it
15:08
<
bonda_000 >
so what do you mean by it lacks 'userland' then where is command prompt operating?
15:08
<
clever >
the command is running in kernel mode
15:08
<
clever >
there is no isolation between the kernel and the commands being ran, and no binary loading
15:08
<
clever >
its just a dumb loop, where if it finds "foo" in the input buffer, it runs foo()
15:09
<
bonda_000 >
what is 'no binary loading'
15:09
<
clever >
you cant load an executable from disk
15:09
<
clever >
you can only run code that was in the kernel when it got compiled
15:09
<
bonda_000 >
so at this point you cannot write an application to run on it
15:10
<
clever >
you can, it just has to be written as part of LK
15:10
<
bonda_000 >
does it have a file system?
15:10
<
clever >
filesystem is optional
15:10
<
clever >
i have working usb and ext4 drivers
15:10
<
clever >
this is an example of a video player application
15:11
<
clever >
lines 444-447 define a usb hook, and on bootup, bad_apple_usb_init() gets ran
15:11
<
clever >
each time a usb storage device is plugged in, it will run bad_aple_msd_probed()
15:11
<
clever >
and line 440 will fire up a thread to play the video file on that drive
15:12
<
clever >
395 mounts the usb drive
15:12
<
clever >
400/401 opens the audio and video files
15:12
<
clever >
405 creates a thread to play audio
15:12
<
clever >
and 408 plays the entire video
15:22
f_ has joined ##raspberrypi-internals
15:29
<
bonda_000 >
This will give you a vc4-targeted toolchain in $(pwd)/prefix/bin
15:30
<
bonda_000 >
It still doesn't recognize it
15:30
<
clever >
bonda_000: did you add that path to $PATH?
15:31
<
bonda_000 >
not yet
15:31
<
clever >
then make wont be able to find it
15:33
<
bonda_000 >
export "PATH=$(pwd)/prefix/bin:$PATH"
15:33
<
bonda_000 >
is what I must do correct?
15:33
<
clever >
yep, that should work
15:34
<
bonda_000 >
it's done
15:34
<
bonda_000 >
what should I use for the UART to USB dongle on this Linux
15:34
<
clever >
which part is done?
15:35
<
bonda_000 >
the lk is built
15:35
<
clever >
115200 baud, same pins as usual, 14/15
15:35
<
bonda_000 >
to be able to talk to the lk shell
15:35
<
bonda_000 >
I mean on the Linux side
15:35
<
clever >
i like using `minicom -D /dev/ttyACM0 -b 115200 -o`
15:35
<
bonda_000 >
I had putty on windows
15:35
<
bonda_000 >
oh alright
15:49
<
bonda_000 >
so you are saying booting by ftp or sd card correct?
15:59
<
clever >
bonda_000: yeah, either will work, but i gotta run now, grocery time!
16:11
<
bonda_000 >
yeah same
16:41
bonda_000 has quit [Ping timeout: 272 seconds]
17:34
bonda_000 has joined ##raspberrypi-internals
17:34
<
bonda_000 >
i'm back
17:35
<
bonda_000 >
okay it's all built so let me set up the ftp and try it out
18:17
<
clever >
bonda_000: last i checked, the dhcp server and tftp server have to be on the same machine
18:18
<
clever >
so you either need control of your router, or you need to plug the rpi3 into a laptop
18:18
<
bonda_000 >
my rpi is plugged into the router at the moment
18:18
<
bonda_000 >
by the Ethernet cable
18:22
sys64738 has joined ##raspberrypi-internals
18:40
f_ has quit [Ping timeout: 260 seconds]
18:41
_whitelogger has joined ##raspberrypi-internals
18:42
<
clever >
line 2 shows my dhcp server running, and lines 4-13 are the important parts of the dhcp server config
18:42
<
clever >
lines 4 and 12 are critical
18:42
<
clever >
the rest is just bog-standard dhcp server stuff
18:42
<
clever >
16 is xinetd running, and 18-38 is the xinetd config
18:43
<
clever >
lines 26-38 tell xinetd to listen on the tftp port, and to run in.tftpd every time a connection comes in
18:43
<
clever >
and to tell in.tftpd to use /tftproot
18:43
<
clever >
and within that directory, is a bootcode.bin
18:47
<
bonda_000 >
so on my router there is a "Host site" setting which says Virtual server settings
18:47
<
bonda_000 >
do I do that or have my Linux machine as a "server"
18:47
<
clever >
your router is too dumb, it cant do what you need
18:48
<
clever >
so your only option is to plug the rpi into a laptop, and run the dhcp and tftp there
18:49
<
bonda_000 >
so what is the Pi doing on the Ethernet boot
18:49
<
clever >
it will do a dhcp request
18:49
<
clever >
and its expecting that special "Raspberry Pi Boot " to come back from the dhcp server
18:49
<
clever >
if its missing, then game over
18:50
<
bonda_000 >
Okay I can connect PC and RPi via Ethernet no problem
18:55
bonda_000 has quit [Ping timeout: 252 seconds]
18:55
bonda_000_ has joined ##raspberrypi-internals
18:55
<
bonda_000_ >
whoops must have hit something
18:55
<
bonda_000_ >
the pc turned off but the Ethernet cable is now in both sides
18:56
<
bonda_000_ >
the window "Connection failed" keeps popping up
18:57
<
clever >
did you start a dhcp server, and configure it similarly to my example?
18:58
<
bonda_000_ >
just installed dhcpd
18:58
<
bonda_000_ >
"router" is your host machine right? Where the bootcode.bin is held
18:59
<
bonda_000_ >
xinet I have a xinetd
19:00
<
bonda_000_ >
dhcpd, xinetd, tftpd-hpa
19:00
<
bonda_000_ >
these three I installed
19:00
<
clever >
sounds right
19:02
<
bonda_000_ >
ps aux | grep dhcpd is what
19:02
<
bonda_000_ >
I get something wrong on this one
19:03
<
bonda_000_ >
well I haven't configured anything yet so no surprise
19:06
dolphinana_ has joined ##raspberrypi-internals
19:07
<
bonda_000_ >
okay let me read this page on how to do this on my Linux distro
19:08
<
clever >
if you run wireshark, and listen to the port where the pi is connected, you should see the dhcp requests
19:09
dolphinana has quit [Ping timeout: 260 seconds]
19:17
<
clever >
bonda_000_: but you can always start with an sd card first as usual, to confirm the LK build is working, and see how it works in general
19:24
<
bonda_000_ >
okay I am copying your dhcp config
19:24
<
bonda_000_ >
with Raspberry Pi Boot and 3 spaces
19:25
<
bonda_000_ >
so that's all your dhcp config 10 lines?
19:26
<
clever >
bonda_000_: thats the important parts, i removed things like the static ip for each mac, and unrelated ipxe junk
19:26
<
bonda_000_ >
mine stock one has a lot uncommented but a few they left like ddns-update-style-none
19:26
<
bonda_000_ >
I will just uncomment these then
19:26
<
bonda_000_ >
comment*
19:28
<
bonda_000_ >
and then I have
19:29
<
bonda_000_ >
/etc/xinetd.conf
19:29
<
bonda_000_ >
/etc/xinetd.d folder
19:29
<
dolphinana_ >
are you doing netboot or something?
19:29
<
bonda_000_ >
well balena etcher is broken on this Linux for some reason although I got the official repo
19:30
<
bonda_000_ >
so yeah and that will be useful for future
19:30
<
clever >
bonda_000_: anything mentioning tftp in either the .conf or the .d ?
19:31
<
bonda_000_ >
I have a /etc/default/tftpd-hpa
19:32
<
clever >
yep, that sounds good
19:32
<
bonda_000_ >
which I already edited and put TFTP_DIRECTORY as a folder on my Desktop, TFTP_ADDRESS="0.0.0.0:69"
19:32
<
clever >
and in there, what are the server_args ?
19:32
<
bonda_000_ >
TFTP_OPTIONS="--secure" thats it
19:32
<
clever >
that might work
19:32
<
clever >
and then just restart both dhcpcd and xinetd
19:34
<
bonda_000_ >
my xinetd.conf is all defaults
19:34
<
bonda_000_ >
includedir /etc/xinetd.d at the end
19:34
<
bonda_000_ >
body is empty
19:34
<
bonda_000_ >
let me fill that up
19:34
<
clever >
yep, thats the classic way of doing it
19:35
<
clever >
that lets things like the tftp package add to the config with /etc/xinetd.d/something_tftp
19:36
<
bonda_000_ >
and then server is the folder with bootcode.bin right?
19:37
<
bonda_000_ >
what's server args
19:37
<
clever >
the arguments passed to the server when launching it
19:37
<
bonda_000_ >
nix/store/2n9w9484wizr7nfnn227j3v844rpvs1j-netkit-tftp-0.17/sbin/in.tftpd
19:38
<
clever >
thats the server
19:38
<
bonda_000_ >
is your server value
19:38
<
bonda_000_ >
what is it a directory?
19:38
<
clever >
on your system, it would just be /sbin/in.tftpd
19:38
<
clever >
nixos just installs everything to a unique directory
19:39
<
bonda_000_ >
found it
19:42
<
bonda_000_ >
so in the root / I create a tftproot directory
19:42
<
bonda_000_ >
and put bootcode.bin in there
19:42
<
bonda_000_ >
since ls says ls: cannot access '/tftproot/': No such file or directory
19:43
<
clever >
thats just where my tftp server happens to be looking
19:43
<
clever >
you want to match your own config, or change the config to that dir
19:44
<
bonda_000_ >
sudo cp ~/Desktop/lk-overlay/build-rpi3-bootcode/lk.bin /tftproot
19:44
bonda_000_ has quit [Remote host closed the connection]
19:45
bonda_000_ has joined ##raspberrypi-internals
19:45
<
bonda_000_ >
I just want to get this done and get back to VC4 coding :D I mean its my first day on real Linux
19:52
<
bonda_000_ >
Apr 29 22:51:17 max systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
19:54
<
clever >
bonda_000_: the true error is a few lines above thatr
19:55
juri_ has quit [Ping timeout: 252 seconds]
19:56
<
bonda_000_ >
Process: 4928 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)
19:57
<
clever >
there should be more in the logs
19:57
<
bonda_000_ >
do you have something like /etc/default/isc-dhcp-server
19:58
<
bonda_000_ >
there are more configs like INTERFACESv4="eth0"
19:58
<
clever >
nope, that doesnt exist on nixos
19:58
<
clever >
is the rpi plugged into eth0 on the machine?
20:00
<
bonda_000_ >
they are connected by ethernet cable I'm not sure if thats eth0 or eth0
20:00
<
clever >
what does `ifconfig -a` report?
20:00
<
bonda_000_ >
command not found
20:01
<
bonda_000_ >
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
20:01
<
bonda_000_ >
valid_lft forever preferred_lft forever
20:01
<
bonda_000_ >
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
20:01
<
bonda_000_ >
inet 127.0.0.1/8 scope host lo
20:01
<
bonda_000_ >
inet6 ::1/128 scope host noprefixroute
20:01
<
bonda_000_ >
valid_lft forever preferred_lft forever
20:01
<
bonda_000_ >
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
20:01
<
bonda_000_ >
link/ether f4:39:09:33:f3:f2 brd ff:ff:ff:ff:ff:ff
20:01
<
bonda_000_ >
3: wlp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
20:01
<
clever >
so the answer, is that you dont even have an eth0
20:01
<
bonda_000_ >
link/ether 28:3a:4d:07:74:95 brd ff:ff:ff:ff:ff:ff
20:01
<
bonda_000_ >
inet 192.168.0.27/24 brd 192.168.0.255 scope global dynamic noprefixroute wlp1s0
20:01
<
bonda_000_ >
valid_lft 82340sec preferred_lft 82340sec
20:01
<
clever >
so any attempt to use eth0 will just fail
20:01
<
bonda_000_ >
inet6 fe80::726a:e725:b9b4:e5b6/64 scope link noprefixroute
20:01
<
bonda_000_ >
valid_lft forever preferred_lft forever
20:01
<
bonda_000_ >
i see its enp
20:01
<
clever >
yeah, change the dhcp server config to enp2s0
20:02
<
clever >
and also assign a static ip to enp2s0, that matches the dhcp server config, and it must differ from 192.168.0
20:02
<
clever >
for example, make enp2s0 10.0.0.1, with a mask of 255.255.255.0
20:03
<
bonda_000_ >
how do I do that
20:03
<
dolphinana_ >
what are you two doing?
20:03
<
clever >
dolphinana_: setting up network boot on the rpi
20:03
<
bonda_000_ >
setting me up for vc4 coding
20:03
<
clever >
bonda_000_: not sure, i havent used debian before
20:03
<
clever >
and its been years since i used ubuntu
20:04
<
bonda_000_ >
says I still have configuration file errors
20:04
<
bonda_000_ >
maybe its IPv6 that I need to use?
20:04
<
clever >
no, the pi3 doesnt support v6
20:04
<
clever >
does it say which file the problem is in?
20:04
<
bonda_000_ >
will try to look at the log
20:06
<
bonda_000_ >
maybe it doesn't understand "option rpiboot code 43 = text;"?
20:06
<
bonda_000_ >
as well as option rpiboot "Raspberry Pi Boot "
20:06
<
clever >
can you pastebin your entire config file?
20:07
<
clever >
and the exact error that it gave
20:10
<
dolphinana_ >
clever, bonda_000_ I see, good luck you too ^^
20:14
<
bonda_000_ >
there is also /etc/default/udhcpd.conf that says
20:14
<
bonda_000_ >
# Comment the following line to enable
20:14
<
bonda_000_ >
DHCPD_ENABLED="no"
20:14
<
bonda_000_ >
# -S Log to syslog
20:14
<
bonda_000_ >
# Options to pass to busybox' udhcpd.
20:14
<
bonda_000_ >
# -f run in foreground
20:14
<
bonda_000_ >
DHCPD_OPTS="-S"
20:14
<
clever >
sounds like you never enabled it
20:15
<
bonda_000_ >
still configuration file errors
20:16
<
clever >
what is the exact error message it gives?
20:16
<
bonda_000_ >
do journalctl -xeu isc-dhcp-server.service
20:16
<
bonda_000_ >
and the journal has no entries
20:17
<
clever >
try just `journalctl -f`
20:17
<
bonda_000_ >
Hint: You are currently not seeing messages from other users and the system.
20:17
<
bonda_000_ >
Users in groups 'adm', 'systemd-journal' can see all messages.
20:17
<
bonda_000_ >
Pass -q to turn off this notice.
20:17
<
clever >
also, run journalctl as root
20:18
<
bonda_000_ >
The unit isc-dhcp-server.service has entered the 'failed' state with result 'exit-code'.
20:19
<
clever >
found the problem
20:19
<
bonda_000_ >
A start job for unit isc-dhcp-server.service has finished with a failure.
20:19
<
clever >
my config has
20:19
<
clever >
default-lease-time 86400; # 1 day
20:19
<
clever >
default-least-time 86400; #1 day
20:19
<
clever >
lease is not spelled correctly
20:20
<
bonda_000_ >
and its so cluttered
20:20
<
bonda_000_ >
with comments
20:20
<
clever >
[root@router:~/ff6fcee94896b57d8ff3e970aaea80d4]# /nix/store/s4cxgsdyypgi942chr559n94p2k9lbfi-dhcp-4.4.3/sbin/dhcpd -t -cf ./gistfile1.txt
20:20
<
bonda_000_ >
hard to see
20:20
<
clever >
./gistfile1.txt line 37: semicolon expected.
20:20
<
clever >
default-least-time 86400;
20:20
<
clever >
you can just run the dhcpd on the file, in test mode
20:20
<
clever >
and it tests the config
20:22
<
bonda_000_ >
Apr 29 23:21:21 max isc-dhcp-server[6367]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed!
20:22
<
bonda_000_ >
Apr 29 23:21:21 max isc-dhcp-server[6367]: failed!
20:22
<
bonda_000_ >
well now at least theres that
20:22
<
bonda_000_ >
does it depend on xinetd?
20:22
<
clever >
maybe remove the -S from the config file, so it sends the logs to the journal instead
20:23
<
bonda_000_ >
-S Log to syslog
20:23
<
bonda_000_ >
-f run in foreground
20:24
<
bonda_000_ >
I'll change it to -f then
20:25
<
clever >
that has to match up with the type in the systemd service
20:26
<
bonda_000_ >
maybe the DNS
20:26
<
bonda_000_ >
I should supply my own?
20:27
<
clever >
that wouldnt cause it to fail to startup
20:28
<
bonda_000_ >
wait is my Pi supposed to be trying to connect at the same time or no?
20:29
<
clever >
that will only work after you have started both dhcpd and xinetd
20:29
<
clever >
no point in turning the pi on until they are both online
20:31
<
bonda_000_ >
there is something going on in the background as my Pi is on and connected to the PC
20:31
<
bonda_000_ >
Apr 29 23:31:29 max NetworkManager[658]: <info> [1714422689.0783] dhcp4 (enp2s0): canceled DHCP transaction
20:31
<
bonda_000_ >
Apr 29 23:31:29 max NetworkManager[658]: <info> [1714422689.0783] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
20:31
<
bonda_000_ >
Apr 29 23:31:29 max NetworkManager[658]: <info> [1714422689.0784] dhcp4 (enp2s0): state changed no lease
20:31
<
bonda_000_ >
Apr 29 23:31:29 max NetworkManager[658]: <info> [1714422689.0801] policy: auto-activating connection 'Wired connection 1' (2f1f8b64-b204-4458-bc91-c01456760f5a)
20:32
<
bonda_000_ >
Apr 29 23:31:29 max NetworkManager[658]: <info> [1714422689.0809] device (enp2s0): Activation: starting connection 'Wired connection 1' (2f1f8b64-b204-4458-bc91-c01456760f5a)
20:32
<
bonda_000_ >
Apr 29 23:31:29 max NetworkManager[658]: <info> [1714422689.0810] device (enp2s0): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
20:32
<
bonda_000_ >
Apr 29 23:31:29 max NetworkManager[658]: <info> [1714422689.0815] device (enp2s0): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
20:32
<
bonda_000_ >
Apr 29 23:31:29 max avahi-daemon[604]: Joining mDNS multicast group on interface enp2s0.IPv6 with address fe80::f639:9ff:fe33:f3f2.
20:32
<
bonda_000_ >
Apr 29 23:31:29 max NetworkManager[658]: <info> [1714422689.0823] device (enp2s0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
20:32
<
bonda_000_ >
Apr 29 23:31:29 max avahi-daemon[604]: New relevant interface enp2s0.IPv6 for mDNS.
20:32
<
bonda_000_ >
Apr 29 23:31:29 max NetworkManager[658]: <info> [1714422689.0830] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
20:32
<
bonda_000_ >
Apr 29 23:31:29 max avahi-daemon[604]: Registering new address record for fe80::f639:9ff:fe33:f3f2 on enp2s0.*
20:32
<
bonda_000_ >
like my Pi is trying to connect to the PC at the same time
20:32
<
bonda_000_ >
Apr 29 23:32:14 max NetworkManager[658]: <info> [1714422734.0783] dhcp4 (enp2s0): canceled DHCP transaction
20:32
<
bonda_000_ >
Apr 29 23:32:29 max kernel: r8169 0000:02:00.0 enp2s0: Link is Down
20:32
<
bonda_000_ >
Apr 29 23:32:14 max NetworkManager[658]: <info> [1714422734.0784] dhcp4 (enp2s0): activation: beginning transaction (timeout in 45 seconds)
20:32
<
bonda_000_ >
Apr 29 23:32:14 max NetworkManager[658]: <info> [1714422734.0784] dhcp4 (enp2s0): state changed no lease
20:32
<
bonda_000_ >
Apr 29 23:32:29 max NetworkManager[658]: <info> [1714422749.3194] device (enp2s0): state change: disconnected -> unavailable (reason 'carrier-changed', sys-iface-state: 'managed')
20:32
<
clever >
most of that looks like network manager chatter
20:33
<
clever >
did you go into network manager, and set enp2s0 for a static ip?
20:33
<
bonda_000_ >
yeah it says there are dhcp transactions between them
20:33
<
bonda_000_ >
and I'm trying to make my own at the same time
20:35
<
clever >
if your sending dhcp requests out on enp2s0 then you didnt configure network manager correctly
20:37
<
bonda_000_ >
does it have a gui or I need to invoke it with some command
20:37
<
bonda_000_ >
it says its a daemon process
20:37
<
clever >
you can use nmtui to edit it from command line
20:38
<
bonda_000_ >
yeah there is a window like raspi-config
20:38
<
bonda_000_ >
and Ipv4 configuration
20:38
<
clever >
and then you want to set enp2s0 to a static ip
20:38
<
clever >
2024-04-29 17:02:45 < clever> for example, make enp2s0 10.0.0.1, with a mask of 255.255.255.0
20:39
<
bonda_000_ >
Profile name Wired connection 1
20:39
<
bonda_000_ >
Device <no name>
20:40
<
bonda_000_ >
so I configure Ipv4 manually put in the address you just said
20:41
<
bonda_000_ >
mask is the same as gateway
20:41
<
bonda_000_ >
DNS server and Search domains are what
20:41
<
clever >
you dont want to set a gateway on that interface
20:41
<
bonda_000_ >
I dont see a mask field
20:42
<
bonda_000_ >
for some reason
20:42
<
clever >
screenshot?
20:42
<
bonda_000_ >
IPv4 configuration <Manual>
20:42
<
bonda_000_ >
Addresses
20:42
<
bonda_000_ >
Gateway
20:42
<
bonda_000_ >
DNS servers
20:42
<
bonda_000_ >
Search domains
20:42
<
bonda_000_ >
Routing
20:42
<
clever >
a screenshot or pastebin is better, irc doesnt handle lots of text well
20:44
<
bonda_000_ >
my bad
20:45
<
bonda_000_ >
the latter one
20:45
<
clever >
that may work, try saving and see what happens
20:48
<
bonda_000_ >
then I can also "activate" it
20:48
<
bonda_000_ >
in the second tab
20:48
<
bonda_000_ >
Apr 29 23:48:20 max NetworkManager[658]: <info> [1714423700.3686] device (enp2s0): Activation: successful, device activated.
20:49
<
bonda_000_ >
Probably need to keep it activated
20:50
<
clever >
it might be related to the network link going down, i had similar problems
20:50
<
clever >
do you have a spare switch or hub?
20:51
<
bonda_000_ >
woah no error messages
20:51
<
bonda_000_ >
sudo service isc-dhcp-server start
20:51
<
bonda_000_ >
just went thrugh quietly
20:51
<
bonda_000_ >
Apr 29 23:50:52 max isc-dhcp-server[7445]: Starting ISC DHCPv4 server: dhcpd.
20:51
<
bonda_000_ >
Apr 29 23:50:52 max systemd[1]: Started isc-dhcp-server.service - LSB: DHCP server.
20:59
<
bonda_000_ >
so now the xinetd part?
21:01
<
clever >
or whichever tftp server your using
21:06
<
bonda_000_ >
so now that I put the bootcode.bin I can simply turn off the Pi, remove the SD card, plug in the Ethernet cable and power it up?
21:06
<
bonda_000_ >
and also need to figure out which COM port I am using
21:07
<
clever >
bonda_000_: yep, thats all it is
21:07
<
bonda_000_ >
this is Mini UART to talk to the shell correct? Pins 14-15 BCM
21:07
<
clever >
yeah, its always on 14/15
21:07
<
clever >
run `dmesg -w` and then unplug and plug the usb adapter back in
21:07
<
clever >
and it will tell you what the name is
21:08
<
bonda_000_ >
got it on ttyUSB0
21:09
<
bonda_000_ >
you said earlier minicom -D /dev/ttyACM0 -b 115200 -o
21:10
<
bonda_000_ >
do I keep it ACM or put USB0
21:11
jcea has joined ##raspberrypi-internals
21:11
<
clever >
change it to USB0
21:11
<
clever >
the value depends on what adapter your using
21:13
<
bonda_000_ >
and thats gonna use it as a COM port?
21:13
<
bonda_000_ >
its a UART-USB dongle with three wires
21:13
<
bonda_000_ >
txd rxd and ground
21:14
<
clever >
yep, thats common
21:14
<
bonda_000_ >
alright first attempt
21:15
<
bonda_000_ >
is minicom supposed to hang open or terminate?
21:15
<
bonda_000_ >
Mine just terminated
21:16
<
bonda_000_ >
bimbom@max:~$ minicom -D /dev/ttyUSB0 -b 115200 -o
21:16
<
bonda_000_ >
bimbom@max:~$
21:16
<
clever >
`ls -lh /dev/ttyUSB0`
21:17
<
bonda_000_ >
crw-rw---- 1 root dialout 188, 0 Apr 30 00:14 /dev/ttyUSB0
21:17
<
clever >
and `id` ?
21:17
<
bonda_000_ >
uid=1000(bimbom) gid=1000(bimbom) groups=1000(bimbom),27(sudo),100(users)
21:17
<
clever >
your not in the dialout group, so you lack permission to use the uart
21:18
<
clever >
either add yourself to dialout, or run minicom with sudo
21:19
<
bonda_000_ >
okay first try
21:23
<
bonda_000_ >
nothing on the terminal nor the palette screen
21:24
<
clever >
run wireshark, and set it to sniff the ethernet interface
21:24
<
clever >
you should see dhcp requests coming from the pi
21:25
<
bonda_000_ >
so lk.bin is in /tftproot
21:26
<
clever >
you must rename it to bootcode.bin
21:26
<
clever >
the rpi rom only ever looks for bootcode.bin
21:26
<
bonda_000_ >
53936 bytes
21:26
<
bonda_000_ >
ah gotcha
21:29
<
bonda_000_ >
nothing on the journal
21:30
<
bonda_000_ >
Dumpcap can be installed
21:30
<
bonda_000_ >
should I get it?
21:30
<
bonda_000_ >
anyway I say yes to everything
21:30
<
clever >
also, is this pi3 setup to boot from usb/network?
21:31
<
bonda_000_ >
yes Pi3B year 2015 rev1.2
21:32
<
clever >
bonda_000_: if you boot normal raspi-os and run `vcgencmd otp_dump | grep 17:`, what does it report?
21:32
<
bonda_000_ >
one sec
21:33
<
bonda_000_ >
1020000a
21:36
<
clever >
usb is not enabled
21:36
<
clever >
add program_usb_boot_mode=1 to config.txt, reboot, then check vcgen again
21:37
<
bonda_000_ >
I'm listening to enp2s0
21:37
<
bonda_000_ >
no packets
21:37
<
bonda_000_ >
gonna try this config option now
21:38
<
bonda_000_ >
its gonna screw up the regular boot won't it?
21:38
<
clever >
SD still has priority
21:38
<
clever >
it just enables booting from usb when SD cant be found
21:38
<
bonda_000_ >
what about force_turbo=1?
21:39
<
clever >
doesnt matter
21:39
<
bonda_000_ >
start_x=1
21:39
<
clever >
doesnt matter
21:39
<
bonda_000_ >
program_usb_boot_mode=1 or usb_boot_mode=1?
21:39
<
clever >
program_usb_boot_mode=1
21:40
<
clever >
thats what the docs say to add
21:41
<
bonda_000_ >
no packets but also leds are not lit up on the Ethernet port Pi Side like they were when it was booted in Linux
21:42
<
clever >
did you reboot raspios and rerun vcgencmd?
21:42
<
bonda_000_ >
I have raspbian
21:42
<
clever >
2024-04-29 18:36:27 < clever> add program_usb_boot_mode=1 to config.txt, reboot, then check vcgen again
21:42
<
clever >
what does vcgencmd say now?
21:43
<
bonda_000_ >
ethernet link is UP
21:43
<
bonda_000_ >
sends packets when Linux boots IPv6, ARP, DHCP, MDNS
21:44
<
bonda_000_ >
ICMPv6*
21:44
<
bonda_000_ >
3020000a
21:45
<
bonda_000_ >
some bit flipped
21:45
<
clever >
yep, that worked
21:45
<
clever >
now you can shutdown, remove the sd card, then apply power again
21:46
<
bonda_000_ >
i wonder if it didnt mess things up now the Raspberry driver knocked on the enp2s0
21:46
<
clever >
shouldnt, the dhcp server will just do its job, and give the pi an ip
21:49
<
bonda_000_ >
yeah they are talking
21:50
<
bonda_000_ >
idk whats going on the LEDS are now on
21:50
<
clever >
i need to get off to bed now, its getting late here
21:50
<
clever >
we can resume tomorrow
21:50
<
bonda_000_ >
there are packets
21:50
<
bonda_000_ >
dont seem like much data
21:51
<
bonda_000_ >
good night
21:52
<
bonda_000_ >
70342.31903026110.0.0.110.0.0.101TFTP61Error Code, Code: File not found, Message: File not found
21:52
<
clever >
that sounds like progress
21:52
<
clever >
the rpi tried to load a file over tftp
21:52
<
clever >
so you just need to configure it to serve the right file
21:52
<
bonda_000_ >
70342.31903026110.0.0.110.0.0.101TFTP61Error Code, Code: File not found, Message: File not found
21:53
<
bonda_000_ >
wrong one
21:53
<
bonda_000_ >
68342.18108257410.0.0.10110.0.0.1TFTP63Read Request, File: bootcode.bin, Transfer type: octet
21:53
<
clever >
you probably have it in the wrong directory
21:53
<
clever >
run `ps aux | grep tftp`, what does it return?
21:54
<
bonda_000_ >
root 2472 0.0 0.0 4656 284 ? Ss Apr29 0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure /home/bimbom/Desktop/srv
21:54
<
bonda_000_ >
yeah its the old one I had before in one of the configs
21:54
<
bonda_000_ >
gotta fix that
21:55
<
bonda_000_ >
just need to recall which one that was
21:55
<
clever >
before you try changing too much, just copy the .bin to that directory
21:55
<
clever >
and reboot the pi again
21:55
<
clever >
once you confirm thats working, its just a matter of cleaning it up, which you can do while i sleep
21:57
<
bonda_000_ >
OH DUDE
21:57
<
bonda_000_ >
it works now
21:57
<
clever >
you got a bunch of logs in minicom?
21:57
<
bonda_000_ >
how do I screenshot on Linux
21:57
<
clever >
the printscreen key
21:57
<
bonda_000_ >
a window
21:58
<
clever >
on your copy of this file, move the lib/debugcommands line up, so its after autoram, and un-comment it, then rerun `make PROJECT=rpi3-bootcode`
21:59
<
clever >
then copy lk.bin to `/home/bimbom/Desktop/srv/bootcode.bin`, and type `reboot` into the minicom window
21:59
<
clever >
then try `help`, and you should see a `db` command
22:00
<
clever >
yep, that looks normal
22:00
<
bonda_000_ >
I can give you the entire log
22:00
<
bonda_000_ >
if you need it
22:00
<
clever >
dont need it
22:01
<
bonda_000_ >
so I need to change the source file now?
22:01
<
f_[xmpp] >
installing modified lk?
22:02
<
clever >
bonda_000_: yeah, change the project/rpi3-bootcode.mk file
22:02
<
bonda_000_ >
yeah no its running on a video processor though
22:02
<
f_[xmpp] >
Debugging, rather..
22:02
<
clever >
f_[xmpp]: just enabling the debug commands in a bootcode.bin build
22:02
<
clever >
after getting network booting going
22:05
<
bonda_000_ >
somehow the vc4 toolchain doest stay on my PATH very long
22:05
<
bonda_000_ >
because I accidentally rebooted the PC
22:05
<
clever >
bonda_000_: `export PATH=` only affects the window you run it in
22:05
<
clever >
if you close that window, its gone
22:10
<
bonda_000_ >
booted up
22:10
<
bonda_000_ >
dont see any debug messages more than it was the first time
22:11
<
clever >
run `help`, do you see the `db` command?
22:11
<
bonda_000_ >
i can't type anything in for some reason
22:12
<
bonda_000_ >
it seems broken this time
22:12
<
bonda_000_ >
let me try again
22:12
<
bonda_000_ >
yeah file not found
22:13
<
clever >
`ls /home/bimbom/Desktop/srv`
22:13
<
clever >
ps aux | grep tftp
22:13
<
bonda_000_ >
its a new file now 56464 bytes was 53936 bytes
22:14
<
bonda_000_ >
root 2472 0.0 0.0 4656 284 ? Ss Apr29 0:00 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure /home/bimbom/Desktop/srv
22:14
<
clever >
and what file did it say was not found?
22:15
<
bonda_000_ >
ah it looks for bootcig
22:15
<
bonda_000_ >
bootsig
22:15
<
clever >
that file can be ignored
22:15
<
clever >
signature checking isnt enabled on the pi3
22:15
<
bonda_000_ >
8411926.14506488610.0.0.10110.0.0.1TFTP62Read Request, File: bootsig.bin, Transfer type: octet
22:16
<
bonda_000_ >
console doesnt take any input though and I rushed and didn't check the first time
22:17
<
bonda_000_ >
anyway I'm gonna go to the store real fast
22:17
<
bonda_000_ >
and then get some sleep
22:17
<
clever >
thats probably hw flow control
22:17
<
clever >
hit ctrl+a and then o, and poke around in the serial port settings
22:17
<
clever >
make sure hw flow control is disabled
22:17
<
clever >
[root@amd-nixos:~]# cat .minirc.dfl
22:17
<
clever >
pu rtscts No
22:17
<
clever >
you can also just directly edit your minicom config, and add this line
22:17
<
bonda_000_ >
Serial port setup?
22:18
<
bonda_000_ >
okay its good now
22:19
<
bonda_000_ >
help gave me a bunch of commands
22:19
<
clever >
do you see a db command?
22:19
<
clever >
try running `db 0x60000000 0x30`
22:20
<
bonda_000_ >
] db 0x60000000 0x30
22:20
<
bonda_000_ >
0x60000000: 00 b0 00 01 00 b0 00 01 e0 00 00 6d e0 00 00 6d
22:20
<
bonda_000_ >
0x60000010: 1d c0 41 07 1d c0 41 07 00 60 19 e8 00 60 19 e8
22:20
<
bonda_000_ >
0x60000020: 31 68 f9 c0 31 68 f9 c0 1d c0 40 07 1d c0 40 07
22:20
<
clever >
now look back at your rom dump
22:21
<
clever >
do those bytes look familiar?
22:22
<
bonda_000_ >
I'll have to reboot back to Linux with an sd card to pull that up
22:22
<
clever >
those bytes exactly match my rom dump
22:22
<
bonda_000_ >
they should be identical I assume
22:22
<
clever >
0x60000020: 31 68 f9 c0 01 cf 2d 1f 1d c0 40 07 18 e8 00 80
22:22
<
clever >
actually no, on closer inspection, they dont
22:23
<
clever >
you may have a different revision of it
22:23
<
bonda_000_ >
rpi 3B year 2015 rev 1.2
22:23
<
bonda_000_ >
says on the pcb
22:23
<
clever >
try otp_pretty_print
22:24
<
clever >
lines 11-16 are the table i just linked
22:25
<
clever >
yep, its a revision 2, from the 3B model
22:25
<
clever >
with the dw command, you can dump words (32bit values), and with mw, you can modify words (write 32bit things to an addr)
22:25
<
clever >
with those 2, you can start poking at the ISP and other registers
22:26
<
bonda_000_ >
yeah I need to start with understanding where those tile buffers are and where frame buffer is and how to point ISP at that memory
22:26
<
bonda_000_ >
but thats tomorrow, I'm gonna build Ghidra for that on this machine
22:27
<
clever >
as long as the VPU hasnt crashed, you can just type reboot into minicom at any time, and it will reboot, and grab the new bootcode.bin
22:27
<
bonda_000_ >
will see if anything will move over because I put some hardware Memory map in there after we spoke
22:27
<
clever >
so you can just recompile to add more things, copy the bin over, and command it to reboot
22:28
<
clever >
you should be able to copy the ghidra project over
22:28
<
clever >
goodnight!
22:28
<
bonda_000_ >
that's neat
22:28
<
bonda_000_ >
good night to you also
22:28
<
bonda_000_ >
i'm out of here
22:45
bonda_000_ has quit [Remote host closed the connection]
22:52
dolphinana_ has quit [Quit: Leaving]