Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian installer on banana pi

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
ljones0
Posts: 84
Joined: 2013-03-30 22:51

Debian installer on banana pi

#1 Post by ljones0 »

Hello all!

I'm trying to get debian to install on my old Banana Pi here (it is the old original Banana Pi M1). I managed to write the files to an sdcard using these links:

https://wiki.debian.org/InstallingDebianOn/Allwinner

and

http://ftp.uk.debian.org/debian/dists/s ... rd-images/

I then did the following to write to an sd card:

Code: Select all

$ zcat firmware.BananaPi.img.gz partition.img.gz > /dev/sdc
(/dev/sdc being the device my SD card appeared under)

However when I go to boot off this card the banana pi starts to boot (I get text on the screen) and it appears to try to boot the kernel. The screen then clears but it all remains blank except for a blinking cursor at the top of the screen and nothing else happens from that point on. Can anyone think what I might be doing wrong or does the installer not work or display anything via HDMI?

Thanks

BTW here is a screengrab. Unfortuantly shortly after this the screen clears but gets no further.

ljones

User avatar
orythem27
Posts: 252
Joined: 2017-05-11 07:59
Location: P.R. China

Re: Debian installer on banana pi

#2 Post by orythem27 »

So you are using the mainline kernel. Did you use the jessie kernel (3.16)? AFAIK sunxi mainline support has matured dramatically in Linux 4.x. So you'd better off installing stretch instead.
ljones0 wrote:I'm trying to get debian to install on my old Banana Pi here
If you just want to get debian running on this board, there are a lot of alternative ways:
1. prebuilt, ready-to-use images;
2. debootstrap;
3. debian-installer.

ljones0
Posts: 84
Joined: 2013-03-30 22:51

Re: Debian installer on banana pi

#3 Post by ljones0 »

If I can work out how I'll try one of the alternative ways. But arm tends to be a bit of a pain when it comes to that sort of thing -- you need to write this file in *just* the right place on the sd card for it to boot, and get it wrong even just slightly and nothing x.x

BTW I did try jessie and stretch, but both didn't boot.

ljones

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Debian installer on banana pi

#4 Post by Dai_trying »

I have a Mk1 Raspberry Pi (256Mb Ram 700Mhz cpu) and I use Q4OS on that and it works ok for me, you can try it from the Q4OS Download page there is also a setup guide you can read in case it might help.

ljones0
Posts: 84
Joined: 2013-03-30 22:51

Re: Debian installer on banana pi

#5 Post by ljones0 »

am thinking the raspberry pi uses a different method and a slightly different cpu so I don't think that would work.

I also tried using zcat with the files I downloaded earlier ( firmware.BananaPi.img.gz partition.img.gz ) with other SD cards I have. They did even less well and failed to boot! I'm not convinced that simply using zcat with those files in this way really truly works. Won't different sized SD cards cause problems with using zcat in this way?

(Update: only 1 other booted, though still got no further!)

sandisk 8gb extreme (speed 10) - boots, but gets no further
sandisk 8gb (speed 4) - failed to boot
sandisk 32gb (speed 4) - failed to boot
samsung micro sd in sd adapter (32gb evo) - boots, but gets no further

Update: I got marginally further. I found that if I entered the uboot console and did these 3 commnads....

Code: Select all

setenv bootargs console=tty1 fb=true
saveenv
boot
That does at least try to boot and gives some kernel messages. But it still hangs -- the last line is

Code: Select all

[3.813291] eth%d PHY ID 001cc915 at 1 IRQ POLL (stmmac-0:01)


ljones
Last edited by ljones0 on 2017-06-10 15:18, edited 2 times in total.

User avatar
orythem27
Posts: 252
Joined: 2017-05-11 07:59
Location: P.R. China

Re: Debian installer on banana pi

#6 Post by orythem27 »

ljones0 wrote:am thinking the raspberry pi uses a different method and a slightly different cpu so I don't think that would work.
Do you want to experiment with debian installer or just grab some pre-built image, burn it and get things working? If the latter, consider specialized distro such as armbian.
https://www.armbian.com/banana-pi/

ljones0
Posts: 84
Joined: 2013-03-30 22:51

Re: Debian installer on banana pi

#7 Post by ljones0 »

Hi, I used the files from here:

http://ftp.uk.debian.org/debian/dists/s ... rd-images/

I did see armbian but then even that's slightly confusing -- there's a ubuntu (yuk!) desktop/leagacy kernel download, a debian server (headless I'm guessing so no hdmi/video output?) and then in other downloads debian jessie default and debian jessie next (no idea exactly if they are headless or minimal or ?) -- also might they only use old kernels being a jessie image?.

I did get slightly further; here is another picture. Though it hangs right at that spot - worst luck!!

If I can I'd like to try to stick with the debian installer.

In those commands;

Code: Select all

setenv bootargs console=tty1 fb=true
saveenv
boot
Does console=tty1 just refer to keyboard input or does that refer to something else such as the display (although I thought fb=true would make the installer use the framebuffer (HDMI) output). Unless there is some sort of problem with a setting in u-boot, although....

Code: Select all

printenv bootargs
 bootargs=console=tty1 fb=true
I did read on this page the following:

IMPORTANT NOTICE: The stretch builds from 2015-10-23 contain a bug which causes them to hang during the hardware detection. This bug is fixed in the daily builds available at http://d-i.debian.org/daily-images/armhf/daily/.

I did try the files from that location but it makes no difference. Maybe the bug mentioned there is back?

Looking at this bug report post I note inside it I read:

Failure is right after "Detecting Networking Hardware".

that is pretty much what is happening to me -- the last message I got was to do with ethernet.

ljones

Dai_trying
Posts: 1100
Joined: 2016-01-07 12:25
Has thanked: 5 times
Been thanked: 16 times

Re: Debian installer on banana pi

#8 Post by Dai_trying »

Have you tried writing the image using dd? I haven't used zcat before and usually us dd (in linux) or rufus (in Windows) for all my images and rarely have a failure. It could be that the card is written fine and please feel free to simply ignore this post if that is the case :)

I use something like
dd bs=4M if=/path/to/image/file of=/dev/sd[?]

Also according to the Q4OS site Docs You should be able to use that image, I'm not saying you should keep it as your main distro but more a case of if you can get it to work then there must be a way to get the debian image to work (Q4OS is Debian Jessie based)

A quick search on their forum shows a user with an Orange Pi and from my very limited knowledge I have in these boards I think that is similar?

ljones0
Posts: 84
Joined: 2013-03-30 22:51

Re: Debian installer on banana pi

#9 Post by ljones0 »

Ok I gave q4os a try, but it did not boot. Don't think it would work as from memory the rasberry pi uses a broadcom BCM based device, but the banana pi uses an allwinner device. And annoyingly different ARM based devices all their own weird versions of bootfiles which need to be written at a specific place. I'm no huge lover of ARM -- I've been down this route devices with other devies (e.g. cubox i4 pro) and it is a world of pain -- weird bootloaders, binary blobs, poor documentation (or non existant),propietary software for X/video....ugh.

I just wish there was something along the lines and that was x86 of the gigabyte brix or intel nuc but also wasn't super expensive (and didn't use the horrible, broken intel Z3535F bay trail chipset!). x86 might not be the best in some ways, but it does at least have the benefit of working!

I really cannot think as to what the reason why the banana pi should hang or stop with the debian installer. Pretty much out of ideas on that one.

ljones

User avatar
orythem27
Posts: 252
Joined: 2017-05-11 07:59
Location: P.R. China

Re: Debian installer on banana pi

#10 Post by orythem27 »

ljones0 wrote:- there's a ubuntu (yuk!) desktop/leagacy kernel download
Sorry, forgot that their desktop image is built from Ubuntu.
ljones0 wrote:a debian server (headless I'm guessing so no hdmi/video output?)
If so, it would be fairly simple to modify the fex/dtb to allow video output and install desktop environment atop the basic system, which is much easier than fiddling with d-i.

Armbian's desktop images, although being Ubuntu, has everything properly set up, such as G2D accel'd desktop, VPU accel'd video playback, etc. (Some of these sunxi-specific features not yet avalible with mainline kernel last time I checked.)
ljones0 wrote:... then in other downloads debian jessie default and debian jessie next (no idea exactly if they are headless or minimal or ?) -- also might they only use old kernels being a jessie image?
I think they are all headless. Only difference is legacy/mainline kernel in default/next images.

ljones0
Posts: 84
Joined: 2013-03-30 22:51

Re: Debian installer on banana pi

#11 Post by ljones0 »

I've not yet tried installing debian with the installer per se yet, but I did finally manage to get it to start. It turns out the installer dosen't output to the HDMI port but you need to use the serial port on the banana pi. And there's 3 pins on the machine to connect to - it needs a serial to USB converter (a PL2303 cable, not a 9 pin serial port!) to work. Note that the USB OTG port dosen't work for this. Here's what I did;

- Grab a spare SD card

- Put it into a linux machine and find out what device name it gets (become root and then dmesg; on my machine it was /dev/sdc)

- Wipe the card with

Code: Select all

dd if=/dev/zero of=/dev/sdc bs=1M count=4

- Download two files

Code: Select all

wget https://d-i.debian.org/daily-images/armhf/daily/netboot/SD-card-images/firmware.BananaPi.img.gz
wget https://d-i.debian.org/daily-images/armhf/daily/netboot/SD-card-images/partition.img.gz
- Write the two files;

Code: Select all

zcat firmware.BananaPi.img.gz partition.img.gz > /dev/sdc
- Wait, type sync and remove the card and then put into banana pi.

- Connect up the PL2303 cable to the banana pi. On my PL2303 cable -- the black wire is ground, white is recieve (RX) and red=send (TX). I think this needs to be switched round when connecting to the banana pi - looking at the J12 connector use the last 3 pins (not the 4 pin connector below J12). Getting the RX and TX pins round the wrong way or misconnecting the ground will result in nothing happening(!).

Code: Select all

J12 . . . [BLACK][WHITE][RED]
  1 . . . .
- Become root on a linux box and run

Code: Select all

screen /dev/ttyUSB0 115200
I did that and I now can see the debian installer using the screen program. BTW, I would upload a picture but I just got an error from the forum, "Sorry, the board attachment quota has been reached." :-( .

Update:*After* the debian installer had completed (over the serial port) and after the banana pi restarted the banana pi did output a command line to HDMI.

ljones

Post Reply