New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Gentoo live USB for B3 Updated (Linux 4.1.6)

Discuss development on Bubba
Post Reply
sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Gentoo live USB for B3 Updated (Linux 4.1.6)

Post by sakaki »

Hello,

I've just released version 1.7.0 of the live-USB image of Gentoo Linux for the B3 on GitHub (here). The kernel has been upgraded to version 4.1.6. All included packages are up-to-date against the Gentoo tree, as of 12 September 2015 (and so, of course, shellshock, heartbleed and Ghost fixes have been applied). A full package list may be viewed here.

As before, you can burn the supplied image to a USB key (>=8GB, Lexar and SanDisk keys seem the most reliable), then boot your B3 from it, without affecting any installed (Excito) system on your B3's hard drive. (The compressed image is 372MiB; writing takes between 10 and 20 minutes, depending on your system.) You can even boot a diskless B3! No soldering, compilation or U-Boot flashing is required.

The live-USB may then be used as a rescue disk, to play with Gentoo Linux, or as the starting point to install Gentoo Linux on your B3's main hard drive. Any packages you install, or other changes you make, while running the live-USB are saved on the USB key, but do not affect your existing Excito system, so you can run Gentoo for a while, then reboot back into your Excito system and continue to use it as normal, then boot back into the USB at a later date - any changes you made will still be there when you do.

Full instructions are provided on the project's GitHub page (including how to install Gentoo on your B3's internal hard drive too, in case you want to do that).

Some other changes in this release (wrt version 1.4.0, the last version I posted about on this forum):
  • Overlay management has been migrated to the new Portage plug-in sync system (from layman);
  • Configuration files in /etc/portage/... have been migrated to a directory/sub-files structure (now the default in the Gentoo installation media);
  • The 4.1.6 kernel (for avoidance of doubt) has had the kirkwood PCIe patch - discussed here - formally merged in;
  • Unnecessary terminals disabled, per Gordon's suggestion here (saves system memory);
  • Migrated sakaki-tools-lite repo to sakaki-tools; this means that B3 users should benefit from changes to the genup and showem tools provided for PC users (these tools now replace genup-lite and showem-lite on the B3). Please note that the genup tool has been emerged with the buildkernel USE flag unset (i.e., you need to manually invoke buildkernel-b3 to upgrade your kernel, as before);
  • Deleted /etc/dhcpcd.duid file from image for better security (will be regenerated on first use);
  • Added CONFIG_RTL8192CU=m (and dependencies) to kernel (support for commonly used WiFi dongle);
  • Networking / initial login now simplified: on first boot, the eth1 (lan) interface has a DHCP (dnsmasq) server running, the eth0 (wan) interface is set up as a DHCP client, and shorewall is configured to provide forwarding etc. (the basic setup follows that outlined in my Gentoo wiki page here). The WiFi interface (where available) is also enabled by default (SSID b3, password changeme), using hostapd, and is bridged with eth1 on br0. As a result, new users can simply hook their PC up to the B3 by Ethernet cable (to the LAN port), or connect via WiFi, without having to specify initial detailed network settings. For external internet access, the B3 may be connected to an ADSL/cable router etc. via the WAN port. (Of course, once logged in, users can configure whatever network setting is desired). As a result, the copynetsetup service is no longer enabled. Also, because forwarding is enabled by default, connected clients should be able to browse the web etc (assuming the WAN port is hooked up). The (new) initial networking setup of the B3 when started from the live-USB is shown below:ImageLogin via eth1/WiFi is still possible, even if the eth0 (wan) interface is disconnected, or the wan network does not support DHCP (as rc_depend_strict has been set to "NO" in /etc/rc.conf, per this post).
  • The WiFi interface is now renamed wlan0, via a udev rule.
  • The sys-apps/haveged entropy daemon has been added and enabled.
  • The net-misc/ntp time server has been added and enabled.
The GitHub project has an associated wiki. I have a few notes there on how to set up your PC as a cross-compilation / distcc server for the B3, to accelerate builds (you don't need to do this just to play with the image, of course). Feel free to add your own material!

Have fun ^-^

best,
sakaki

PS: if you'd like to try v4 of the Linux kernel, but would rather use a binary distro, then please take a look at my Arch Linux live-USB for the B3, available here.
kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Re: Gentoo live USB for B3 Updated (Linux 4.1.6)

Post by kurt2000 »

Hi

I think it has been 10 years or more since i've used gentoo. I've completly forgot all about emerge and the portage tree, but i do remember that there was conflicts :-)

I tried to install strongswan, but got a conflict on openssl. Then for some unknown reason i thought a genup would save my day :-)

Now i'm left with no strongswan and a broken compiler :-)

Code: Select all

b3 ~ # emerge --pretend --verbose --update --deep --newuse @world ; emerge --info > emerge-uipdate.txt

These are the packages that would be merged, in order:

Calculating dependencies... done!

Total: 0 packages, Size of downloads: 0 KiB

WARNING: One or more updates/rebuilds have been skipped due to a dependency conflict:

dev-libs/openssl:0

  (dev-libs/openssl-1.0.2d:0/0::gentoo, ebuild scheduled for merge) conflicts with
    >=dev-libs/openssl-0.9.8f:0[bindist] required by (net-misc/openssh-6.9_p1-r2:0/0::gentoo, installed)
                                ^^^^^^^


 * IMPORTANT: 2 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

!!! No gcc found. You probably need to 'source /etc/profile'
!!! to update the environment of this terminal and possibly
!!! other terminals also.

Code: Select all

b3 ~ # gcc-config -l
 * gcc-config: Active gcc profile is invalid!

 [1] armv5tel-softfloat-linux-gnueabi-4.9.3

Code: Select all


b3 ~ # emerge -av strongswan

 * IMPORTANT: 2 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] virtual/linux-sources-1::gentoo  USE="-firmware" 0 KiB
[ebuild   R    ] dev-libs/openssl-1.0.2d::gentoo  USE="asm tls-heartbeat zlib -bindist* -gmp -kerberos -rfc3779 (-sctp) -static-libs {-test} -vanilla" 5,176 KiB
[ebuild  N     ] virtual/logger-0::gentoo  0 KiB
[ebuild  N     ] net-misc/strongswan-5.3.2::gentoo  USE="caps constraints gmp non-root openssl pam strongswan_plugins_led strongswan_plugins_lookip strongswan_plugins_systime-fix strongswan_plugins_unity strongswan_plugins_vici -curl -debug -dhcp -eap -farp -gcrypt -ldap -mysql -networkmanager -pkcs11 -sqlite -strongswan_plugins_blowfish -strongswan_plugins_ccm -strongswan_plugins_ctr -strongswan_plugins_gcm -strongswan_plugins_ha -strongswan_plugins_ipseckey -strongswan_plugins_ntru -strongswan_plugins_padlock -strongswan_plugins_rdrand (-strongswan_plugins_unbound) -strongswan_plugins_whitelist" 4,220 KiB

Total: 4 packages (3 new, 1 reinstall), Size of downloads: 9,395 KiB

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

dev-libs/openssl:0

  (dev-libs/openssl-1.0.2d:0/0::gentoo, ebuild scheduled for merge) pulled in by
    >=dev-libs/openssl-0.9.8[-bindist] required by (net-misc/strongswan-5.3.2:0/0::gentoo, ebuild scheduled for merge)
                             ^^^^^^^^

  (dev-libs/openssl-1.0.2d:0/0::gentoo, installed) pulled in by
    >=dev-libs/openssl-0.9.8f:0[bindist=] required by (net-misc/openssh-6.9_p1-r2:0/0::gentoo, installed)
                                ^^^^^^^^


It may be possible to solve this problem by using package.mask to
prevent one of those packages from being selected. However, it is also
possible that conflicting dependencies exist such that they are
impossible to satisfy simultaneously.  If such a conflict exists in
the dependencies of two different packages, then those packages can
not be installed simultaneously. You may want to try a larger value of
the --backtrack option, such as --backtrack=30, in order to see if
that will solve this conflict automatically.

For more information, see MASKED PACKAGES section in the emerge man
page or refer to the Gentoo Handbook.

Maybe the genup was a mistake, and i should start over reinstalling the little box again, but what i would really like is, if it's possible to upgrade and maintain the installation.
sakaki
Posts: 172
Joined: 15 Aug 2014, 11:20

Re: Gentoo live USB for B3 Updated (Linux 4.1.6)

Post by sakaki »

Hi,
Issuing

Code: Select all

b3 ~ # gcc-config 1
b3 ~ # source /etc/config
should fix your compiler (that's a one, not an ell, by the way).

Once that is done you'll need to fix your USE flags (eg bindist) and re-emerge.

Apologies for short response, travelling atm,
Best, Sakaki
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Gentoo live USB for B3 Updated (Linux 4.1.6)

Post by Gordon »

Hi Kurt,

Yes that can happen sometimes when upgrading the compiler and/or running depclean (which I think is part of the genup procedure). Simply run the following and you should be back up:

Code: Select all

gcc-config armv5tel-softfloat-linux-gnueabi-4.9.3
To solve the openssl conflict you'll need to disable the bindist USE flag. By default this flag is enabled on your system to prevent legal issues (it disables copyrighted parts in the source code) with distributing binaries. Since you're bound to run into issues if you only disable this USE flag on specific packages, you should turn it of globally in /etc/portage/make.conf and recompile every package that owns this USE flag. Unless you installed a lot of other stuff already, this should be openssl and openssh only.

Code: Select all

emerge --ask --newuse --deep @world
kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Re: Gentoo live USB for B3 Updated (Linux 4.1.6)

Post by kurt2000 »

Gordon's advice worked perfectly !
kurt2000
Posts: 40
Joined: 16 Sep 2010, 14:15

Re: Gentoo live USB for B3 Updated (Linux 4.1.6)

Post by kurt2000 »

Oh, by the way

Code: Select all

b3 ~ # poweroff-b3 
/usr/sbin/poweroff-b3: line 10: write-magic: command not found
on both the installs i tried.

With kind regards
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Gentoo live USB for B3 Updated (Linux 4.1.6)

Post by Gordon »

Ah yes. Sakaki and I should probably grab a few beers (or whatever her poison may be) together and try to reach some kind of common view on how to proceed with development.

As it stands, all bubba related files and applications that are not bound to specific locations by other applications (e.g. perl modules) have been moved to the /opt/bubba/ tree and /etc/bubba/. This includes the write-magic flash writing application that tells uboot to go into the wait-for-button-to-be-pressed mode on restart. Note that it does in fact not shut off power and the B3 can run quite hot while in this mode.

On my own systems I have integrated write-magic into an adapted version of the shutdown command. On other systems the install procedure of bubba-buttond provides a symlink to write-magic in /sbin. This does however require that the /opt/bubba/ tree is present on your machine and it appears this is not part of the install_on_sda.sh script. /opt is created as an empty folder. As a result the symlink doesn't point to anything and issuing the command doesn't function.
Post Reply