Go to advanced search

by bzt
Tue Sep 10, 2019 2:36 pm
Forum: Bare metal, Assembly language
Topic: Detecting RPi4 programatically
Replies: 8
Views: 310

Re: Detecting RPi4 programatically

Hi, Thank you for your answers! @LdB: it's not about 32 bit vs. 64 bit, but running AArch64 mode on A53 vs. A72. And I need that in bare metal, so not under Linux. @rpdom: unfortunately mailbox is a no go, because A53 and A72 uses different MMIO base address. We need to know that before we can use m...
by bzt
Mon Sep 09, 2019 11:29 am
Forum: Bare metal, Assembly language
Topic: Detecting RPi4 programatically
Replies: 8
Views: 310

Detecting RPi4 programatically

Hi, Is it possible to detect if an AArch64 image is running on an RPi3 or on an RPi4? I have a feeling that I saw something similar here, using an ARM system register and comparing it's value against some magic constants. But no matter how hard I try, I simply can't find that post. It would help if ...
by bzt
Sun Sep 08, 2019 8:58 pm
Forum: Bare metal, Assembly language
Topic: some basic raspberry pi questions related to chadderz121 tutorials
Replies: 5
Views: 445

Re: some basic raspberry pi questions related to chadderz121 tutorials

Hi, I'll try to answer some of your remaining questions. 7). Do I miss any other important hardware? Are there tutorials on how to bring up the rest of the hardwares? That depends what you want to do on your RPi. One hardware that can be useful is the interrupt controller. And yes, there are tutoria...
by bzt
Fri Sep 06, 2019 5:41 pm
Forum: Networking and servers
Topic: Absolutely Disable ipv6
Replies: 4
Views: 1977

Re: Absolutely Disable ipv6

This should work. You must create that ipv6.conf file with

Code: Select all

blacklist ipv6
What errors do you get? It would be helpful to see the exact messages.

Try "sudo sysctl -a", that should print out the current configuration. If ipv6 is disabled, you'll see that there.

Cheers,
bzt
by bzt
Fri Sep 06, 2019 5:33 pm
Forum: Networking and servers
Topic: How much data each device use on my network ?
Replies: 3
Views: 171

Re: How much data each device use on my network ?

Hi, As thagrol said, you have to make sure your traffic goes through your Pi. However, if you're interested in the Pi's traffic, you can query a stat in many many ways. Simplest is netstat -i The command ifconfig also prints out total TX/RX counts per interface. If you want to filter your traffic, t...
by bzt
Fri Sep 06, 2019 12:24 pm
Forum: Bare metal, Assembly language
Topic: Announce: RusPiRo - a kernel the Rust way ;)
Replies: 51
Views: 3448

Re: Announce: RusPiRo - a kernel the Rust way ;)

Hi, Yes, I agree with jahboater, C is very very different to C++, we should not mention them on the same page. I personally prefer C (not C++) for bare metal development, but it is really good to see that we have lot more programming languages to choose from! 1) C++, with rst's Circle library 2) Pas...
by bzt
Thu Sep 05, 2019 10:49 am
Forum: Bare metal, Assembly language
Topic: qemu raspi4
Replies: 0
Views: 136

qemu raspi4

Hi, "Good news, everyone!" (in Fanworth's voice :-)) Lately Phillipe was refactoring the qemu bcm SoC code to make the code modular. As a last step, yesterday he has submitted a patch that adds the bcm2711 SoC and "raspi4" machine type to qemu: https://lists.gnu.org/archive/html/qemu-devel/2019-09/m...
by bzt
Tue Sep 03, 2019 6:32 pm
Forum: Networking and servers
Topic: Can not copy without a password from a PI zero to a Pi3 through network.
Replies: 4
Views: 214

Re: Can not copy without a password from a PI zero to a Pi3 through network.

Hi, I need only some commands that work to copy the files without password automatically, of course nothing manually. I will integrate and call them from my python scripts. I already did this with other Linux commands and worked fine. Thank you for your advice you gave me so far. Then "scp" is defin...
by bzt
Tue Sep 03, 2019 11:37 am
Forum: Networking and servers
Topic: Can not copy without a password from a PI zero to a Pi3 through network.
Replies: 4
Views: 214

Re: Can not copy without a password from a PI zero to a Pi3 through network.

Hi, Known_hosts file lists all the servers you have connected to. If you create a new connection, ssh will ask you to verify the key's fingerprint. If the destination server is listed in known_hosts, it will not ask. About authorized_keys, it seems to me that you did it right. There's one thing thou...
by bzt
Mon Sep 02, 2019 6:53 pm
Forum: Bare metal, Assembly language
Topic: Yet Another Bare Metal Tutorial for the RPi3
Replies: 77
Views: 51839

Re: Yet Another Bare Metal Tutorial for the RPi3

Hi,
Johnbeaumont wrote:
Fri Aug 30, 2019 8:15 pm
Will this tutorial work on rpi4?
I didn't had the chance to get an RPi4 yet, so I couldn't test them. I believe you only have to change the MMIO_BASE define in gpio.h, and they should work. As far as I know, all the devices those tutorials use are available on Rpi4 too.

Cheers,
bzt
by bzt
Mon Sep 02, 2019 6:32 pm
Forum: Bare metal, Assembly language
Topic: Raspbian assembly draw a line on screen
Replies: 7
Views: 515

Re: Raspbian assembly draw a line on screen

@LdB: it was me, bzt not rst, but that's okay :-) Thanks all. Yes I am using ASM on raspbian. When I did ASM on the Archimedes (admittedly a long time ago!) it was easier to access video memory. Ah, I see. Then those framebuffer examples I linked are no good to you, they are for bare metal. Under Li...
by bzt
Thu Aug 29, 2019 9:58 am
Forum: Bare metal, Assembly language
Topic: Raspbian assembly draw a line on screen
Replies: 7
Views: 515

Re: Raspbian assembly draw a line on screen

Hi, Thanks. This can’t be done in asm? In Risc OS you a section of memory was reserved for the screen so you could just write to that ... Absolutely, it can be done in ASM. I'm a little bit confused though, because there's a mention to Raspbian here, although your post is in Bare metal topic. Anyway...
by bzt
Fri Jul 19, 2019 10:59 am
Forum: Automation, sensing and robotics
Topic: Electronic chess board and identifying specific pieces
Replies: 8
Views: 503

Re: Electronic chess board and identifying specific pieces

Hi If transparent or semi-transparent chess-board is an option, then I'd put a camera beneath and a small easily identifiable shape or color code on the bottom of each chess-piece. That's the simplest and cheapest solution, requires only one reader, and it is guaranteed that pieces won't interfere (...
by bzt
Mon Jul 15, 2019 12:25 pm
Forum: General programming discussion
Topic: Script for check IP adress
Replies: 3
Views: 336

Re: Script for check IP adress

Hi, Using ipinfo.io reveals your real IP, I'd recommend against that. There's a simpler solution, use ip ro get 8.8.8.8 Replace the IP address with one that should go through the tunnel. It returns a line like: 8.8.8.8 via x.x.x.x dev tun0 src x.x.x.x If there's no "dev tun0" (or whatever your tunne...
by bzt
Mon Jul 15, 2019 12:15 pm
Forum: General discussion
Topic: RPi4 chargers
Replies: 19
Views: 1057

Re: RPi4 chargers

just don't use an e-marked cable Which leads us back to my original question: how can I know without trying it out? Is there a standard marking on the box to indicate the charger comes with an e-marked cable? I mean there are codes on the box to indicate European, British and American plug types, i...
by bzt
Mon Jul 15, 2019 8:33 am
Forum: Bare metal, Assembly language
Topic: Kernel switcher... kernel?
Replies: 4
Views: 1128

Re: Kernel switcher... kernel?

Hi, The magic keyword you need to google for is "raspberrypi dual boot". There are boot managers written for the RPi, and they do exactly as @pik33 described (except the overwrite part, which is unnecessary with chain loading). My personal favourite is jncronin's multiboot compatible rpi-boot . Many...
by bzt
Sat Jul 13, 2019 11:39 am
Forum: Bare metal, Assembly language
Topic: Virtual memory and linking
Replies: 21
Views: 7216

Re: Virtual memory and linking

Hi, You could take a look at my bootloader . It's loaded at 80000, which loads an ELF kernel from the SD card (or over serial) and sets up paging for it, jumping to the entry point in upper-half address. That way your kernel can be an ELF (no objconv needed), purely linked to upper-half, forgetting ...
by bzt
Sat Jul 13, 2019 11:28 am
Forum: Bare metal, Assembly language
Topic: Reserving cores for bare-metal programs - interupts
Replies: 36
Views: 3453

Re: Reserving cores for bare-metal programs - interupts

Hi,

I'm not sure about the new GIC, but Pi4 also has the old interface to the ARM Q4 interrupt controller with which you can route every single interrupt to a specific core.

Cheers,
bzt
by bzt
Sat Jul 13, 2019 11:25 am
Forum: General discussion
Topic: RPi4 chargers
Replies: 19
Views: 1057

Re: RPi4 chargers

Hi, Thanks for the answers. It doesn't matter what you called them, the article I've linked call them "charger" hence the title. Believe me, if I could buy the official adapter, I would, but unfortunately it's out of stock :-( So my question is still unanswered, how can I know if a power supply/char...
by bzt
Thu Jul 11, 2019 7:46 pm
Forum: General discussion
Topic: RPi4 chargers
Replies: 19
Views: 1057

RPi4 chargers

Hi, I've read here , that certain chargers won't work with the RPi4. The article mentions something about non e-marked cable, and that most chargers are such, therefore will work, with a counter-example of Macbook chargers. My question is, assuming I'm going to buy a new charger, what should I look ...
by bzt
Thu Jul 11, 2019 6:00 pm
Forum: Beginners
Topic: SD-card backup one line code?
Replies: 1
Views: 130

Re: SD-card backup one line code?

Hi, I remember seeing 1 row code which backed up currently running Raspbian card to USB-stick. Anybody know that code? Yes, sync && dd if=(inputdevice) of=(outputfile) The inputdevice is the name of your SD card, "/dev/...", and outputfile is a filename on the USB (if mounted under /mnt, then "/mnt/...
by bzt
Mon Jul 08, 2019 3:20 pm
Forum: General programming discussion
Topic: TCP client in PHP not working
Replies: 4
Views: 392

Re: TCP client in PHP not working

If that were true you'd have more things that were very broken in your Linux system. I totally agree. If using gethostbyname() solved the problem, then you've just workarounded some bigger issues with your network stack configuration. It would be better to fix those first. Opening the loopback devi...
by bzt
Mon Jul 08, 2019 3:05 pm
Forum: General programming discussion
Topic: Boot to Application
Replies: 31
Views: 2801

Re: Boot to Application

Hi, Any luck with this? It would be really great to have a BASIC interpreter that generates web pages on an RPi :-) Another thing that popped into my mind, is that your built-in webserver must pass the query string to the script somehow. Let's say it's in a global QUERY$ variable. Then in your scrip...
by bzt
Mon Jul 08, 2019 2:47 pm
Forum: Bare metal, Assembly language
Topic: Problem with handling multiple functions
Replies: 22
Views: 908

Re: Problem with handling multiple functions

Hi, First, I'd like to say well done! Although you haven't produced a working kernel yet, you've definitely made a big progress here! I'm not sure what ARM mode kernel.img uses. I'd recommend to a) use arm-eabi-none-gcc, dwelch67's startup (the startup function alone is enough, you don't need PUT32/...
by bzt
Sat Jul 06, 2019 10:40 am
Forum: Bare metal, Assembly language
Topic: Problem with handling multiple functions
Replies: 22
Views: 908

Re: Problem with handling multiple functions

Hi, Yeah I agree with DavidS, you were extremely lucky. Not only because you lack a proper stack, but also because you haven't zerod out the bss, and you have started running your code at the first function found. The entry point is NOT main() by default, but _start(), which should set up the C envi...

Go to advanced search