Home | History | Annotate | Download | only in altboot
History log of /src/sys/arch/sandpoint/stand/altboot/main.c
RevisionDateAuthorComments
 1.34  22-Sep-2022  riastradh sandpoint: Teach altboot to handle 9.99.100 modules.

Not tested, but something here will be necessary to make it work, and
the same change does work in x86 efiboot.
 1.33  23-Mar-2021  rin Make this compile with -DDEBUG.
 1.32  23-Mar-2021  rin Make sure not to run kernel if fdloadfile() fails;
it returns *non-zero* value on error.
 1.31  26-Jun-2019  christos branches: 1.31.10; 1.31.12;
make this compile again
 1.30  26-Jun-2019  pgoyette Similar to changes made for x86, allow for the boot-loader to auto-push
a list of modules for file-system support. This allows, for example,
booting from an ext2fs file-system when the kernel has no built-in ufs
or ext2fs modules.

XXX Untested, as I have no sandpoint hardware. I'd appreciate it if
XXX someone with hardware can build and test.
 1.29  08-Feb-2018  dholland branches: 1.29.4;
Typos.
 1.28  11-Jun-2016  dholland PR 51200 gets in libsa considered harmful: use kgets
 1.27  30-Sep-2015  phx Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
 1.26  05-Aug-2014  joerg branches: 1.26.2; 1.26.4;
Don't use non-literal strings as format strings.
XXX Switch to strlcpy.
 1.25  26-Mar-2014  christos branches: 1.25.2;
fix sprintf.
 1.24  22-Mar-2014  jakllsch drop trailing whitespace
 1.23  05-Jan-2014  jakllsch sprinkle const
 1.22  25-Dec-2012  phx branches: 1.22.2;
Add a DEBUG function to search the Flash for byte-streams, as U-Boot usually
doesn't offer a search function.
 1.21  21-May-2012  dsl branches: 1.21.2;
Remove the code that tries to load the "ffs" kernel module during boot.
This is in line with the core decision than even modular kernels should
contain the ffs code.
I've left in the code that tries to load "nfs" and "ext2fs", but it
isn't clear that is necessary.
Removes a warning message that (usually) flashes past to fast to read.
AFAICT all the relevant kernels contain ffs (and nfs for that matter).
 1.20  27-Apr-2012  nisimura Comment improvement. altboot(8) is now aware of the disk removal
for mirrored drive configuration.
 1.19  26-Apr-2012  phx Multiple boot devices and/or paths may be specified, which are booted one
after another until success. When no boot device is specified altboot tries
to boot from all disk devices with a valid NetBSD disklabel, starting with
unit 0.
 1.18  16-Apr-2012  phx Improved Synology CS/RS support: watch power-state of all SATA drives before
initializing them, configure drive LEDs to reflect SATA activity.
Configure drives on all ATA PCI devices, not only on the first one.
 1.17  22-Jan-2012  phx branches: 1.17.2;
Support PATA drive configuration option (ide:N[N...]).
Wait until drives are ready after cold-start.
Wake up drives from standby mode.
A default command line can be saved to flash as initrd image.
 1.16  01-Jan-2012  phx Handle devices with two network interfaces (e.g. a DSM-G600 with stge(4)
and ath(4)).
 1.15  06-Nov-2011  phx branches: 1.15.4;
Added a test terminal for communicating with the satellite microcontroller.
When compiled with DEBUG option it can be entered by typing 'C'.
 1.14  25-Apr-2011  phx branches: 1.14.4; 1.14.6;
Also scan for PCI_CLASS_RAID, when looking for disk devices.
 1.13  20-Mar-2011  phx The DSM-G600 U-Boot is so restricted that there is no possibility to pass
any bootargs. So we will just do the default multiuser boot from wd0: when
altboot was started together with a Linux initrd image.
 1.12  13-Mar-2011  phx With the new boot argument "altboot" the program can replace itself with a
new binary while running.
The default boot path was changed from nfs: to wd0:.
Bumped altboot version to 1.7.
 1.11  13-Mar-2011  phx Enter interactive mode, when a key is pressed within two seconds.
 1.10  12-Mar-2011  phx Introduced an optional shutdown function for all network interfaces.
This is needed to stop a NIF and make it return to a known state. A running
NIF may cause all sorts of bad effects, like for example making it impossible
to reboot a board without a hardware-reset function.
 1.9  06-Mar-2011  phx Suport for loading a kernel from memory (RAM, ROM or Flash).
The boot file path should look like "mem:<address>", where <address> is
the start address, in hex notation, of the file in memory.
 1.8  06-Mar-2011  phx branches: 1.8.2;
New experimental driver for SundanceIT ST1023 / IP1000+ NICs.
PHY initialization, media select and MAC address are working, but I found no
way to make the chip transmit any frame yet (although it clears the DONE flag).

Moved DSK_DECL to globals.h, where NIF_DECL already was.
 1.7  26-Feb-2011  phx branches: 1.7.2;
Build altboot.img, which fakes a Linux kernel module, loadable with "bootm",
for extremely stripped U-Boot firmware. Arguments are passed through the
"bootargs" environment variable, which is detected automatically when
using bootm.
The startup code also fixes a bug in bootm, which doesn't flush the cache
before running the image.
 1.6  10-Feb-2011  nisimura - some rework for PCI device enumeration.
- allow dual IDE/SATA devices.
- fix a typo of D-Link #define.
 1.5  27-Jan-2011  phx Debugging output is only visible when DEBUG is defined.
 1.4  26-Jan-2011  nisimura one more twist to complete newvers_stand.sh transition. Include timestamp
in banner.
 1.3  26-Jan-2011  phx bootprog_maker and bootprog_date are missing since we switched to the
MI newvers_stand.sh script. Remove the refering information line.
 1.2  23-Jan-2011  nisimura switch to use newvers_stand.sh as suggested by joerg@
 1.1  23-Jan-2011  nisimura change bootloader name to "altboot". bump version and add README.
 1.7.2.4  31-May-2011  rmind sync with head
 1.7.2.3  21-Apr-2011  rmind sync with head
 1.7.2.2  05-Mar-2011  rmind sync with head
 1.7.2.1  26-Feb-2011  rmind file main.c was added on branch rmind-uvmplock on 2011-03-05 20:51:47 +0000
 1.8.2.2  06-Mar-2011  bouyer Sync with HEAD
 1.8.2.1  06-Mar-2011  bouyer file main.c was added on branch bouyer-quota2 on 2011-03-06 15:07:55 +0000
 1.14.6.5  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.6.4  23-Jan-2013  yamt sync with head
 1.14.6.3  23-May-2012  yamt sync with head.
 1.14.6.2  17-Apr-2012  yamt sync with head
 1.14.6.1  10-Nov-2011  yamt sync with head
 1.14.4.2  06-Jun-2011  jruoho Sync with HEAD.
 1.14.4.1  25-Apr-2011  jruoho file main.c was added on branch jruoho-x86intr on 2011-06-06 09:06:35 +0000
 1.15.4.3  02-Jun-2012  mrg sync to latest -current.
 1.15.4.2  29-Apr-2012  mrg sync to latest -current.
 1.15.4.1  18-Feb-2012  mrg merge to -current.
 1.17.2.1  03-Jun-2012  jdc Pull up revisions:
src/sys/arch/i386/stand/lib/exec.c revision 1.50
src/sys/arch/sandpoint/stand/altboot/main.c revision 1.21 via patch
src/sys/lib/libsa/ext2fs.c revision 1.13
src/sys/lib/libsa/ffsv1.c revision 1.6
src/sys/lib/libsa/ffsv2.c revision 1.6
src/sys/lib/libsa/globals.c revision 1.9
src/sys/lib/libsa/lfsv1.c revision 1.5
src/sys/lib/libsa/lfsv2.c revision 1.5
src/sys/lib/libsa/stand.h revision 1.76
src/sys/lib/libsa/ufs.c revision 1.58
(requested by dsl in ticket #279).

Remove the code that tries to load the "ffs" kernel module during boot.
This is in line with the core decision than even modular kernels should
contain the ffs code.
I've left in the code that tries to load "nfs" and "ext2fs", but it
isn't clear that is necessary.
Removes a warning message that (usually) flashes past to fast to read.
AFAICT all the relevant kernels contain ffs (and nfs for that matter).
 1.21.2.3  03-Dec-2017  jdolecek update from HEAD
 1.21.2.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.21.2.1  25-Feb-2013  tls resync with head
 1.22.2.1  18-May-2014  rmind sync with head
 1.25.2.1  10-Aug-2014  tls Rebase.
 1.26.4.2  09-Jul-2016  skrll Sync with HEAD
 1.26.4.1  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.26.2.1  16-Jan-2016  snj Pull up following revision(s) (requested by phx in ticket #1059):
sys/arch/sandpoint/include/bootinfo.h: revision 1.9
sys/arch/sandpoint/stand/altboot/brdsetup.c: revisions 1.36, 1.37
sys/arch/sandpoint/stand/altboot/dsk.c: revision 1.18
sys/arch/sandpoint/stand/altboot/globals.h: revisions 1.20, 1.21
sys/arch/sandpoint/stand/altboot/main.c: revision 1.27
sys/arch/sandpoint/stand/altboot/siisata.c: revision 1.6
sys/arch/sandpoint/stand/altboot/version: revision 1.8
The disk's unittag is not equal to the channel, so we need an additional
unitchan entry to make lba_read() work in all cases.
The libsa-printf() does not seem to support 64-bit output, so cast the
block number to unsigned when printing an error message.
--
Pass a name and flags precisely describing the current model and its
features via a new bootinfo node (currently Synology only). This allows
for example the configuration of model-specific temperature I2C sensors
and fan control.
Support for the Synology DS207 and DS209 drive LEDs and wait until the
2nd drive is completely powered up.
--
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.
 1.29.4.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.31.12.1  03-Apr-2021  thorpej Sync with HEAD.
 1.31.10.1  03-Apr-2021  thorpej Sync with HEAD.

RSS XML Feed