f3 - Asus E35M1-I - FreeBSD
Hardware info on main page.
The amd64 version of FreeBSD has been used for testing this machine.
External hard drive da0 (60 GB sata, connected via usb adapter), which is sliced up as follows:
slice 1 - 14 GB - FreeBSD 8.2-stable (RELENG_8) slice 2 - XX GB - FreeBSD 9.0 (currently 9.0-RC1) slice 3 - XX GB - slice 4 - XX GB -
Work log
2011-11-25: da0s2a - here is output related to amdtemp (from dmesg) after a verbose boot:
root@kg-f3# dmesg | grep amd root@kg-f3.kg4.no:/usr/obj/usr/src/sys/GENERIC amd64 Preloaded elf obj module "/boot/kernel/amdtemp.ko" at 0xffffffff813d9320. amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb4 amdtemp0: Found 2 cores and 1 sensors.
also, it seems like the temperature reported in bios differs a bit from the temperature reported via amdtemp: bios temperature was + 33 degrees C, amdtemp reports:
root@kg-f3# temp dev.cpu.0.temperature: 39.8C dev.cpu.1.temperature: 39.8C
That's it.
2011-11-24: da0s2a - test the amdtemp patch with FreeBSD 9.0-RC1: first, unpack the sources: (I mounted the install memory stick on /mnt first)
root@kg-f3# cd / root@kg-f3# tar xvf /mnt/usr/freebsd-dist/src.txz
after a while, the sources was unpacked. A dry run patch first:
root@kg-f3# cd /usr/src/sys/dev/amdtemp root@kg-f3# patch -C < /home/tingo/dl/amdtemp_fusion_test.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- amdtemp.c-orij 2011-11-22 14:01:44.000000000 +0900 |+++ amdtemp.c 2011-11-22 14:06:16.000000000 +0900 -------------------------- Patching file amdtemp.c using Plan A... Hunk #1 succeeded at 76. Hunk #2 succeeded at 85. Hunk #3 succeeded at 192. Hunk #4 succeeded at 285. done
Looks good, do it real:
root@kg-f3# patch < /home/tingo/dl/amdtemp_fusion_test.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- amdtemp.c-orij 2011-11-22 14:01:44.000000000 +0900 |+++ amdtemp.c 2011-11-22 14:06:16.000000000 +0900 -------------------------- Patching file amdtemp.c using Plan A... Hunk #1 succeeded at 76. Hunk #2 succeeded at 85. Hunk #3 succeeded at 192. Hunk #4 succeeded at 285. done
Will it build a kernel without making world first?
root@kg-f3# cd /usr/src root@kg-f3# make kernel
We will find out. Yes, that worked. Load the module:
kldload amdtemp
From /var/log/messages:
amdtemp0: <AMD CPU On-Die Thermal Sensors> on hostb4
From sysctl:
root@kg-f3# sysctl -a | grep amdtemp dev.amdtemp.0.%desc: AMD CPU On-Die Thermal Sensors dev.amdtemp.0.%driver: amdtemp dev.amdtemp.0.%parent: hostb4 dev.amdtemp.0.sensor0.core0: 51.1C root@kg-f3# sysctl -a | grep temper dev.cpu.0.temperature: 51.0C dev.cpu.1.temperature: 51.0C
So it works.
2011-11-24: da0s1 - Today I found a patch for amdtemp in the FreeBSD Forums (in this thread). Downloaded, and proceed to patch the kernel:
root@kg-f3# locate amdtemp.c /usr/src/sys/dev/amdtemp/amdtemp.c root@kg-f3# cd /usr/src/sys/dev/amdtemp
Do a dry run first:
root@kg-f3# patch -C < /home/tingo/dl/amdtemp_fusion_test.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- amdtemp.c-orij 2011-11-22 14:01:44.000000000 +0900 |+++ amdtemp.c 2011-11-22 14:06:16.000000000 +0900 -------------------------- Patching file amdtemp.c using Plan A... Hunk #1 failed at 76. Hunk #2 succeeded at 81 (offset -4 lines). Hunk #3 succeeded at 329 with fuzz 2 (offset 137 lines). Hunk #4 succeeded at 224 with fuzz 2 (offset -61 lines). 1 out of 4 hunks failed--saving rejects to amdtemp.c.rej done
Need to check this. Ok, I can manually edit in the first hunk. Patching now:
root@kg-f3# patch < /home/tingo/dl/amdtemp_fusion_test.diff Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |--- amdtemp.c-orij 2011-11-22 14:01:44.000000000 +0900 |+++ amdtemp.c 2011-11-22 14:06:16.000000000 +0900 -------------------------- Patching file amdtemp.c using Plan A... Hunk #1 failed at 76. Hunk #2 succeeded at 81 (offset -4 lines). Hunk #3 succeeded at 329 with fuzz 2 (offset 137 lines). Hunk #4 succeeded at 224 with fuzz 2 (offset -61 lines). 1 out of 4 hunks failed--saving rejects to amdtemp.c.rej done
Then I edit amdtemp.c and add
#define DEVICEID_AMD_MISC14 0x1703
at the right place. Let's compile the module:
root@kg-f3# cd /usr/src/sys/modules/amdtemp root@kg-f3# make
- that didn't work. Ok, I'll have to make a new kernel then.
cd /usr/src make kernel
should work. Nope, it didnm't. OK, let's try the patch with 9.0 instead.
2011-11-19: da0s1 - after installing X (xorg-minimal) and Xfce, it is time to test desktop. Note: with xorg-minmal installed, lots of things are missing, this makes 'startx' fail, because 'twm' 'xclock' and 'xterm' are missing. However, startxfce4 works fine. Xfce feels snappy.
2011-11-16: da0s1 - I fetched and installed a ports tree with these two commands:
root@kg-f3# portsnap fetch Looking up portsnap.FreeBSD.org mirrors... 5 mirrors found. Fetching public key from portsnap5.FreeBSD.org... done. Fetching snapshot tag from portsnap5.FreeBSD.org... done. Fetching snapshot metadata... done. Fetching snapshot generated at Wed Nov 16 01:10:43 CET 2011: 417d53565ace0f5974f5652cb097a38884c74304475a27100% of 64 MB 756 kBps 00m00s Extracting snapshot... done. Verifying snapshot integrity... done. Fetching snapshot tag from portsnap5.FreeBSD.org... done. Fetching snapshot metadata... done. Updating from Wed Nov 16 01:10:43 CET 2011 to Wed Nov 16 17:18:39 CET 2011. Fetching 4 metadata patches... done. Applying metadata patches... done. Fetching 0 metadata files... done. Fetching 32 patches.....10....20....30. done. Applying patches... done. Fetching 11 new ports or files... done.
Then
root@kg-f3# portsnap extract
2011-11-15: da0s2 - installing FreeBSD 9.0-RC1. dmesg output: normal, verbose. When the installer booted, FreeBSD thinks that the external drive is drive ad1 (the usb memory stick is ad0) so this should be interesting. On a positive note, automatic (aka guided) partitioning worked, even if it created just a root and a swap partition. The "add users to this system" part didn't allow me to add a specific group (I like the name "users") before adding a user, but other than that it worked fine. After the install finished, I used the live-cd to edit the /etc/fstab on the newly installed system, changing da1 to da0. Then I booted the system. it came right up, no problems. Filesystem layout:
root@kg-f3# df -h Filesystem Size Used Avail Capacity Mounted on /dev/da0s2a 12G 2G 9.8G 17% / devfs 1.0k 1.0k 0B 100% /dev root@kg-f3# swapinfo Device 1K-blocks Used Avail Capacity /dev/da0s2b 733184 0 733184 0% root@kg-f3# more /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/da0s2a / ufs rw 1 1 /dev/da0s2b none swap sw 0 0
2011-11-15: wrote FreeBSD 9.0-RC1 (amd64) to a usb memory stick (1 GB, da4:
root@kg-v2# dd if=/home/tingo/dl/bsd/fbsd/9.0/FreeBSD-9.0-RC1-amd64-memstick.img of=/dev/da4 bs=10240 conv=sync 66539+1 records in 66540+0 records out 681369600 bytes transferred in 331.219397 secs (2057155 bytes/sec)
Time to test it.
2011-11-05: da0s1 - finally, here is the FreeBSD 8.2-stable dmesg output: normal, verbose.
2011-11-05: da0s1 - Ok, getting to the boot prompt and setting
set kern.cam.boot_delay=10000
and then do
boot
seems to have fixed the problem. Created /boot/loader.conf and added
kern.cam.boot_delay=10000
to it. Yes, that fixes the issue.
2011-11-05: da0s1 - I upgraded to FreeBSD 8.2-stable using csup and make world. Now the machine doesn't want to boot from the external hard drive anymore. The kernel loads and boots, but root mount fails, because da0 never shows up. I had to load /boot/kernel.old/kernel to get it to boot. The external adapter shows up like this:
root@kg-f3# usbconfig -u 3 -a 2 ugen3.2: <External Generic> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
device description:
root@kg-f3# usbconfig -u 3 -a 2 dump_device_desc ugen3.2: <External Generic> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0200 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x13fd idProduct = 0x1240 bcdDevice = 0x0104 iManufacturer = 0x0001 <Generic > iProduct = 0x0002 <External > iSerialNumber = 0x0003 <HP2200BBG9H54A > bNumConfigurations = 0x0001
current config:
root@kg-f3# usbconfig -u 3 -a 2 dump_curr_config_desc ugen3.2: <External Generic> at usbus3, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON Configuration index 0 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x0020 bNumInterfaces = 0x0001 bConfigurationValue = 0x0001 iConfiguration = 0x0000 <no string> bmAttributes = 0x00c0 bMaxPower = 0x0001 Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x0008 bInterfaceSubClass = 0x0006 bInterfaceProtocol = 0x0050 iInterface = 0x0000 <no string> Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 <IN> bmAttributes = 0x0002 <BULK> wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 <OUT> bmAttributes = 0x0002 <BULK> wMaxPacketSize = 0x0200 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000
That's it.
2011-11-04: da0s1 - installed FreeBSD 8.2-release from a usb memory stick. dmesg output: normal, verbose. The drive is slow to spin up, sometimes this gives a root mount error. The external sata-usb adapter I use is a HDD Stage Rack from Deltaco, model SI-7908US.
2011-11-04: testing amdtemp:
# kldload amdtemp # sysctl dev.amdtemp sysctl: unknown oid 'dev.amdtemp' # sysctl dev.cpu.0.temperature sysctl: unknown oid 'dev.cpu.0.temperature' # sysctl dev.cpu.1.temperature sysctl: unknown oid 'dev.cpu.1.temperature'
Nope, the amdtemp module doesn't work. testing acpi_aiboost:
# kldload acpi_aiboost # sysctl dev.acpi_aiboost.0 sysctl: unknown oid 'dev.acpi_aiboost.0'
No aiboost either. Darn!
2011-11-04: FreeBSD 8.2-release - booting from a memory stick, going Fixit, and live image. Lots of 'ln -s /dist/...' then ready:
# uname -a FreeBSD kg-f3.kg4.no 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
dmesg output: [normal]((files/asus/f3-dmesg-8.2-rel-20111104.txt). pciconf output:
# pciconf -lvc hostb0@pci0:0:0:0: class=0x060000 card=0x84a51043 chip=0x15101022 rev=0x00 hdr=0x00 class = bridge subclass = HOST-PCI vgapci0@pci0:0:1:0: class=0x030000 card=0x84a51043 chip=0x98021002 rev=0x00 hdr=0x00 class = display subclass = VGA cap 01[50] = powerspec 3 supports D0 D1 D2 D3 current D0 cap 10[58] = PCI-Express 2 root endpoint max data 128(128) link x0(x0) cap 05[a0] = MSI supports 1 message, 64 bit ecap 000b[100] = unknown 1 pcib1@pci0:0:4:0: class=0x060400 card=0x12341022 chip=0x15121022 rev=0x00 hdr=0x01 class = bridge subclass = PCI-PCI cap 01[50] = powerspec 3 supports D0 D3 current D0 cap 10[58] = PCI-Express 2 root port max data 128(128) link x16(x4) cap 05[a0] = MSI supports 1 message, 64 bit cap 0d[b0] = PCI Bridge card=0x12341022 cap 08[b8] = HT MSI fixed address window enabled at 0xfee00000 ecap 000b[100] = unknown 1 atapci0@pci0:0:17:0: class=0x01018f card=0x84961043 chip=0x43901002 rev=0x40 hdr=0x00 class = mass storage subclass = ATA cap 12[70] = SATA Index-Data Pair cap 13[a4] = PCI Advanced Features: FLR TP ohci0@pci0:0:18:0: class=0x0c0310 card=0x84961043 chip=0x43971002 rev=0x00 hdr=0x00 class = serial bus subclass = USB ehci0@pci0:0:18:2: class=0x0c0320 card=0x84961043 chip=0x43961002 rev=0x00 hdr=0x00 class = serial bus subclass = USB cap 01[c0] = powerspec 2 supports D0 D1 D2 D3 current D0 cap 0a[e4] = EHCI Debug Port at offset 0xe0 in map 0x14 ohci1@pci0:0:19:0: class=0x0c0310 card=0x84961043 chip=0x43971002 rev=0x00 hdr=0x00 class = serial bus subclass = USB ehci1@pci0:0:19:2: class=0x0c0320 card=0x84961043 chip=0x43961002 rev=0x00 hdr=0x00 class = serial bus subclass = USB cap 01[c0] = powerspec 2 supports D0 D1 D2 D3 current D0 cap 0a[e4] = EHCI Debug Port at offset 0xe0 in map 0x14 none0@pci0:0:20:0: class=0x0c0500 card=0x84961043 chip=0x43851002 rev=0x42 hdr=0x00 class = serial bus subclass = SMBus atapci1@pci0:0:20:1: class=0x01018a card=0x84961043 chip=0x439c1002 rev=0x40 hdr=0x00 class = mass storage subclass = ATA none1@pci0:0:20:2: class=0x040300 card=0x84151043 chip=0x43831002 rev=0x40 hdr=0x00 class = multimedia subclass = HDA cap 01[50] = powerspec 2 supports D0 D3 current D0 isab0@pci0:0:20:3: class=0x060100 card=0x84961043 chip=0x439d1002 rev=0x40 hdr=0x00 class = bridge subclass = PCI-ISA pcib2@pci0:0:20:4: class=0x060401 card=0x00000000 chip=0x43841002 rev=0x40 hdr=0x01 class = bridge subclass = PCI-PCI ohci2@pci0:0:20:5: class=0x0c0310 card=0x84961043 chip=0x43991002 rev=0x00 hdr=0x00 class = serial bus subclass = USB pcib3@pci0:0:21:0: class=0x060400 card=0x00001002 chip=0x43a01002 rev=0x00 hdr=0x01 class = bridge subclass = PCI-PCI cap 01[50] = powerspec 3 supports D0 D1 D2 D3 current D0 cap 10[58] = PCI-Express 2 root port max data 128(128) link x16(x1) cap 05[a0] = MSI supports 1 message, 64 bit cap 0d[b0] = PCI Bridge card=0x00001002 cap 08[b8] = HT MSI fixed address window enabled at 0xfee00000 ecap 000b[100] = unknown 1 pcib4@pci0:0:21:1: class=0x060400 card=0x00001002 chip=0x43a11002 rev=0x00 hdr=0x01 class = bridge subclass = PCI-PCI cap 01[50] = powerspec 3 supports D0 D1 D2 D3 current D0 cap 10[58] = PCI-Express 2 root port max data 128(128) link x1(x1) cap 05[a0] = MSI supports 1 message, 64 bit cap 0d[b0] = PCI Bridge card=0x00001002 cap 08[b8] = HT MSI fixed address window enabled at 0xfee00000 ecap 000b[100] = unknown 1 ohci3@pci0:0:22:0: class=0x0c0310 card=0x84961043 chip=0x43971002 rev=0x00 hdr=0x00 class = serial bus subclass = USB ehci2@pci0:0:22:2: class=0x0c0320 card=0x84961043 chip=0x43961002 rev=0x00 hdr=0x00 class = serial bus subclass = USB cap 01[c0] = powerspec 2 supports D0 D1 D2 D3 current D0 cap 0a[e4] = EHCI Debug Port at offset 0xe0 in map 0x14 hostb1@pci0:0:24:0: class=0x060000 card=0x00000000 chip=0x17001022 rev=0x43 hdr=0x00 class = bridge subclass = HOST-PCI hostb2@pci0:0:24:1: class=0x060000 card=0x00000000 chip=0x17011022 rev=0x00 hdr=0x00 class = bridge subclass = HOST-PCI hostb3@pci0:0:24:2: class=0x060000 card=0x00000000 chip=0x17021022 rev=0x00 hdr=0x00 class = bridge subclass = HOST-PCI hostb4@pci0:0:24:3: class=0x060000 card=0x00000000 chip=0x17031022 rev=0x00 hdr=0x00 class = bridge subclass = HOST-PCI cap 0f[f0] = unknown hostb5@pci0:0:24:4: class=0x060000 card=0x00000000 chip=0x17041022 rev=0x00 hdr=0x00 class = bridge subclass = HOST-PCI hostb6@pci0:0:24:5: class=0x060000 card=0x00000000 chip=0x17181022 rev=0x00 hdr=0x00 class = bridge subclass = HOST-PCI hostb7@pci0:0:24:6: class=0x060000 card=0x00000000 chip=0x17161022 rev=0x00 hdr=0x00 class = bridge subclass = HOST-PCI hostb8@pci0:0:24:7: class=0x060000 card=0x00000000 chip=0x17191022 rev=0x00 hdr=0x00 class = bridge subclass = HOST-PCI re0@pci0:4:0:0: class=0x020000 card=0x84321043 chip=0x816810ec rev=0x06 hdr=0x00 class = network subclass = ethernet cap 01[40] = powerspec 3 supports D0 D1 D2 D3 current D0 cap 05[50] = MSI supports 1 message, 64 bit enabled with 1 message cap 10[70] = PCI-Express 2 endpoint IRQ 2 max data 128(256) link x1(x1) cap 11[b0] = MSI-X supports 4 messages in map 0x20 cap 03[d0] = VPD ecap 0001[100] = AER 1 0 fatal 0 non-fatal 1 corrected ecap 0002[140] = VC 1 max VC0 ecap 0003[160] = Serial 1 3e000000684ce000
smbios output:
# kenv | grep smbios smbios.bios.reldate="08/08/2011" smbios.bios.vendor="American Megatrends Inc." smbios.bios.version="0802" smbios.chassis.maker="Chassis Manufacture" smbios.chassis.serial="Chassis Serial Number" smbios.chassis.tag="Asset-1234567890" smbios.chassis.version="Chassis Version" smbios.memory.enabled="8388608" smbios.planar.maker="ASUSTeK Computer INC." smbios.planar.product="E35M1-I" smbios.planar.serial="MT7015054700938" smbios.planar.version="Rev X.0x" smbios.socket.enabled="1" smbios.socket.populated="1" smbios.system.maker="System manufacturer" smbios.system.product="System Product Name" smbios.system.serial="System Serial Number" smbios.system.uuid="78addb00-b83f-11dc-afde-f46d0473b954" smbios.system.version="System Version" smbios.version="2.6"
That's it.
2011-11-04: I wrote FreeBSD 8.2-release to a usb memory stick (1 GB, da4:
root@kg-v2# dd if=/home/tingo/dl/bsd/fbsd/8.2/FreeBSD-8.2-RELEASE-amd64-memstick.img of=/dev/da4 bs=10240 conv=sync dd: /dev/da4: end of device 98561+0 records in 98560+0 records out 1009254400 bytes transferred in 492.899724 secs (2047586 bytes/sec)
Hmm, why does it say "end of device"?