Linux Kernel out of tree Driver Compilation failed with BUILD_BUG_ON_ZERO - linux

On a Raspberry Pi 3, I am compiling a custom Linux Kernel and want to include an open source software PWM kernel driver.
I cloned the following repository for the Linux source:
https://github.com/raspberrypi/linux.git
I cloned the following repository for the Software PWM:
https://github.com/dagon666/rpi_SoftPwm
After successfully building the kernel, I compile the software PWM driver per the README like this:
pi#raspberrypi:~/Desktop/rpi_SoftPwm $ make M=/home/pi/Desktop/rpi_SoftPwm -C /home/pi/linux/ modules
The compilation fails with the error below:
make: Entering directory '/home/pi/linux'
CC [M] /home/pi/Desktop/rpi_SoftPwm/pwm.o
In file included from ./include/linux/thread_info.h:11:0,
from ./include/asm-generic/preempt.h:4,
from ./arch/arm/include/generated/asm/preempt.h:1,
from ./include/linux/preempt.h:59,
from ./include/linux/spinlock.h:50,
from ./include/linux/seqlock.h:35,
from ./include/linux/time.h:5,
from ./include/linux/stat.h:18,
from ./include/linux/module.h:10,
from /home/pi/Desktop/rpi_SoftPwm/pwm.c:2:
./include/linux/bug.h:37:45: error: negative width in bit-field ‘<anonymous>’
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
./include/linux/kernel.h:854:3: note: in expansion of macro ‘BUILD_BUG_ON_ZERO’
BUILD_BUG_ON_ZERO((perms) & 2) + \
^
./include/linux/sysfs.h:102:12: note: in expansion of macro ‘VERIFY_OCTAL_PERMISSIONS’
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
^
/home/pi/Desktop/rpi_SoftPwm/pwm.c:155:2: note: in expansion of macro ‘__ATTR’
__ATTR(export, 0222, NULL, export_store),
^
./include/linux/bug.h:37:45: error: negative width in bit-field ‘<anonymous>’
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
./include/linux/kernel.h:854:3: note: in expansion of macro ‘BUILD_BUG_ON_ZERO’
BUILD_BUG_ON_ZERO((perms) & 2) + \
^
./include/linux/sysfs.h:102:12: note: in expansion of macro ‘VERIFY_OCTAL_PERMISSIONS’
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
^
/home/pi/Desktop/rpi_SoftPwm/pwm.c:156:2: note: in expansion of macro ‘__ATTR’
__ATTR(unexport, 0222, NULL, unexport_store),
^
scripts/Makefile.build:299: recipe for target '/home/pi/Desktop/rpi_SoftPwm/pwm.o' failed
make[1]: *** [/home/pi/Desktop/rpi_SoftPwm/pwm.o] Error 1
Makefile:1490: recipe for target '_module_/home/pi/Desktop/rpi_SoftPwm' failed
make: *** [_module_/home/pi/Desktop/rpi_SoftPwm] Error 2
make: Leaving directory '/home/pi/linux'
I've tried to research this on Google and have not seen a solution. The failure has to do with the __ATTR macro. This used to compile with the older Linux Kernel 3.19, however now Raspbian is up to Linux 4+.
How can I get this to compile? Thanks.

Linux kernel developers tend to create attributes (files under /sys) non-writable for non-root users. This is what macro VERIFY_OCTAL_PERMISSIONS checks: permissions shouldn't have flag S_IWOTH (second bit) set.
Replace permissions 0222 to 0220, so compilation will succeed.

Related

Issue: Virtio rpmsg bus virtio0: msg received with no recipient - in Yocto Hardknott - imx7d-pico

I’m correctly generating my image Yocto-hardknott-technexion with this:
$ mkdir tn-imx-yocto
$ cd tn-imx-yocto
$ repo init -u https://github.com/TechNexion/tn-imx-yocto-manifest.git -b hardknott_5.10.y-next -m imx-5.10.52-2.1.0.xml
$ repo sync -j8
$ DISTRO=fsl-imx-x11 MACHINE=pico-imx7 BASEBOARD=pi source tn-setup-release.sh -b build-x11-pico-imx7
$ bitbake core-image-base
Then after I run modprobe imx_rpmsg_tty I have issue: virtio_rpmsg_bus virtio0: msg received with no recipient
I tried this: https://community.toradex.com/t/rpmsg-error-virtio-rpmsg-bus-virtio0-msg-received-with-no-recipient/12701
But not solved yet
When I change lines 83 and 102 from src to dst I got the error below(also look at the last photo):
/home/neuberfran/freertos-tn/examples/imx7d_pico_m4/demo_apps/rpmsg/str_echo_freertos/str_echo_freertos.c: In function 'StrEchoTask':
/home/neuberfran/freertos-tn/examples/imx7d_pico_m4/demo_apps/rpmsg/str_echo_freertos/str_echo_freertos.c:83:75: error: 'dst' undeclared (first use in this function)
result = rpmsg_rtos_recv_nocopy(app_chnl->rp_ept, &rx_buf, &len, &dst, 0xFFFFFFFF);
^
/home/neuberfran/freertos-tn/examples/imx7d_pico_m4/demo_apps/rpmsg/str_echo_freertos/str_echo_freertos.c:83:75: note: each undeclared identifier is reported only once for each function it appears in
/home/neuberfran/freertos-tn/examples/imx7d_pico_m4/demo_apps/rpmsg/str_echo_freertos/str_echo_freertos.c:63:19: warning: unused variable 'src' [-Wunused-variable]
unsigned long src;
^
make[2]: *** [CMakeFiles/rpmsg_str_echo_freertos_example.dir/build.make:94: CMakeFiles/rpmsg_str_echo_freertos_example.dir/home/neuberfran/freertos-tn/examples/imx7d_pico_m4/demo_apps/rpmsg/str_echo_freertos/str_echo_freertos.c.obj] Erro 1
make[2]: ** Esperando que outros processos terminem.
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/rpmsg_str_echo_freertos_example.dir/all] Erro 2
The error is being printed on line 761:
https://elixir.bootlin.com/linux/latest/source/drivers/rpmsg/virtio_rpmsg_bus.c#L761
How to solve?
edited: I think the problem can be stay in Vring[0] Vring1. Link below. Because I can put
#define VRING0_BASE 0xBFFF0000
#define VRING1_BASE 0xBFFF8000
in platform_info.c But I can't do changes in imx_rpmsg.c
https://imxdev.gitlab.io/tutorial/Multicore_communication_on_WaRP7_using_Remote_Processor_Messaging_bus_(RPMsg)/
Good morning,
We got the same problem in our project when there was no destination address set in message coming from the real-time controller (M7 in our case; Before we had M4. both in imx8-derivates).
Attached you see the tx-no copy call of our implementation. First try in my case was to extract the messages from downstream message and swap the addresses.
the call; Here we use the addresses stored in the bwloe stated list
The list with our channels (we build the kernel-module separately to add those cahnnel names
For a first try, send a message from Linux to sub-core, take the sender's address and set it as destination in the answer.
Hopefully you can get it running with this information. Please let me know.
I started to resolve my issue after on 04/13/2022 When I edited this post/issue and put this link: https://imxdev.gitlab.io/tutorial/Multicore_communication_on_WaRP7_using_Remote_Processor_Messaging_bus_(RPMsg)/
In freertos-tn/middleware/multicore/open-amp/porting/imx7d-m4/platform_info.c file #define VRING1_BASE correct is 0x9FFF8000
But in my platform_info.c was 0x9FFF0000
Now, I can run RPMsg with str_echo_freertos script/example:

Copy Yocto Project to other PC by tar

Due to the Internet connect is poor on customer side, I copied the tar file of my Yocto Project to customer.
However, customer met an issue while untar the Yocto Project and run the bitbake command to build project on their PC.
Customer got the following build code error:
s32v#s32v-vm:~/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release$ bitbake fsl-image-s32v2xx
ERROR: OE-core's config sanity checker detected a potential misconfiguration.
Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
Following is the list of potential problems / advisories:
Error, TMPDIR has changed location. You need to either move it back to /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp or rebuild
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
I edited /build_s32v234evb_release/tmp/saved_tmpdir file to re-position the tmp directory, this error has pass.
However, I got another error while building Kernel, it seems the directory parameter is still wrong... (There is no error while building U-Boot only.)
s32v#s32v-vm:~/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release$ bitbake fsl-image-s32v2xx
Loading cache: 100% |########################################################################################################################################################################| ETA: 00:00:00
Loaded 2462 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.26.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-14.04"
TARGET_SYS = "aarch64-fsl-linux"
MACHINE = "s32v234evb"
DISTRO = "fsl-networking"
DISTRO_VERSION = "1.8"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
meta
meta-yocto
meta-yocto-bsp = "(nobranch):03b0fbcf6b3b5cd16ae16738fbaabd1c6bf98536"
meta-fsl-arm = "(nobranch):c9f259a4bf8472dfa3ff75f1c3fcbe5e0ded7aaf"
meta-fsl-networking = "(nobranch):b8ff02a8d508464a16c84e1d13c155f45aa98cbe"
meta-fsl-toolchain = "(nobranch):0a235c4bcd4057608ee60b8c898eec9509632b95"
meta-virtualization = "(nobranch):0277cbcb47db4239d0a4aa3b37c5c6a705070951"
meta-fsl-s32v = "<unknown>:<unknown>"
meta-oe
meta-networking
meta-python
meta-webserver
meta-filesystems = "(nobranch):c841231b9f327d2d06d19d2ba1324dd86b83617c"
meta-linaro
meta-aarch64
meta-linaro-toolchain = "(nobranch):5075a82bd510d19617803fb16da2375605225cbb"
NOTE: Preparing RunQueue
WARNING: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-kernel/linux/linux-s32v2xx_4.1.26.bb.do_compile is tainted from a forced run
WARNING: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-bsp/u-boot/u-boot-s32v2xx_2016.01.bb.do_compile is tainted from a forced run
WARNING: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-bsp/u-boot/u-boot-s32v2xx_2016.01.bb.do_deploy is tainted from a forced run
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/s32v234evb-fsl-linux/linux-s32v2xx/4.1.26-r0/temp/log.do_compile.17853)
ERROR: Logfile of failure stored in: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/s32v234evb-fsl-linux/linux-s32v2xx/4.1.26-r0/temp/log.do_compile.17853
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4 Image CC=aarch64-fsl-linux-gcc --sysroot=/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/s32v234evb LD=aarch64-fsl-linux-ld.bfd --sysroot=/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/s32v234evb
| make: *** /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work-shared/s32v234evb/kernel-source: No such file or directory. Stop.
| make: *** [__sub-make] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/s32v234evb-fsl-linux/linux-s32v2xx/4.1.26-r0/temp/log.do_compile.17853)
ERROR: Task 76 (/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-kernel/linux/linux-s32v2xx_4.1.26.bb, do_compile) failed with exit code '1'
ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/temp/log.do_compile.17854)
ERROR: Logfile of failure stored in: /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/temp/log.do_compile.17854
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 4
| LINK tests/qemu-iotests/socket_scm_helper
| GEN qemu-doc.html
| GEN qemu.1
| CC qga/commands.o
| cc1: warning: /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/x86_64-linux/usr/include/pixman-1: No such file or directory [enabled by default]
| cc1: warning: /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/x86_64-linux/usr/include/glib-2.0: No such file or directory [enabled by default]
| cc1: warning: /media/2T_HDD_for_SDK/Amingo/S32V/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/sysroots/x86_64-linux/usr/lib/glib-2.0/include: No such file or directory [enabled by default]
| /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/qemu-2.2.0/qga/commands.c:13:18: fatal error: glib.h: No such file or directory
| #include <glib.h>
| ^
| compilation terminated.
| make: *** [qga/commands.o] Error 1
| make: *** Waiting for unfinished jobs....
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/build_s32v234evb_release/tmp/work/x86_64-linux/qemu-native/2.2.0-r1/temp/log.do_compile.17854)
ERROR: Task 2849 (virtual:native:/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/poky/meta/recipes-devtools/qemu/qemu_2.2.0.bb, do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1504 tasks of which 1502 didn't need to be rerun and 2 failed.
Waiting for 0 running tasks to finish:
Summary: 2 tasks failed:
/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/meta-fsl-s32v/recipes-kernel/linux/linux-s32v2xx_4.1.26.bb, do_compile
virtual:native:/home/s32v/s32v_15.0/yocto_auto_linux_bsp15.0/poky/meta/recipes-devtools/qemu/qemu_2.2.0.bb, do_compile
Summary: There were 3 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
My question is:
Is it possible to copy the Yocot Project to another PC by tar file?
What configuration / initial files I need to edit except saved_tmpdir file?
Which file does Yocto Project define the "kernel-source" directory?
Best Regards,
Wayne Kuo
when you copy tar project to another PC, two files will be modified:
build/conf/bblayers.conf
build/tmp/saved_tmpdir
If it's only a matter of internet connection, I suggest you create a download folder mirror.
On your side, you add BB_GENERATE_MIRROR_TARBALLS and build.
Then copy entire DL_DIR folder at customer side, and use BB_NO_NETWORK there.
You can look here and here for usage example.
You can then make a new build at customer side without internet connection. to speed up process, you can also copy your sstate-cache folder to customer side and add a sstate mirror with SSTATE_MIRRORS.
No, you will need a fresh build folder
You need to create a new Yocto environment at customer side
It's bitbake variable STAGING_KERNEL_DIR
Error, TMPDIR has changed location. You need to either move it back to...
I built all yocto stuff with the user jamie. Due to disk space running out, I copied the whole $HOME directory of jamie to another disk /dev/sdb1, which had a larger storage.
When I tried to run bitbake command to make a test, I got the same error. Here is a simple solution which worked for me:
mount /dev/sdb1 /mnt/sdb1/
mount --bind /mnt/sdb1/home_jamie/ /home/jamie/
What I want was to restore the exact original filesystem layout which the bitbake commands were once run with.
To make the above changes permanent, write above mounting as entries of /etc/fstab.

Missing soft link to linux source tree

In /lib/modules/xx.xx.xx-xx there is supposed to be two soft links one called source and one called build. The source one is there and its fine but the build one is missing and I have no idea where it is supposed to point to and I need to install a driver for my video card. Is there any way to find out where that is supposed to point if so how and where. I know there are a lot of other questions out there but not of them actually discribe where they are supposed to be pointing in the end.
Updated the link and now it is having build errors that I can't fix because I can't even find the struct its talking about
make -C /lib/modules/3.16.0-4-amd64/build M=/home/gibsont/gpuTempDriver modules
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
CC [M] /home/gibsont/gpuTempDriver/base.o
/home/gibsont/gpuTempDriver/base.c: In function ‘_rtl_init_mac80211’:
/home/gibsont/gpuTempDriver/base.c:319:6: error: ‘IEEE80211_HW_BEACON_FILTER’ undeclared (first use in this function)
IEEE80211_HW_BEACON_FILTER |
^
/home/gibsont/gpuTempDriver/base.c:319:6: note: each undeclared identifier is reported only once for each function it appears in
/home/gibsont/gpuTempDriver/base.c:349:4: error: ‘struct ieee80211_hw’ has no member named ‘channel_change_time’
hw->channel_change_time = 100;
^
/home/gibsont/gpuTempDriver/base.c: In function ‘rtl_action_proc’:
/home/gibsont/gpuTempDriver/base.c:858:32: error: ‘struct ieee80211_conf’ has no member named ‘channel’
rx_status.freq = hw->conf.channel->center_freq;
^
/home/gibsont/gpuTempDriver/base.c:859:32: error: ‘struct ieee80211_conf’ has no member named ‘channel’
rx_status.band = hw->conf.channel->band;
^
/home/gibsont/gpuTempDriver/base.c:861:25: error: ‘RX_FLAG_MACTIME_MPDU’ undeclared (first use in this function)
rx_status.flag |= RX_FLAG_MACTIME_MPDU;
^
/home/gibsont/gpuTempDriver/base.c: In function ‘rtl_beacon_statistic’:
/home/gibsont/gpuTempDriver/base.c:1132:2: error: implicit declaration of function ‘compare_ether_addr’ [-Werror=implicit-function-declaration]
if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid))
^
/home/gibsont/gpuTempDriver/base.c: In function ‘rtl_send_smps_action’:
/home/gibsont/gpuTempDriver/base.c:1414:16: error: ‘struct <anonymous>’ has no member named ‘sta’
info->control.sta = sta;
^
/home/gibsont/gpuTempDriver/base.c:1415:24: error: ‘struct ieee80211_conf’ has no member named ‘channel’
info->band = hw->conf.channel->band;
^
cc1: some warnings being treated as errors
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:262: recipe for target '/home/gibsont/gpuTempDriver/base.o' failed
make[4]: *** [/home/gibsont/gpuTempDriver/base.o] Error 1
/usr/src/linux-headers-3.16.0-4-common/Makefile:1350: recipe for target '_module_/home/gibsont/gpuTempDriver' failed
make[3]: *** [_module_/home/gibsont/gpuTempDriver] Error 2
Makefile:181: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:27: recipe for target 'all' failed
make: *** [all] Error 2
I copied it from the disk because it was a read only and placed it into my home directory.
I feel like this has become a whole new issues or possibly the link is wrong and is causing this issue.
this is mine:
2509142 lrwxrwxrwx 1 root root 37 Apr 24 15:02 build -> /usr/src/linux-headers-3.16.0-4-amd64
actually it's managed by package manager. I install linux headers using apt-get. I think you should do the same, unless you are advanced kernel developer.

Install OpenCV-2.4.9 on CentOS 7 (PC)

I'm trying to install OpenCV-2.4.9 on CentOS 7 (PC) however getting error after 16% when running "make" command. I leave default configuration for OpenCV.
make
...
[ 16%] Building CXX object modules/highgui/CMakeFiles/opencv_highgui.dir/src/cap_v4l.cpp.o /opt/opencv-2.4.9/opencv/modules/highgui/src/cap_v4l.cpp:306:29: error: field ‘capability’ has incomplete type
struct video_capability capability;
^ /opt/opencv-2.4.9/opencv/modules/highgui/src/cap_v4l.cpp:307:29: error: field ‘captureWindow’ has incomplete type
struct video_window captureWindow;
....
....
/opt/opencv-2.4.9/opencv/modules/highgui/src/cap_v4l.cpp: In function ‘void icvCloseCAM_V4L(CvCaptureCAM_V4L*)’:
/opt/opencv-2.4.9/opencv/modules/highgui/src/cap_v4l.cpp:2812:46: error: ‘CvCaptureCAM_V4L’ has no member named ‘memoryBuffer’
It seems that the define HAVE_CAMV4L has the value 1, if you look in the file modules/highgui/src/cap_v4l.cpp looking for the structure definition at the row 306. If the compilation fails at that point this means that the video4linux development configuration is corrupted.
Using google I have found that the OpenCV Bug #1357 is described as follow:
CHECK_INCLUDE_FILE(linux/videodev.h HAVE_CAMV4L) succeeds even though linux/videodev.h doesn't exist on the system. (Bug #1357)
http://code.opencv.org/issues/1357
Anyway the solution is described at the same URL for "HAVE_CAMV4L gets set incorrectly": "Setting it to FALSE in CMakeLists.txt fixes the problem".

rpmbuild hp-be2net emulex driver

i am trying to do an rpmbuild for HP DL360 G7 Emulex driver from HP on centos 6.3
but it fails with this error.. any ideas?
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd hp-be2net-4.1.402.6
+ LANG=C
+ export LANG
+ unset DISPLAY
+ export 'EXTRA_CFLAGS=-DVERSION=\"4.1.402.6\"'
+ EXTRA_CFLAGS='-DVERSION=\"4.1.402.6\"'
+ for flavor in default
+ rm -rf obj/default
+ cp -r source obj/default
+ export SRC=/root/rpmbuild/BUILD/hp-be2net-4.1.402.6/obj/default
+ SRC=/root/rpmbuild/BUILD/hp-be2net-4.1.402.6/obj/default
++ '[' default = default ']'
+ make -C /usr/src/kernels/2.6.32-279.1.1.el6.centos.plus.x86_64 modules M=/root/rpmbuild/BUILD/hp-be2net-4.1.402.6/obj/default CONFIG_BE2NET=m
make: Entering directory `/usr/src/kernels/2.6.32-279.1.1.el6.centos.plus.x86_64'
CC [M] /root/rpmbuild/BUILD/hp-be2net-4.1.402.6/obj/default/be_main.o
/root/rpmbuild/BUILD/hp-be2net-4.1.402.6/obj/default/be_main.c: In function 'get_rx_page_info':
/root/rpmbuild/BUILD/hp-be2net-4.1.402.6/obj/default/be_main.c:1279: error: 'struct be_rx_page_info' has no member named 'bus'
/root/rpmbuild/BUILD/hp-be2net-4.1.402.6/obj/default/be_main.c: In function 'be_post_rx_frags':
/root/rpmbuild/BUILD/hp-be2net-4.1.402.6/obj/default/be_main.c:1679: error: 'struct be_rx_page_info' has no member named 'bus'
make[1]: *** [/root/rpmbuild/BUILD/hp-be2net-4.1.402.6/obj/default/be_main.o] Error 1
make: *** [_module_/root/rpmbuild/BUILD/hp-be2net-4.1.402.6/obj/default] Error 2
make: Leaving directory `/usr/src/kernels/2.6.32-279.1.1.el6.centos.plus.x86_64'
error: Bad exit status from /var/tmp/rpm-tmp.R3DzsV (%build)
I ran into the same problem. HP has not provided me with a resolution yet so I started looking around for other possible solutions. I found that Emulex (the manufacturer of the card) provides a binary driver compatible with RHEL 6.2 that seems to load fine in RHEL 6.3.
Look for UCNA Ethernet Driver - Binary Driver RPM Kit
http://www.emulex.com/downloads/emulex/linux/rhel6x/drivers.html

Resources