diff options
-rw-r--r-- | README | 1 | ||||
-rw-r--r-- | mk/vars.mk | 2 | ||||
-rw-r--r-- | package/busybox/files/busybox.postinst | 2 | ||||
-rw-r--r-- | package/grub-bin/Makefile | 33 | ||||
-rw-r--r-- | package/grub/Makefile | 27 | ||||
-rw-r--r-- | package/grub/files/core.img.i386-pc | bin | 0 -> 25564 bytes | |||
-rw-r--r-- | package/grub/files/embed.cfg | 2 | ||||
-rw-r--r-- | package/patch/Makefile | 11 | ||||
-rw-r--r-- | scripts/scan-tools.sh | 13 | ||||
-rw-r--r-- | target/config/Config.in.tools | 5 | ||||
-rw-r--r-- | target/x86/Makefile | 4 | ||||
-rw-r--r-- | target/x86/sys-available/generic-pc | 1 | ||||
-rw-r--r-- | target/x86/sys-available/ibm-x40 | 2 | ||||
-rw-r--r-- | target/x86_64/Makefile | 15 |
14 files changed, 63 insertions, 55 deletions
@@ -12,7 +12,6 @@ Before you can start you need to install some tools: - GNU awk - GNU sed - tar -- patch - gzip - wget - libc headers diff --git a/mk/vars.mk b/mk/vars.mk index f3911044f..3ae3f1d67 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -168,7 +168,7 @@ CXXFLAGS_FOR_BUILD?= -O2 -Wall LDFLAGS_FOR_BUILD?= -L$(STAGING_HOST_DIR)/usr/lib FLAGS_FOR_BUILD= ${CPPFLAGS_FOR_BUILD} ${CFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD} -PATCH= ${BASH} $(SCRIPT_DIR)/patch.sh +PATCH= PATH=${HOST_PATH} ${BASH} $(SCRIPT_DIR)/patch.sh SED:= PATH=${HOST_PATH} sed -i -e LINUX_DIR:= $(BUILD_DIR)/linux KERNEL_MODULE_FLAGS:= ARCH=${ARCH} \ diff --git a/package/busybox/files/busybox.postinst b/package/busybox/files/busybox.postinst index d403ff481..ed264244f 100644 --- a/package/busybox/files/busybox.postinst +++ b/package/busybox/files/busybox.postinst @@ -5,7 +5,7 @@ add_rcconf network network YES add_rcconf crond crond NO add_rcconf watchdog watchdog NO add_rcconf watchdog_flags watchdog_flags '-t 10 -T 20' -add_rcconf syslogd NO +add_rcconf syslogd syslogd NO add_rcconf 'use "-C32" normally' syslogd_flags '-C32' add_rcconf inetd inetd NO add_rcconf ntpd ntpd NO diff --git a/package/grub-bin/Makefile b/package/grub-bin/Makefile deleted file mode 100644 index 352c2b572..000000000 --- a/package/grub-bin/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# This file is part of the OpenADK project. OpenADK is copyrighted -# material, please see the LICENCE file in the top-level directory. - -include ${TOPDIR}/rules.mk - -# compiled with i486 toolchain, statically linked with uClibc -# cross-compiling is difficult, so provide a binary package -PKG_NAME:= grub-bin -PKG_VERSION:= 1.98 -PKG_RELEASE:= 2 -PKG_MD5SUM:= 50dbe739776f904c318be05faf1d7ce5 -PKG_DESCR:= GRUB2 bootloader (binary package) -PKG_SECTION:= boot -PKG_SITES:= http://openadk.org/distfiles/ -PKG_URL:= http://www.gnu.org/software/grub - -PKG_ARCH_DEPENDS:= x86 x86_64 - -PKG_CFLINE_GRUB_BIN:= select BUSYBOX_FEATURE_STAT_FORMAT@ -PKG_CFLINE_GRUB_BIN+= depends on !ADK_TARGET_ROOTFS_INITRAMFS_PIGGYBACK && !ADK_TARGET_ROOTFS_INITRAMFS - -include ${TOPDIR}/mk/package.mk - -$(eval $(call PKG_template,GRUB_BIN,grub-bin,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) - -CONFIG_STYLE:= manual -BUILD_STYLE:= manual -INSTALL_STYLE:= manual - -do-install: - ${CP} ${WRKBUILD}/* ${IDIR_GRUB_BIN}/ - -include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/grub/Makefile b/package/grub/Makefile index 2f2deba4a..9e43242aa 100644 --- a/package/grub/Makefile +++ b/package/grub/Makefile @@ -5,9 +5,9 @@ include $(TOPDIR)/rules.mk PKG_NAME:= grub PKG_VERSION:= 2.00 -PKG_RELEASE:= 4 +PKG_RELEASE:= 5 PKG_MD5SUM:= e927540b6eda8b024fb0391eeaa4091c -PKG_DESCR:= GRUB2 bootloader (source package) +PKG_DESCR:= GRUB2 bootloader PKG_SECTION:= boot PKG_BUILDDEP:= bison-host qemu-host PKG_URL:= http://www.gnu.org/software/grub @@ -16,6 +16,9 @@ PKG_SITES:= ftp://ftp.gnu.org/gnu/grub/ PKG_ARCH_DEPENDS:= x86 x86_64 mips PKG_NOPARALLEL:= 1 +PKG_SUBPKGS:= GRUB GRUB_TOOLS +PKGSD_GRUB_TOOLS:= GRUB2 tools + PKG_CHOICES_GRUB:= PC EFI PKGCD_PC:= build for PC BIOS PKGCD_EFI:= build for EFI @@ -23,7 +26,10 @@ PKGCD_EFI:= build for EFI include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,GRUB,grub,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,GRUB_TOOLS,grub-tools,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +# core.img is generated via +# grub-mkimage -O ${GRUB_ARCH} -o core.img -c embed.cfg ${GRUB_MODULES} GRUB_MODULES:= ext2 part_msdos biosdisk ifeq ($(ADK_PACKAGE_GRUB_PC),y) @@ -35,11 +41,8 @@ GRUB_ARCH:= x86_64-efi CONFIGURE_ARGS+= --with-platform=efi endif -TARGET_CFLAGS+= -static -TARGET_LDFLAGS+= -static CONFIGURE_ARGS+= --disable-grub-mkfont \ --enable-efiemu=no \ - --enable-liblzma=no \ --enable-device-mapper=no \ --enable-libzfs=no \ --disable-werror @@ -49,8 +52,16 @@ grub-install: ${INSTALL_DIR} $(IDIR_GRUB)/boot/grub/${GRUB_ARCH} ${CP} ${WRKINST}/usr/lib/grub/${GRUB_ARCH}/*{mod,lst,img} \ $(IDIR_GRUB)/boot/grub/${GRUB_ARCH}/ - PATH='${HOST_PATH}' qemu-i386 ${WRKBUILD}/grub-mkimage \ - -o $(IDIR_GRUB)/boot/grub/core.img -O ${GRUB_ARCH} \ - -c ./files/embed.cfg ${GRUB_MODULES} + ${CP} ./files/core.img.${GRUB_ARCH} \ + $(IDIR_GRUB)/boot/grub/core.img + +grub-tools-install: + ${INSTALL_DIR} $(IDIR_GRUB_TOOLS)/usr/{sbin,bin} + ${INSTALL_BIN} ${WRKINST}/usr/sbin/grub-install \ + $(IDIR_GRUB_TOOLS)/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/sbin/grub-bios-setup \ + $(IDIR_GRUB_TOOLS)/usr/sbin + ${INSTALL_BIN} ${WRKINST}/usr/bin/grub-mkimage \ + $(IDIR_GRUB_TOOLS)/usr/bin include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/grub/files/core.img.i386-pc b/package/grub/files/core.img.i386-pc Binary files differnew file mode 100644 index 000000000..bd6fbac6f --- /dev/null +++ b/package/grub/files/core.img.i386-pc diff --git a/package/grub/files/embed.cfg b/package/grub/files/embed.cfg new file mode 100644 index 000000000..01eb1d453 --- /dev/null +++ b/package/grub/files/embed.cfg @@ -0,0 +1,2 @@ +set root=(hd0,1) +set prefix=($root)/boot/grub diff --git a/package/patch/Makefile b/package/patch/Makefile index 0d80e53ec..0d1e23448 100644 --- a/package/patch/Makefile +++ b/package/patch/Makefile @@ -4,20 +4,25 @@ include $(TOPDIR)/rules.mk PKG_NAME:= patch -PKG_VERSION:= 2.5.9 +PKG_VERSION:= 2.7.1 PKG_RELEASE:= 1 -PKG_MD5SUM:= dacfb618082f8d3a2194601193cf8716 -PKG_DESCR:= GNU patch +PKG_MD5SUM:= 95dd8d7e41dcbcecdd5cd88ef915378d +PKG_DESCR:= GNU patch utility PKG_SECTION:= utils PKG_URL:= http://www.gnu.org/software/patch/ PKG_SITES:= ${MASTER_SITE_GNU:=patch/} +include $(TOPDIR)/mk/host.mk include $(TOPDIR)/mk/package.mk +$(eval $(call HOST_template,PATCH,patch,$(PKG_VERSION)-${PKG_RELEASE})) $(eval $(call PKG_template,PATCH,patch,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +HOST_STYLE:= auto + patch-install: $(INSTALL_DIR) $(IDIR_PATCH)/usr/bin $(INSTALL_BIN) $(WRKINST)/usr/bin/patch $(IDIR_PATCH)/usr/bin +include ${TOPDIR}/mk/host-bottom.mk include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index f513b5861..9bb713f6e 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -113,12 +113,6 @@ if ! which gzip >/dev/null 2>&1; then out=1 fi -if ! which patch >/dev/null 2>&1; then - echo You must install patch to continue. - echo - out=1 -fi - cat >test.c <<-'EOF' #include <stdio.h> #include <zlib.h> @@ -239,6 +233,12 @@ if ! which m4 >/dev/null 2>&1; then host_build_m4=1 fi +host_build_patch=0 +if ! which patch >/dev/null 2>&1; then + echo "No patch found, will build one." + host_build_patch=1 +fi + host_build_pkgconf=0 if ! which pkgconf >/dev/null 2>&1; then echo "No pkgconf found, will build one." @@ -317,6 +317,7 @@ if [ $host_build_bzip2 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_BZIP2 if [ $host_build_file -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FILE" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_flex -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FLEX" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_m4 -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_M4" >> $topdir/target/config/Config.in.prereq ;fi +if [ $host_build_patch -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PATCH" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_pkgconf -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_PKGCONF" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_findutils -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_FINDUTILS" >> $topdir/target/config/Config.in.prereq ;fi if [ $host_build_xz -eq 1 ];then printf "\t%s\n" "select ADK_HOST_BUILD_XZ" >> $topdir/target/config/Config.in.prereq ;fi diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools index b3e900bb3..d66a7e400 100644 --- a/target/config/Config.in.tools +++ b/target/config/Config.in.tools @@ -14,6 +14,7 @@ config ADK_HOST_BUILD_BASH config ADK_HOST_BUILD_BC boolean + select ADK_HOST_BUILD_FLEX default n config ADK_HOST_BUILD_BISON @@ -40,6 +41,10 @@ config ADK_HOST_BUILD_M4 boolean default n +config ADK_HOST_BUILD_PATCH + boolean + default n + config ADK_HOST_BUILD_PKGCONF boolean default n diff --git a/target/x86/Makefile b/target/x86/Makefile index 27920819f..736f1c359 100644 --- a/target/x86/Makefile +++ b/target/x86/Makefile @@ -9,7 +9,11 @@ include $(TOPDIR)/mk/image.mk KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y) +ifeq ($(ADK_TARGET_QEMU_WITHOUT_GRAPHIC),y) +CREATE:=./scripts/create.sh -g -t +else CREATE:=./scripts/create.sh -g +endif else CREATE:=./scripts/create.sh endif diff --git a/target/x86/sys-available/generic-pc b/target/x86/sys-available/generic-pc index 76d228936..72ae99765 100644 --- a/target/x86/sys-available/generic-pc +++ b/target/x86/sys-available/generic-pc @@ -4,6 +4,7 @@ config ADK_TARGET_SYSTEM_GENERIC_PC select ADK_generic_pc select ADK_CPU_I486 select ADK_TARGET_KERNEL_BZIMAGE + select ADK_PACKAGE_GRUB help Support for generic PC (i486). diff --git a/target/x86/sys-available/ibm-x40 b/target/x86/sys-available/ibm-x40 index 80c5bf531..df11b1f3f 100644 --- a/target/x86/sys-available/ibm-x40 +++ b/target/x86/sys-available/ibm-x40 @@ -21,6 +21,6 @@ config ADK_TARGET_SYSTEM_IBM_X40 select ADK_TARGET_WITH_PP select ADK_TARGET_WITH_ROOT_RW select ADK_TARGET_KERNEL_BZIMAGE - select ADK_PACKAGE_GRUB_BIN + select ADK_PACKAGE_GRUB help System profile for IBM X40 laptop. diff --git a/target/x86_64/Makefile b/target/x86_64/Makefile index c94c3a1a6..63785c12a 100644 --- a/target/x86_64/Makefile +++ b/target/x86_64/Makefile @@ -8,6 +8,15 @@ include $(TOPDIR)/mk/kernel-build.mk include $(TOPDIR)/mk/image.mk KERNEL:=$(LINUX_DIR)/arch/x86/boot/bzImage +ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y) +ifeq ($(ADK_TARGET_QEMU_WITHOUT_GRAPHIC),y) +CREATE:=./scripts/create.sh -g -t +else +CREATE:=./scripts/create.sh -g +endif +else +CREATE:=./scripts/create.sh +endif ifeq ($(ADK_TARGET_FS),archive) imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) @@ -15,11 +24,15 @@ imageinstall: $(FW_DIR)/$(ROOTFSTARBALL) ifeq ($(ADK_TARGET_SYSTEM_QEMU_X86_64),y) @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) @echo "Use following command to create a QEMU Image:" - @echo "./scripts/create.sh qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)" + @echo "$(CREATE) qemu-${CPU_ARCH}.img $(FW_DIR)/$(ROOTFSTARBALL)" @echo "Start qemu with following command line:" +ifeq ($(ADK_TARGET_QEMU_WITH_BOOTLOADER),y) + @echo 'qemu-system-x86_64 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 qemu-${CPU_ARCH}.img' +else @echo 'qemu-system-x86_64 ${ADK_QEMU_ARGS} -net user -net nic,model=e1000 -kernel $(FW_DIR)/$(TARGET_KERNEL) qemu-${CPU_ARCH}.img' endif endif +endif ifeq ($(ADK_TARGET_FS),initramfsarchive) imageinstall: $(FW_DIR)/$(ROOTFSUSERTARBALL) @cp $(KERNEL) $(FW_DIR)/$(TARGET_KERNEL) |