Changeset 12381
- Timestamp:
- 06/25/2009 08:48:46 PM (4 months ago)
- Files:
-
- ar5315_microredboot/microredboot/CHANGELOG (modified) (1 diff)
- ar5315_microredboot/microredboot/boot/src/misc_lzma.c (modified) (3 diffs)
- ar5315_microredboot/microredboot/boot/src/ramconfig.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ar5315_microredboot/microredboot/CHANGELOG
r12377 r12381 1 1 25.6.09 2 * fix bootcode for LSDK based devices 2 3 * add cfg partition for ubnt devices 3 4 24.6.09 ar5315_microredboot/microredboot/boot/src/misc_lzma.c
r12368 r12381 223 223 #include <lib/nvram.c> 224 224 225 typedef struct { 226 char *name; 227 char *val; 228 } t_env_var; 229 230 struct parmblock { 231 t_env_var memsize; 232 t_env_var modetty0; 233 t_env_var ethaddr; 234 t_env_var env_end; 235 char *argv[2]; 236 char text[0]; 237 }; 238 239 static void set_cmdline(void) 240 { 241 char *pcmd; 242 struct parmblock *pb; 243 pb = (struct parmblock *)0x80030000; 244 pcmd = pb->text; 245 246 pb->memsize.name = pcmd; 247 strcpy(pcmd, "memsize"); 248 pcmd += 7; 249 pb->memsize.val = ++pcmd; 250 strcpy(pcmd, "0x"); 251 pcmd += 2; 252 static char *xlate = "0123456789abcdef"; 253 int i; 254 int c = 0; 255 unsigned int val = RAM_SIZE; 256 for (i = 28; i >= 0; i -= 4) { 257 pcmd[c++] = xlate[(val >> i) & 0xf]; 258 } 259 pcmd += c; 260 pb->modetty0.name = ++pcmd; 261 strcpy(pcmd, "modetty0"); 262 pcmd += 8; 263 pb->modetty0.val = ++pcmd; 264 strcpy(pcmd, "115200,n,8,1,hw"); 265 pcmd += 15; 266 pb->ethaddr.name = NULL; 267 pb->ethaddr.val = NULL; 268 pb->argv[0] = pcmd; 269 pb->argv[1] = ++pcmd; 270 pcmd[0] = 0; //terminate, no commandline 271 272 void (*tt) (int a, char **b, void *c); 273 tt = bootoffset; 274 tt(2, pb->argv, pb); 275 276 } 277 225 278 ulg 226 279 decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p) … … 258 311 bootoffset = 0x800004bc; 259 312 resettrigger = 0; 313 puts("loading"); 314 lzma_unzip(); 315 puts("\n\n\n"); 316 return output_ptr; 260 317 } else { 261 318 flashdetect(); … … 268 325 /* important, enable ethernet bus, if the following lines are not initialized linux will not be able to use the ethernet mac, taken from redboot source */ 269 326 enable_ethernet(); 270 } 271 puts("loading"); 272 lzma_unzip(); 273 puts("\n\n\n"); 274 275 return output_ptr; 276 } 327 puts("loading"); 328 lzma_unzip(); 329 set_cmdline(); 330 } 331 } ar5315_microredboot/microredboot/boot/src/ramconfig.h
r12339 r12381 1 #define RAM_SIZE 0x2000000 2 #define AR5312 1 3 #define RESETBUTTON 0x06 1 #define RAM_SIZE 0x1000000 2 #define RESETBUTTON 0x17
