First Build - ihipop/winsun_mininas_v1 GitHub Wiki

Create buildroot config file

make defconfig

This will generate a .config file from .defconfig file and the builtroot configuration system.

Fix bison bug

This is a toolchain compatibility bug.

make bison-unpackage

This will extract the source code of bison target into project_build_i686 folder.

vim project_build_i686/IntelCE/bison-29.0.12344.325128/bison-2.4.2/lib/stdio.in.h +122

Wrap line 122 with macros:

+ #if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2,16)
  __GL_WARN_ON_USE(gets, "gets is a security hole - use fgets instead");
+ #endif

save and exit.

Fix fakeroot_ng bug

vim Makefile +285

comment out the original FAKEROOT_NG_CMD definition line, and add a new line as follows.

# FAKEROOT_NG_CMD=LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(FSROOT)/lib $(BUILD_DEST)/bin/fakeroot_ng -p$(STATE_FILE)
FAKEROOT_NG_CMD=LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(FSROOT)/lib fakeroot-ng -p$(STATE_FILE)

Making sure you have installed fakeroot-ng on Ubuntu PC.

The fakeroot_ng in the CEFDK will cause segmentation fault. Don't know the exact reason. But we can use the fakeroot-ng on host pc as workaround solution.

fakeroot is required in building ramdisk as well as full target file system disk images. It 'fools' the program to consider it has the root priviledge to proceed.

Fix kernel mmc core bug

Extract kernel source

make kernel-unpackage

Edit file

vim project_build_i686/IntelCE/kernel-29.0.12344.325128/kernel_source/linux-2.6.39/drivers/mmc/core/mmc.c +241

change

if (card->ext_csd.rev > 5) {

to

if (card->ext_csd.rev > 7) {

This bug will prevent kernel loading mmc driver.

Deselect TargetFS build target

make menuconfig

Package Selection for the target  ---> 
                      ...
                      [*] system_utils
                      [ ] targetFS    <--- uncheck this
                      [*] thermal
                      ...

targetFS target need root privilege to build. If targetFS is not unchecked, the error logged as:

#####################################################################
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
#
# Your UID is not zero meaning you are likely not logged in as root.
# This script uses commands which most likely need root privileges
#
#####################################################################
mknod: ‘/home/ma/intel/CEFDK/workspace/IntelCE-29.0.12364.325671/project_build_i686/IntelCE/root/dev/initrd’: Operation not permitted
Command mknod -m 644 /home/ma/intel/CEFDK/workspace/IntelCE-29.0.12364.325671/project_build_i686/IntelCE/root/dev/initrd b 1 250 failed; exiting
Makefile:70: recipe for target 'image' failed
make[1]: *** [image] Error 1
make[1]: Leaving directory '/home/ma/intel/CEFDK/workspace/IntelCE-29.0.12364.325671/project_build_i686/IntelCE/targetFS-29.0.12364.325671'
package/Makefile.IntelCE.in:76: recipe for target '/home/ma/intel/CEFDK/workspace/IntelCE-29.0.12364.325671/project_build_i686/IntelCE/targetFS-29.0.12364.325671/.built' failed
make: *** [/home/ma/intel/CEFDK/workspace/IntelCE-29.0.12364.325671/project_build_i686/IntelCE/targetFS-29.0.12364.325671/.built] Error 2

First build

There are other bugs, but you should pass the first build here.

make

This takes around 40 to 50 minutes.

All built binaries are located in binaries/IntelCE directory.

bzImage - kernel
genXXX.bin - nor flash image (or part of it)
ramdisk.ext2 & ramdisk.ext2.tar.gz - ramdisk and gzipped version
TargetFS.ext2 & TargetFS.tar & TargetFS.tar.gz - TargetFS (rootfs), it's tar ball and gzipped tar ball.
redboot.bin - redboot image

other - I have no idea.

There are fundamental error in ramdisk file. We'll fix it later.

targetFS target

If you want to build targetFS solely (make targetFS), you need to use sudo. Otherwise the create_image.sh shell script will complain (pid not 0) and fail. But if you issue make, make all or make world to build all targets, it may succeed. This is (probably) because other targets depends on this one and persistent fakeroot takes effect.