Skip to contentSkip to conversation

No subject

DISCUSSION [email protected] 1 participant 1 message Mar 17, 2008

lore
Share & tools
lore
#0 lore raw

There is a dependency on buildroot's gcc 3.4.6 that probably should be added.

As for mapping buildroot's target architectures to uMon ports, that may be unnecessary. However, the following ports are available in uMon:

adse_imx21
as3dev
csb250
csb335
csb360
csb472
csb625
csb655
fads860
ads_imx21
bf537
csb272
csb337
csb431
csb535fs
csb637
csb726
mpc852t
v4
altep2c35
csb226
csb281
csb350
csb437tl
csb536fs
csb650
evalsh2
m68en302
walnut

I'm not the best candidate to limit uMon selection to buildroot architectures that cover those ports.

Josh

Quoted 145 lines · Ulf Samuelsson
Quoted 7 lines

The following patch adds support for the Microcross Micromonitor (uMon) bootloader.
Josh

Does this work for all targets, or do we want to only enable the configuration for those targets which actually can build uMon?

Best Regards
Ulf Samuelsson

Quoted 126 lines

diff -purN buildroot/target/Config.in buildroot-umon/target/Config.in

target/Config.in 2008-03-31 22:22:09.000000000 -0700 renamed from target/Config.in 2008-03-31 00:15:26.000000000 -0700 +0 -0
@@ -19,6 +19,7 @@ source "target/x86/grub/Config.in"

source "target/x86/syslinux/Config.in"
source "target/powerpc/yaboot/Config.in"
source "target/u-boot/Config.in"
+source "target/umon/Config.in"
endmenu

menu "Kernel"
diff -purN buildroot/target/Makefile.in buildroot-umon/target/Makefile.in

target/Makefile.in 2008-03-31 22:22:30.000000000 -0700 renamed from target/Makefile.in 2008-03-31 00:15:26.000000000 -0700 +0 -0
@@ -15,6 +15,10 @@ ifeq ($(strip $(BR2_TARGET_UBOOT)),y)

include target/u-boot/Makefile.in
endif

target/Makefile.in 2008-03-31 22:22:30.000000000 -0700 renamed from target/Makefile.in 2008-03-31 00:15:26.000000000 -0700 +4 -0
+ifeq ($(strip $(BR2_TARGET_UMON)),y)
+include target/umon/Makefile.in
+endif
+
# and finally build the filesystems/tarballs
include target/*/*.mk

diff -purN buildroot/target/umon/Config.in buildroot-umon/target/umon/Config.in

target/umon/Config.in 2008-03-31 22:18:49.000000000 -0700 renamed from target/umon/Config.in 1969-12-31 16:00:00.000000000 -0800 +20 -0
@@ -0,0 +1,20 @@
+config BR2_TARGET_UMON
+ bool "Micromonitor Boot Loader"
+ default n
+ help
+   Build uMon bootloader.
+
+config BR2_TARGET_UMON_PORT
+ string "port name"
+ depends on BR2_TARGET_UMON
+ default "$(BOARD_NAME)"
+ help
+   uMon port name. This is the name of the directory under umon_ports.
+
+config BR2_TARGET_UMON_CUSTOM_PATCH
+ string "custom patch"
+ depends on BR2_TARGET_UMON
+ help
+   If your board requires a custom patch, add the path to the file here.
+   Most users may leave this empty.
+

diff -purN buildroot/target/umon/Makefile.in
buildroot-umon/target/umon/Makefile.in

target/umon/Makefile.in 2008-03-31 22:18:49.000000000 -0700 renamed from target/umon/Makefile.in 1969-12-31 16:00:00.000000000 -0800 +17 -0
@@ -0,0 +1,66 @@
+#############################################################
+#
+# umon
+#
+#############################################################
+UMON_VERSION:=sep8_2007
+UMON_SOURCE:=umon_$(UMON_VERSION).tgz
+UMON_SITE:=http://microcross.com
+UMON_PORT:=$(strip $(subst ",,$(BR2_TARGET_UMON_PORT)))
+UMON_DIR:=$(PROJECT_BUILD_DIR)/umon/umon_ports/$(UMON_PORT)
+UMON_HOST_DIR:=$(PROJECT_BUILD_DIR)/umon/umon_main/host
+UMON_PATCH_DIR:=$(PROJECT_BUILD_DIR)/umon-patches
+UMON_CAT:=$(ZCAT)
+UMON_BIN:=boot.bin
+UMON_TOP:=$(PROJECT_BUILD_DIR)/umon/umon_main
+# this is a nasty hack to get the PLATFORM variable from the makefile
+UMON_PLATFORM:=$$(grep '^PLATFORM.*=' $(UMON_DIR)/makefile | sed

's@^PLATFORM.*=@@')

target/umon/Makefile.in 2008-03-31 22:18:49.000000000 -0700 renamed from target/umon/Makefile.in 1969-12-31 16:00:00.000000000 -0800 +49 -0
+
+$(DL_DIR)/$(UMON_SOURCE):
+ $(WGET) -P $(DL_DIR) $(UMON_SITE)/$(UMON_SOURCE)
+
+$(UMON_DIR)/.unpacked: $(DL_DIR)/$(UMON_SOURCE)
+ $(UMON_CAT) $(DL_DIR)/$(UMON_SOURCE) \
+ | tar -C $(PROJECT_BUILD_DIR) $(TAR_OPTIONS) -
+ touch $@
+
+$(UMON_DIR)/.patched: $(UMON_DIR)/.unpacked
+ifneq ($(strip $(BR2_TARGET_UMON_CUSTOM_PATCH)),"")
+ @mkdir -p $(UMON_PATCH_DIR)
+ cp -dpr $(BR2_TARGET_UMON_CUSTOM_PATCH) $(UMON_PATCH_DIR)
+ toolchain/patch-kernel.sh $(PROJECT_BUILD_DIR)/umon $(UMON_PATCH_DIR) *.patch
+endif
+ touch $@
+
+$(UMON_DIR)/build_$(UMON_PLATFORM)/$(UMON_BIN): $(UMON_DIR)/.patched
+ $(MAKE) -C $(UMON_HOST_DIR) UMON_TOP=$(UMON_TOP) OSTYPE=linux install
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(UMON_DIR) UMONTOP=$(UMON_TOP)
+
+$(BINARIES_DIR)/$(UMON_BIN): $(UMON_DIR)/build_$(UMON_PLATFORM)/$(UMON_BIN)
+ cp $(UMON_DIR)/build_$(UMON_PLATFORM)/$(UMON_BIN) $(BINARIES_DIR)/$(UMON_BIN)
+
+umon: $(BINARIES_DIR)/$(UMON_BIN)
+
+umon-clean:
+ $(MAKE) -C $(UMON_DIR) clean
+
+umon-dirclean:
+ rm -rf $(UMON_DIR)
+
+umon-source: $(DL_DIR)/$(UMON_SOURCE)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_TARGET_UMON)),y)
+TARGETS+=umon
+endif
+
+umon-status:
+ @echo
+ @echo BR2_TARGET_UMON_PORT = $(BR2_TARGET_UMON_PORT)
+ @echo BR2_TARGET_UMON_CUSTOM_PATCH = $(BR2_TARGET_UMON_CUSTOM_PATCH)
+ @echo
+ @exit 0

_______________________________________________
buildroot mailing list
buildroot at uclibc.org
http://busybox.net/mailman/listinfo/buildroot