alistair23 / meta-pine64

OpenEmbedded/Yocto layer for the Pine64 boards
MIT License
22 stars 21 forks source link

Issues with PINE64 LTS #2

Closed tmorin closed 4 years ago

tmorin commented 5 years ago

Hi,

First of all thank for your contribution!!

I would like to know if you (or someone else) tried your layer with a PINE64 LTS board? As far I understood the image for SOPINE should work with PINE64 LTS. I know it is the case for armbian as well as the build 0.7.19 from ayufan-pine64. Both are working with older kernel. However it might this layer "doesn't work" with PINE64 LTS.

Doesn't work means: despite an IP is provided by the DHCP once the board is powered on, the ssh port is closed. I expect the ssh port opened because of EXTRA_IMAGE_FEATURES ?= "debug-tweaks" in local.conf.

FYI I'm a newbee about OpenEmbedded/Yocto/bitbake and so one. You will find below the steps I made to build an image. I followed Yocto Project Quick Build.

Do you think I missed something?

Best regards

~/git$ git clone git://git.yoctoproject.org/poky
Cloning into 'poky'...
remote: Counting objects: 447463, done.
remote: Compressing objects: 100% (105570/105570), done.
remote: Total 447463 (delta 334832), reused 447299 (delta 334670)
Receiving objects: 100% (447463/447463), 157.10 MiB | 2.67 MiB/s, done.
Resolving deltas: 100% (334832/334832), done.
~/git$ cd poky
~/git/poky$ git clone git@github.com:alistair23/meta-pine64.git
Cloning into 'meta-pine64'...
remote: Enumerating objects: 156, done.
remote: Counting objects: 100% (156/156), done.
remote: Compressing objects: 100% (97/97), done.
remote: Total 156 (delta 51), reused 138 (delta 34), pack-reused 0
Receiving objects: 100% (156/156), 41.71 KiB | 435.00 KiB/s, done.
Resolving deltas: 100% (51/51), done.
~/git/poky$ source oe-init-build-env
You had no conf/local.conf file. This configuration file has therefore been
created for you with some default values. You may wish to edit it to, for
example, select a different MACHINE (target hardware). See conf/local.conf
for more information as common configuration options are commented.

You had no conf/bblayers.conf file. This configuration file has therefore been
created for you with some default values. To add additional metadata layers
into your configuration please add entries to conf/bblayers.conf.

The Yocto Project has extensive documentation about OE including a reference
manual which can be found at:
    http://yoctoproject.org/documentation

For more information about OpenEmbedded see their website:
    http://www.openembedded.org/

### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'
~/git/poky/build$ bitbake-layers add-layer ../meta-pine64
NOTE: Starting bitbake server...
~/git/poky/build$ MACHINE=sopine-a64 bitbake core-image-base
WARNING: Host distribution "ubuntu-19.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100% |##################################################################################################################################| Time: 0:01:07
Parsing of 799 .bb files complete (0 cached, 799 parsed). 1326 targets, 61 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.43.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-19.04"
TARGET_SYS           = "aarch64-poky-linux"
MACHINE              = "sopine-a64"
DISTRO               = "poky"
DISTRO_VERSION       = "2.7+snapshot-20190721"
TUNE_FEATURES        = "aarch64"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "master:2d8e21eaac3e9d8a1f71fc45877e553c8546aea0"
meta-pine64          = "master:2b7c0d210b87656cb040efa95c7a6278b57fc0dc"

NOTE: Fetching uninative binary shim from http://downloads.yoctoproject.org/releases/uninative/2.6/x86_64-nativesdk-libc.tar.xz;sha256sum=133387753a9acf3e1b788103c59fac91e968e2ee331d7a4b9498e926ada7be57
Initialising tasks: 100% |###############################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 1211 Found 0 Missed 1211 Current 0 (0% match, 0% complete)
NOTE: Executing Tasks
NOTE: Setscene tasks completed
NOTE: Tasks Summary: Attempted 3557 tasks of which 5 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message shown.
alistair23 commented 5 years ago

I would like to know if you (or someone else) tried your layer with a PINE64 LTS board?

I have not tried it, I only have a sopine board so that's all I use.

As far I understood the image for SOPINE should work with PINE64 LTS

I'm not sure if that is correct. They both have their own u-boot config and kernel DTS. Although I haven't compared the differences between them I suspect there are some small differences between the board. Maybe they both boot but the more advanced features might require specific DTS changes.

Doesn't work means: despite an IP is provided by the DHCP once the board is powered on, the ssh port is closed.

Great! So networking seems to work for you

I expect the ssh port opened because of EXTRA_IMAGE_FEATURES ?= "debug-tweaks" in local.conf.

You might also need to install an SSH server? Do you have one running on your board?

I have this line in my local.conf (you can also use dropbear instead of openssh if you prefer)

CORE_IMAGE_EXTRA_INSTALL += "openssh openssh-misc"

FYI I'm a newbee about OpenEmbedded/Yocto/bitbake and so one. You will find below the steps I made to build an image. I followed Yocto Project Quick Build.

If your image boots and you get a network connection then you have done pretty well :)

I am working on adding a pine-a64-lts machine for you. I'm just running the final test then I will push it. Feel free to use that instead as it will use the correct u-boot config and kernel DTS for you. I can't test it on the board so let me know if there are any issues.

alistair23 commented 5 years ago

I just pushed the new machine

tmorin commented 5 years ago

Hi @alistair23

Thanks, I in fact started the same on my side ;)

I integrated both in a fork: https://github.com/tmorin/meta-pine64/tree/integrate_pine64-lts

FYI the network connection is about (I guess) the PXE feature of u-boot I guess. For me u-boot is not able to load the kernel and fallback with PXE (c.f. https://github.com/apritzel/pine64, If you let the U-Boot prompt time out, it will start looking for kernels on the SD card, any USB mass storage device (pen drive, hard disk), also trying PXE network boot.).

Once the build is done I will check it hopping it will OK!

Best regards

alistair23 commented 5 years ago

Cool your work looks good. Please send a pull request when you are done, then I will happily merge it in with my tree.

tmorin commented 5 years ago

Hello,

I made a PR for the sd-card support: #3

For the support of eMMC it is a bit more complicated.

Armbian uses a UUID to identify the rootfs partition. But it requires, from yocto, to be able to get the UUID of the partition in the wic and then to be able to patch the boot partition with the value of the UUID. c.f. get the UUID of the rootfs partition, patch the boot partition with the value of the UUID

Another build for pine64 play with u-boot commands -> https://github.com/ayufan-pine64/boot-tools/blob/with-drm/blobs/boot.cmd

I will try the second way.

Best regards

alistair23 commented 5 years ago

Armbian uses a UUID to identify the rootfs partition. But it requires, from yocto, to be able to get the UUID of the partition in the wic and then to be able to patch the boot partition with the value of the UUID. c.f. get the UUID of the rootfs partition, patch the boot partition with the value of the UUID

That shouldn't be too hard, you can just hardcode the UUID in the wic file, see meta-riscv for an example of that. Then you can just use the hardcoded value.

alistair23 commented 4 years ago

Closing this issue as I think the Pine LTS is supported. Please re-open or create a new issue if you still see any issues.