adrian

adrian

Hello!

I’m step by step getting deeper into nerves. I think it’s awesome. I’m reading and watching lots of resources related to buildroot, busybox, and nerves, but I still have many questions.

I’m using a custom raspberry pi 3 firmware. The only two changes I want to make is install dropbear and postgresql. My question now is about dropbear.

After reading this, I’ve added the package using make menuconfig, saved the configuration, and compiled. I’ve also added a file under rootfs_overlay/etc/default/dropbear with the following content:

DROPBEAR_ARGS="-p 222"

I’m using an USB serial converter for the rpi3 and I’m using also nerves_init_gadget so I have access to the IEx console via ssh in the default port 22, that’s why I want to run dropbear on port 222.

I can’t make it work. It looks like dropbear is not even starting. I can get into the system from the elixir shell, but is tedious:

System.cmd("dmesg", [], stderr_to_stdout: true, into: IO.stream(:stdio, :line))

I see nothing related to dropbear -nor postgresql-.

It looks like dropbear and postgresql use systemd for starting services, is it configured on the rpi3 nerves base system? I couldn’t find information about that.

Thanks a lot!

Adrián

Showing Posts 1 to 8

ConnorRigby

ConnorRigby

Nerves Core Team

You will have to start dropbear yourself manually. A while back i built a dropbear wrapper. Check it out here

adrian

adrian OP

Thanks @ConnorRigby! I just realized systemd is selected by default, and cannot be selected because I get this error:

... is not using a merged /usr for the following directories: /lib /bin /sbin.

I was investigating about using busybox for the init system but your solutin on elixir looks better

ConnorRigby

ConnorRigby

Nerves Core Team

You will almost always want to use Elixir for init. There is no other init system installed. /bin/init is replaced with a small program that only starts the beam vm. so no /etc/init.d, systemd etc. Enabling those things will break a lot of things.

adrian

adrian OP

Thanks, that is a very useful information. I think it should go into the documentation or the FAQs, because often you would need some kind of service running probably.

GregMefford

GregMefford

Thanks for the feedback! I agree that we should have some documentation about how the Nerves “init system” works (i.e. there isn’t one and you just use Elixir process supervision with Ports).

When you were looking in the docs for how to do it, do you remember where you looked first or where it might fit? Or did you just assume that systemd would be there and it wasn’t? The FAQ is the lazy/obvious place to put it, but curious if you have other thoughts because I don’t like having a random grab-bag of things there if there’s a more helpful place for it.

adrian

adrian OP

@GregMefford thanks for your interest!

I think the first place I looked was the Systems page. I think is a better place to add the init information than the FAQ.

When I started to work with nerves, the documentation didn’t provide all the information I needed. I come from the web world, and even though I have knowledge on systems, I didn’t know a lot about buildroot, busybox, and so on. I had to find information about that.

For me it would had been very helpful a reference page informing how nerves has been built, and what is and what is not. Also some information about the tools nerves is based on, and the initial system you get with nerves. I found this reply from @ConnorRigby useful.

Usually, people come to nerves because they have a project in mind, and the project involves several stages, like setup, customization, setting up other packages, communicating using IO ports, sensors, UI interfaces… I’m not saying that we have to include all the stages in the documentation, but at least a section like “Where to go from here” or “What you can do now” that points to other documentation for those tasks. This will be useful for a newcomer that has a project in mind and doesn’t know exactly what it’s needed for getting it working.

I’ve been impressed with the community in this forum, providing quick and really helpful replies. If it wasn’t for this forum I probably had abandoned nerves. Also, the library Nerves init gadget was very helpful, and without it I probably had also abandoned. I know that it was designed for the Raspberry Pi Zero, and I’m using Raspberry Pi 3 but I need it, because it has some useful tools that I couldn’t have created myself, and I use a lot, specially mDNS, OTA firmware updates and RingLogger.

Said this, after every step I made through making my project work, I was impressed about nerves. I’m really thankful to the community and the developers that made this possible. Elixir (with OTP) and embedded devices is a perfect match made possible by this great project.

If I can contribute to this project I’d be happy to. I really like it. I don’t have experience yet and I almost have no free time on my life :slight_smile: but I would try to spend some time on it if there are some small and easy tasks I could do.

By the way, there are some open source projects based on Nerves that impressed me a lot, and got me excited about the possibilities of creating a better world. I’m talking about Farmbot, but I’m sure there are many other great projects over there too.

Thank you all the core developers, for creating this and being so helpful.

GregMefford

GregMefford

Thanks again, this is all super helpful insight! :heart:

I assume that the first thing you found was the Getting Started guide , which ends at the point where you’re directed to some simple examples. Are you thinking that the end of this guide should have another “what’s next” section, that points you to some deeper information about Nerves concepts like Systems, adding packages, how to structure your application, etc.?

adrian

adrian OP

I’m glad it helps :slight_smile:

yes, what I found first was the Getting Started guide. IMHO it would be helpful another section at the end that points the user to deeper information, because I think more often than not, devs would need to use these concepts in their projects.

The examples are great, but including tutorials explaining those examples (in the docs, a wiki or any other place) would help too.

There are some things that would be used by most of the projects, like networking and debugging, that would be nice to have in the documentation too. Or at least a link to external documentation. Using a Raspberry pi example with a USB to serial converter and minicom or picocom is some of the most useful information I found for working on the project.

Let me know if I can help :wink:

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
jaybe78
Hello, I’m developing a online persistent chat system (what’s app) like using elixir/dynamodb/aws for a mobile app(flutter). The diffic...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
aseigo
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews