Git Product home page Git Product logo

Comments (9)

nandra avatar nandra commented on July 26, 2024

I think simply nobody update if to wic yet. Feel free to post pull request ;)

from meta-sunxi.

ludiazv avatar ludiazv commented on July 26, 2024

Ok. I will try unsing the existing as template.

from meta-sunxi.

nandra avatar nandra commented on July 26, 2024

I did quick check and tested in opi pc2 and it seems to boot:

diff --git a/conf/machine/include/sunxi64.inc b/conf/machine/include/sunxi64.inc
index b2df753..aeb5bb4 100644
--- a/conf/machine/include/sunxi64.inc
+++ b/conf/machine/include/sunxi64.inc
@@ -9,8 +9,7 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
 
 KERNEL_IMAGETYPE ?= "Image"
 
-IMAGE_CLASSES += "sdcard_image-sunxi"
-IMAGE_FSTYPES += "ext4 tar.gz sunxi-sdimg"
+IMAGE_FSTYPES += "ext4 tar.gz wic.gz wic.bmap"
 
 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
 
@@ -19,8 +18,13 @@ UBOOT_LOCALVERSION = "-g${@d.getVar('SRCPV', True).partition('+')[2][0:7]}"
 UBOOT_ENTRYPOINT ?= "0x40008000"
 UBOOT_LOADADDRESS ?= "0x400080OB00"
 
-#UBOOT_BINARY ?= "u-boot.itb"
-SPL_BINARY ?= "spl/sunxi-spl.bin"
+SPL_BINARY = "u-boot-sunxi-with-spl.bin"
 
 SERIAL_CONSOLE ?= "115200 ttyS0"
 MACHINE_FEATURES ?= "alsa apm keyboard rtc serial screen usbgadget usbhost vfat"
+
+WKS_FILES ?= "sunxi-sdcard-image.wks.in"
+WKS_FILE_DEPENDS ?= "virtual/kernel u-boot"
+SUNXI_BOOT_SPACE ?= "40"
+IMAGE_BOOT_FILES ?= "${KERNEL_IMAGETYPE} boot.scr ${KERNEL_DEVICETREE}"

from meta-sunxi.

ludiazv avatar ludiazv commented on July 26, 2024

I tested your solution and for opizero2 does not build the wic.
The error is simple the kernel is deploying the device tree to: tmp/deploy/images/orange-pi-zero2/sun50i-h616-orangepi-zero2.dtb but the IMAGE_BOOT_FILES = " ... allwinner/sun50i-h616-orangepi-zero2.dtb"
hence the wic process fails as it does not find the file tmp/deploy/images/orange-pi-zero2/allwinner/sun50i-h616-orangepi-zero2.dtb and can not copy the file into the boot partition.

If I make copy manually the file under the folder tmp/deploy/images/orange-pi-zero2/allwinner/ the wic gets build.

from meta-sunxi.

nandra avatar nandra commented on July 26, 2024

@ludiazv yes this was typo, please drop (allwinnerr/). Let me know if board boots then I'll make pull request and merge it to master and kirkstone and dunfell branches. Thanks.

from meta-sunxi.

nandra avatar nandra commented on July 26, 2024

@ludiazv sorry have fix for that. Will push changes shortly.

from meta-sunxi.

ludiazv avatar ludiazv commented on July 26, 2024

Hi,
I came across this workarround as IMAGE_BOOT_FILES is limited to create directories.

...
MACHINE_FEATURES ?= "alsa apm keyboard rtc serial screen usbgadget usbhost vfat"

# location in deploy dir of the dbts
# arm64 dbts are under <vendor>/dts but is deployed under DEPLOYDIR
do_fix_device_tree_location() {

    for kdt in ${KERNEL_DEVICETREE}
    do
            local dbt_dir=$(dirname ${kdt})
            if [ "." != "${dbt_dir}" ] ; then
              local dbt=$(basename ${kdt})
              local dst=${DEPLOY_DIR_IMAGE}/${dbt_dir}/${dbt}
              if [ ! -f ${dst} ] ; then
               mkdir -p ${DEPLOY_DIR_IMAGE}/$dbt_dir
               ln -s ${DEPLOY_DIR_IMAGE}/${dbt} ${dst}
              fi
            fi
     done
}


addtask do_fix_device_tree_location after do_write_wks_template before do_image_wic

SUNXI_FEX_FILE ?= " "
SUNXI_BOOT_SPACE ?= "40"
IMAGE_BOOT_FILES ?= "${KERNEL_IMAGETYPE} boot.scr"
# ship fex file for sunxi kernel, devicetree file for mainline kernel
IMAGE_BOOT_FILES += "${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel', 'linux-sunxi', '${SUNXI_FEX_FILE}', '${KERNEL_DEVICETREE}', d)}"
WKS_FILES ?= "sunxi-sdcard-image.wks.in"
WKS_FILE_DEPENDS ?= "virtual/kernel u-boot"
# in case of sunxi kernel, sunxi-board-fex must be built prior wic image assembly
WKS_FILE_DEPENDS += " ${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel', 'linux-sunxi', 'sunxi-board-fex', '', d)}"

I send a PR if ok for you.

from meta-sunxi.

nandra avatar nandra commented on July 26, 2024

Please send whole including wic so can merge in once. Thanks.

from meta-sunxi.

ludiazv avatar ludiazv commented on July 26, 2024

Check-out the pull request to be merged in master.

I tested the wic in kirkstone an also works. (testing in a orange pi zero 2), So the change can also be backported to that branch.

from meta-sunxi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.