{"id":21195547,"url":"https://github.com/eantcal/spidyboot","last_synced_at":"2025-07-10T04:30:27.019Z","repository":{"id":35312291,"uuid":"39573768","full_name":"eantcal/spidyboot","owner":"eantcal","description":"This is a tool to create or modify SPI bootable images for Freescale PowerPC spi/flash devices.","archived":false,"fork":false,"pushed_at":"2019-10-31T23:00:38.000Z","size":49,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-03-03T01:34:47.825Z","etag":null,"topics":["flash-device","freescale","freescale-powerpc-spi","linux","macos","macosx","spi","tool","windows"],"latest_commit_sha":null,"homepage":"https://www.eantcal.eu","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eantcal.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-23T15:00:31.000Z","updated_at":"2022-05-26T09:46:55.000Z","dependencies_parsed_at":"2022-09-18T20:31:38.181Z","dependency_job_id":null,"html_url":"https://github.com/eantcal/spidyboot","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eantcal%2Fspidyboot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eantcal%2Fspidyboot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eantcal%2Fspidyboot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eantcal%2Fspidyboot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eantcal","download_url":"https://codeload.github.com/eantcal/spidyboot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225618177,"owners_count":17497473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flash-device","freescale","freescale-powerpc-spi","linux","macos","macosx","spi","tool","windows"],"created_at":"2024-11-20T19:28:46.612Z","updated_at":"2024-11-20T19:28:47.488Z","avatar_url":"https://github.com/eantcal.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n================================================================================ \n README\n\n spidyboot - (C) 2012-2017 - Antonino Calderone antonino.calderone@gmail.com\n================================================================================ \n \n This is a tool to write SPI bootable images for Freescale PowerPC SPI flash\n device.\n\n================================================================================ \n\n The spidyboot utility can take the following flags and arguments:\n\n   --help | --ver  | --show \n   --bin \u003csrc_binary_file\u003e --cfg \u003ccfg_file\u003e --dat \u003cdat_file\u003e \n [ --prb \u003cpreamble_file\u003e ] \n [ --spi -s \u003cbootcode_file\u003e -d \u003cspiboot_file\u003e | --patch \u003cspiboot_file\u003e ] \n [ --addr \u003cbaddr\u003e \u003cnewaddr\u003e ]\n [ --tga \u003ctrgaddr\u003e ] [ --sra \u003csrcaddr\u003e ] [ --exe \u003cexeaddr\u003e ] \n\n================================================================================ \n\n Use \"--help\" to show help message.\n\n================================================================================ \n\n Use \"--ver\" to show program version.\n\n================================================================================ \n\n Use \"--show\" to print the preamble content. \n\n================================================================================ \n\n Use \"--bin \u003csrc_binary_file\u003e\" to read the preamble from a binary \n file (\u003csrc_binary_file\u003e).\n\n================================================================================ \n\n Use \"--cfg \u003ccfg_file\u003e\" to modify the preamble by using data read from a \n DRAM config file.\n\n You may use \"Component DDR for QorIQ - DDR Controller Configuration Utility\"\n provided by Freescale (R) NetComm utility to generate a memory initialization\n file (.cfg).  \n\n An example of generated ddrCtrl_1.cfg file is the following one:\n \n 8\u003c ----------------------------------------------------------------------------\n\n  ##################################################\n  # ProcessorExpert DDR Tool memory initialization #\n  ##################################################\n\n   # DDR Controller 1 Registers\n\n   # DDR_SDRAM_CFG\n   writemem.l 0xFE008110 0x670C0000\n\n   # CS0_BNDS\n   writemem.l 0xFE008000 0x3F\n\n   # CS0_CONFIG\n   writemem.l 0xFE008080 0x80014302\n\n   # CS0_CONFIG_2\n   writemem.l 0xFE0080C0 0x00\n\n   # TIMING_CFG_3\n   writemem.l 0xFE008100 0x01031000\n\n   # TIMING_CFG_0\n   writemem.l 0xFE008104 0x00330104\n\n   # TIMING_CFG_1\n   writemem.l 0xFE008108 0x98912733\n\n   # TIMING_CFG_2\n   writemem.l 0xFE00810C 0x010860D3\n\n   # DDR_SDRAM_CFG_2\n   writemem.l 0xFE008114 0x24000012\n\n   # DDR_SDRAM_MODE\n   writemem.l 0xFE008118 0x40061650\n\n   # DDR_SDRAM_MODE_2\n   writemem.l 0xFE00811C 0x8040C000\n\n   # DDR_SDRAM_MD_CNTL\n   writemem.l 0xFE008120 0x00000000\n\n   # DDR_SDRAM_INTERVAL\n   writemem.l 0xFE008124 0x2DAE0100\n\n   # DDR_DATA_INIT\n   writemem.l 0xFE008128 0xDEADBEEF\n\n   # DDR_SDRAM_CLK_CNTL\n   writemem.l 0xFE008130 0x00800000\n\n   # DDR_INIT_ADDR\n   writemem.l 0xFE008148 0x00000000\n\n   # DDR_INIT_EXT_ADDR\n   writemem.l 0xFE00814C 0x00000000\n\n   # TIMING_CFG_4\n   writemem.l 0xFE008160 0x01\n\n   # TIMING_CFG_5\n   writemem.l 0xFE008164 0x3400\n\n   # DDR_ZQ_CNTL\n   writemem.l 0xFE008170 0x89080600\n\n   # DDR_WRLVL_CNTL\n   writemem.l 0xFE008174 0x85049400\n\n   # DDR_SR_CNTR\n   writemem.l 0xFE00817C 0x00000000\n\n   # DDR_WRLVL_CNTL_2\n   writemem.l 0xFE008190   0x00000000\n\n   # DDR_WRLVL_CNTL_3\n   writemem.l 0xFE008194   0x00000000\n\n   # DDRCDR_1\n   writemem.l 0xFE008B28 0x00000000\n\n   # DDRCDR_2\n   writemem.l 0xFE008B2C 0x00000000\n\n   # ERR_SBE\n   writemem.l 0xFE008E58 0x00010000\n\n   #delay before enable\n   sleep 500\n   #DDR_SDRAM_CFG\n   writemem.l 0xFE008110 0xE70C0000\n\n   # wait for DRAM data initialization\n   sleep 1000\n\n 8\u003c ----------------------------------------------------------------------------\n\n================================================================================\n\n  Use parameter --dat \u003cdat_file\u003e to modify the preamble by using data read \n  from a DAT file.\n  DAT file format is a list of pairs with syntax \u003coffset\u003e:\u003cvalue\u003e\n  where \u003coffset\u003e is the position in the preamble, and \u003cvalue\u003e is the \n  corresponding value that will be patched.\n\n  An example of .dat file is following one:\n\n 8\u003c ----------------------------------------------------------------------------\n\n  040:424f4f54\n  044:00000000\n  048:00080000\n  04c:00000000\n  050:00001000\n  054:00000000\n  058:11000000\n  05c:00000000\n  060:1107f000\n  064:00000000\n  068:00000017\n\n  080:ff702110\n  084:470c0008\n  088:ff702000\n  08c:0000003f\n  090:ff702080\n  094:80014302\n  098:ff702100\n  09c:00030000\n  0a0:ff702104\n  0a4:00110104\n  0a8:ff702108\n  0ac:6f6b8644\n  0b0:ff70210c\n  0b4:0fa888cf\n  0b8:ff702114\n  0bc:24401000\n  0c0:ff702118\n  0c4:00441420\n  0c8:ff702124\n\n8\u003c -----------------------------------------------------------------------------\n\n  Some .dat files are provided with \"MentorEmbedded / boot-format\" tool\n  See https://github.com/MentorEmbedded/boot-format to obtain more information\n\n================================================================================ \n\n  Use \"--prb \u003cpreamble_file\u003e\" to save the preamble in the file \u003cpreamble_file\u003e.\n\n================================================================================ \n\n  Use \"--spi -s \u003cbootcode_file\u003e -d \u003cspiboot_file\u003e\" to create a spi-flash image: \n  \u003cspiboot_file\u003e = preamble + \u003cbootcode_file\u003e.\n\n================================================================================ \n\n  Use \"--patch \u003cspiboot_file\u003e\" to patch the preamble of an existing \n  spi-flash image.\n\n================================================================================ \n\n  Use \"--addr \u003cbaddr\u003e \u003cnewaddr\u003e\" to replace the base address \u003cbaddr\u003e with \n  new value \u003cnewaddr\u003e.\n\n================================================================================ \n\n  Use \"--tga \u003ctrgaddr\u003e\" to replace the default target address with new \n  value \u003ctrgaddr\u003e.\n\n================================================================================ \n\n  Use \"--sra \u003csrcaddr\u003e\" to replace the default source address with new \n  value \u003csrcaddr\u003e.\n\n================================================================================ \n\n  Use \"--exe \u003cexeaddr\u003e\" to replace the default exe start address with new \n  value \u003cexeaddr\u003e.\n\n================================================================================\n\n EXAMPLES:\n\nTo print a default preamble type:\n\n         $ ./spidyboot --show\n\n         0x40- 0x43 BOOT signature      :  0x42 0x4f 0x4f 0x54 == 'BOOT' OK\n         0x48- 0x4B User's code length  :  0x00080000 (524288 bytes - 512 Kb)\n         0x50- 0x53 Source Address      :  0x00000400\n         0x58- 0x5B Target Address      :  0x11000000\n         0x60- 0x63 Exe Start Address   :  0x1107f000\n         0x68- 0x6B N.of Adr/Data pairs :  0x00000000 (0)\n\n \n To write a default preamble into a binary file and show it you may use \n the following command:\n\n\n         $ ./spidyboot --show --prb preamble.bin\n\n         0x40- 0x43 BOOT signature      :  0x42 0x4f 0x4f 0x54 == 'BOOT' OK\n         0x48- 0x4B User's code length  :  0x00080000 (524288 bytes - 512 Kb)\n         0x50- 0x53 Source Address      :  0x00000400\n         0x58- 0x5B Target Address      :  0x11000000\n         0x60- 0x63 Exe Start Address   :  0x1107f000\n         0x68- 0x6B N.of Adr/Data pairs :  0x00000000 (0)\n\n\n\n To generate a spi-flash boot image by using information of .cfg file (ddrCtrl_1.cfg) \n and an image of u-boot (u-boot.bin) you may use the following command:\n\n\n         $ ./spidyboot --spi -s u-boot.bin -d spi_u-boot.bin --cfg ddrCtrl_1.cfg\n\n\n To generate a spi-flash boot image by using information of .dat file (ddr2cfg.dat) \n and an image of u-boot (u-boot.bin) you may use the following command:\n\n\n         $ ./spidyboot --spi -s u-boot.bin -d spi_u-boot.bin --dat ddr2cfg.dat\n\n\n Appending --show parameter to the last commands you can also dump the preamble \n content:\n\n         $ ./spidyboot --spi -s u-boot.bin -d spi_u-boot.bin --cfg ddrCtrl_1.dat --show\n\n          0x40- 0x43 BOOT signature      :  0x42 0x4f 0x4f 0x54 == 'BOOT' OK\n          0x48- 0x4B User's code length  :  0x00080000 (524288 bytes - 512 Kb)\n          0x50- 0x53 Source Address      :  0x00000400\n          0x58- 0x5B Target Address      :  0x11000000\n          0x60- 0x63 Exe Start Address   :  0x1107f000\n          0x68- 0x6B N.of Adr/Data pairs :  0x00000016 (22)\n          0x080-0x087 addr[ 0]@0xff702110 := 0x470c0008\n          0x088-0x08f addr[ 1]@0xff702000 := 0x0000003f\n          0x090-0x097 addr[ 2]@0xff702080 := 0x80014302\n          0x098-0x09f addr[ 3]@0xff702100 := 0x00030000\n          0x0a0-0x0a7 addr[ 4]@0xff702104 := 0x00110104\n          0x0a8-0x0af addr[ 5]@0xff702108 := 0x6f6b8644\n          0x0b0-0x0b7 addr[ 6]@0xff70210c := 0x0fa888cf\n          0x0b8-0x0bf addr[ 7]@0xff702114 := 0x24401000\n          0x0c0-0x0c7 addr[ 8]@0xff702118 := 0x00441420\n          0x0c8-0x0cf addr[ 9]@0xff702124 := 0x0c300100\n          0x0d0-0x0d7 addr[10]@0xff702128 := 0xdeadbeef\n          0x0d8-0x0df addr[11]@0xff702130 := 0x03000000\n          0x0e0-0x0e7 addr[12]@0xff702160 := 0x00000001\n          0x0e8-0x0ef addr[13]@0xff702164 := 0x02401400\n          0x0f0-0x0f7 addr[14]@0xff702170 := 0x89080600\n          0x0f8-0x0ff addr[15]@0xff702174 := 0x8675f608\n          0x100-0x107 addr[16]@0xff702084 := 0x00000000\n          0x108-0x10f addr[17]@0x40000001 := 0x00000100\n          0x110-0x117 addr[18]@0xff702110 := 0xc70c0008\n          0x118-0x11f addr[19]@0xff700c08 := 0x00000000\n          0x120-0x127 addr[20]@0xff700c10 := 0x80f0001d\n          0x128-0x12f addr[21]@0xefefefef := 0x00000000\n\n If you want modify an existing spi-flash boot image you have to use --patch \n paramter instead of --spi. You may replace all the preamble content or\n modify one of source address, target address, exe start address.\n You may also replace the base address used in the assignment list.\n All the command line parameters may be combined in order to do all \n those things.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feantcal%2Fspidyboot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feantcal%2Fspidyboot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feantcal%2Fspidyboot/lists"}