Go to advanced search

by jahboater
Mon Oct 23, 2017 1:18 pm
Forum: C/C++
Topic: Cross compile and add another library
Replies: 5
Views: 100

Re: Cross compile and add another library

luckcfm wrote:
Mon Oct 23, 2017 1:09 pm
I'm using pi zero, I think this will not take any effect since it has only 1 core.
Aha!!! Yes, sorry, I can see why builds take a long time!!! Also that one ARMv6 core is much slower than each of the Pi3's ARMv8 cores. There is twice the memory on a Pi3 too which helps.
by jahboater
Mon Oct 23, 2017 1:01 pm
Forum: Beginners
Topic: apt-get -y?
Replies: 4
Views: 118

Re: apt-get -y?

Yes indeed.
I use "apt" instead of "apt-get" though.
by jahboater
Mon Oct 23, 2017 12:41 pm
Forum: C/C++
Topic: Cross compile and add another library
Replies: 5
Views: 100

Re: Cross compile and add another library

luckcfm wrote:
Mon Oct 23, 2017 12:29 pm
And I agree that it's alot easier to compile on pi itself but when I got some error it takes forever to recompile (ffmpeg in my case),
The only thing I can suggest is "make -j5" which should reduce the build time by a factor of four (ish) (it will use all four CPU cores in parallel).
by jahboater
Mon Oct 23, 2017 12:16 pm
Forum: C/C++
Topic: Cross compile and add another library
Replies: 5
Views: 100

Re: Cross compile and add another library

Just FYI, ffmpeg is available for the Pi

sudo apt install ffmpeg

Couldn't see ffplay though.
Use apt-cache search xxx to find things.

Its usually (much) easier to compile stuff on the Pi itself by the way.
by jahboater
Mon Oct 23, 2017 8:01 am
Forum: Troubleshooting
Topic: Loosing my head over headless...
Replies: 15
Views: 287

Re: Loosing my head over headless...

I use "sudo nmap -sn 192.168.0.0/24" which gives me all the details. A Pi Zero W looks like this: Nmap scan report for piclk (192.168.0.118) Host is up (0.013s latency). MAC Address: B8:27:EB:7A:BC:A1 (Raspberry Pi Foundation) You could set a static IP address in /etc/dhcpcd.conf, just add something...
by jahboater
Mon Oct 23, 2017 7:49 am
Forum: Beginners
Topic: apt-get -y?
Replies: 4
Views: 118

Re: apt-get -y?

From the manual page (see "man apt-get") -y, --yes, --assume-yes Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held package, trying to install a unauthenticated package or removing an essential package occur...
by jahboater
Mon Oct 23, 2017 7:44 am
Forum: Beginners
Topic: Newbie Pitfall - BACKUPS don't restore (insufficient space)
Replies: 23
Views: 576

Re: Newbie Pitfall - BACKUPS don't restore (insufficient space)

KLL wrote:
Mon Oct 23, 2017 2:44 am
the copy of the 2 files to a
burned image || a copied NOOBS
SD card is a 10sec thing,
so your question must have some other background ? misunderstanding
5 seconds, the ssh file can be empty and doesn't need to be copied.
I just do this to create the file:

>ssh
by jahboater
Sun Oct 22, 2017 6:33 pm
Forum: Beginners
Topic: Newbie Pitfall - BACKUPS don't restore (insufficient space)
Replies: 23
Views: 576

Re: Newbie Pitfall - BACKUPS don't restore (insufficient space)

1) '... lots of empty space' OK, if you don't know that on a PC, Windows will 'transparently' compress stuff for you, then storing big files of 'empty space' can be a concern Of course it will. However all that "empty space" has to be read off the slow SD card which takes time, it then needs to be ...
by jahboater
Sun Oct 22, 2017 8:59 am
Forum: Beginners
Topic: Newbie Pitfall - BACKUPS don't restore (insufficient space)
Replies: 23
Views: 576

Re: Newbie Pitfall - BACKUPS don't restore (insufficient space)

It might be old fashioned but its the proper way of doing it.

It does seem an overkill for the average Pi user though!
by jahboater
Sun Oct 22, 2017 8:24 am
Forum: Beginners
Topic: Raspberry 3 B needs a cooling system?
Replies: 7
Views: 263

Re: Raspberry 3 B needs a cooling system?

Even though cooling is not required (because of the built-in throttling) it won't be wrong to add a heat sink since it may increase the life-time of the chip (chips tend to live longer on lower temperatures). Whether this is significant and if it matters at all, that's another topic. Yes, it can ne...
by jahboater
Sun Oct 22, 2017 8:19 am
Forum: Beginners
Topic: Newbie Pitfall - BACKUPS don't restore (insufficient space)
Replies: 23
Views: 576

Re: Newbie Pitfall - BACKUPS don't restore (insufficient space)

You can hold dozens and dozens of Pi back-up .img All full of empty space and easily replaced stuff. At least compress them, which should remove the empty space, as it will all be zero's Will it? It depends on if it has been used for anything previously. Deleted files don't get zeroed out unless yo...
by jahboater
Sun Oct 22, 2017 8:08 am
Forum: Beginners
Topic: Newbie Pitfall - BACKUPS don't restore (insufficient space)
Replies: 23
Views: 576

Re: Newbie Pitfall - BACKUPS don't restore (insufficient space)

You can hold dozens and dozens of Pi back-up .img All full of empty space and easily replaced stuff. At least compress them, which should remove the empty space, as it will all be zero's and be easily compressible. How large is you project? "du -sh ~" should tell you how big your home folder is. ta...
by jahboater
Sun Oct 22, 2017 7:44 am
Forum: Beginners
Topic: PATH question - research done.
Replies: 4
Views: 141

Re: PATH question - research done.

See the top of the file for a hint: # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. Use "ls -a" to see all the files in your home folder. Files starting with '.' are hidden from normal view (to avoid clutter). The -a option to "ls" shows them all. ~ expands to $HOME...
by jahboater
Sun Oct 22, 2017 7:15 am
Forum: Beginners
Topic: Raspberry 3 B needs a cooling system?
Replies: 7
Views: 263

Re: Raspberry 3 B needs a cooling system?

The SoC will itself detect when its overheating and reduce the clock speed to keep it cool (throttling). It is pretty robust. If you do a lot of work on the Pi3 and/or its in a poorly ventilated position, a small stick on heat sink may reduce the throttling and give you better performance. Avoid fan...
by jahboater
Sat Oct 21, 2017 5:03 pm
Forum: Raspbian
Topic: Default Raspbian Strecht Lite free space
Replies: 4
Views: 229

Re: Default Raspbian Strecht Lite free space

It is resized automatically on first boot to make all of the SD card available.
Thats the ext4 "/" filesystem.
by jahboater
Sat Oct 21, 2017 1:45 pm
Forum: General discussion
Topic: Expand Filesystem - command line
Replies: 3
Views: 236

Re: Expand Filesystem - command line

Yes. Just do "sudo raspi-config"
by jahboater
Sat Oct 21, 2017 9:28 am
Forum: Beginners
Topic: Newbie Pitfall - BACKUPS don't restore (insufficient space)
Replies: 23
Views: 576

Re: Newbie Pitfall - BACKUPS don't restore (insufficient space)

One difference with the Pi is that it is not an "OS install" in the usual sense of the word. The actual installation is done by the RPF engineers first, which they then make an image of and publish. What the user does is simply copy the pre-installed image over the raw disk. It would be an extremely...
by jahboater
Sat Oct 21, 2017 9:03 am
Forum: Beginners
Topic: Newbie Pitfall - BACKUPS don't restore (insufficient space)
Replies: 23
Views: 576

Re: Newbie Pitfall - BACKUPS don't restore (insufficient space)

2) second, for some insane reason, on the very first boot, the Pi expands it's file system to use ALL the available space on the SD card i.e. every last block. You need to stop the Pi doing this BEFORE you put the SD card in the Pi. Its not insane, its very useful and saves a lot of problems. You s...
by jahboater
Fri Oct 20, 2017 3:26 pm
Forum: Beginners
Topic: dd question.
Replies: 7
Views: 269

Re: dd question.

Thanks all for the replies. I have some more questions about dd. I read it on wiki that the output has to be same size as the input file. I found out now. It must be at least the same size. No surprises there. But SD cards vary slightly from card to card even if they are nominally the same size. An...
by jahboater
Thu Oct 19, 2017 8:32 pm
Forum: General programming discussion
Topic: ASM with Raspbian?
Replies: 7
Views: 2166

Re: ASM with Raspbian?

This looks good:- http://thinkingeek.com/arm-assembler-raspberry-pi/ This is a smaller book, simpler and easier for beginners:- https://www.amazon.co.uk/Raspberry-Assembly-Language-RASPBIAN-Beginners/dp/1492135283 The first book I mentioned is here in print. It is very expensive and I believe its th...
by jahboater
Thu Oct 19, 2017 11:28 am
Forum: Windows 10 for IoT
Topic: Console and UI?
Replies: 7
Views: 560

Re: Console and UI?

Thanks for you answer. Sorry about the delay but I've been afected bu the wild fire in Portugal. Sorry to hear this. Hope you are OK. Do you specifically want to use Windows IoT? Or do you just want to program something on the Pi - and you are familiar with Windows, so Windows IoT seemed a good ide...
by jahboater
Wed Oct 18, 2017 5:56 pm
Forum: C/C++
Topic: My alternative to using Make
Replies: 17
Views: 635

Re: My alternative to using Make

That looks impressively well written! Defaults to number of cpu cores on the system although can be changed via a command line option. The usual wisdom is "N cores + 1". If a compilation is held up by I/O, then you want to have another runnable task available to start using the core. I suspect with ...
by jahboater
Wed Oct 18, 2017 3:11 pm
Forum: Beginners
Topic: dd question.
Replies: 7
Views: 269

Re: dd question.

Thanks for the reply. I did try the bs=32g, bs=32000m but my Mac terminal complines say it is invalid argument. I will have to give cp a try, you need bs=1 G count=16 - note the capital G. Or whatever doesn't make you run out of memory. From the manual page:- N and BYTES may be followed by the foll...
by jahboater
Wed Oct 18, 2017 2:28 pm
Forum: Beginners
Topic: dd question.
Replies: 7
Views: 269

Re: dd question.

The total on the SD image is 16G, the total capacity on the USB is 120G if I do dd if=(..path..) pi.img of= (..path..) USB bs=1024m, it will copy everything on my SD to the USB, but since the USB capacity is greater then the SD, The ddkeeps going until it reaches 120G, which is a waste of time. The...
by jahboater
Wed Oct 18, 2017 12:16 pm
Forum: C/C++
Topic: Hi, how can I write a calculator program with c language?
Replies: 3
Views: 239

Re: Hi, how can I write a calculator program with c language?

Third case, the OP knows how to program in C, but wants some quick hints on how to write a calculator. Write: 1) a lexical analyzer which reads in text items one by one and converts them into tokens. Literal numbers can be converted here and stored in the token. Things like unary minus or binary min...

Go to advanced search