Build Kodi 14.2-Helix using Buildroot 2015.05

XBMC subforum

Build Kodi 14.2-Helix using Buildroot 2015.05

Postby blue_z » Mon Jun 22, 2015 8:42 am

The following patch file
buildroot.patch.gz
(41.28 KiB) Downloaded 186 times

can be applied to Buildroot version 2015.05 in order to build Kodi version 14.2-Helix and Linux 3.10.53-1.1.0-ga for the Wandboard Quad with Vivante GPU support. This latest version of Buildroot already has the pieces to build Kodi for the Wandboard, but this patch has an actual configuration that gets the proper pieces working together (e.g. direct access to the framebuffer and no need for X11).
Buildroot is build environment for the Linux kernel and a root filesystem that has less stringent host requirements than Yocto. E.G. Buildroot will run on older Linux distros, such as Ubuntu 10.04 which is my primary development host.

Install Buildroot-2015.05 and the patch file in a suitable Linux directory.
Patch the original build files:
Code: Select all
cd buildroot-2015.05
patch -p1 <../buildroot.patch

Modify the execution permissions for one of the new files, a script:
Code: Select all
chmod 755 board/wandboard/post-build.sh

Configure the build:
Code: Select all
make wandboard_kodi_defconfig

Inspect the configuration
Code: Select all
make menuconfig
If you want to add kernel drivers , e.g. for LCD and backlighting, then build everything first, and then do a `make linux-menuconfig`.

Commence building:
Code: Select all
make

Source code and Linaro toolchain will be downloaded from the appropriate locations. Build time not including download time is about 2.5 hours (or more for a slow PC).
The resulting files include a U-Boot 2015.04 image, Device Tree blobs, and a small rootfs (about 200MB) with kernel and libraries to run Kodi on the Wandboard as a dedicated application, i.e. a STB using HDMI output.
See board/wandboard/readme.txt for instructions on installing the build output on the micro SDcard.

Regards
blue_z
 
Posts: 36
Joined: Sat Jun 13, 2015 12:12 am
Location: USA

SDcard image of Kodi 14.2-Helix using Buildroot 2015.05

Postby blue_z » Tue Jun 23, 2015 2:06 am

The output of the patched Buildroot for building Kodi 14.2-Helix for the Wandboard Quad is available as a bootable SDcard image at https://www.dropbox.com/s/u68j3lb3ut2vyv2/kodi_on_wb.img.gz?dl=0
The minimal rootfs plus kernel occupies less than half of a 512MB partition.

Uncompress the downloaded file, and install the image using the shell command
Code: Select all
sudo dd if=kodi_on_wb.img of=/dev/sd<x> bs=32768
where you need to replace the <x> with the appropriate letter for the the device node of the SDcard adapter.

Known issues
    1. BogoMIPS: Kodi reports the i.MX6 core is capable of 790.52 BogoMIPS, whereas the Linux kernel reports 1581.
    2. display resolution: the kernel command line passed by U-Boot configures the display resolution to 1280x720. For other resolutions (e.g. 1920x1080) then either update the U-Boot environment variable or change the Kodi setting.
    3. audio output: the audio output defaults the analog 2-channel line-out jack. Use the Kodi System menu to choose an alternate output (e.g. HDMI audio).
    4. date/time: the system date and time (i.e. the RTC) are initialized to the epoch on power-up/boot.
    5. The OTG port is only usable as a USB host port, because gadget support is disabled in the kernel.

I'm a newbie with respect to Kodi, and my testing has been focused on playback of .wtv files from a Win7 PC over wired Ethernet. Wifi has not been tested as I don't have the antenna, but the Broadcom device appears to be ready.

Regards
blue_z
 
Posts: 36
Joined: Sat Jun 13, 2015 12:12 am
Location: USA

Re: Build Kodi 14.2-Helix using Buildroot 2015.05

Postby Nuke_off » Wed Jul 22, 2015 1:30 pm

Hi,

your image is very nice and thanks for the buildroot patches. I have been searching for ages for a working Kodi Buildroot.

I am experiencing some problems though.
In your prebuilt image, "route" tool is missing. This results in udhcpdc not setting gateway routes.

I fixed that in my build, but ran into a whole set of other problems.
I can´t seem to get KODI working properly. It starts up and does everything as it should exept i cant install addons, skins .. etc.
The Logfiles tell me it cant read SQL Database.
Which packages did you tick for your build? Just "make wanboard_kodi_defconfig" does not work.

Hope you can help me out there.

EDIT: It seems as if Kodi does not have enough permissions or cant access the filesystem properly. It says something like this for example "ADDON: cpluff: 'Could not read plug-in directory /usr/lib/kodi/addons: No such file or directory' "
But this directory does exist and the plugins within are loaded on startup.



I also had to manually create a genimage script, so buildroot makes a .img file. I´ve attached them.


Greetings from Germany

Nuke_off
Last edited by Nuke_off on Fri Jul 24, 2015 3:18 pm, edited 1 time in total.
Nuke_off
 
Posts: 5
Joined: Wed Jul 22, 2015 1:10 pm

Re: Build Kodi 14.2-Helix using Buildroot 2015.05

Postby blue_z » Wed Jul 22, 2015 10:22 pm

Nuke_off wrote:your image is very nice and thanks for the buildroot patches. I have been searching for ages for a working Kodi Buildroot.
Appreciate the feedback.

Nuke_off wrote:I am experiencing some problems though.
In your prebuilt image, "route" tool is missing. This results in udhcpdc not setting gateway routes.

I fixed that in my build, but ran into a whole set of other problems.
Presumably you selected the `route` command in the Busybox menuconfig?
Are you claiming that this one change then had negative consequences?

Nuke_off wrote:Which packages did you tick for your build?
By "tick" do you mean "select"?
Why are you even asking this question?
The complete Buildroot configuration that I used can be replicated by using the posted patch file.
Only packages essential for (a basic) Kodi and HW video decoding were selected.
You are free to add more packages for your own build. That was the intent of supplying/posting the patch before the image.
I have no intention of maintaining/updating the image.

Nuke_off wrote:Just "make wanboard_kodi_defconfig" does not work.
So you like the SDcard image but not the Buildroot patch?
The former was built using the latter!
Your comment is not constructive. What, does the build fail? Does the kernel fail to boot or panics?
Or perhaps that command doesn't "work" simply because you committed a typo?

Nuke_off wrote:Hope you can help me out there.

EDIT: It seems as if Kodi does not have enough permissions or cant access the filesystem properly. It says something like this for example "ADDON: cpluff: 'Could not read plug-in directory /usr/lib/kodi/addons: No such file or directory' "
But this directory does exist and the plugins within are loaded on startup.
Instead of broad negative descriptions and vague recollections, you will need to describe a problem as a reproducible procedure.
If you cannot explain the problem with those details, then I am not going to expend effort to figure out how to recreate it. As I previously confessed, I am not a Kodi/XBMC expert or developer (and do not aspire to be either).

Regards
blue_z
 
Posts: 36
Joined: Sat Jun 13, 2015 12:12 am
Location: USA

Re: Build Kodi 14.2-Helix using Buildroot 2015.05

Postby Nuke_off » Thu Jul 23, 2015 12:24 pm

blue_z wrote:
Nuke_off wrote:I am experiencing some problems though.
In your prebuilt image, "route" tool is missing. This results in udhcpdc not setting gateway routes.

I fixed that in my build, but ran into a whole set of other problems.
Presumably you selected the `route` command in the Busybox menuconfig?
Are you claiming that this one change then had negative consequences?

Yes, thats exactly what i did. No i meant i had other problems regarding Kodi itself.

blue_z wrote:
Nuke_off wrote:Which packages did you tick for your build?
By "tick" do you mean "select"?
Why are you even asking this question?
The complete Buildroot configuration that I used can be replicated by using the posted patch file.
Only packages essential for (a basic) Kodi and HW video decoding were selected.
You are free to add more packages for your own build. That was the intent of supplying/posting the patch before the image.
I have no intention of maintaining/updating the image.
Nuke_off wrote:Just "make wanboard_kodi_defconfig" does not work.
So you like the SDcard image but not the Buildroot patch?
The former was built using the latter!
Your comment is not constructive. What, does the build fail? Does the kernel fail to boot or panics?
Or perhaps that command doesn't "work" simply because you committed a typo?

Yes by tick i meant select.
Exactly my thoughts, i would rather have a working Build environment than some guy making images.
I absolutly do not expect you to maintain your image.

I am asking because using your supplied wandboard_kodi_defconfig in combination with genconfig results in an image that is not comparable with your prebuilt one.
Ok,i try to clarify a few things.
Letting Buildroot do its thing ("make wandboard_kodi_defconfig && make") results in "u-boot.imx , uboot-env.bin , uImage, rootfs.tar, imx6q-wandboard.dtb, imx6dl-wandboard.dtb".

The resulting .img image from "wandboard_kodi_defconfig" generated by my "genconfig patch" does boot, has no kernel panics, lacks "route" package, is only ~250MB in size, starts up kodi, on first glance kodi works normal.
BUT as soon as one tries to install any addons, e.g. skins, it fails to do so.
The Logfiles throw out a lot of weird errors, mostly about Kodi not beeing able to write or read something.
I will post complete Kodi and Kernel Logs later.
Your "kodi_on_wb.img" image installs those addons just fine.

I am beginning to suspect it has something to do with filesystem structure (ext2/4 vs. tar).

How did you create your .img file ?

blue_z wrote:
Nuke_off wrote:Hope you can help me out there.

EDIT: It seems as if Kodi does not have enough permissions or cant access the filesystem properly. It says something like this for example "ADDON: cpluff: 'Could not read plug-in directory /usr/lib/kodi/addons: No such file or directory' "
But this directory does exist and the plugins within are loaded on startup.
Instead of broad negative descriptions and vague recollections, you will need to describe a problem as a reproducible procedure.
If you cannot explain the problem with those details, then I am not going to expend effort to figure out how to recreate it. As I previously confessed, I am not a Kodi/XBMC expert or developer (and do not aspire to be either).

Look, i do not try to discredit any of your work, i am just trying to get it working on my side.
I am sorry if it comes across as if i am beeing negative, that is not my intent.
As i said earlier you prebuilt image is fine, i want to reproduce what you achieved.
I just do not know why my results are so much different.
By the way these errors are reproducable.
I am guessing you want Kernel-,Kodi-,syslogs ?


Best Regards

Nuke_off
Nuke_off
 
Posts: 5
Joined: Wed Jul 22, 2015 1:10 pm

Re: Build Kodi 14.2-Helix using Buildroot 2015.05

Postby Nuke_off » Thu Jul 23, 2015 3:24 pm

I solved the issue.

Buildroot resized the ext4 partition to 278MB, which left no space on the rootpartition.
But it showed up as 512MB partition in Kodi or "df -h".
Partitiontable was corrupted, i checked with gparted and resized it.

Now everything works fine.

Sorry for troubling you.

You should probably mention that in your tutorial though.

Best regards

Nuke_off
Nuke_off
 
Posts: 5
Joined: Wed Jul 22, 2015 1:10 pm

Re: Build Kodi 14.2-Helix using Buildroot 2015.05

Postby blue_z » Fri Jul 24, 2015 12:16 am

Nuke_off wrote:I am asking because using your supplied wandboard_kodi_defconfig in combination with genconfig results in an image that is not comparable with your prebuilt one.
You left out the "in combination with genconfig" when you previously wrote "Just "make wanboard_kodi_defconfig" does not work."
That's the crux of the matter.
In other words. you did not follow the procedure that I wrote to the letter, but made an "improvement", encountered some issues, and then declared in unspecified scope that the (original) procedure "does not work".

Nuke_off wrote:Ok,i try to clarify a few things.
Letting Buildroot do its thing ("make wandboard_kodi_defconfig && make") results in "u-boot.imx , uboot-env.bin , uImage, rootfs.tar, imx6q-wandboard.dtb, imx6dl-wandboard.dtb".

The resulting .img image from "wandboard_kodi_defconfig" generated by my "genconfig patch" does boot, has no kernel panics, lacks "route" package, is only ~250MB in size, starts up kodi, on first glance kodi works normal.
BUT as soon as one tries to install any addons, e.g. skins, it fails to do so.
The Logfiles throw out a lot of weird errors, mostly about Kodi not beeing able to write or read something.
I will post complete Kodi and Kernel Logs later.
Your "kodi_on_wb.img" image installs those addons just fine.
If you had followed the instructions without adding your genconfig "improvement", then you could have built an SDcard that performed as expected.
Your assumptions that you can do no wrong, that your "improvement" was perfect, and that the other guy was posting faulty patches prompts you to write that "Just "make wanboard_kodi_defconfig" does not work" and a follow-up of "You should probably mention that in your tutorial though".

Nuke_off wrote:How did you create your .img file ?
First I followed my own directions and the instructions in board/wandboard/readme.txt. The ext4 filesystem was created using GParted, then mounted and the root filesystem was untared. After the SDcard was tested, then the SDcard image file was created using the dd command using the SDcard as the input.

Nuke_off wrote:Look, i do not try to discredit any of your work, i am just trying to get it working on my side.
I am sorry if it comes across as if i am beeing negative, that is not my intent.
Then always be very specific when describing what "doesn't work", and assume that it's your fault (e.g. you're doing something wrong) when requesting help.

Nuke_off wrote:You should probably mention that in your tutorial though.
No, the root problem is your genimage.cfg and post-build-fs.sh are broken. What you have posted is testimony that they do not create a proper image file.

Regards
blue_z
 
Posts: 36
Joined: Sat Jun 13, 2015 12:12 am
Location: USA

Re: Build Kodi 14.2-Helix using Buildroot 2015.05

Postby Nuke_off » Fri Jul 24, 2015 11:32 am

blue_z wrote:
Nuke_off wrote:I am asking because using your supplied wandboard_kodi_defconfig in combination with genconfig results in an image that is not comparable with your prebuilt one.
You left out the "in combination with genconfig" when you previously wrote "Just "make wanboard_kodi_defconfig" does not work."
That's the crux of the matter.
In other words. you did not follow the procedure that I wrote to the letter, but made an "improvement", encountered some issues, and then declared in unspecified scope that the (original) procedure "does not work".

Nuke_off wrote:Ok,i try to clarify a few things.
Letting Buildroot do its thing ("make wandboard_kodi_defconfig && make") results in "u-boot.imx , uboot-env.bin , uImage, rootfs.tar, imx6q-wandboard.dtb, imx6dl-wandboard.dtb".

The resulting .img image from "wandboard_kodi_defconfig" generated by my "genconfig patch" does boot, has no kernel panics, lacks "route" package, is only ~250MB in size, starts up kodi, on first glance kodi works normal.
BUT as soon as one tries to install any addons, e.g. skins, it fails to do so.
The Logfiles throw out a lot of weird errors, mostly about Kodi not beeing able to write or read something.
I will post complete Kodi and Kernel Logs later.
Your "kodi_on_wb.img" image installs those addons just fine.
If you had followed the instructions without adding your genconfig "improvement", then you could have built an SDcard that performed as expected.
Your assumptions that you can do no wrong, that your "improvement" was perfect, and that the other guy was posting faulty patches prompts you to write that "Just "make wanboard_kodi_defconfig" does not work" and a follow-up of "You should probably mention that in your tutorial though".


Nuke_off wrote:You should probably mention that in your tutorial though.
No, the root problem is your genimage.cfg and post-build-fs.sh are broken. What you have posted is testimony that they do not create a proper image file.

Regards


Ok, i tried to stay nice but youre being really rude.
I am so sick of peoples attitudes on the web.

Yes, i did not follow your instructions 100% but thats no reason to attack me in every sentence.

My "improvement" does work, it just needs a small correction.
Btw. i never said nor implied anything about beeing perfect, you just made that up.

blue_z wrote:
Nuke_off wrote:How did you create your .img file ?
First I followed my own directions and the instructions in board/wandboard/readme.txt. The ext4 filesystem was created using GParted, then mounted and the root filesystem was untared. After the SDcard was tested, then the SDcard image file was created using the dd command using the SDcard as the input.

Ok, i see. Thanks for the info.

blue_z wrote:
Nuke_off wrote:Look, i do not try to discredit any of your work, i am just trying to get it working on my side.
I am sorry if it comes across as if i am beeing negative, that is not my intent.
Then always be very specific when describing what "doesn't work", and assume that it's your fault (e.g. you're doing something wrong) when requesting help.

Fair enough, i will keep that in mind.
I am very well aware that i can sometimes make errors, it is only human.
You should try to relax and not assume the worst in people.

Regards
Nuke_off
 
Posts: 5
Joined: Wed Jul 22, 2015 1:10 pm

Re: Build Kodi 14.2-Helix using Buildroot 2015.05

Postby Nuke_off » Fri Jul 24, 2015 3:10 pm

Got it working, buildroots autocalculation of ext4 blocks/inodes broke the partition integrity.
Changed buildroots ext4 blocks/ionodes to match partitionsize.
No need to edit anything about filesystem/scipts anymore. I´ve updated wandboard_kodi_defconfig.
Output is sdcard.img.
To write to SDcard: "dd if=output/images/sdcard.img of=/dev/sd(X) bs=1M"
Updated files are attached.

Regards
Attachments
updated-buildconfig-genimage.zip
genimage.cfg and post-build-fs.sh go to "{buildrootdir}/board/wandboard/"
Execution permissions:
chmod 755 board/wandboard/post-build-fs.sh

wandboard_kodi_defconfig goes to "{buildrootdir}/configs/"
(12.81 KiB) Downloaded 126 times
Nuke_off
 
Posts: 5
Joined: Wed Jul 22, 2015 1:10 pm

Re: Build Kodi 14.2-Helix using Buildroot 2015.05

Postby blackibiza » Sun Jul 26, 2015 2:21 pm

Hi!

Really nice work, I have some feedbacks about it (Wandboard Quad Rev B):

- The menu is not as smooth as the "original" Kodi image available on Wandboard's site
- The HDMI audio output choice isn't available
- I have only WiFi access (no Ethernet cable): there's no possibility to configure WiFi within Kodi

Thanks
blackibiza
 
Posts: 13
Joined: Wed Dec 04, 2013 11:24 am

Next

Return to Software - XBMC

Who is online

Users browsing this forum: No registered users and 2 guests