Revert wrongly commited files (u-boot changes) from -r25617
authorThiago A. Corrêa <thiago.correa@gmail.com>
Wed, 11 Mar 2009 21:40:00 +0000 (21:40 -0000)
committerThiago A. Corrêa <thiago.correa@gmail.com>
Wed, 11 Mar 2009 21:40:00 +0000 (21:40 -0000)
target/device/Atmel/arch-arm/u-boot/2009.01/u-boot-2009.01-009-factory.patch
target/u-boot/Makefile.in

index adbc03bed3f332413ccef37e9c89b97704528be3..7d1c958dcda967cfaf0f5eec53b1182f51399504 100644 (file)
@@ -109,8 +109,8 @@ diff -urN u-boot-2009.01-0rig//common/cmd_factory.c u-boot-2009.01/common/cmd_fa
 +      setenv("fs-date",       MK_STR(DATE));
 +      setenv("rd",            "rootfs.arm-"MK_STR(DATE)".ext2");
 +#endif
-+#if   defined(KERNEL_NAME)
-+      setenv("linux",         MK_STR(KERNEL_NAME));
++#if   defined(KERNEL_VERSION)
++      setenv("linux",         MK_STR(BOARD_NAME)"-linux-"MK_STR(KERNEL_VERSION)"-"MK_STR(DATE)".gz");
 +#endif
 +      setenv("get-ramdisk",   "tftp   ${ramdisk}      ${rd};          setenv rd-size  ${filesize}");
 +      setenv("store-ramdisk", "cp.b   ${ramdisk}      ${FS}           ${rd-size}");
@@ -243,17 +243,32 @@ diff -urN u-boot-2009.01-0rig//common/cmd_factory.c u-boot-2009.01/common/cmd_fa
 +
 +int do_os (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 +{
-+#if defined(KERNEL_NAME)
-+      setenv("linux", MK_STR(KERNEL_NAME));
-+#else
-+      setenv("linux", "uImage");
-+#endif
-+      return 0;
++      char *kchip;
++      char *kdate;
++      char *kver;
++      char cmd[512];
++      kchip = getenv("hostname");
++      kdate = getenv("kernel-date");
++      kver = getenv("kernel-version");
++      if((strlen(kdate) + strlen(kver) + 32) >  500) {
++              printf("Error: Environment too large during 'os': ");
++              printf("len=%d\n", strlen(kdate) + strlen(kver) + 32);
++      } else if(kver != NULL) {
++              if(kdate != NULL) {
++                      sprintf(cmd,"%s-linux-%s-%s.gz",kchip,kver,kdate);
++              } else {
++                      sprintf(cmd,"%s-linux-%s.gz",kchip,kver);
++              }
++              printf("Setting kernel to %s\n",cmd);
++              setenv("linux",cmd);
++              return 0;
++      }
++      return 1;
 +}
 +
 +U_BOOT_CMD(
 +      os,     1,      1,      do_os,
-+      "os\t- Select linux version\n"
++      "os\t- Select linux version  ${hostname}-linux-${kernel-name}-${kernel-date}\n"
 +      ,       "\n"
 +);
 +
index 53d9dff0ce0b9be98fc5d823c5e1b7a90fa739ef..be889a07617d226fecb03474dfb2e9098e4c42f4 100644 (file)
@@ -111,7 +111,6 @@ ifdef BR2_TARGET_UBOOT_DEFAULT_ENV
        @echo "#ifndef __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE)
        @echo "#define __BR2_ADDED_CONFIG_H" >> $(U_BOOT_INC_CONF_FILE)
        $(call insert_define, DATE, $(DATE))
-       $(call insert_define, KERNEL_NAME, $(LINUX26_KERNEL_NAME))
        $(call insert_define, CONFIG_LOAD_SCRIPTS, 1)
 ifneq ($(strip $(BR2_PROJECT)),"")
        $(call insert_define, CONFIG_HOSTNAME, $(BR2_PROJECT))