Thursday 29 June 2017

Interim Ubuntu 17.04 ISO with mainline v4.12-rc7 kernel, RTL8723BS and Broadcom Wifi/BT firmware, UCM audio files and full 32-bit bootloader support

UpdateThis work is superseded by my 'isorespin.sh' script which can respin an official ISO suitable for use on Intel Atom devices.

Latest 'linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso' kernel respun using v7.1.2 of 'isorespin.sh' with log file of:

Script '/usr/local/bin/isorespin.sh' called with '-i ubuntu-17.04-desktop-amd64.iso -u -l rtl8723bs_4.12.0_amd64.deb -f linuxium-install-UCM-files.sh -f linuxium-install-broadcom-drivers.sh -f wrapper-linuxium-install-UCM-files.sh -f wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh' ...
Work directory 'isorespin' used ...
ISO '/home/linuxium/isorespin/ubuntu-17.04-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.12.0-041200rc7-generic' ...
Local package '/home/linuxium/isorespin/rtl8723bs_4.12.0_amd64.deb' added ...
File '/home/linuxium/isorespin/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished 
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished 
Respun ISO created as 'linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso'.

I've used the Ubuntu 17.04 ISO 'ubuntu-17.04-desktop-amd64.iso' and I've updated the kernel with the 'v4.12-rc7 mainline build' and also added my wifi/bt firmware package 'rtl8723bs_4.12.0_amd64.deb', my Broadcom wifi/bt firmware script 'linuxium-install-broadcom-drivers.sh' installed by running 'wrapper-linuxium-install-broadcom-drivers.sh' and my ALSA UCM audio files script 'linuxium-install-UCM-files.sh' installed by running the 'wrapper-linuxium-install-UCM-files.sh'.

The respun ISO can be downloaded from 'linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso' and written to a USB using 'dd'.

On booting if bluetooth fails to start automatically then it can be started manually with the command:

sudo systemctl start rtl8723bsbt.service

or

sudo systemctl start brcmbt.service

depending on wifi chip.

Full documentation about my 'isorespin.sh' script including examples is available from here.

If you find this useful then please donate using the following link http://goo.gl/nXWSGf as everything helps with development costs.

51 comments:

billP said...

Hi, T100HA here (again). Here is my quandry.

Running the iso from March (17.04 Beta 1) with linuxium broadcom and UCM scripts.

dmesg March (working)

That pretty much works. I just respun, using the latest and greatest isorespin from 17.04 gnome.

isorespin log

latest dmesg

Upon live boot from a USB stick, no bluetooth and no sound. Regarding bluetooth, the early image clearly picks up the BCM43341B0.hcd firmware and works, while anything over the last couple months never does. No clue about the sound as even the latest image sees the cthrt stuff, but nothing there.

I'm beginning to think if it was on disk it might work better, or at least I could work through it a bit.

Any suggestions helpful. As always, thanks for the great work!

Unknown said...

very good work : works with the intel stick just missing wifi but ethernet and sound works ok

can you PLEASE do your isorespin magic with a ligth distro like linux minx Xfce thanks again and very good work send me your paypal info

Linuxium said...

I've encountered the line 'Bluetooth: hci1 command 0xfc45 tx timeout' before and only solved it by physically powering off the device and then rebooting. This seems to be a known bluetooth issue and not necessarily kernel or OS related.

For sound make sure you go into sound settings and select the output device otherwise sound seems to have stopped working by default with the latest kernel.

Linuxium said...

If wifi is not working make sure you run 'sudo systemctl start rtl8723bsbt.service' and this should fix it if you installed the above ISO.

My PayPal link is http://goo.gl/nXWSGf

Unknown said...

HI there Im currently getting this error and cant get to the scripts or iso you linked

drive.google.com normally uses encryption to protect your information. When Google Chrome tried to connect to drive.google.com this time, the website sent back unusual and incorrect credentials. This may happen when an attacker is trying to pretend to be drive.google.com, or a Wi-Fi sign-in screen has interrupted the connection. Your information is still secure because Google Chrome stopped the connection before any data was exchanged.

You cannot visit drive.google.com at the moment because the website uses HSTS. Network errors and attacks are usually temporary, so this page will probably work later. Find out more.

Unknown said...

normally I can add an exception - this wont allow me to go any further forward :(

Linuxium said...

I've never seen that error before but it looks local to you and your internet access. Maybe reboot and try again?

GalaxyCurse said...

Tried it on my Teclast X98 Plus (A5C8) tablet, and it seems to work fine out of the box.
I read above that people had Bluetooth problems, but I can't come with any info there since I didn't think of testing it.
Sound works from the loudspeaker. I didn't test headphones
Wifi works perfectly.
Battery level is shown (dunno if it's correct, but it seemed to drop normally while using it).
Touchscreen works.
The screen however it's rotated one step clockwise, showing landscape in portrait mode and vice versa. If I try to change it in the settings, the touchscreen seems to stay as before, meaning the touches are at the wrong place. I guess it's a file I need to edit somewhere.
I don't seem to find any "install to harddrive" which I expected from a Ubuntu iso.
I'm strongly thinking of replacing Android on the tablet with Linux if I can figure out the last few quirks.
Thank you for all your work.

Ripi said...

Thanks a lot. Tryed 17.04 kernel 4.12rc7 on Teclast x80 pro: Wifi works, but headphones, mic and speaker don't.
The audio chip on this tablet is ES8316 everest semiconductor.
I found this recent patch to add support, but I do not know what I can do with it. https://patchwork.kernel.org/patch/9767415/

After trying live USB, Android does not boot anymore even though i did not install anything. From what I have seen I suspect some Android security feature detects that its partitions have been mounted and prevents boot up. Does anybody know how to fix this? Windows still boots ok.

Linuxium said...

The ES8316 driver is currently merged for v4.13 so hopefully in a couple of weeks you'll have release candidate kernel that provides audio.

Regarding the Android boot issue take a look at 'https://source.android.com/security/verifiedboot/verified-boot'.

Mic87xp1 said...

Hi, I tried it to my Chuwi HI10 Pro. All works perfectly except for audio and touchscreen.
Soundcard is recognized but I have no sound from speakers or hearphones.
I tried to select the output from Audio Settings but when I do this, the application crashes.
What I can do to solve this?

Linuxium said...

FYI: v4.13-rc1 is now available for download or using in respinning.

Linuxium said...

Does it crash when running as a LiveUSB or after installation?

Mic87xp1 said...

After installation.

Linuxium said...

Can you pastebin the 'dmesg' immediately after booting?

Mic87xp1 said...

Here it is https://pastebin.com/q2XA8AYr

Linuxium said...

After installing it seems you need to install the ALSA UCM files so boot it up and connect to the internet then download the script 'linuxium-install-UCM-files.sh' and run it to install them.

Unknown said...

Just bought a Z83-II box, sold on Amazon as Beelink, but boxed as kodlix.

Boots plain kubuntu 17.04 just fine, and SD card works, but no WIFI. Broadcom chip here, I think 6234 or 6212 (can it be a dual mode thing?).

Tried your linuxium-v4.12-rc7-ubuntu-17.04-desktop-amd64.iso with no success, wifi still does not work. Yet, now I see a

Direct firmware load for brcm/brcmfmac43455-sdio.txt failed with error -2

in dmesg, which looks like an interesting hint.

Have no clue of what error -2 might be. Will post full dmesg if needed (as soon as I save it on usb pen).

Any idea of what might be the issue?

Linuxium said...

See the 'Wifi issues' section in my documentation http://linuxiumcomau.blogspot.com.au/2017/06/customizing-ubuntu-isos-documentation.html.

Mic87xp1 said...

I excecuted your script and I restarted my tablet but I have the same problem. In the dmesg it seems to appear the same messages.

Linuxium said...

It seems the Chuwi HI10 Pro uses the ES8316 codec so you should respin an ISO with the '-u' option (to get v4.13 RCs or later) and check the resultant 'dmesg' if audio still doesn't work for hopefully some further clues.

Mic87xp1 said...

Hi have to respin your iso or the ubuntu official iso?

Linuxium said...

Respin an official Ubuntu ISO. You can use the same command as above but first download the required scripts from https://linuxiumcomau.blogspot.com.au/2017/06/customizing-ubuntu-isos-documentation.html together with the same version of 'isorespin.sh' from that page.

Unknown said...

Saw it, but I cannot find any /sys/firmware/efi/efivars/nvram- file on my system.

Unknown said...

Gotcha. On the Z83-II I have, the file must be copied over from the windows drivers directory, Windows/System32/drivers and is called 4345r6nvram.txt. Needs to be copied into /lib/firmware/brcm/brcmfmac43455-sdio.txt

Unknown said...

So, the next issue on the list is audio. I am unable to try the hdmi audio for lack of a monitor supporting hdmi audio and I do not seem to be able to get any sound out of the headphone jack.

Furthermore, the dmesg is flooded with:

Audio Port: ASoC: no backend DAIs enabled for Audio Port

Any clue?

Unknown said...

Hello, I have an asus T100ha on which I just installed the image. It works apart from the fact that I am forced to put nomodeset in the parameters of the Grub otherwise I the pc does not boot. I think has a graphics card problem. Do you have an idea?? Thank you

Mic87xp1 said...

Ok, now I respin the iso and I installed Ubuntu again, but now also wifi doesn't work.
This is the pastebin: https://pastebin.com/ACALkFtk

Linuxium said...

If the ALSA UCM files are installed then likely a quirk is required for headphone audio. There is still work being done upstream on issues similar to this but without the hardware it is difficult to test.

Linuxium said...

I'd try a later ISO (like https://linuxiumcomau.blogspot.com.au/2017/07/sixth-look-at-ubuntu-1710-julyshakedown.html) to see if that helps?

Linuxium said...

Did you use the command above as you are missing userspace files. To fix wifi download and install 'rtl8723bs_4.12.0_amd64.deb' link in my documentation. '

Mic87xp1 said...

I used -u to respin the iso updating the kernel

Linuxium said...

Download my latest 'isorespin.sh' script and respin using the options '--atom -u' as this will include the missing userspace files.

Mic87xp1 said...

Ok, I used last version of your respin tool with --atom -u option.
Now all hardware works except for soundcard and touchscreen ^^".
Soundcard is recognized by system but there is no sound from the speaker.
I tried also to select the soundcard from the pannel and to connect my earphones but always there is no sound ^^".
In the dmesg appear "Audio Port: ASoC: no backend DAIs enabled for Audio Port"

Linuxium said...

It seems the current kernel does not include the ES8316 driver by default so it needs to be manually added - see the post from Gérald TOUSSAINT on 'https://linuxiumcomau.blogspot.com.au/2017/07/sixth-look-at-ubuntu-1710-julyshakedown.html'.

wildcowboy said...

Hello I wanted to make my own respin but the script stopped at adding deb packages with an error 'can't find file. I am wondering where I should place the files.

Linuxium said...

It sounds like you are using the '-l' option to add local deb packages so in this case you need to specify the path to the local packages either relative to where you are running the script or by absolute path name. If you want to add packages from the official repositories then you should use the '-p' option and then you just specify the package name.

wildcowboy said...

Yeah you are correct I messed local -l option and repository -p option

wildcowboy said...

Hello,

Script '/home/user/Downloads/isorespin/isorespin.sh' called with '-i /home/user/Downloads/isorespin/lubuntu-16.04.2-desktop-amd64.iso --atom -u -r ppa:team-xbmc/ppa -p kodi -l /home/user/Downloads/isorespin/rtl8723bs_4.12.0_amd64.deb -f /home/user/Downloads/isorespin/linuxium-install-UCM-files.sh -f /home/user/Downloads/isorespin/wrapper-linuxium-install-UCM-files.sh -f /home/user/Downloads/isorespin/linuxium-install-broadcom-drivers.sh -f /home/user/Downloads/isorespin/wrapper-linuxium-install-broadcom-drivers.sh -c wrapper-linuxium-install-UCM-files.sh -c wrapper-linuxium-install-broadcom-drivers.sh -b GRUB' ...
Work directory 'isorespin' used ...
ISO '/home/user/Downloads/isorespin/lubuntu-16.04.2-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.13.0-041300rc4-generic' ...
Repository 'ppa:team-xbmc/ppa' added ...
Package 'kodi' added ...
Local package '/home/user/Downloads/isorespin/rtl8723bs_4.12.0_amd64.deb' added ...
File '/home/user/Downloads/isorespin/linuxium-install-UCM-files.sh' added ...
File '/home/user/Downloads/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/user/Downloads/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/home/user/Downloads/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
bash: wrapper-linuxium-install-UCM-files.sh: command not found
# wrapper-linuxium-install-broadcom-drivers.sh
bash: wrapper-linuxium-install-broadcom-drivers.sh: command not found
Respun ISO created as 'linuxium-v4.13-rc4-lubuntu-16.04.2-desktop-amd64.iso'.

Any ideas on what I am doing wrong? i made the scripts executable and copied them to /home/user directory as well as /home/user/Downloads/isorespin

wildcowboy said...

By wrong I mean this:

Command run ...
# wrapper-linuxium-install-UCM-files.sh
bash: wrapper-linuxium-install-UCM-files.sh: command not found
# wrapper-linuxium-install-broadcom-drivers.sh
bash: wrapper-linuxium-install-broadcom-drivers.sh: command not found

Linuxium said...

I've tried to reproduce your error but can't so:

1. What version are you using and if 'isorespin.sh -v' does not show '7.2.1' then download from the link above.

2. When using the '--atom' there is no need to add the same packages and scripts as this is duplication. Assumming you are in the directory '/home/user/Downloads/isorespin' the command 'isorespin.sh' -i lubuntu-16.04.2-desktop-amd64.iso --atom -u -r ppa:team-xbmc/ppa -p kodi' is sufficient.

If the shortened command above still fails then what is your environment (i.e. what OS and distro are you running? is it native or a VM?).

wildcowboy said...

Version is 7.2.1

user@linux:~/Downloads/isorespin> sh isorespin.sh -i lubuntu-16.04.2-desktop-amd64.iso --atom -u -r ppa:team-xbmc/ppa -p kodi
Extracting ISO ...
Parallel unsquashfs: Using 4 processors
111734 inodes (116411 blocks) to write

[============================================================================================================================================================-] 116411/116411 100%

created 90493 files
created 13255 directories
created 21140 symlinks
created 80 devices
created 0 fifos
Extracting isorespin files ...
Updating bootloader/bootmanager ...
Fetching mainline kernel packages ...
Installing mainline kernel packages ...
Adding repositories ...
Installing packages ...
Installing local packages ...
Reading package lists... Done
Building dependency tree
Failed to open the software package
The package might be corrupted or you are not allowed to open the file. Check the permissions of the file.
Reading state information... Done
isorespin.sh: Local package 'rtl8723bs_4.12.0_amd64.deb' failed to install correctly.

I tried to go to the temporary isorespin directory the script creates and change the owner and permissions of 'rtl8723bs_4.12.0_amd64.deb' but it did not help.

I am on OpenSUSE Tumbleweed KDE (native)

Linuxium said...

I don't know if this will fix it, however the script is a 'bash' script so it should be run either as:

./isorespin.sh -i lubuntu-16.04.2-desktop-amd64.iso --atom -u -r ppa:team-xbmc/ppa -p kodi

or

bash isorespin.sh -i lubuntu-16.04.2-desktop-amd64.iso --atom -u -r ppa:team-xbmc/ppa -p kodi

wildcowboy said...

Thanks. I will try them both.

I also keep getting this error: "Logfile 'isorespin.log' already exists." and have to delete the logfile myself all the time. Is this supposed to be like that ?

Linuxium said...

Yes. Because the log file actually documents the respun ISO it is useful to keep so you know how the respun ISO was created. If the log file is automatically deleted you would loose this information. When you are testing like this it seems an inconvenience but when you have an ISO and log file and then accidentally delete it just because you ran the script it becomes a significant issue. However I have recently considered adding a file to the ISO showing how it was created and this would remove this issue. Any viewpoint on adding the ISO file vs auto-removing the log file?

wildcowboy said...

./isorespin.sh -i lubuntu-16.04.2-desktop-amd64.iso --atom -u -r ppa:team-xbmc/ppa -p kodi

or

bash isorespin.sh -i lubuntu-16.04.2-desktop-amd64.iso --atom -u -r ppa:team-xbmc/ppa -p kodi


did not change anything

wildcowboy said...

I tried to respin on Mint MATE 18.2 and here is the error I get:

Adding repositories ...
WARNING:root:system-image-cli failed, using defaults: [Errno 13] Permission denied: '/dev/null'
WARNING:root:system-image-cli failed, using defaults: [Errno 13] Permission denied: '/dev/null'
WARNING:root:system-image-cli failed, using defaults: [Errno 13] Permission denied: '/dev/null'
Cannot add PPA: 'ppa:~team-xbmc/ubuntu/ppa'.
ERROR: '~team-xbmc' user or team does not exist.
./isorespin.sh: Adding repository 'ppa:team-xbmc/ppa' failed.

wildcowboy said...

Re the log file

Your comments make sense.
I think it is best to have it in both isorespin directory and the ISO file itself.

wildcowboy said...

It did work without the "-r ppa:team-xbmc/ppa -p kodi" options though:
---
Script './isorespin.sh' called with '-i lubuntu-16.04.2-desktop-amd64.iso --atom -u' ...
Work directory 'isorespin' used ...
ISO '/media/user/Home/andrey/Downloads/isorespin/lubuntu-16.04.2-desktop-amd64.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.13.0-041300rc6-generic' ...
Local package '/media/user/Home/andrey/Downloads/isorespin/isorespin/rtl8723bs_4.12.0_amd64.deb' added ...
File '/media/user/Home/andrey/Downloads/isorespin/isorespin/linuxium-install-UCM-files.sh' added ...
File '/media/user/Home/andrey/Downloads/isorespin/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/media/user/Home/andrey/Downloads/isorespin/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/media/user/Home/andrey/Downloads/isorespin/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service, pointing to /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished
Respun ISO created as 'linuxium-v4.13-rc6-lubuntu-16.04.2-desktop-amd64.iso

Linuxium said...

I've just tested this with Mint MATE 18.2 and it worked:

Script '/usr/local/bin/isorespin.sh' called with '-i linuxmint-18.2-mate-64bit.iso --atom -u -r ppa:team-xbmc/ppa -p kodi' ...
Work directory '/home/linuxium/isorespin' used ...
ISO '/home/linuxium/linuxmint-18.2-mate-64bit.iso' respun ...
Bootloader 'GRUB' added ...
Kernel updated with mainline kernel version '4.13.0-041300rc6-generic' ...
Repository 'ppa:team-xbmc/ppa' added ...
Package 'kodi' added ...
Local package '/home/linuxium/isorespin/rtl8723bs_4.12.0_amd64.deb' added ...
File '/home/linuxium/isorespin/linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-UCM-files.sh' added ...
File '/home/linuxium/isorespin/linuxium-install-broadcom-drivers.sh' added ...
File '/home/linuxium/isorespin/wrapper-linuxium-install-broadcom-drivers.sh' added ...
Command run ...
# wrapper-linuxium-install-UCM-files.sh
./linuxium-install-UCM-files.sh: Extracting UCM files ...
./linuxium-install-UCM-files.sh: Installing UCM files ...
./linuxium-install-UCM-files.sh: Reloading UCM driver ...
./linuxium-install-UCM-files.sh: Installation of UCM finished
# wrapper-linuxium-install-broadcom-drivers.sh
./linuxium-install-broadcom-drivers.sh: Extracting Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom files ...
./linuxium-install-broadcom-drivers.sh: Reloading Broadcom driver ...
./linuxium-install-broadcom-drivers.sh: Installing Broadcom bluetooth service ...
Created symlink /etc/systemd/system/multi-user.target.wants/brcmbt.service, pointing to /lib/systemd/system/brcmbt.service.
./linuxium-install-broadcom-drivers.sh: Starting Broadcom bluetooth service ...
Running in chroot, ignoring request.
./linuxium-install-broadcom-drivers.sh: Installation of Broadcom finished
Respun ISO created as '/home/linuxium/linuxium-v4.13-rc6-linuxmint-18.2-mate-64bit.iso'.

I can only suggest trying it again.

Linuxium said...

I have incorporated the change into a new version 'v7.3.0' which I will release shortly.

Post a Comment