Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Lemote Lynloong all-in-one-PC kernel?[break 0ff]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
vastchen
n00b
n00b


Joined: 22 Apr 2016
Posts: 55

PostPosted: Sun Jul 01, 2018 5:09 am    Post subject: Lemote Lynloong all-in-one-PC kernel?[break 0ff] Reply with quote

i got a old computer Lynloong All-in-one PC

lynloogn-2f-9003

THE hardware
http://zkml.lemote.com/en/products/all-in-one/2010/0311/122.html

i got a old loongon 2f computer .lemote-lynloong-2f-9003 i try many kernnel like mainline

and https://github.com/tinyclub/linux-loongson-community/blob/linux-2.6.32-stable/arch/mips/configs/lemote2f_defconfig

i set CONFIG_LEMOTE_LYNLOONG2F_PDEV=y

evertime can pmon load the kernel but can't
g console=tty root=/dev/sdax

just like the picture URL
https://pan.baidu.com/s/10gdA2KoEyGTdcvEWvDShpg

how can't i build the kernel ?

ude the default kernel [need help build kernel]
and the stage is too old wnhen i down the nwe portage must mask EAPI 4 5 6 and many package lost how can i upgrade or how to build cross mips64el by hand?




Ask lemote team they tell me
9003唯一可以使用的一个内核是Lemote当时出厂的的2.6.27内核,我放在这里,你可以试试
9003 thi only kernel is 2.6.27; other kernel no support SM502 ,but the 2.6.37 chroot get kernel too old. so break off install gentoo ,even openbsd say they supoot but boot the bsd kernel got LM9103-1.5.9 unknown.....so no thing can do.....
_________________
gentoo user


Last edited by vastchen on Sun Jul 08, 2018 7:15 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Tue Jul 03, 2018 1:49 pm    Post subject: Reply with quote

vastchen,

I was hoping that someone with more knowledge of MIPS than me would answer.
I've done what you need to do but on arm64 for Raspberry Pi, so I know the theory is sound.
Its not for a Gentoo beginner though.

Before you even start, its unlikely that you can build very much with only 512Mb RAM.
You can try but you will need say 2G swap, which makes things very slow.

Your first step is to build a cross toolchain on a Gentoo intsall on more capable hardware.
If you don't yet have a Gentoo install, a Gentoo guest install in Virtualbox will be good.

In your Gentoo,
Code:
emerge crossdev
then
Code:
crossdev -t mips64el-unknown-linux-gnu


This gives you a cross toolchain and a target root filesystem at /usr/mips64el-unknown-linux-gnu/
That's mostly empty but its the start of a gentoo install for your system.

If you just want to build the kernel with your cross compiler, I'm fairly sure that's covered in the embedded handbook you quoted.
None of the rest below is required.

If you want co cross compile a Gentoo system be warned that theory and practice diverge sharply.
In theory you set up /usr/mips64el-unknown-linux-gnu/etc/portage/.. for your target then
Code:
emerge-wrapper --init -t mips64el-unknown-linux-gnu
mips64el-unknown-linux-emerge @system
cross compiles the system set.

In practice, its not straight forward becase:-
a few packages will not cross compile by design.
many packages build systems have not been tested with cross compiling.
The portage dependency tree for the system set is incomplete - that's by design too.
That means things will try to build in the wrong order and fail.
Several runs of
Code:
mips64el-unknown-linux-emerge @system
will address that.
Note: that this does not use a stage3.

At this point, you could chroot into /usr/mips64el-unknown-linux-gnu/ using QEMU, if it supports mips64el.
Thats a whole new world though.

In summary, you can build a cross compiler.
That's enough for cross compiling the kernel.
You can configure /usr/mips64el-unknown-linux-gnu/etc/portage/.. then cross compile packages for your loongson.
Once you get most of @system cross compiled, you can chroot into it using an emulator.
A stage3 tarball is not required.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
vastchen
n00b
n00b


Joined: 22 Apr 2016
Posts: 55

PostPosted: Thu Jul 05, 2018 1:13 am    Post subject: Reply with quote

NeddySeagoon thank you very much .
your are the first one to answer this question.

i have a amd64 gentoo on my pc. key_worlds "~amd64"


i was do this in few day ago .

Code:
crossdev -t mips64el-unknown-linux-gnu


Code:
emerge-wrapper --init -t mips64el-unknown-linux-gnu
this step no in https://wiki.gentoo.org/wiki/Embedded_Handbook/General/Full i have no do this.


Code:
mips64el-unknown-linux-emerge @system
in this step many package emerge fail the most important is gcc-7.3.0-r3 buil fail ,try mips64el-unknown-linux-emerge ="sys-devel/gcc-4.4.9" also fail.

gcc build fail mean i use QEMU chroot have no build-toolchain in the chroot :cry:

tonight i will try add this
Code:
emerge-wrapper --init -t mips64el-unknown-linux-gnu
step build again.

if the gcc also fail i will post the log.

by the way /usr/mips64el-unknown-linux-gnu/etc/portage/ have no mips64el only mipsel ....in 13 or 17.

lynloogn-2f machine i was install a old debain build by someone squeeze。

this is the make.conf in the only one stage in the lynloogn-2f squeeze can chroot in and correct(but too old 2010).... orther mips64el stage chroot and use ls will error 8?

post this stage make.conf
Code:

CFLAGS="-O3 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop"
CXXFLAGS="-O3 -march=loongson2f -mabi=n32 -pipe -mplt -Wa,-mfix-loongson2f-nop"
# LDFLAGS is unsupported.  USE AT YOUR OWN RISK!
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="mips64el-unknown-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="n32"


NeddySeagoon thanks again tonight i will try again.
_________________
gentoo user
Back to top
View user's profile Send private message
vastchen
n00b
n00b


Joined: 22 Apr 2016
Posts: 55

PostPosted: Thu Jul 05, 2018 2:04 pm    Post subject: Reply with quote

NeddySeagoon wrote:
vastchen,

I was hoping that someone with more knowledge of MIPS than me would answer.
I've done what you need to do but on arm64 for Raspberry Pi, so I know the theory is sound.
Its not for a Gentoo beginner though.

Before you even start, its unlikely that you can build very much with only 512Mb RAM.
You can try but you will need say 2G swap, which makes things very slow.

Your first step is to build a cross toolchain on a Gentoo intsall on more capable hardware.
If you don't yet have a Gentoo install, a Gentoo guest install in Virtualbox will be good.

In your Gentoo,
Code:
emerge crossdev
then
Code:
crossdev -t mips64el-unknown-linux-gnu


This gives you a cross toolchain and a target root filesystem at /usr/mips64el-unknown-linux-gnu/
That's mostly empty but its the start of a gentoo install for your system.

If you just want to build the kernel with your cross compiler, I'm fairly sure that's covered in the embedded handbook you quoted.
None of the rest below is required.

If you want co cross compile a Gentoo system be warned that theory and practice diverge sharply.
In theory you set up /usr/mips64el-unknown-linux-gnu/etc/portage/.. for your target then
Code:
emerge-wrapper --init -t mips64el-unknown-linux-gnu
mips64el-unknown-linux-emerge @system
cross compiles the system set.

In practice, its not straight forward becase:-
a few packages will not cross compile by design.
many packages build systems have not been tested with cross compiling.
The portage dependency tree for the system set is incomplete - that's by design too.
That means things will try to build in the wrong order and fail.
Several runs of
Code:
mips64el-unknown-linux-emerge @system
will address that.
Note: that this does not use a stage3.

At this point, you could chroot into /usr/mips64el-unknown-linux-gnu/ using QEMU, if it supports mips64el.
Thats a whole new world though.

In summary, you can build a cross compiler.
That's enough for cross compiling the kernel.
You can configure /usr/mips64el-unknown-linux-gnu/etc/portage/.. then cross compile packages for your loongson.
Once you get most of @system cross compiled, you can chroot into it using an emulator.
A stage3 tarball is not required.



Code:
emerge-wrapper --init -t mips64el-unknown-linux-gn
what this line mean?
Code:
emerge-wrapper --init -t mips64el-unknown-linux-gnu  gcc
emerge-wrapper: missing --target <CHOST> option

_________________
gentoo user
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum