ingamedeo / orangepi3-h6-mainline

Mainline kernel Orange Pi 3 (Allwinner H6) with custom DTS, USB3, WiFi, Ethernet (dwmac_meson8b regulator patch), PCI-E patches. EL2 Hypervisor for quirky PCI-E controller.
23 stars 6 forks source link

compile #2

Open jkoenig72 opened 3 years ago

jkoenig72 commented 3 years ago

Hi,

just want to try and see if I can get a sata disk working via pci on my orange pi 3. Would be great if that works.

arm-trusted-firmware -> OK

aw-el2-barebone -> OK

u-boot-el1-hyp-emmc -> OK

But when I...

fritz@astro1:~/orangepi3-h6-mainline/linux-5.7.4$ make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs modules Makefile:634: include/config/auto.conf: No such file or directory Makefile:680: include/config/auto.conf.cmd: No such file or directory


*** Configuration file ".config" not found!


Please run some configurator (e.g. "make oldconfig" or "make menuconfig" or "make xconfig").


Makefile:683: recipe for target '.config' failed make: *** [.config] Error 1 fritz@astro1:~/orangepi3-h6-mainline/linux-5.7.4$

any idea what I do wrong?

/Joerg

ingamedeo commented 3 years ago

Before running the make command: Please copy this config file: https://github.com/ingamedeo/orangepi3-h6-mainline/blob/master/configs/linux-5.7.4-config to the kernel root directory and rename it to .config. Then adjust permissions so it's readable.

SATA disks using ASMedia controllers are supposed to be working.

jkoenig72 commented 3 years ago

ok... let me try that ...

Need to add a

sudo apt install libssl-dev

Now it looks good. thanks!

jkoenig72 commented 3 years ago

While its compiling.. there is a 2nd config file in the config folder:

u-boot-el1-hyp-config

Do I need that to copy as well?

ingamedeo commented 3 years ago

No, you don't need to. If it still doesn't work you can run preliminary configuration by running "make menuconfig" just after copying the .config file.

jkoenig72 commented 3 years ago

Thanks... still compiling...

Sorry for asking this but what I do not understand is:

dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8

Thats copy uboot to sd card, right? Should it then not more like if=/dev/mmcblk0?

ingamedeo commented 3 years ago

That depends on how your system maps SD cards, you need to adjust the device accordingly. I am using an external reader, so it's /dev/sdX for me.

jkoenig72 commented 3 years ago

ok. sure.

I will let you know if I can get it running.

So after copy it all to SD, plug in SSD, boot ... and if I'm lucky I will see SSD as /dev/s something, right?

jkoenig72 commented 3 years ago

But the idea is great...

ingamedeo commented 3 years ago

Yes, check "dmesg" to see if your drive is detected. You should see it under /dev/sdX, correct. If it doesn't work I can give you a controller model number that works for sure.

jkoenig72 commented 3 years ago

Please ...

ingamedeo commented 3 years ago

ASM1062: https://www.asmedia.com.tw/eng/e_show_products.php?cate_index=166&item=151

jkoenig72 commented 3 years ago

Thanks. Btw. do I need a controller, what about msata pci-e directly?

ingamedeo commented 3 years ago

mSATA and PCI-E are two different standards with a similar hardware port. mSATA SSDs don't work when connected directly to a PCI-E bus.

jkoenig72 commented 3 years ago

Clear. Thanks!

jkoenig72 commented 3 years ago

I found a cheap pci-e sata on aliexpress, Has AS1061 chip. I will try and let you know.

Thanks for helping me on this!

ingamedeo commented 3 years ago

Yes, excellent! Please let me know either case, even if it doesn't work.

ingamedeo commented 3 years ago

Any update on this front? So we can add your pcie controller to the supported list.

jkoenig72 commented 3 years ago

I received a small controller from aliexpress last Friday, let’s see if I get some time this week... ;)

Sent from my iPad

On 18. Oct 2020, at 21:18, Amedeo Baragiola notifications@github.com wrote:

 Any update on this front? So we can add your pcie controller to the supported list.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ingamedeo commented 3 years ago

Thank you for any detail you can provide!

jkoenig72 commented 3 years ago

https://www.aliexpress.com/item/4000594720396.html

That the one I will try...

Sent from my iPad

On 18. Oct 2020, at 21:21, Amedeo Baragiola notifications@github.com wrote:

 Thank you for any detail you can provide!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

jkoenig72 commented 3 years ago

SD card just needs one partition as ext4 and then I can copy all to /, correct? Boot does not need to be on fat partition or something like that?

Sent from my iPad

On 18. Oct 2020, at 21:21, Amedeo Baragiola notifications@github.com wrote:

 Thank you for any detail you can provide!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ingamedeo commented 3 years ago

Just one partition ext4

jkoenig72 commented 3 years ago

I will try it now, following for instructions..

"First copy bl31.bin from arm-trusted-firmware and el2-bb.bin from aw-el2-barebone and rename it to hyp.bin."

By copy you mean into the "u-boot-el1-hyp-emmc" dir, correct? Not into one of those sub dirs under "u-boot-el1-hyp-emmc".

jkoenig72 commented 3 years ago

Also this line...

dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8

I have sd with on ext4 partition sdc1 mounted /mnt/sd Do I need to do that command above like

dd if=u-boot-sunxi-with-spl.bin of=/dev/sdc1 bs=1024 seek=8

ingamedeo commented 3 years ago

Yes, correct: u-boot-el1-hyp-emmc Yes, you should put /dev/sdc1, you need to adjust it accordingly every time you see sdX

jkoenig72 commented 3 years ago

Ok... will try that..

Sorry - I'm not so familiar with this stuff... :-)

also this "rebuild initrd"

cd /media/ingamedeo// mount -t proc proc proc/ mount -t sysfs sysfs sys/ mount --bind /dev dev/ chroot /mnt/ /bin/bash update-initramfs -u -k 5.7.4

I have cross compiled it on an intel box, when do I need to execute this? Do I need to boot 1st from this new SD?

ingamedeo commented 3 years ago

You don't need to run it for now, it's not needed

Read the other issue as well, you might need to replace a file in the u-boot folder where the dtbs are stored

jkoenig72 commented 3 years ago

Ok...

make -j8 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs modules make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=output modules_install make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=output headers_install INSTALL_HDR_PATH=output/usr

seems to run fine, no error but when I try

cp -R linux-5.7.4/arch/arm64/boot/Image /media/ingamedeo//boot/

seems there is no file or dir named Image

fritz@astro1:~/orangepi3-h6-mainline$ cp -R linux-5.7.4/arch/arm64/boot/Image /mnt/sd/boot/ cp: cannot stat 'linux-5.7.4/arch/arm64/boot/Image': No such file or directory

dir looks like that:

fritz@astro1:~/orangepi3-h6-mainline$ cd  linux-5.7.4/arch/arm64/boot
fritz@astro1:~/orangepi3-h6-mainline/linux-5.7.4/arch/arm64/boot$ ls -la
total 24
drwxrwxr-x  3 fritz fritz 4096 Sep 29 15:35 .
drwxrwxr-x 12 fritz fritz 4096 Sep 29 16:46 ..
drwxrwxr-x 31 fritz fritz 4096 Sep 29 15:35 dts
-rw-rw-r--  1 fritz fritz   55 Sep 29 15:35 .gitignore
-rw-rw-r--  1 fritz fritz 1562 Sep 29 15:35 install.sh
-rw-rw-r--  1 fritz fritz 1200 Sep 29 15:35 Makefile
fritz@astro1:~/orangepi3-h6-mainline/linux-5.7.4/arch/arm64/boot$

And the make before seems to run without error...

fritz@astro1:~/orangepi3-h6-mainline/linux-5.7.4$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs modules
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h
  MODPOST 4497 modules
fritz@astro1:~/orangepi3-h6-mainline/linux-5.7.4$
jkoenig72 commented 3 years ago

What did I missed?

waabyy commented 3 years ago

I have the same problem with build => no directory or file Image in linux-5.7.4/arch/arm64/boot Could you please take a look what's wrong? Thank you in advance BR

Bletsko commented 1 year ago

Hello @jkoenig72 @ingamedeo @waabyy, were you successful to solve the issue? I have the same issue, do not have the Image file. Could you pls tell me what steps did you perform to resolve the problem?

ole00 commented 1 year ago

@Bletsko compile this extra make target: make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image.gz