FreeBSD on Lenovo Ideapad S10 (feat Broadcom BCM4312)

in #freebsd7 years ago

45094B67-6910-419B-B1CA-2AD67A5C2BA3.jpeg
Playing with new OSes has always been one of my hobbies. So, a few days ago, I decided to play around a bit with FreeBSD. I am already a member of The NetBSD Foundation but I didn’t know much about any of the *BSDs until I participated in Google Summer of Code, 2017. Upon taking a closer look I realised that these Operating systems also carry their unique advantages. However, I won’t be talking about any of that in this article.

Choosing a machine

FreeBSD isn’t that demanding. Most of the RAM and CPU power is consumed by the skin on top of it. As with linux systems, you need to choose your window manager wisely. Thanks to the light footprint, I decided to install it on one of my older netbooks, Lenovo Ideapad S10. I got this netbook as a prize when I stood third all over India in National Cyber Olympiad, when I was in standard 7th (2008-09). Here’s a quick look at the specifications.

CPU Intel Atom N270 (1.6 GHz. with hyperthreading)
RAM 1GB DDR2 (@667 MHz.)
HDD 160GB (@5400 rpm)
Screen Size 10.1”
Resolution 1024x600
Wireless chip Broadcom BCM4312 (11a/b/g)

Choosing a window manager

The window manager of my choice in this case was XFCE. There were other contenders like i3, fluxbox etc. but to me XFCE looks more visually appealing while still being lightweight.

Installation

The installation procedure is pretty standard if you’re used to setting up linux. However, you might face some difficulty in setting it up if you’re a beginner. While the installer is interactive, you won’t really get a GUI to begin with, right after the installation. *BSD systems generally store all the X11 packages in xsrc set, but I’ll be assuming that you didn’t install that (Personally, I didn’t even look for it).

Setting up X11 and XFCE

Well, this was fairly simple. Here are the commands that I used (in order):
To install required packages, run

pkg install xorg xf86-video-intel xfce4 lightdm dbus hal

After this you need to take the following steps to automate everything at boot:

echo ‘dbus_enable=“YES”’>>/etc/rc.conf
echo ‘hald_enable=“YES”’>>/etc/rc.conf
echo ‘lightdm_enable=“YES”’>>/etc/rc.conf

And finally,

dbus-uuidgen>/etc/machine-id

This should get you a working setup on rebooting. Fairly straight forward, eh? But now the fun part. Lenovo Ideapad S10 features Broadcom Inc. BCM4312 wireless chip, which, unfortunately (fortunately, for students like me :P), doesn’t work out of the box. For that, you need to set up the user port for it.
For this, you first need to get hold of the kernel sources for your particular OS version. You can directly download it from command line using the fetch(1) utility.

fetch URL_OF_THE_FILE

Then, you need to extract it to /usr/src. Then, navigate to /usr/ports and check if everything’s fully updated.

cd /usr/ports && portsnap fetch extract

Finally, you need to install b43-fwcutter and navigate to net/bwn-firmware-kmod and build the driver.

pkg install b43-fwcutter && cd /usr/ports/net/bwn-firmware-kmod && make install

This will build the driver as kernel modules and place them in the appropriate directory.
Then, you need to load the modules at startup by issuing these commands:

echo ‘if_bwn_load=“YES”’>>/boot/loader.conf
echo ‘bwn_v4_lp_ucode_load=“YES”’>>/boot/loader.conf

Do note that, In our case the device is a low power device (Hence, lp), which might not always be the case. Next, we need to make sure that a wlan device is created out of bwn0 device.

echo ‘wlans_bwn0=“wlan0”’>>/etc/rc.conf

This, brings us to the final section of this article.

Conclusion

While setting up the wireless card was a bit tricky (It looks easy, because I collected all the information and put that in one place), it is what sparks interest in passionate students like me. Here are a few screenshots, that you might want to look at (one of them contains the resource usage):


IMG_0117.pngIMG_0116.pngIMG_0115.png

Sort:  

Resteemed by @resteembot! Good Luck!
The resteem was paid by @greetbot
Curious?
The @resteembot's introduction post
Get more from @resteembot with the #resteembotsentme initiative
Check out the great posts I already resteemed.

Hi. I am @greetbot - a bot that uses AI to look for newbies who write good content!
Your post was approved by me. As reward it will be resteemed by a resteeming service.
greetbot's stamp of approval

@greetbot evaluated your post's quality score as [32.03] points!
Good Job!

Coin Marketplace

STEEM 0.15
TRX 0.16
JST 0.028
BTC 67340.80
ETH 2419.68
USDT 1.00
SBD 2.35