Loongson-3A/PMON problems

96 views
Skip to first unread message

David Kuehling

unread,
Apr 5, 2014, 11:50:46 AM4/5/14
to loongs...@googlegroups.com
Hi,

just trying to install Debian on a Xinghuo Desktop machine with
Loongson
3A CPU. I built a 3.5 linux kernel that contains a minimum Debian
installer as initrd. Here is the build scripts I used:


http://mosquito.dyndns.tv/opensvn/free/trunk/loongson/loongson3a-debian-wheezy-installer/

And this is the resulting linux image:


http://mosquito.dyndns.tv/david/loongson/vmlinuz-3.5.0-8.lemote-with-wheezy-installer

I put this on a usb stick (8GB, vfat partition), under path+name
"/installer".

Now I boot the Xinghuo, enter the pmon prompt and type:

load (usb0,0)/installer

It loads for a while, outputs

Loading file: (usb0,0)/installer (elf)
(elf64)
0x01610000/6427652 + 0x81c81404/4202540(z)

Then the whole system deadlocks.

Is this a pmon problem? I didn't even run the 'boot' command yet. Or
could this be some problem with my kernel config (this is almost the
same kernel config as the one that I found on the boot partition of the
system)? Any ideas how to proceed would be appreciated. Solving these
kinds of problems via trial+error can take a lot of time...

cheers,

David
--
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk2.gpg
Fingerprint: B63B 6AF2 4EEB F033 46F7 7F1D 935E 6F08 E457 205F

Huacai Chen

unread,
Apr 5, 2014, 9:40:48 PM4/5/14
to loongs...@googlegroups.com
Hi, David,

Could you please tell me the PMON version? And does 3.5.0-7 works fine?

Huacai
> --
> You received this message because you are subscribed to the Google Groups
> "loongson-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to loongson-dev...@googlegroups.com.
> To post to this group, send email to loongs...@googlegroups.com.
> Visit this group at http://groups.google.com/group/loongson-dev.
> For more options, visit https://groups.google.com/d/optout.

David Kuehling

unread,
Apr 5, 2014, 10:03:02 PM4/5/14
to loongs...@googlegroups.com
Replying to myself:

after a little trial+error I made pmon load the kernel by separating out
the initrd image. I can load it from PMON via commands

load (usb0,0)/installer
initrd (usb0,0)/initrd
g

However, there seems to be some problem with the kernel: the installer
runs for about one minute, then the system deadlocks. It does not seem
to be the installer's fault: if I switch to a different console and
enter the installer's shell, the deadlocks happen, too. Any problems
know WRT the official kernel image 3.5 from

http://dev.lemote.com/cgit/linux-official.git/

?

David Kuehling

unread,
Apr 5, 2014, 10:40:28 PM4/5/14
to loongs...@googlegroups.com
>>>>> "Huacai" == Huacai Chen <chenh...@gmail.com> writes:

> Hi, David, Could you please tell me the PMON version? And does 3.5.0-7
> works fine?

Hi Huacei,

entering 'vers' at the PMON prompt prints

PMON2000 2.1 (Bonito) #1: 2013 [XXX]03[XXX]18[XXX]09:26:42 CST

[XXX] is nonsensical ASCII garbage, maybe it's some multibyte chinese
printed on singlebyte PMON console?

I'm also tried version 3.5.0-7 from:

http://dev.lemote.com/cgit/linux-official.git/snapshot/linux-official-3.5.0-7.lemote.tar.gz

But this has the same problem as the 3.5.0-8 : it deadlocks after a
short time of use (maybe related to the radeon framebuffer driver? the
last thing I see is when the installer blanks the screen, which taks
quite some time, given how slow the framebuffer is).

My kernel config is here (minus the CONFIG_INITRAMFS_SOURCE=):

http://mosquito.dyndns.tv/opensvn/free/trunk/loongson/loongson3a-debian-wheezy-installer/kconfig

I'm using upstream GCC 4.6.4 from

ftp://ftp.cs.tu-berlin.de/pub/gnu/gcc/gcc-4.6.4/gcc-core-4.6.4.tar.bz2

to build the kernel. Hopefully we're not also fighting against GCC bugs
here?

David Kuehling

unread,
Apr 5, 2014, 11:14:35 PM4/5/14
to loongs...@googlegroups.com, Huacai Chen
I'm now going to try the master branch from
git://dev.lemote.com/linux-official.git . I'm wondering which source
Aurelien Jarno is using for building

http://temp.aurel32.net/loongson3/linux-image-3.13-1-loongson-3_3.13.4-1+loongson3+pv19_mipsel.deb ,

this cannot come from Linux upstream, as there is no Loongson 3A support
there yet.

Looking at /boot partition that came pre-installed with the Xinghuo, the
boot.cfg only lists kernel versions 2.6 for boot. There is a 3.5 kernel
image, but this is commented out, maybe for the same poblems that I'm
encountering?

title Neokylin linux
kernel /dev/fs/ext2@wd0/vmlinuz-2.6
args console=tty8 root=/dev/sda7 quiet splash loglevel=0

title LOonux 3
kernel /dev/fs/ext2@wd0/vmlinuz-2.6
args console=tty1 quiet init=/sbin/LOonux3 splash root=/dev/sda5

#title LOonux 3 (3.5+)
# kernel /dev/fs/ext2@wd0/vmlinuz-3.x
# args console=tty1 quiet init=/sbin/LOonux3 splash root=/dev/sda5 resume=/dev/sda3
[..]

According to /boot/config-2.6, these "known good" kernels are extremely
old, listing 2.6.36-21.lemote as source.

Huacai Chen

unread,
Apr 6, 2014, 3:45:24 AM4/6/14
to David Kuehling, loongs...@googlegroups.com
Hi, David,

Please use "set" command in PMON and the "Version" variable will give
an exact version number. Then, I think the pre-installed should be
good, though I don't know why it is commented.

Huacai

David Kuehling

unread,
Apr 6, 2014, 5:11:01 AM4/6/14
to loongs...@googlegroups.com
>>>>> "Huacai" == Huacai Chen <chenh...@gmail.com> writes:

> Hi, David, Please use "set" command in PMON and the "Version" variable
> will give an exact version number.

'set Version' answers 'A1101-3.1.8'

> Then, I think the pre-installed should be good, though I don't know
> why it is commented.

I'm pretty sure the included 3.5 version is not going to work either,
though I'll try that tonight just to be sure. It won't be too helpful
for installation, as it doesn't have the full dm-crypt support that I
need during installation (I never use unencrypted disks for my
computers, you never know where these computers/disks end up).

I now tried Ralf's master branch, it already has the Loongson3A patches
(upstream support coming closer?):

git://git.linux-mips.org/pub/scm/ralf/linux

It lacks the radeon firmware, had to manually add that from

http://people.freedesktop.org/~agd5f/radeon_ucode/R600_rlc.bin

The R8168 network driver is not supported on that branch, but googeling
around I think the 8169 driver should work as a replacement and I
enabled it. I do get a missing firmware warning on the kernel log,
though networking seems to work (promiscous mode/DHCP may be broken?
had to manually setup networking)

The resulting kernel now boots into the installer. But the installation
does not proceed beyond "downloading installer components". This is now
a debian-specific problem, will try to ask at debian-mips and/or hack
the installer.

This looks pretty promising.

About PMON: the version that came with my Fuloong 6004 also was very
picky about which kernels it would load. Finally worked around these
problems by installing grub. Hopefully Grub will also work on the
Xinghuo.

cheers,

Aníbal Monsalve Salazar

unread,
Apr 5, 2014, 2:11:48 PM4/5/14
to loongs...@googlegroups.com, David Kuehling
On Sat, 2014-04-05 17:50:46 +0200, David Kuehling wrote:
> Hi,
>
> just trying to install Debian on a Xinghuo Desktop machine with
> Loongson 3A CPU. I built a 3.5 linux kernel that contains a minimum
> Debian installer as initrd. Here is the build scripts I used:
>
> http://mosquito.dyndns.tv/opensvn/free/trunk/loongson/loongson3a-debian-wheezy-installer/
>
> And this is the resulting linux image:
>
> http://mosquito.dyndns.tv/david/loongson/vmlinuz-3.5.0-8.lemote-with-wheezy-installer
>
> I put this on a usb stick (8GB, vfat partition), under path+name
> "/installer".
>
> Now I boot the Xinghuo, enter the pmon prompt and type:
>
> load (usb0,0)/installer
>
> It loads for a while, outputs
>
> Loading file: (usb0,0)/installer (elf)
> (elf64)
> 0x01610000/6427652 + 0x81c81404/4202540(z)
>
> Then the whole system deadlocks.
>
> Is this a pmon problem? I didn't even run the 'boot' command yet. Or
> could this be some problem with my kernel config (this is almost the
> same kernel config as the one that I found on the boot partition of
> the system)? Any ideas how to proceed would be appreciated. Solving
> these kinds of problems via trial+error can take a lot of time...
>
> cheers,
>
> David

Maybe you could try:

http://temp.aurel32.net/loongson3/linux-image-3.13-1-loongson-3_3.13.4-1+loongson3+pv19_mipsel.deb

It was built by a Aurélien Jarno a Debian Developer.

You could also ask questions at debia...@lists.debian.org and if you
would like to subcribe go to http://lists.debian.org/debian-mips/.
signature.asc
Reply all
Reply to author
Forward
0 new messages