irclog2html for blob on 2001.09.04

00:07:20Sammymornong ...
07:21:40erikmmorning
07:21:59erikmis in lurk mode, so don't expect answers
07:55:32Russyou have 24hr remaining....
08:05:44erikmno, 48hr
16:53:31erikmre *
16:54:14erikmRuss: I've given up the hope that we'll get a working demo ;)
16:54:46erikmRuss: so tomorrow I'l start digging up my own working "plan B" demos
17:41:20Russerikm: bummer
17:41:45erikmRuss: what, the demos?
17:42:13Russyah
17:44:31erikmRuss: I don't care, the guy that had to write a crucial part of the system started too late and didn't want listen to our advice
17:45:56erikmoh, btw, the cs89x0 will be done in linux-2.5
17:46:05erikmcs89x0 rewrite, I mean
17:46:16Russwe still need to work on the fixed up version a bit
17:46:46erikmyeah, this morning I found out that it really doesn't want to work with 2.4.8-ac12-rmk1-np1
17:46:57Russits broken in many places
17:50:42erikmbtw, the ethernet address is easy: just do what SUN and SGI machines do: use part of the machine serial number as ethernet address
17:51:12erikmand we already *have* ATAG nodes for serial numbers
17:51:42Russor just keep it in the paramater block
17:51:47Russer
17:51:53Russthe actual address that is
17:52:04Russserial number node?
17:52:08erikmyep
17:52:13Russchar serial[16]?
17:52:23erikmATAG_SERIAL
17:52:32erikmu32 low and ure high
17:52:38RussI mean in blob
17:52:45erikmlike I said in the comments: "64 bits should be enough for everybody"
17:52:51erikmno, I mean in the kernel
17:53:04Russwhere do you store it in the flash? it goes in the kernel?
17:54:16erikmmake a paramater tag for the serial number. if there is a serial number parameter tag, we pass it to the kernel by issuing an ATAG_SERIAL node
17:54:29Russso you want it to just be u32
17:54:31erikmsame for board revision, that might also be handy
17:54:36RussI would think char[16]
17:54:43erikmno, that would be a waste
17:55:03Russwhy?
17:55:20erikmwhy put it in chars when we can encode it in a 64 it entity?
17:56:06Russsimplicity
17:56:21erikmif you make it the same as the kernel expects it to be, you can very easily make issue an ATAG_SERIAL node to the kernel
17:56:36erikmthat's what I think is simplicity
17:56:39Russok
17:56:52erikmand really: 64 bit *is* enough
17:57:02RussI thought you said u32
17:57:12erikmstruct tag_serialnr {
17:57:12erikm        u32 low;
17:57:12erikm        u32 high;
17:57:12erikm};
17:57:17erikm2x u32
17:57:22Russah
17:57:59Russis it ATAG_SERIAL, or ATAG_SERIALNR
17:58:42erikmATAG_SERIAL
17:58:54erikmsee include/asm-arm/setup.h
17:59:11Russ#define PTAG_SERIAL(PTAG_MAGIC | 0xA)
17:59:11Russstruct ptag_serialnr {
17:59:11Russu32 low;
17:59:11Russu32high;
17:59:11Russ};
17:59:45erikm(I documented the various ATAG_* nodes, so I almost know them by heart :)
18:00:05Russso far I have 10 nodes
18:00:36erikmand while you're at it: also make a PTAG_REVISION node:
18:00:39erikmstruct tag_revision {
18:00:39erikm        u32 rev;
18:00:39erikm};
18:00:49erikmthat is for the board revision number
18:01:00Russdoes that have an associated ATAG?
18:01:15erikmyes, ATAG_REVISION
18:01:33erikmit's an u32, but that's nice for alignment
18:03:25erikmso what's the idea about the PTAG_REVISION node? do something like this in linux.c:
18:03:42Russ?
18:03:53erikmif((node == ptag_get_node(PTAG_REVISION))) {
18:04:05erikm    issue_atag_revsion_node()
18:04:06erikm}
18:05:08Russthere is no ptag_get_node at the moment
18:05:32RussI was just going to parse it and add it to a global, but that creates the problem of not knowing if its set
18:07:25Russwhich would you rather have?
18:07:44erikmI think that parsing the list at the moment you realy need it is good. in that case you can also change the values before you boot
18:07:54erikmlike "set serial=42"
18:08:00RussI could just do this:
18:08:22Russstatic int parse_ptag_serialnr(const struct ptag *ptag)
18:08:22Russ{
18:08:22Russblob_status.serialnr = ptag;
18:08:22Russreturn 0;
18:08:22Russ}
18:08:23Russ__ptagtable(PTAG_SERIAL, parse_ptag_serialnr);
18:08:35Russif (blob_status.serialnr) {
18:08:45Russ    issue_atag_revision_node()
18:08:46Russ}
18:10:55Russright now, the ptag list is a "preboot" thing, it well (eventually) controll the loading of the kernel/ramdisk and getting tags ready, etc
18:11:13erikmbtw, how are you going to change the parameter list?
18:11:18Russbefore booting, it would still do the "autoboot" ... thing
18:11:40Russyou mean the hdr part of it?
18:14:12erikmno, suppose I want to save a different default command line. how are you going to write that to flash?
18:15:59Russrun your config through the external parser, download and flash it
18:16:59erikmhmm
18:17:18erikmwhy can't blob safe it's setting itself?
18:17:51Russwas trying to keep it simple
18:18:34erikmwell, I think this is too simple
18:19:24Russok, I'll see what I can do then
18:19:58erikmI think you shouldn't put the parameter list into the blob binary, but put it somewhere in the flash. at 64K boundary, for example
18:20:10Russit is in the flash
18:20:23Russthere are 4 paramater blocks on the tuxscreen flash
18:20:28RussI put it on the last paramater bolck
18:20:29Russer
18:20:29Russblock
18:21:00erikmso why do we need all that linker magic if the parameters are not in the blob binary?
18:21:16Russto tell the kernel where the paramater block is
18:22:49erikmkernel?
18:22:51Russwhich linker magic?
18:23:22erikmthe .ptaglist ELF section
18:23:39Russoh, to simplify the function list that handles ptags
18:24:00erikmoh, ok
18:24:10erikmI see, just like linux __init functions
18:24:21Russlike, if you have ptags that initialize a net device, all that needs to be done is link those .o's in
18:24:26Russno #ifdefs in the parsing
18:24:53erikmBTW, I'm going to rewrite the command parser to use the same kind of magic
18:24:54Russthe splash screen patch is an example of that
18:25:23Russgood
18:25:39Russbecause the way you want to rewrite the paramater block on the fly, it will need that
18:26:15Russnote that there may be more than one command line in the paramater block, and you need to select which "config" you want to modify
18:26:37erikmhmm. just thinking about it: I think we should copy the parameter block to RAM and use that copy to play with
18:26:52Russright now I'm not, but its an easy change
18:27:32erikmif you want to save it, you just say "save parameters" and only at that point the list is cleaned up (dead nodes thrown out, duplicates removed, etc) and saved to flash
18:28:33Russyou would need to do the cleanup as paramater are changed I would think
18:29:23erikmno. I think you'll need a PTAG_DEAD node that indicates that the current node is no longer active and the parser should ignore it and continue with the next node. only when you want to save it back to flash, you should clean up the list
18:29:47Russwell
18:29:48erikmbecause in most cases you only want to make temporary changes from the default configuration that you're not going to save anyway
18:29:51Russa tag can grow
18:30:39erikmno, don't let it grow. just copy it to the end of the list and modify it, and mark the old one as DEAD
18:30:46erikmmakes your code a lot easier
18:30:46Russwith some tags, the order matters
18:31:33erikmlike?
18:31:49Russ/* check a GPIO */
18:31:50Russ#define PTAG_GPIO(PTAG_MAGIC | 8)
18:31:50Russstruct ptag_gpio {
18:31:50Russu32 mask;
18:31:50Russu32level;
18:31:50Russ};
18:33:02erikmwhat's that for? to see if a certain key is pressed or so?
18:33:19Russor maybe if there is a pcmcia card inserted
18:33:32Russor the flash_ext thing on the lart
18:33:52Russthere are lots of reasons you'd want to boot differently based an a gpio
18:35:46Russas well as other things, such as if configuring a net device succeeds, or a tftp retrieval, etc
18:37:38erikmhmm
18:37:57erikmI'm really going to think about it over the weekend
18:38:00Russ/* what to do with the config bits */
18:38:00Russu8fail_set;
18:38:00Russu8fail_clear;
18:38:00Russu8pass_set;
18:38:00Russu8pass_clear;
18:38:35Russthen each tag has a config mask, and config, so if config & tagmask == tagconfig
18:38:40Russthen the tag is proccessed
18:39:18Russwhen it returns, it looks at the return value, and the fail/pass masks, and modifies the config accordingly
18:42:02Russalso, reloading the config from another location can probably be done (ie, jffs2, tftp)
18:43:35erikmok, makes sense, just like we discussed with rmk
18:44:26RussI think that most (probably all) tags you'd want to change from blob won't require anything complex
18:45:31Russeither that, or we just link blob tighter with the host
18:45:50Russso if you want to change stuff, the host does it transparently
18:46:33erikmI think you see the parameter list as something static that is only set at compile time, while in my opinion it is very dynamic
18:46:47Russits not set at compile time
18:47:01Russits a seperate entity, like the kernel or ramdisk
18:47:16erikmI agree that we need some default settings, but you should be able to change it and  save it to flash at  all times
18:47:17Russmaybe it could be seperated into two halves
18:47:39erikmjust like the bootproms for SUN or SGI machines
18:47:59Russnot familar with those
18:50:12RussI see giving the boot process intellegence that is generated by a program on the host, a boot process to follow
18:50:50erikmRuss: I really like the SUN proms because they are completely written in Forth. every card comes with a small EPROM with some forth code to initialise the card, and it also has some test programs and settings
18:51:39erikmso you just put a SCSI SBUS card in the machine, you cd to the correct device node, and run the diag program over there
18:52:01Russhmm
18:52:31erikmthe main prom also has some stuff in it, like "scsi-probe-all" which probes all scsi devices on all scsi cards
18:53:00erikmand setting variables is very easy: set boot-device disk1
18:53:38Russso there are some basic paramaters that are settable
18:53:47Russand there are some other processes that just happen
18:54:23erikmwell, you can actually set whatever parameter you like, but not all parameters make sense
18:54:55erikmthings like "set the=meaning-of-life-the-universe-and-everything=42" is nice, but doesn't buy you anything
18:56:01Russso you would only have a fixed set of boot logic, and choose one? (ala: C:, A:, SCSI)
18:56:31erikmthe machine boots by calling all init procedures for the complete device tree (so a bus bridge will get initialised before the scsi device) and after that calling the boot procedure from the boot device
18:56:54erikmyou can boot from any device that implements the boot function
18:58:24erikmthat's called OpenPROM, btw, or IEEE 1275. the PCI SIG should have made that mandatory for PCI devices
18:58:30Russso a bootfunction at its core would be kernel, ramdisk (optional), and cmdline
18:59:52erikmafaik the disk driver boot function loads a couple of blocks from a magic part of the disk and gives control to it (SILO, for sparc-linux), the network driver implements it as bootp+tftp
19:00:25RussI'm talking with blob
19:00:51Russseems to static for blob to me, too many cases in blob, like if you have a CF card, net card, and your own flash
19:00:53erikmoh, sorry %-)
19:01:11Russand you want to try the CF, then tftp, then flash
19:01:49erikmoh, but openprom allows you to do so. remember: it's a forth interpreter, so you can write forth programs to control the boot proces :)
19:02:07Russwhich is what the paramater tags are
19:02:17Russbasically a program to control the boot process
19:02:26erikmyes and no
19:02:50erikmin some way it controls the boot process, in other ways it just contains parameters
19:03:17Russright, but those paramaters can vary based on which tags succeded/failed (ie, cmdline)
19:03:51Russah
19:03:57erikmsome of them, yes. others not.
19:04:06Russeach boot medium has a paramater lists that tells how to boot it
19:04:32erikmthat's only *one* of the uses of the parameter list
19:04:35Russhmm...or
19:04:53erikmwe only want to be able to set the for example the serial speed with it
19:05:13Russterminal speed is in the core tag
19:05:50Russbecause it needs to be read before the rest of the list is parsed (and before the memory map thing is done)
19:12:30Russmaybe i could make a set of N paramater lists
19:12:51Russand the action of a certain tag could jump to another list
19:12:51erikmmaybe you'd better discuss it on the LART list
19:13:12erikmthat would be an idea, yeah
19:13:47RussI'll brainstorm how to do that best
19:15:50erikmjust write down your ideas. it forces you to think about it, and it will give other an opportunity to comment
19:19:16erikms/other/others/
19:20:52Russanyway, class
19:21:35erikmyeah, home
19:21:46erikmor better: bed
19:21:53erikmbye

Generated by irclog2html.pl by Jeff Waugh - find it at freshmeat.net! Modified by Tim Riker to work with infobot logs, split per channel and by date, etc.