thradtke
Posts: 492
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL

Re: The Raspberry Pi 2 Q&A thread

Sat Feb 21, 2015 3:19 pm

jamesh wrote:
thradtke wrote:Just got mine and realized power input has moved. Inside my A500 box there's no way to connect it anymore, so I wonder if I can power it through pins 1 and 3.
The USB power should be in the same place as the B+...the cases all fit both.
It is, but I'm coming from an ordinary B (v1 and v2) board. I've placed the B2 inside the A500 so that HDMI is directly accessible. Power lines are inside the case, so I need another connection for 5V.
Rocket Scientist.

plugwash
Forum Moderator
Forum Moderator
Posts: 3454
Joined: Wed Dec 28, 2011 11:45 pm

Re: The Raspberry Pi 2 Q&A thread

Sat Feb 21, 2015 3:26 pm

thradtke wrote:Just got mine and realized power input has moved.
The "Raspberry pi 2 model B" has the same layout as the "Raspberry pi model B+" which is different from the "Raspberry pi model B".
Inside my A500 box there's no way to connect it anymore, so I wonder if I can power it through pins 1 and 3.
Powering through the GPIO header is fine. Depending on how paranoid you are you may want to provide your own overcurrent and backfeeding protection.

You got the pin numbers wrong though (pin 1 is 3.3V and pin 3 is an IO pin), you want to feed in on a 5V/ground pair, 4/6 is probablly the easiest.

thradtke
Posts: 492
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL

Re: The Raspberry Pi 2 Q&A thread

Sat Feb 21, 2015 3:31 pm

Great, thanks plugwash! :-)
Rocket Scientist.

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: The Raspberry Pi 2 Q&A thread

Mon Feb 23, 2015 8:17 pm

Hello,
eventually, i got my raspi 2
So i did a image of my sd (i come from a B model), wrote it to the new micro sd and.. nothing! no error, just noting. A fixed red led.

the old system is updated and dist-upgraded

Code: Select all

Linux raspino 3.18.7+ #755 PREEMPT Thu Feb 12 17:14:31 GMT 2015 armv6l GNU/Linux
so i could expect some errors from pigpio or something else, but what about not booting at all??

if i put noobs on the same sd, it boots.
Can't understand this..

Edit to add: i tried writing 2 different images. No change. Formatting and not formatting the sd before. no result.
What did i miss?

Some time i get only red led. Some other time it's red and green together. Always with no output

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: The Raspberry Pi 2 Q&A thread

Mon Feb 23, 2015 10:42 pm

pattagghiu wrote: So i did a image of my sd (i come from a B model), wrote it to the new micro sd and.. nothing! no error, just noting. A fixed red led.
Does the sdcard copy still boot on the old Pi?

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: The Raspberry Pi 2 Q&A thread

Tue Feb 24, 2015 3:27 pm

gkreidl wrote:
solar3000 wrote: yes, I've run youtube and youtube-dl.
I meant in a browser without special tools, just flash or html5.
No flash video (except with the help of youtube-dl). HTML5 video should profit from the better CPU (often still a bit shaky in the browser right now), but only in a browser that uses GPU HW acceleration (epiphany/kweb3).
I finally got my pi 2 two days ago. And I downloaded the latest OS. Now I understand. Yes, videos now play. when I open up the new browser and go to youtube I'm seeing windowed videos play at a low rate probably 10 to 15 fps. Jerky. And it plays at full screen.

Now the new problem.
In raspbian that I just downloaded and then ran the web browser and went to youtube to watch a video it plays ok. then I click on another video and it won't play. Or at least it looks like its starting to play a few frames and than loops back to the beginning to play the first few frames...repeats forever.
So, I'm only able to watch one video. Unless I close the browser and open it up again.
Antikythera

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: The Raspberry Pi 2 Q&A thread

Tue Feb 24, 2015 3:39 pm

Are you saying that YouTube vids work under Epiphany on the Pi 2?

'Cause it don't work for me. I just get the message flashing over and over saying that the video can't be displayed.
(But YouTube vids works just fine on all my "regular" computers on the LAN - using the same Internet connection)

This is all brand new, freshly downloaded stuff - everything up to date.

Note: It could be location dependent - I know that web sites now know pretty much exactly where you are, within a few miles.

I live in a repressive, Third World country (The USA).
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

gkreidl
Posts: 6092
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: The Raspberry Pi 2 Q&A thread

Tue Feb 24, 2015 3:46 pm

I suppose by "selecting new video" you mean you are clicking on the suggested videos on the right side of the youtube page.

This is a know problem (since a few days ago). It happens in epiphany and in kweb3, if the experimental option is enabled (fast scrolling mode). In kweb3 you can prevent it by disabling fast scrolling.

BTW, my own favorite way of watching youtube video is the following:
visit youtube with kweb(3) with javascript disabled (loads much faster), search for a video, go to the video page and click the "Play" button. With a working youtube-dl version installed, it takes about 3 seconds on the RPi2 for the video to start and play with omxplayerGUI, in window size or full screen in best quality and without any lagging.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: The Raspberry Pi 2 Q&A thread

Tue Feb 24, 2015 3:56 pm

rahlquist wrote:
solar3000 wrote: LEDs:
why not use tape therapy?
Why waste money on tape when bit flipping is free. Lots of devices have this ability now and some like the Pi and my router I mentioned actually expose it so you can do it. Heck my netgear router has enough white led's on it to light a room bright enough to read by. Turning them off is nice, being able to have dark without a big piece of tape across the top of my $200 router is even better.

When tape is needed I have used it, and I even covered all the LED's on a Buffalo brand ethernet/wifi bridge once with a chunk of Sugru(some of the best stuff on the planet).

EDIT: and lastly of course, power consumption, its a pittance, but less is less.
wire cutter therapy?
Antikythera

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: The Raspberry Pi 2 Q&A thread

Tue Feb 24, 2015 4:12 pm

gkreidl wrote:I suppose by "selecting new video" you mean you are clicking on the suggested videos on the right side of the youtube page.

This is a know problem (since a few days ago). It happens in epiphany and in kweb3, if the experimental option is enabled (fast scrolling mode). In kweb3 you can prevent it by disabling fast scrolling.

BTW, my own favorite way of watching youtube video is the following:
visit youtube with kweb(3) with javascript disabled (loads much faster), search for a video, go to the video page and click the "Play" button. With a working youtube-dl version installed, it takes about 3 seconds on the RPi2 for the video to start and play with omxplayerGUI, in window size or full screen in best quality and without any lagging.
yes. just clicking another video.
guess I'll have to wait until they update it.
Or download it with youtube-dl like you said.
Antikythera

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: The Raspberry Pi 2 Q&A thread

Tue Feb 24, 2015 4:14 pm

Joe Schmoe wrote:Are you saying that YouTube vids work under Epiphany on the Pi 2?

'Cause it don't work for me. I just get the message flashing over and over saying that the video can't be displayed.
(But YouTube vids works just fine on all my "regular" computers on the LAN - using the same Internet connection)

This is all brand new, freshly downloaded stuff - everything up to date.

Note: It could be location dependent - I know that web sites now know pretty much exactly where you are, within a few miles.

I live in a repressive, Third World country (The USA).

Yes sir. You may need to download the full ISO again. Because I tried using an existing sd card and apt-get update/upgrade raspi-update and the GUI is the same. But a new download and full install gave me a new GUI and youtube worked.
Antikythera

jdunson
Posts: 10
Joined: Thu Dec 18, 2014 8:17 pm

Re: The Raspberry Pi 2 Q&A thread

Tue Feb 24, 2015 7:03 pm

solar3000 wrote: Yes sir. You may need to download the full ISO again. Because I tried using an existing sd card and apt-get update/upgrade raspi-update and the GUI is the same. But a new download and full install gave me a new GUI and youtube worked.
I'm not sure this was your problem, since I'm not tested it in but a few combinations of variations, but as I understand it the full series of commands needed to bring an old Raspbian up to current stable spec is:

apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install raspberrypi-ui-mods

(Currently, the recommendation for the vast majority of users is NOT to run rpi-update, unless you have a specific reason or instruction to do so; doing so loads the bleeding-edge version of things which may break in unexpected ways.)

Lacking either or both of the last two commands may have left your Pi with the older version of some things, and exhibit the behavior you noted. Re-downloading the entire OS should not be necessary.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: The Raspberry Pi 2 Q&A thread

Tue Feb 24, 2015 8:40 pm

I'm pretty sure it is just location dependent.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

apritzel
Posts: 2
Joined: Wed Feb 25, 2015 9:19 pm
Location: Cambridge

Re: The Raspberry Pi 2 Q&A thread

Wed Feb 25, 2015 9:59 pm

dom wrote:
vsiles wrote:Hi,
I just ported my small bare-metal kernel to Pi 2 (changing base periphs address and gcc flags) and it runs !
However it seems I am booting in "non secure" SVC mode: if I try to read the SCR register (only accessible from the secure world), my code crashes.

Can someone confirm or infirm the fact that the Pi2 does not let us play with the secure TrustZone anymore ?
Are you using any config.txt options (like kernel_old=1?)
By default we insert some startup code at address 0x0 - 0xff, which comes from here.
This does switch to non-secure monitor mode, which is required to write to CNTVOFF.
I wonder if it would be feasible to switch to HYP mode on the way? To me it looks like the code has been taken from u-boot, there it served the purpose of switching to HYP mode eventually. Is there any reason the actual HYP mode switch was omitted? While KVM wouldn't run out of the box due to the missing GIC, I'd like to see Linux (or Xen as well) booting in HYP, so one can hack around with that a bit.
On a related note: Would it be possible to put that early ARM code in a separate file and release it's source? That would allow people to play around with that, implementing native PSCI support for SMP bringup, for instance. I would be happy to contribute such code (and fix the HYP mode switch on the way), but as it currently stands hacking that in in start.elf doesn't sound like a very promising approach.

vsiles
Posts: 41
Joined: Wed Feb 04, 2015 10:04 am

Re: The Raspberry Pi 2 Q&A thread

Thu Feb 26, 2015 6:52 am

apritzel wrote:
dom wrote:
vsiles wrote:Hi,
I just ported my small bare-metal kernel to Pi 2 (changing base periphs address and gcc flags) and it runs !
However it seems I am booting in "non secure" SVC mode: if I try to read the SCR register (only accessible from the secure world), my code crashes.

Can someone confirm or infirm the fact that the Pi2 does not let us play with the secure TrustZone anymore ?
Are you using any config.txt options (like kernel_old=1?)
By default we insert some startup code at address 0x0 - 0xff, which comes from here.
This does switch to non-secure monitor mode, which is required to write to CNTVOFF.
I wonder if it would be feasible to switch to HYP mode on the way? To me it looks like the code has been taken from u-boot, there it served the purpose of switching to HYP mode eventually. Is there any reason the actual HYP mode switch was omitted? While KVM wouldn't run out of the box due to the missing GIC, I'd like to see Linux (or Xen as well) booting in HYP, so one can hack around with that a bit.
On a related note: Would it be possible to put that early ARM code in a separate file and release it's source? That would allow people to play around with that, implementing native PSCI support for SMP bringup, for instance. I would be happy to contribute such code (and fix the HYP mode switch on the way), but as it currently stands hacking that in in start.elf doesn't sound like a very promising approach.
There is no problem in booting in HYP mode using kernel_old=1 (see my last entry here http://www.raspberrypi.org/forums/viewt ... 2&t=100752 for a quick howto). Once you manage to boot in secure svc mode, you can do pretty much anything. I am currently trying to patch uboot so we can use it with kernel_old=1 in secure svc or hyp mode.

apritzel
Posts: 2
Joined: Wed Feb 25, 2015 9:19 pm
Location: Cambridge

Re: The Raspberry Pi 2 Q&A thread

Thu Feb 26, 2015 5:26 pm

vsiles wrote:
apritzel wrote:
I wonder if it would be feasible to switch to HYP mode on the way? To me it looks like the code has been taken from u-boot, there it served the purpose of switching to HYP mode eventually. Is there any reason the actual HYP mode switch was omitted? While KVM wouldn't run out of the box due to the missing GIC, I'd like to see Linux (or Xen as well) booting in HYP, so one can hack around with that a bit.
On a related note: Would it be possible to put that early ARM code in a separate file and release it's source? That would allow people to play around with that, implementing native PSCI support for SMP bringup, for instance. I would be happy to contribute such code (and fix the HYP mode switch on the way), but as it currently stands hacking that in in start.elf doesn't sound like a very promising approach.
There is no problem in booting in HYP mode using kernel_old=1 (see my last entry here http://www.raspberrypi.org/forums/viewt ... 2&t=100752 for a quick howto). Once you manage to boot in secure svc mode, you can do pretty much anything. I am currently trying to patch uboot so we can use it with kernel_old=1 in secure svc or hyp mode.
Yes, technically it's feasible to hack around this, but if there is code in the Raspi firmware which deals with mode-switching then I'd like to see it happening there. Same with PSCI. There is only limited sense in enabling PSCI in the kernel if people need to install u-boot to be able to use it - the majority of users just will go with what the foundation provides. But it's still good to have that switch to be able to run your own secure code (and btw. thanks for your u-boot work on this). -- Andre

vsiles
Posts: 41
Joined: Wed Feb 04, 2015 10:04 am

Re: The Raspberry Pi 2 Q&A thread

Fri Feb 27, 2015 8:33 am

apritzel wrote: Yes, technically it's feasible to hack around this, but if there is code in the Raspi firmware which deals with mode-switching then I'd like to see it happening there. Same with PSCI. There is only limited sense in enabling PSCI in the kernel if people need to install u-boot to be able to use it - the majority of users just will go with what the foundation provides. But it's still good to have that switch to be able to run your own secure code (and btw. thanks for your u-boot work on this). -- Andre
As you can see at http://pastebin.com/rgGgBuTN their firmware does not do much (simple initialization of all the core + clock + cp15 access, no PSCI if I'm not mistaken). I managed to add this code inside u-boot so that I can boot using the "kernel_old=1" option and uboot, ending up in non-secure mode just like a normal boot (added a custom section in start.S with their code that I link to 0x0 in u-boot.bin + patching makefiles so that my section is actually used, that's all, and dirty :p).

Since my ability to hack inside u-boot to allow "booting with u-boot and kernel_old=1 in secure mode" is not that great, I think I'm just going to hack the secure_monitor instead, so that my kernel can get access to the secure world using a smc instruction quite early in the process. This is not a definitive solution, but it will do for now.

If anyone manages to properly patch u-boot to allow secure boot, I would be greatly interested.

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: The Raspberry Pi 2 Q&A thread

Fri Feb 27, 2015 11:09 am

jdunson wrote:I'm not sure this was your problem, since I'm not tested it in but a few combinations of variations, but as I understand it the full series of commands needed to bring an old Raspbian up to current stable spec is:

apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install raspberrypi-ui-mods
I've tested this. It works to update Raspbian including the UI changes, but I haven't tested it when migrating a micro-SD card from a Raspberry Pi 1 to a Raspberry Pi 2. You do need to reboot after doing the dist-upgrade and installing the UI mods. If you forget the last step the UI will be a bit messed up.

There are other packages to install too when upgrading from a very old Raspbian Wheezy. This gives a more complete update from an image such as the above:

Code: Select all

sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y install raspberrypi-ui-mods epiphany-browser pistore sonic-pi minecraft-pi wolfram-engine
sudo reboot

I'm not sure if I missed any additional packages above, can anyone let me know?


Note: I tested this not with a real Pi, but with the QEMU-based Raspberry Pi Emulation for Windows package, which uses a VERY old Raspbian Wheezy image from 2012-07-15 (apparently slightly modified to run under QEMU). You do need to expand the image file first AND expand the guest filesystem, which is non-trivial on this MS Windows-based emulator which does NOT expand the filesystem with raspi-config. QEMU does not emulate the VideoCore or OpenGL ES, nor the new Raspberry Pi 2 nor more than 256MB RAM, so is somewhat limited.

Note that Wolfram Mathematica will NOT run under QEMU emulation due to licensing and legal issues - this is strictly for real Raspberry Pi hardware! Minecraft Pi will not run under QEMU due to missing VideoCore/OpenGL ES emulation (there may be licensing issues here too). Sonic Pi also fails due to technical reasons.

The UI mods and Pi Store both work fine on QEMU, however, although many Pi Store apps will also fail for the aforementioned reasons. You can also get QEMU to increase its emulated desktop resolution from 640x480 to 800x600 by editing a guest configuration file. Note also that this emulates the original Raspberry Pi 1, not the quad core RPi2. I couldn't get it working with Cortex-A7 emulation.

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: The Raspberry Pi 2 Q&A thread

Fri Feb 27, 2015 3:53 pm

OK, I decided to test Raspbian's upgrade abilities using both one of my old Raspberry Pi 1 Model B's (I went for my 256MB model), and my new Raspberry Pi 2 Model B.

I used an 8GB micro-SD card (SanDisk Ultra Class 10), with SD adapter for my original Pi, and a USB SD card reader for my PC.

On my Windows 7 PC, I downloaded the earliest official Raspbian image, 2012-07-15-wheezy-raspbian.zip, extracted it, and flashed it to the micro-SD card using Win32DiskImager.

It booted up on my original Raspberry Pi 1 Model B (256MB) - quite retro now to use an image from 2012! I configured it with sensible options and rebooted, where it automatically expanded the file system to the full 8GB, and finally booted to a command line.

I ran the update commands, as before:

Code: Select all

sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y install raspberrypi-ui-mods epiphany-browser pistore sonic-pi minecraft-pi wolfram-engine
sudo reboot

This of course took a LONG time for such an old image on an original Raspberry Pi. (I noticed that it is indeed mandatory to run apt-get upgrade before apt-get dist-upgrade, or the update process fails.)

Where it prompted during the update, I selected the default options (possibly not the best choice). I also accepted the Wolfram licence agreement to install Wolfram Mathematica.

On launching startx after rebooting on the Raspberry Pi 1 Model B, the improved UI was operational. I removed the desktop icons (other than Wastebasket) as in recent Raspbian builds. I then shut down the Pi 1, and tried the micro-SD card in my Raspberry Pi 2.

Success, it worked! I couldn't get sound working even after adjusting all the HDMI config.txt options (probably something trivial to fix), but other than that, I can confirm that the very first official Raspbian image from 2012-07-15 can be updated on a Pi 1 to work on a Pi 2. (The card also booted fine when I put it back in my Pi 1 - I tried it successfully on both my 256MB and 512MB models.)

mikerr
Posts: 2778
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: The Raspberry Pi 2 Q&A thread

Fri Feb 27, 2015 4:21 pm

I'd be interested to know how much space on the sd card that took up?
Earlier raspbian could fit in 2gb..
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: The Raspberry Pi 2 Q&A thread

Sat Feb 28, 2015 5:01 am

mikerr wrote:I'd be interested to know how much space on the sd card that took up?
Earlier raspbian could fit in 2gb..
If I recall, I had around 3.5GB left after completion. You'd save more space starting with the latest Raspbian image, which I suspect removes a lot of old packages which remain after this kind of update (Midori for one). Doing apt-get upgrade alone will completely fill up a 2GB card, never mind adding the new packages.

Most likely, you can't get a RPi 2-compatible Raspbian in under 2GB without ripping out a lot of functionality.

thradtke
Posts: 492
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL

Re: The Raspberry Pi 2 Q&A thread

Sat Feb 28, 2015 10:23 am

jamesh wrote:
thradtke wrote:Can we mix USB 1.1 and USB 2 devices on a standard USB-hub, or on the Pi 2 itself?
USB is same as B+, much improved software has also fixed the majority of issues, but there is still an outlier that can cause problems. Cannot remember the exact circumstances though.
Thanks, James. I can confirm this. Rebuild my System aound a 25W power source (MeanWell unit; coming from 10W and always in doubt about possible glitches due to power) for all devices including hub, and it shows the same behaviour. Cannot connect Mouse and keyboard through a Single-TT hub, but if the mouse hangs on one of the Pi2's connectors (keyboard draws too much power for it) it works. I might try a Multi-TT hub as soon as I find one suitable for my A500 case project.

BTW, the Pi2 feels quite fast :-).
Rocket Scientist.

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: The Raspberry Pi 2 Q&A thread

Mon Mar 02, 2015 11:01 pm

Hello,
in first pages it was told that there was a "timing problem" with raspi2 and that it was corrected in new firmware.
Since i'm having troubles in timing signals swapping my raspi1 with raspi2, i wanted to know if the "correct" firmware is in the official branch (so within the apt-get dist-upgrade command) or still not.

My version is 3.18.7+ #755 PREEMPT on both raspi1 and raspi2

thanks

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5331
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: The Raspberry Pi 2 Q&A thread

Mon Mar 02, 2015 11:45 pm

pattagghiu wrote: My version is 3.18.7+ #755 PREEMPT on both raspi1 and raspi2
The timing fix was here, so your version should include it.

Massi
Posts: 1691
Joined: Fri May 02, 2014 1:52 pm
Location: Italy

Re: The Raspberry Pi 2 Q&A thread

Tue Mar 03, 2015 11:47 am

dom wrote:
pattagghiu wrote: My version is 3.18.7+ #755 PREEMPT on both raspi1 and raspi2
The timing fix was here, so your version should include it.
Ok, thanks, so i simply have no idea why swapping my Pi1B with a Pi2B is breaking my signals :)

Sorry for the stupid question, but from here
https://github.com/Hexxeh/rpi-firmware
can i assume now the "official" firmware (with dist-upgrade) is 3.18.8 or should i look elsewhere?
Thanks

Return to “General discussion”