LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 01-09-2017, 05:21 AM   #1
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,101
Blog Entries: 2

Rep: Reputation: 135Reputation: 135
Slackaware (-current) on H3: step by step


1. I use an Orange Pi PC for my H3 host (@$16 hardly any beats it's bang for buck)
2. H3 is Allwinner so any inquiry begins here at sunxsi (kudos to sunxi).

it seem it's supported by mainline uboot (excellent) and apparently mainline kernel supports booting it since 4.9

Why Orange PI PC?:
1. it's "en par" with R-Pi3 raw performance
2. Bang for buck - it's second to none
3. It's "old enough" for mainline

my goals:
-document all needed to make it 7/24 station for server or PC.

Further info as I progress.
 
Old 01-09-2017, 05:40 AM   #2
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 537

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Quote:
Originally Posted by SCerovec View Post
1. I use an Orange Pi PC for my H3 host (@$16 hardly any beats it's bang for buck)
2. H3 is Allwinner so any inquiry begins here at sunxsi (kudos to sunxi).

it seem it's supported by mainline uboot (excellent) and apparently mainline kernel supports booting it since 4.9

Why Orange PI PC?:
1. it's "en par" with R-Pi3 raw performance
2. Bang for buck - it's second to none
3. It's "old enough" for mainline

my goals:
-document all needed to make it 7/24 station for server or PC.

Further info as I progress.
I've got the Orange Pi H3 Plus v1.1 working but unfortunately I haven't been able to get the Ethernet working (I took the sun8i emac patch from Fedora's Kernel SRPM -- you can pull the patch from the Kernel repo but it's easier to pull it from Fedora, and I'm assuming someone using Fedora on an OPi might have tested it) - the NIC is found but it never gets a link/carrier; yet it works fine in U-Boot.


Code:
root@melonia:~# uname -a
Linux melonia 4.9.1-armv7 #2 SMP Sat Jan 7 14:20:52 GMT 2017 armv7l Allwinner sun8i Family GNU/Linux
root@melonia:~# cat /proc/device-tree/model
Xunlong Orange Pi Plus / Plus 2
I've written the installation documents for it and it'll be uploaded when the next batch of packages goes out.

If you get your eth0 working I'd like to know, although you've got a different model to me.

Last edited by drmozes; 01-09-2017 at 08:24 AM.
 
Old 01-09-2017, 06:01 AM   #3
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 537

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Also does the Orange Pi PC have mmc? My install docs assume eSATA but I will expand it to MMC since the Orange Pi Plus has it.
Working out which Orange Pi you have is quite difficult -I had to look at the wording next to the GPIO pins -- the web site does not help much particularly since there are multiple models under the same name!
 
Old 01-09-2017, 11:10 AM   #4
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,101
Blog Entries: 2

Original Poster
Rep: Reputation: 135Reputation: 135
Hey drmozes, kudos for the valuable work there !

I got my an O-PI_PC it seems to be v1.3?

I will, of course, spam few photos in the process?

Maybe some code too?
 
Old 01-09-2017, 04:20 PM   #5
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 142

Rep: Reputation: 35
Quote:
Originally Posted by drmozes View Post
Also does the Orange Pi PC have mmc? My install docs assume eSATA but I will expand it to MMC since the Orange Pi Plus has it.
Working out which Orange Pi you have is quite difficult -I had to look at the wording next to the GPIO pins -- the web site does not help much particularly since there are multiple models under the same name!
The Orange Pi Plus has 8GB eMMC and the Orange Pi Plus 2 has 16GB eMMC... *reportedly*. As you know the official Orange Pi website makes a dogs dinner out of listing the spec's of each board model/version and revisions, plus that entire website confuses the hell out of me!

You can install an OS on the eMMC and the Orange Pi will boot with it if there's no microSD card detected at boot. The microSD is the primary boot device so it will always try to boot from that first. Not sure what will happen if the microSD card has no bootable partition or boot files on it but the eMMC does. I think you can also configure the Orange Pi to boot from eSATA but don't quote me on that. I've yet to put mine through the rigours of testing.
 
Old 01-10-2017, 02:28 AM   #6
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,101
Blog Entries: 2

Original Poster
Rep: Reputation: 135Reputation: 135
Post

might I chime in?

The "bare metal" really seeks for the uboot or a like initial loader, rather than an actual OS.

It does, however, make sense to use an present eMMC of 8GB for something more than mere "BIOS" (in x86 lingo).

Yes, all non Raspberry companies reflect a culture of inflated enthusiasm (Asia(TM)?)

The OPI-PC has an MMC slot (TF size) and apparently no "flash chips" (eMMC) elsewhere. Photos still due. (my (lame) Excuse: -15 C on day time and the shop (=shed) is outside of the house)
 
Old 01-10-2017, 03:41 AM   #7
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 537

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
As it turns out, I was sent an Orange Pi Plus *and* an Orange Pi PC, so once I'm done with some other stuff I'll add documentation support for the Orange Pi PC as well.
 
Old 01-10-2017, 09:03 AM   #8
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,101
Blog Entries: 2

Original Poster
Rep: Reputation: 135Reputation: 135
Arrow due photos

Please lookup the attached pictures:
Yes the price was such I couldn't resist to get an non DIY-ed case and the USB power cord.

The PSU is an all powerful twin 2.4A 5.1V monster from e-bay

more images below...
Attached Thumbnails
Click image for larger version

Name:	dressed-top.jpg
Views:	25
Size:	244.4 KB
ID:	23940   Click image for larger version

Name:	dressed-bottom.jpg
Views:	27
Size:	238.8 KB
ID:	23941   Click image for larger version

Name:	Power.jpg
Views:	22
Size:	186.9 KB
ID:	23942   Click image for larger version

Name:	topview.jpg
Views:	26
Size:	76.2 KB
ID:	23943  
 
Old 01-10-2017, 09:06 AM   #9
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,101
Blog Entries: 2

Original Poster
Rep: Reputation: 135Reputation: 135
Arrow moar photos

I mainly pick to post what I would like to lookup on any device.

That's why the abundance of views
Attached Thumbnails
Click image for larger version

Name:	back.jpg
Views:	23
Size:	68.7 KB
ID:	23944   Click image for larger version

Name:	pinheader.jpg
Views:	21
Size:	128.3 KB
ID:	23945   Click image for larger version

Name:	multimedia.jpg
Views:	18
Size:	129.9 KB
ID:	23946   Click image for larger version

Name:	options.jpg
Views:	19
Size:	157.1 KB
ID:	23947   Click image for larger version

Name:	connectors.jpg
Views:	18
Size:	153.1 KB
ID:	23948  

 
Old 01-10-2017, 09:07 AM   #10
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,101
Blog Entries: 2

Original Poster
Rep: Reputation: 135Reputation: 135
next we prepare the TF-card for a boot, and connect the UART and power to the SBC (stay tuned)...
 
Old 01-12-2017, 01:39 PM   #11
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,101
Blog Entries: 2

Original Poster
Rep: Reputation: 135Reputation: 135
Arrow

Hello fellow slackers, here we continue the process...
This stage is apparently referred to as installing the SPL by sunxsi:

1. We need to obtain an u_boot - it's source code and it's maintained here. I got 2017.01
2. To be able to build it we either have to be native (build it on ARM host) or use a toolchain (in next post in more detail), i used the last time's linaro 5.3.1, links apparently obsolete quickly, so please use a search engine and the site structure, to locate the current one?
3. the build result is the file named
Code:
u-boot-sunxi-with-spl.bin
note the spl it stands for secondary program loader, we used to call BIOS on x86.
We need put this to where the SBC can find it - an MMC and on the spacial location:
Code:
start 	size 	usage
0 	8KB 	Unused, available for partition table etc.
8 	24KB 	Initial SPL loader
32 	512KB 	U-Boot
544 	128KB 	environment
672 	352KB 	reserved
1024 	- 	Free for partitions
according to sunxi.org.
This apparently populates the "track zero" of our "flash-disk"
The partition usually begins at 2048...
drmozes has us covered with the preparation of most orange_pi SBCs. And while he prepares all for us, I used his scripts and the "empty image" as following:
Code:
dd if=u_boot-build/u-boot-sunxi-with-spl.bin of=empty_image.img bs=1k seek=8
so I got my SPL in place where it belongs on a real "drive".
then I just applied it over an dedicated MMC:
Code:
# dd if=empty_image.img of=/dev/sdc
NOTE:
this is the first step one has to make as root,
i used /dev/sdc as it's the correct device for me - use most caution when finding out the proper device - or loose data at You own risk!

and my SPL was in place for me to try boot the OPI-PC:
MMC --> slot
2A (or better) 5V PSU (led driver comes to mind)
UART converter (or anything talking serial) to the OPI_PC header (care to "X" the TX and RX - TX-->RX RX-->TX GND-->GND)
open a terminal:
Code:
# screen -T screen-256color /dev/ttyUSB0 115200,-crtscts
(it becomes blank) (i use root for convenience- otherwise check user is in the right group (dialout?))
power on the OPI_PC
and it happily spews away:
Code:
U-Boot SPL 2017.01 (Jan 12 2017 - 19:48:33)
DRAM: 1024 MiB
Trying to boot from MMC1

U-Boot 2017.01 (Jan 12 2017 - 19:48:33 +0100) Allwinner Technology

CPU:   Allwinner H3 (SUN8I 1680)
Model: Xunlong Orange Pi PC
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   phy interface0
eth0: ethernet@1c30000
starting USB...
USB0:   USB EHCI 1.00
USB1:   USB OHCI 1.0
USB2:   USB EHCI 1.00
USB3:   USB OHCI 1.0
USB4:   USB EHCI 1.00
USB5:   USB OHCI 1.0
scanning bus 0 for devices... 1 USB Device(s) found
scanning bus 2 for devices... 1 USB Device(s) found
scanning bus 4 for devices... 1 USB Device(s) found
Hit any key to stop autoboot:  0 
=> <INTERRUPT>
I might note the SPL got (DHCPd's) IP, so Ethernet seems supported by the mainline u_boot.

Last edited by SCerovec; 01-13-2017 at 03:53 AM. Reason: yikes! -typos (few found)
 
Old 01-12-2017, 01:48 PM   #12
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,101
Blog Entries: 2

Original Poster
Rep: Reputation: 135Reputation: 135
Using an toolchain: pros and cons.
I wanted to point out here, that our beloved Slackware apparently endorses the way of natively building ARM packages.
And by a good reason so.
It is better to have packages tested in native environment (that they work as intended) than to vaste time troubleshooting an non native build requirement.

But i just so happen that I don't have an native host running at hand, and have an new (fresh?) SBC in dire need of an OS.

So I found my self more easy to produce an toolchain-built u-boot on Slackware, than to try build it native on non-Slackware OS.

So it seems merely a matter of preference, and in my case of convenience (I happen more easy hack on Slackware than on other distros )

here my buildscript that makes the u-boot:
Code:
#!/bin/sh
# blah blah for Slackware-current 2017.
#
#

our_target="orangepi_pc_defconfig"
image="u-boot-sunxi-with-spl.bin"
export KBUILD_OUTPUT=`pwd`/u_boot-build

export CC=`pwd`/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-


${CC}gcc --version

echo "we are building here:"
echo ${KBUILD_OUTPUT}
mkdir -vp ${KBUILD_OUTPUT}
rm -vrf ${KBUILD_OUTPUT}/*

echo "entering source tree"

cd u-boot
make ARCH=arm CROSS_COMPILE=${CC} distclean

make ARCH=arm CROSS_COMPILE=${CC} ${our_target}

# make ARCH=arm CROSS_COMPILE=${CC} xconfig

make -j4 ARCH=arm CROSS_COMPILE=${CC} all

echo "if all went well, here we have the image ready"


file=${KBUILD_OUTPUT}/${image}
if [ -a $file ]; then
  echo "image found :"
  ls -h $file
else
  echo "error, no valid output"
  exit 1
fi

echo "partition the device, and issue as root:"
echo "dd if=$file of=\"/dev/<yourMMC>\" bs=1k seek=8"
NOTE:
alpha quality, just works as is (ISC license okay?)
for it to work: symlink Your U_boot sources to u-boot:
Code:
ln -vs u-boot-2017.01 u-boot
for me, as I downloaded 2017.01 version.

Last edited by SCerovec; 01-12-2017 at 01:49 PM.
 
Old 01-13-2017, 03:58 AM   #13
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,101
Blog Entries: 2

Original Poster
Rep: Reputation: 135Reputation: 135
Where do we go now?
well, since we have the option to boot from a u_boot, which equates "full featured bios boot", why not make an USB stick of current-ARM and try make it booted and then install?

I will report back as soon as I find the available carrier for this (spare USB).

goal:
get series:
a,l,d,app and n installed at least - therefrom one can continue en vivo with slackpkg.

stay tuned
 
Old 01-13-2017, 04:06 AM   #14
Penthux
Member
 
Registered: Dec 2008
Location: Middlesbrough, UK
Distribution: Slackware
Posts: 142

Rep: Reputation: 35
Quote:
Originally Posted by SCerovec View Post
Where do we go now?
Hi SCerovec,

It wouldn't be a bad idea to document and publish all your hard work on Slack Docs. I'm sure many users would benefit from your experience and efforts.
 
Old 01-13-2017, 04:52 AM   #15
drmozes
Slackware Contributor
 
Registered: Apr 2008
Location: Surrey, England
Distribution: Slackware
Posts: 537

Rep: Reputation: 399Reputation: 399Reputation: 399Reputation: 399
Quote:
Originally Posted by Penthux View Post
Hi SCerovec,

It wouldn't be a bad idea to document and publish all your hard work on Slack Docs. I'm sure many users would benefit from your experience and efforts.
Why not hold off on that for now since the H3 installation support is already documented, but not pushed out until the latest packages finish building.

Once it's out, you might want to write additional documentation to cover more complex installation methods -- which I can provide a link to in the OrangePI installation docs.
 
  


Reply

Tags
allwinner, kernel, mainline, slackware -current, uboot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Step By Step Ubuntu 13.04 (Raring Ringtail) LAMP Server Setup LXer Syndicated Linux News 0 09-12-2013 04:34 PM
Step by step configuration documents of FTP/DNS/MAIL/Appache/SAMBA sidharthasankar.raja Linux - Server 2 04-15-2010 06:31 AM
Step-By-Step Instruction to install Linksys WPC11 Ver.4 Wireless Card Zypher Linux - Hardware 8 08-12-2009 10:43 AM
LXer: Atticware Revisited: Step-By-Step Instructions For Installing A Current Linux Distro On A Very Small, Very Old Laptop LXer Syndicated Linux News 0 07-04-2006 09:54 AM
Step-by-Step: Making integrated Broadcome wireless adapter work with Mandrake 9.2 jmp875 Linux - Wireless Networking 16 06-30-2004 12:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 06:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration