Changeset 5711f6e in mainline


Ignore:
Timestamp:
2012-09-19T21:44:01Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
40ad375
Parents:
3896974
Message:

Add configuration option to select uImage os type

NetBSD stage 2 for beagleboardxm, Linux for everything else.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • HelenOS.config

    r3896974 r5711f6e  
    615615@ "efi" GRUB for UEFI
    616616! [PLATFORM=ia32|PLATFORM=amd64] GRUB_ARCH (choice)
     617
     618% uImage OS type
     619@ "2" NetBSD stage 2 boot loader
     620! [PLATFORM=arm32&MACHINE=beagleboardxm] UIMAGE_OS (choice)
     621
     622% uImage OS type
     623@ "5" Linux kernel
     624! [PLATFORM=arm32&MACHINE!=beagleboardxm] UIMAGE_OS (choice)
  • boot/Makefile.uboot

    r3896974 r5711f6e  
    4040
    4141$(POST_OUTPUT): $(BIN_OUTPUT)
    42         $(MKUIMAGE) -name "$(IMAGE_NAME)" -laddr $(LADDR) -saddr $(SADDR) $< $@
     42        $(MKUIMAGE) -name "$(IMAGE_NAME)" -laddr $(LADDR) -saddr $(SADDR) -ostype $(UIMAGE_OS) $< $@
    4343
    4444clean:
  • tools/mkuimage.py

    r3896974 r5711f6e  
    6060        load_addr = 0
    6161        start_addr = 0
     62        os_type = 5 #Linux is the default
    6263
    6364        while len(args) >= 2 and args[0][0] == '-':
     
    7172                elif opt == 'saddr':
    7273                        start_addr = (int)(optarg, 0)
     74                elif opt == 'ostype':
     75                        os_type = (int)(optarg, 0)
    7376                else:
    7477                        print(base_name + ": Unrecognized option.")
     
    8588
    8689        try:
    87                 mkuimage(inf_name, outf_name, image_name, load_addr, start_addr)
     90                mkuimage(inf_name, outf_name, image_name, load_addr, start_addr, os_type)
    8891        except:
    8992                os.remove(outf_name)
    9093                raise
    9194
    92 def mkuimage(inf_name, outf_name, image_name, load_addr, start_addr):
     95def mkuimage(inf_name, outf_name, image_name, load_addr, start_addr, os_type):
    9396        inf = open(inf_name, 'rb')
    9497        outf = open(outf_name, 'wb')
     
    120123        header.start_addr = start_addr  # Address of entry point
    121124        header.data_crc = data_crc
    122         header.os = 2                   # NetBSD
     125        header.os = os_type
    123126        header.arch = 2                 # ARM
    124127        header.img_type = 2             # Kernel
Note: See TracChangeset for help on using the changeset viewer.