295453 |
09-Feb-2016 |
emaste |
MFC boot loader path and RBX constant deduplication
r294765 (imp)
Move all the separate copies of the same strings into paths.h. There's nothing machine specific about these.
r294765 (imp)
RBX_ defines are in rbx.h, move it there.
r294847 (imp)
Remove static from these two. They slipped through the cracks.
r294925 (imp)
Fix mistake when transitioning to the new defines with ZFS loader. I hate adding yet another define, but it is the lessor of the evil choices available. Kill another evil by removing PATH_BOOT3 and replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate.
Approved by: re (gjb) |
276486 |
31-Dec-2014 |
ngie |
MFC r264400,r265836:
r264400:
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit.
r265836:
Remove last two NO_MAN= in the tree. In both of these cases, MAN= is what is needed. |
261455 |
04-Feb-2014 |
eadler |
MFC r258779,r258780,r258787,r258822:
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result.
Similar to the (1 << 31) case it is not defined to do (2 << 30).
This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases.
A similar change was made in OpenBSD. |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
251250 |
02-Jun-2013 |
tijl |
Convert old make variable modifiers :U and :L to bmake :tu and :tl.
Reviewed by: sjg
|
238463 |
15-Jul-2012 |
imp |
Use the pin number rather than the hybrid pin number + name.
|
238188 |
07-Jul-2012 |
imp |
Generalize this for loading the loader into the SPI. Plus trim about 100 bytes from the binary with silly tricks. Hope to get this small enough to run on the models that have 4k SRAM. We are close compiled for the at91rm9200, but still need to trim for the target.
|
238187 |
07-Jul-2012 |
imp |
Allow other SOCs to be compiled in, first step.
|
238186 |
07-Jul-2012 |
imp |
Strip out the useless junk. All we really care about is the text, data and bss sections. All the rest is needed for normal binaries, but boot loaders aren't normal.
|
235988 |
25-May-2012 |
gleb |
Use 32-bit ufs_ino_t instead of ino_t to keep boot2 small and prevent unnecessary 64-bit math on 32-bit machines.
Sponsored by: Google Summer of Code 2011
|
235272 |
11-May-2012 |
imp |
Add support for passing in the board ID.
# This doesn't implement the full Linux boot ABI for arm yet. # since there's no ATAGs list passed in for r2, and r0 has # boot options rather than 0 as specified in the standard. # Commited code to the tree won't touch any of this anyway, but # future code may be able to use this.
|
235271 |
11-May-2012 |
imp |
Hack to unbreak boot2 for at91rm9200 boot loader. When the at91sam code came in, it moved things around which wound up breaking the build. We have to do this bit of a hack to avoid duplication of a lot of #defines.
|
228471 |
13-Dec-2011 |
ed |
Replace `inline static' by `static inline'.
If I interpret the C standard correctly, the storage specifier should be placed before the inline keyword. While at it, replace __inline by inline in the files affected.
|
226506 |
18-Oct-2011 |
des |
Look for /boot/config in addition to /boot.config, with the former taking precedence over the latter if it exists.
MFC after: 3 weeks
|
217663 |
20-Jan-2011 |
imp |
No need to list an obsolete arm compiler here.
|
217657 |
20-Jan-2011 |
imp |
Don't need __DYNAMIC here. it is commented out and a.out only -- these are all ELF.
|
204900 |
09-Mar-2010 |
ticso |
BWCT boards can have 128MB SDRAM.
|
204899 |
09-Mar-2010 |
ticso |
fix signed warning
|
183673 |
07-Oct-2008 |
imp |
More diff reductions against ixp425/boot2/boot2.c. This time, we bring in FIXUP_BOOT_DRV functionality as an #ifdef. This is not enabled at this time, and the md5 remains constant with this change. Apart from the 'accept any partitioning scheme on the device' changes, this was the biggest delta...
# and yes, we'll merge these into one source file if we can do that in a # way that makes sense.
Obtained from: sys/boot/arm/ixp425/boot2/boot2.c
|
183636 |
06-Oct-2008 |
imp |
Bring in the trivial differences between this code and John Hay's new code. Added a copyright for the work I did to this file a couple of years ago. Add John's copyright too, since I'm sure I'll be pulling more into this code. This also implements a new -n option to not allow breaking into the boot sequence which was original in the patch John posted (not in the original i386 code I based this boot2.c on, only the name is the same). I haven't checked to see if he did that, or if it was one of Sam's improvements.
Submitted by: jhay@
|
183635 |
05-Oct-2008 |
imp |
Remove XMODEM_DL support. It never was complete and only serves to increase the diffs with other arm boot2 loaders.
|
183634 |
05-Oct-2008 |
imp |
Indent with 8-space tabs. This reduces the diffs to the newer ixp425 boot2 and may make it easier to merge these files in the future...
|
180012 |
25-Jun-2008 |
ru |
Enable GCC stack protection (aka Propolice) for userland: - It is opt-out for now so as to give it maximum testing, but it may be turned opt-in for stable branches depending on the consensus. You can turn it off with WITHOUT_SSP. - WITHOUT_SSP was previously used to disable the build of GNU libssp. It is harmless to steal the knob as SSP symbols have been provided by libc for a long time, GNU libssp should not have been much used. - SSP is disabled in a few corners such as system bootstrap programs (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves. - It should be safe to use -fstack-protector-all to build world, however libc will be automatically downgraded to -fstack-protector because it breaks rtld otherwise. - This option is unavailable on ia64.
Enable GCC stack protection (aka Propolice) for kernel: - It is opt-out for now so as to give it maximum testing. - Do not compile your kernel with -fstack-protector-all, it won't work.
Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
|
174878 |
23-Dec-2007 |
ticso |
- remove code from oroginal file, which is not required on BWCT boards - Be more chatty on startup, since we have enough code space on AT91RM9200 - init DS1672 charging - init USART GPIO
|
174877 |
23-Dec-2007 |
ticso |
BWCT boards uses two different SPI flash chips check for both status codes
|
173040 |
26-Oct-2007 |
jhb |
Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is defined. This lets each boot program choose which version of cgbase() it wants to use rather than forcing ufsread.c to have that knowledge.
MFC after: 1 week Discussed with: imp
|
172991 |
25-Oct-2007 |
cognet |
Fix signedness to make gcc happy.
|
172952 |
25-Oct-2007 |
imp |
Load the bytes into the EMAC's MAC address register in the proper order. The kernel used to shuffle them around to get things right, but that was recently fixed. This makes our boot loader match the behavior of most other boot loaders for the atmel parts. This bug was inherited from the Kwikbyte loader that we started from.
This bug was discovered by Bj?\027.A?\027Nvrn K?\027Nvnig back in June, but fell on the floor. He provided patches to the kernel, include backwards compatibility options that were similar to Olivier's if_ate.c commit.
|
171876 |
17-Aug-2007 |
imp |
Don't pass RB_BOOTINFO to the kernel. There's no bootinfo actually passed into the kernel, and the kernel will soon grow that ability on arm.
Approved by: re@ (blanket)
|
171794 |
09-Aug-2007 |
imp |
Use the .S version for now. I have a version optimized for size p4, but I'm unsure of its provenance, so rather than add it here, revert the migration to it.
Approved by: re@ (blanket)
|
171426 |
13-Jul-2007 |
imp |
MFp4: Add support for the CENTIPAD board (http://www.harerod.de/centipad/index.html) (which is a very cool, very small ARM board) Add support for KB9202B (it has different memory) Make BOOT_FLAVOR settable Minor cleanup nits
Approved by: re@
|
168279 |
02-Apr-2007 |
imp |
Loop on sdcard init. This helps if one hasn't plugged in the card fast enough, or there's other issues that cause the first try to fail.
|
168013 |
28-Mar-2007 |
imp |
RTC_TIMR's RTC_SEC field is BCD. That makes it unsuitable for GetSeconds(). Instead, use CRTR register shifted right 15. This gives us a range of 32 seconds we can do for timeout.
Shift to using == rather than < or > for calculating the timeout, since if we can't read the ST_CTRT register twice in a second we have even bigger problems to worry about, and == deals with the 'wrap' issue.
This lets me type at the boot2 prompt again! Woo Hoo!
Bogusness noticed by: tisco Pointy Hat to: That silly imp guy
|
168012 |
28-Mar-2007 |
imp |
Since we're about to set ST_RTMR to 1 to increase the accuracy of the CRTR register to be 1/32768th of a second in init, we don't need to do it here.
|
168011 |
28-Mar-2007 |
imp |
All SD cards have a block size of 512. The READ_BL_LEN field in the CSD is usually 512 (well, 9), but for 2GB (and the rogue 4GB SD cards) it is 1024 (or 2048 for 4GB). This value doesn't work for the block read commands (which really want 512). Hardcode 512 for those. This may break really old MMC cards that don't have a 512 block size (I've never seen one: make my day and send me one :-), but since the MMC side of the house is currently broken, it should only have the effect that 2GB (and non-conforming 4GB) SD cards will work.
My 'non-conforming' 4GB SD card also works now too. The non-conforming 4GB SD cards were sold for a while before the SD association was worried they would be (a) incompatible (different FAT flavor on them) and (b) confusing for the new SDHC standard and cracked down on suppliers' bogus use of the SD trademark...
|
168007 |
28-Mar-2007 |
imp |
Various buglets fixed (from submitter):
The changes to getstr() is so that the character that is passed in to it, is also processed just as the rest. I also removed one of the getc() calls otherwise you loose every second character.
I also changed the strcpy of kname, so that it only happens if kname is '\0'. This is so that one can pass a kernel in through /boot.config.
The last change to boot2.c is in parse(). If you tried to type a kernel name to boot, the first character was lost, the arg-- fix that.
Submitted by: jhay
|
168006 |
28-Mar-2007 |
imp |
Fix problem where memcmp would return true in the case where the character after the character that was the same.
Submitted by: jhay
|
168005 |
28-Mar-2007 |
imp |
Fix off by one error in length of the string.
Submitted by: jhay
|
167586 |
15-Mar-2007 |
imp |
Remove vestiges of very specific fpga support for my company's board. It isn't relevant to FreeBSD as a whole, breaks the build, and isn't even needed for my company's boards anymore...
MFC After: 2 weeks
|
165401 |
20-Dec-2006 |
imp |
MFp4: differences for bwct ethernet attachment
|
165400 |
20-Dec-2006 |
imp |
MFp4: Differences in flash part for bwct. need a more generic way to cope.
|
165399 |
20-Dec-2006 |
imp |
MFp4: Add timeout to eeprom access for lame eeprom that go awol
|
165398 |
20-Dec-2006 |
imp |
MFp4: bwct memory size and PLL parameters
|
165397 |
20-Dec-2006 |
imp |
MFp4: bwct boot rom is different. need a more generic way to cope long term.
|
165396 |
20-Dec-2006 |
imp |
MFp4: Delay a second or two after the upload before printing Done. Add an automatic reset for remote operational luvin' goodness.
|
165395 |
20-Dec-2006 |
imp |
MFp4: bwct is a new board choice.
|
164324 |
16-Nov-2006 |
imp |
Mfp4: Remove mci_device.c. It should have been removed when it was merged ito sd-card.c, but this is an imperfect world.
|
164323 |
16-Nov-2006 |
imp |
Move to using a common arm_init.S. These things are more similar than different at this point.
|
164322 |
16-Nov-2006 |
imp |
MFp4: Don't fix the size at 8k, and some minor cleanups. andre@ contributed to fixing this problem.
|
164321 |
16-Nov-2006 |
imp |
MFp4: Improvements, including the ability to download to an arbitrary part of the spi flash.
|
164320 |
16-Nov-2006 |
imp |
Tweaks for better boot flavor support.
|
164319 |
16-Nov-2006 |
imp |
Mfp4: We no longer need ee.h included here.
|
164138 |
09-Nov-2006 |
imp |
MFp4: boot2 should now build
|
164137 |
09-Nov-2006 |
imp |
MFp4: boot on KB9202 correctly. Also, reduce the size of the SD/MMC driver somewhat.
|
164136 |
09-Nov-2006 |
imp |
MFp4: Support KB9202 booting better
|
164135 |
09-Nov-2006 |
imp |
Fix typo
|
164134 |
09-Nov-2006 |
imp |
MFp4: Make boot2 work on Kwikbyte KB9202 boards.
|
164133 |
09-Nov-2006 |
imp |
MFp4: Merge a slightly more generic build infrastructure.
|
164132 |
09-Nov-2006 |
imp |
MFp4: Remove bogus \r
|
163598 |
21-Oct-2006 |
imp |
MFp4: default to not loading the fpga
|
163597 |
21-Oct-2006 |
imp |
MFp4: Update to smaller code footprint.
|
163596 |
21-Oct-2006 |
imp |
MFp4: Move to smaller code footprint.
|
163595 |
21-Oct-2006 |
imp |
MFp4: Move to smaller code. This was somehow forgotten before.
|
163542 |
20-Oct-2006 |
imp |
There's no fpga.c, so omit it.
|
163533 |
20-Oct-2006 |
imp |
MFp4:
Massive update. The highlights: o dramatically cut memory usage by writing better, less intertwingled code. o implement booting off mmc/sd cards (sd only tested one at the moment) o start to split out board specific stuff for boot2.
|
161452 |
18-Aug-2006 |
imp |
Support compiling as part of world
|
161379 |
17-Aug-2006 |
imp |
MFp4: changes since .s -> .S rename. Use correct header for size
|
161370 |
16-Aug-2006 |
imp |
MFp4: First cut at making spi and/or sd card booting work, needs work
|
161369 |
16-Aug-2006 |
imp |
MFp4:
Tidy up a bit. Make sure that the burned image matches the downloaded one.
|
161368 |
16-Aug-2006 |
imp |
MFp4:
Simplify life a little for such a simple program.
|
161202 |
10-Aug-2006 |
imp |
MFp4: Integrate a boatload of bug fixes from p4. We're right on the 8k boundary with this program still.
text data bss dec hex filename 7925 4 4476 12405 3075 bootiic.out
so we have like 293 bytes left before we have to play games. There may be ways to reduce that somewhat, but they start to be very board specific.
|
161199 |
10-Aug-2006 |
imp |
MFp4:
Reach over into the arm tree to grab some at91 definitions. Better warnings Lots of build tweaks
|
161198 |
10-Aug-2006 |
imp |
MFp4: remove obsolete files
|
161197 |
10-Aug-2006 |
imp |
MFp4: Remove obsolete files in list Add spi flash reading routines
|
161196 |
10-Aug-2006 |
imp |
MFp4: Numerous changes from p4 to try to improve tftp downloading, reduce code footprint, etc. While some problems still remain, the reliability of tftp is much improved.
|
161195 |
10-Aug-2006 |
imp |
MFp4: consolidate #include files down to lib.h
|
161194 |
10-Aug-2006 |
imp |
MFp4: These will migrate to the boot specific directories because they are too hard to share between the different boot loaders.
|
161193 |
10-Aug-2006 |
imp |
MFp4: Make it clearer that the address passed to the eeprom routines is really an offset within the eeprom device, and not a IIC address.
|
161192 |
10-Aug-2006 |
imp |
MFp4: Catchup with migration of some defines.
|
161191 |
10-Aug-2006 |
imp |
MFp4: Tweaks for our board.
|
161190 |
10-Aug-2006 |
imp |
MFp4: Increase character timeout to 10. Make it a #define for easier changes in the future. This helps with getting started and to overcome the really sucky level of granuality this timeout has in getc. A timeout of 1 means 'wait until top of next second' rather than 'wait for at least a second'.
|
157940 |
21-Apr-2006 |
imp |
MFp4: Make getc(0) polling (this has the happy side effect of saving 8 bytes in the generated code).
|
157939 |
21-Apr-2006 |
imp |
MFp4: Loop forever getting characters... A kludge for now.
|
157938 |
21-Apr-2006 |
imp |
MFp4: Integrate support for building tag support for linux booting.
|
157937 |
21-Apr-2006 |
imp |
MFp4: Init eeprom here now that we don't init the eeprom in arm_init.s and read in the second 8k of the data. Tweak formatting.
|
157936 |
21-Apr-2006 |
imp |
Move from arm_init.s -> .S. #ifdef linux vs freebsd defaults for the boot loader (linux booting helps regression testing). No repo copy because of limited history.
|
157926 |
21-Apr-2006 |
imp |
MFp4: formatting nits and minor style changes that likely won't matter.
|
157925 |
21-Apr-2006 |
imp |
Allow one to enable building tags. Check the size of the boot imag.
|
157924 |
21-Apr-2006 |
imp |
MFp4:
On the KB9202 go ahead and enable the flash controller so the boot loader can access the parallel flash.
|
157921 |
21-Apr-2006 |
imp |
MFp4:
Make this compile, assuming that you have linux installed in a sensible place. tag_list is disabled by default, since we don't distribute linux, but it is desirable to allow the boot loader to boot Linux or FreeBSD (mostly for testing).
|
157918 |
21-Apr-2006 |
imp |
MFp4: Minor diffs to reduce diffs to p4.
|
157917 |
21-Apr-2006 |
imp |
spi flash updating boot loader. upload this file for the recovery xmodem download. Then download the image you want in the flash. This will burn the image into the flash. You must then reset the unit and the new flash image will be used for booting...
|
157916 |
21-Apr-2006 |
imp |
iic eeprom updating boot loader. upload this file for the recovery xmodem download. Then download the image you want in the eeprom. This will burn the image into the eeprom. You must then reset the unit and the new eeprom image will be used for booting...
|
157915 |
21-Apr-2006 |
imp |
Add boot0iic and boot0spi. These are 'shortcut' boot loaders designed to replace either a bad iic eeprom with one you download with xmodem, or likewise with a spi flash.
|
157873 |
19-Apr-2006 |
imp |
MFp4 (checkpoint of work in progress):
o Use a directory layout that is more akin to the i386 boot layout. o Create a libat91 for library routines that are used by one or more of the boot loaders. o Create bootiic for booting from an iic part. o Create bootspi for booting from an spi part. o Optimize the size of many of these routines (especially emac.c). Except for the emac.c optimizations, all these have been tested. o eliminate the inc directory, libat91 superceeds it. o Move linker.cfg up a layer to allow it to be shared.
|
157765 |
15-Apr-2006 |
imp |
Fix style nit noticed by bde.
|
157733 |
13-Apr-2006 |
imp |
Add commented out define for TSC board's boot0.
|
157732 |
13-Apr-2006 |
imp |
MFp4:
For 32-bit SDRAM systems, enable D16 to D31 in the PIO controller. Otherwise they read back as 0xffff.
Shave 8 bytes from the object size by using AT91C_BASE_PIOA directly and by not assigning PIO_BSR to 0 in the DBGU init. That's a nop in two ways (everything defaults to peripheral A, and writing 0 changes nothing).
|
157731 |
13-Apr-2006 |
imp |
Merge from p4:
Many places used #define FOO ((unsigned int) 0x23) where a simpler #define FOO 0x23u would have sufficed. This practice is overly verbose and has the disadvantage that you can't say
#if FOO == BAR #endif
because the extra "unsigned int" tokens choke cpp's little brain. Migrate to the latter style to allow use in preprocessor statements. The two are the same semantically anyway in a C context (at least for the uses they are put to presently, C gurus can explain to me how they differ).
|
157730 |
13-Apr-2006 |
imp |
Need at91rm9200_lowlevel.h for SDRAM_BASE definition.
|
157699 |
12-Apr-2006 |
imp |
Common register definition for AT91RM9200
|
157697 |
12-Apr-2006 |
imp |
Recovery boot loader for the AT91 family of processors. Download it via xmodem to the DBGU port when the AT91 comes up in recovery mode. The recovery loader will then load your program via xmodem into SDRAM at 1MB which can do its things. It needs to be tweaked to the specific board one is using, but it fits in < 1kB (all of Atmel's ARM products have at least 8kb of SRAM that I can tell, so this should work for them all).
Parts of this code were provided by Kwikbyte with copyright specifically disclaimed. I heavily modified it to act as a recovery loader (before it was a bootstrap loader) and to optimize for size (before I started the size was closer to 8k).
Bootstrap loaders for SPI and IIC to follow.
|