diff --git a/embed/bootloader/bootui.c b/embed/bootloader/bootui.c index 95787ba1..a5723075 100644 --- a/embed/bootloader/bootui.c +++ b/embed/bootloader/bootui.c @@ -182,7 +182,7 @@ void ui_screen_install_confirm_upgrade(const vendor_header * const vhdr, const i void ui_screen_install_confirm_newvendor(const vendor_header * const vhdr, const image_header * const hdr) { display_bar(0, 0, DISPLAY_RESX, DISPLAY_RESY, COLOR_WHITE); - display_text(16, 32, "Re-install firmware", -1, FONT_NORMAL, COLOR_BLACK, COLOR_WHITE, 0); + display_text(16, 32, "Vendor change", -1, FONT_NORMAL, COLOR_BLACK, COLOR_WHITE, 0); display_bar(16, 44, DISPLAY_RESX - 14 * 2, 1, COLOR_BLACK); display_icon(16, 54, 32, 32, toi_icon_info + 12, sizeof(toi_icon_info) - 12, COLOR_BLACK, COLOR_WHITE); display_text(55, 70, "Install firmware by", -1, FONT_NORMAL, COLOR_BLACK, COLOR_WHITE, 0); diff --git a/tools/binctl b/tools/binctl index 95979408..16250f40 100755 --- a/tools/binctl +++ b/tools/binctl @@ -232,11 +232,8 @@ class VendorHeader(object): return header def sign(self, sigmask, signature): - if sigmask >= (1 << self.vsig_n): - raise Exception('signature index is higher than vsig_n (%d)' % self.vsig_n) - if bin(sigmask).count('1') != self.vsig_m: - raise Exception('invalid number of indexes (vsig_m expected %d, got %d)' % (self.vsig_m, bin(sigmask).count('1'))) - # sign + header = self.serialize_header(sig=False) + assert len(header) == self.hdrlen self.sigmask = sigmask self.sig = signature