create account

FreeBSD on Lenovo Ideapad S10 (feat Broadcom BCM4312) by valkyr

View this thread on: hive.blogpeakd.comecency.com
· @valkyr ·
FreeBSD on Lenovo Ideapad S10 (feat Broadcom BCM4312)
![45094B67-6910-419B-B1CA-2AD67A5C2BA3.jpeg](https://steemitimages.com/DQma6kTRFc3jCDdcPqSgv75c4TmfVSSm3aQQmdJ4HyfeDoM/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.

<h1>Choosing a machine</h1>

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.

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

<h1>Choosing a window manager</h1>

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.

<h1>Installation</h1>

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).

<h1>Setting up X11 and XFCE</h1>

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

<code>pkg install xorg xf86-video-intel xfce4 lightdm dbus hal</code>

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

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

And finally,

<code>dbus-uuidgen>/etc/machine-id</code>

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 <code>fetch(1)</code> utility.

<code>fetch URL_OF_THE_FILE</code>

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

<code>cd /usr/ports && portsnap fetch extract</code>

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

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

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:

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

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 <code>wlan</code> device is created out of <code>bwn0</code> device.

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

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

<h1>Conclusion</h1>

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): 
https://steemitimages.com/DQmU7zizbZ6aoL9ez52Q7B7hq5457RhLLXMjYE6N1oJ7CgX/Screenshot%20from%202017-12-28%2015-56-26.png
https://steemitimages.com/DQmXohJTY6fXutjA7z9KsEQM9TAw1NDNN6KkrdztrcPZUSg/Screenshot%20from%202017-12-28%2015-55-00.png
![IMG_0117.png](https://steemitimages.com/DQmedQ3YFGwDsoCiCNm71V9ZCcEVBBSeCBheWybeMVDqdGg/IMG_0117.png)![IMG_0116.png](https://steemitimages.com/DQmZ3q3VAVKoirRbPAxPWgocoTKwbNsTNX4nnnMukxiadcz/IMG_0116.png)![IMG_0115.png](https://steemitimages.com/DQmSvfWbskdw5ag76BF4QY5jfXBuzKJxu7HijBhKB5aLcnV/IMG_0115.png)
👍  
properties (23)
authorvalkyr
permlinkfreebsd-on-lenovo-ideapad-s10-feat-broadcom-bcm4312
categoryfreebsd
json_metadata{"tags":["freebsd","technology","ideapad","lenovo","bcm4312"],"image":["https://steemitimages.com/DQma6kTRFc3jCDdcPqSgv75c4TmfVSSm3aQQmdJ4HyfeDoM/45094B67-6910-419B-B1CA-2AD67A5C2BA3.jpeg","https://steemitimages.com/DQmU7zizbZ6aoL9ez52Q7B7hq5457RhLLXMjYE6N1oJ7CgX/Screenshot%20from%202017-12-28%2015-56-26.png","https://steemitimages.com/DQmXohJTY6fXutjA7z9KsEQM9TAw1NDNN6KkrdztrcPZUSg/Screenshot%20from%202017-12-28%2015-55-00.png","https://steemitimages.com/DQmedQ3YFGwDsoCiCNm71V9ZCcEVBBSeCBheWybeMVDqdGg/IMG_0117.png","https://steemitimages.com/DQmZ3q3VAVKoirRbPAxPWgocoTKwbNsTNX4nnnMukxiadcz/IMG_0116.png","https://steemitimages.com/DQmSvfWbskdw5ag76BF4QY5jfXBuzKJxu7HijBhKB5aLcnV/IMG_0115.png"],"app":"steemit/0.1","format":"markdown"}
created2017-12-28 11:29:33
last_update2017-12-28 11:29:33
depth0
children2
last_payout2018-01-04 11:29:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,027
author_reputation39,005,660,541
root_title"FreeBSD on Lenovo Ideapad S10 (feat Broadcom BCM4312)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id25,672,854
net_rshares0
author_curate_reward""
vote details (1)
@greetbot ·
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](https://s10.postimg.org/3ksxxmpc9/stamp-250.png)
> @greetbot evaluated your post's quality score as [32.03] points!
Good Job!
👎  
properties (23)
authorgreetbot
permlinkre-valkyr-freebsd-on-lenovo-ideapad-s10-feat-broadcom-bcm4312-20171230t101954696z
categoryfreebsd
json_metadata""
created2017-12-30 10:19:57
last_update2017-12-30 10:19:57
depth1
children0
last_payout2018-01-06 10:19:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length333
author_reputation5,104,449,623
root_title"FreeBSD on Lenovo Ideapad S10 (feat Broadcom BCM4312)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id26,025,257
net_rshares-173,255,439
author_curate_reward""
vote details (1)
@resteembot ·
Resteemed by @resteembot! Good Luck!
The resteem was paid by @greetbot
Curious?
The @resteembot's [introduction post](https://steemit.com/resteembot/@resteembot/how-to-use-resteembot-updated-2017824t202525149z)
Get more from @resteembot with the #resteembotsentme initiative
Check out the great posts I already resteemed.
properties (22)
authorresteembot
permlinkre-valkyr-freebsd-on-lenovo-ideapad-s10-feat-broadcom-bcm4312-20171230t102034698z
categoryfreebsd
json_metadata""
created2017-12-30 10:20:36
last_update2017-12-30 10:20:36
depth1
children0
last_payout2018-01-06 10:20:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length321
author_reputation454,519,749,949
root_title"FreeBSD on Lenovo Ideapad S10 (feat Broadcom BCM4312)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id26,025,335
net_rshares0